modified Set up Claude Code for your organization View current →
--- a/admin-setup.md +++ b/admin-setup.md @@ -83,7 +83,7 @@ [Managed policy CLAUDE.md](</docs/en/memory#deploy-organization-wide-claude-md>)| Organization-wide behavioral guidance for Claude rather than a client-enforced rule| File at the managed policy path [MCP server control](</docs/en/managed-mcp>)| Restrict which MCP servers users can add or connect to, deploy a fixed set, or provide remote servers to every user alongside their own| `allowedMcpServers`, `deniedMcpServers`, `allowManagedMcpServersOnly`, `managedMcpServers`, or a deployed `managed-mcp.json` file [Plugin marketplace control](</docs/en/plugins/org#restrict-what-users-can-install>)| Restrict which marketplace sources users can add and install from, and reject the CLI flags that sideload plugins, agents, and MCP servers for a single run. Block [`command` plugin sources](</docs/en/plugins/marketplace-reference#command-plugin-source>), and allowlist which marketplaces’ plugins can be suggested in the terminal| `strictKnownMarketplaces`, `blockedMarketplaces`, `disableSideloadFlags`, `disableCommandPluginSources`, `pluginSuggestionMarketplaces` -[Customization lockdown](</docs/en/settings-reference#strictpluginonlycustomization>)| Block skills, agents, hooks, and MCP servers from user and project sources, so they can only come from plugins or managed settings. Locking skills also stops the [skills your developers enable on claude.ai](</docs/en/skills#where-synced-skills-load>) from syncing| `strictPluginOnlyCustomization` +[Customization lockdown](</docs/en/settings-reference#strictpluginonlycustomization>)| Block skills, agents, hooks, and MCP servers from user and project sources. Locking skills also stops the [skills your developers enable on claude.ai](</docs/en/skills#where-synced-skills-load>) from syncing| `strictPluginOnlyCustomization` [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`
modified Escalate hard decisions with the advisor tool View current →
--- a/advisor.md +++ b/advisor.md @@ -1,4 +1,4 @@ -The advisor tool is experimental and requires the Anthropic API. It is not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry. Behavior, pricing, and availability may change. +The advisor tool is experimental and requires the Anthropic API or [Claude Platform on AWS](</docs/en/claude-platform-on-aws>). On Claude Platform on AWS, it requires Claude Code v2.1.300 or later. It isn’t available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Behavior, pricing, and availability may change. The advisor tool lets Claude consult a second, typically stronger model at key moments during a task, such as before committing to an approach, when stuck on a recurring error, or before declaring a task complete. The advisor receives the full conversation, including every tool call and result, and returns guidance that Claude applies before continuing. The advisor runs server-side on Anthropic’s infrastructure as a [server tool](<https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool>), available to both subscription and API-billed accounts. You choose which model acts as the advisor, and Claude decides when to call it. This page covers how to enable the advisor, which model pairings are accepted, what Claude shows during a consultation, and how advisor usage is billed. @@ -174,11 +174,10 @@ Requirements -The advisor tool requires all of the following: - - * **Anthropic API only** : the advisor is a server-executed tool. It is not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry. Through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, availability depends on whether the gateway forwards the request intact to the Anthropic API. If the gateway or its upstream doesn’t recognize the advisor tool, see [Automatic retry and error forwarding](</docs/en/llm-gateway-protocol#automatic-retry-and-error-forwarding>) for how Claude Code responds. + * **Provider** : the Anthropic API or [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), not Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. On Claude Platform on AWS, the advisor requires Claude Code v2.1.300 or later. + * **LLM gateway** : through an [LLM gateway](</docs/en/llm-gateway>) configured with `ANTHROPIC_BASE_URL`, availability depends on whether the gateway forwards the request intact to the Anthropic API. If the gateway or its upstream doesn’t recognize the advisor tool, see [Automatic retry and error forwarding](</docs/en/llm-gateway-protocol#automatic-retry-and-error-forwarding>) for how Claude Code responds. * **Supported main model** : Fable, Opus 4.6 or later, Sonnet 4.6 or later, Haiku 4.5, or Haiku 5.5. See Choose an advisor model for which advisors each accepts. - * **Feature-flag fetching** : Claude Code turns the advisor on through a feature flag it fetches from Anthropic. In a session where a variable that turns flag fetching off is set, such as `DISABLE_TELEMETRY`, the advisor stays off. See [Features that need feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>). + * **Feature-flag fetching** : unless you’re on Claude Platform on AWS, the advisor needs a feature flag fetched from Anthropic. A session with a variable that turns fetching off, such as `DISABLE_TELEMETRY`, doesn’t have that flag. To check your session, see [which sessions skip the fetch or start without the flag](</docs/en/env-vars#features-that-need-feature-flag-fetching>). ##
modified How the agent loop works View current →
--- a/agent-loop.md +++ b/agent-loop.md @@ -230,7 +230,7 @@ If you don’t set `effort`, Claude Code resolves the effort level itself, in the order [Adjust effort level](</docs/en/model-config#adjust-effort-level>) describes. -`effort` trades latency and token cost for reasoning depth within each response. [Extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) is a separate feature that produces `thinking` blocks in the output, and the `display` field on `ThinkingConfig` for [Python](</docs/en/agent-sdk/python#thinkingconfig>) or [TypeScript](</docs/en/agent-sdk/typescript#thinkingconfig>) controls whether you receive their text. They are independent: you can set `effort: "low"` with extended thinking enabled, or `effort: "max"` without it. +`effort` trades latency and token cost for reasoning depth within each response. [Extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) produces `thinking` blocks in the output, and the `display` field on `ThinkingConfig` for [Python](</docs/en/agent-sdk/python#thinkingconfig>) or [TypeScript](</docs/en/agent-sdk/typescript#thinkingconfig>) controls whether you receive their text. Use lower effort for agents doing simple, well-scoped tasks, such as listing files or running a single grep, to reduce cost and latency. Set `effort` in the top-level `query()` options for the [session](</docs/en/sub-agents#choose-an-effort-level>), or per subagent with the `effort` field on [`AgentDefinition`](</docs/en/agent-sdk/subagents#agentdefinition-configuration>) to override the session level.
modified Manage multiple agents with agent view View current →
--- a/agent-view.md +++ b/agent-view.md @@ -143,7 +143,15 @@ Row summaries -The one-line summary in each row is generated by a [Haiku-class model](</docs/en/model-config>) so the row can tell you what the session is doing, what it needs, or what it produced without opening the transcript. While a session is actively working, the row text updates at most once every 15 seconds from the session’s own recent output without sending a model request, and the model writes a fresh summary when each turn ends. A working row shows what the session says it’s doing, and a blocked row shows the question it’s asking. During a long turn, the model also rewrites the summary every few minutes so a busy row doesn’t keep showing an outdated one. The summary text fills the row’s remaining width; open the peek panel to read a sentence the terminal edge clips. When the list is grouped by directory, the summary opens with the session’s state as a colored word, such as `Needs input · double jump or wall climb?`. In the default state grouping, the group header already names the state, so the row shows only the summary. The end-of-turn summary and each mid-turn rewrite are one short Haiku-class request through your normal provider, billed and handled under the same [data usage terms](</docs/en/data-usage>) as the session itself. The 15-second updates between model rewrites reuse the session’s own output and don’t send a request. On a third-party provider or gateway with no Haiku-class model configured, the request uses the session’s main model instead; set [`ANTHROPIC_DEFAULT_HAIKU_MODEL`](</docs/en/model-config#environment-variables>) to choose one. +The one-line summary in each row is generated by a [Haiku-class model](</docs/en/model-config>) so the row can tell you what the session is doing, what it needs, or what it produced without opening the transcript. While a session is actively working, the row text updates at most once every 15 seconds from the session’s own recent output without sending a model request, and the model writes a fresh summary when each turn ends. A working row shows what the session says it’s doing, and a blocked row shows the question it’s asking. During a long turn, the model also rewrites the summary every few minutes so a busy row doesn’t keep showing an outdated one. The summary text fills the row’s remaining width; open the peek panel to read a sentence the terminal edge clips. When the list is grouped by directory, the summary opens with the session’s state as a colored word, such as `Needs input · double jump or wall climb?`. In the default state grouping, the group header already names the state, so the row shows only the summary. + +#### + +​ + +Cost of row summaries + +The end-of-turn summary and each mid-turn rewrite are one short request through your normal provider, billed and handled under the same [data usage terms](</docs/en/data-usage>) as the session itself. On a third-party provider or gateway, summaries use the model you set in [`ANTHROPIC_DEFAULT_HAIKU_MODEL`](</docs/en/model-config#environment-variables>). With it unset, they use your provider’s model for background tasks: see [Amazon Bedrock](</docs/en/amazon-bedrock#4-pin-model-versions>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai#5-pin-model-versions>), [Microsoft Foundry](</docs/en/microsoft-foundry#4-pin-model-versions>), or your [gateway](</docs/en/llm-gateway-protocol#requests-and-defaults-by-connection-method>). ###
modified Share session output as artifacts View current →
--- a/artifacts.md +++ b/artifacts.md @@ -60,7 +60,7 @@ ---|--- The session is in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>)| Asks before the first publish of each artifact The publish declares runtime capabilities for the page, such as connector calls or file downloads| Asks before that publish -You shared the artifact publicly| Asks once per conversation before changing it +You shared the artifact publicly| Asks once per conversation before changing it, and before each reply to a comment on it Claude publishes in a turn that a [session-scoped scheduled task](</docs/en/scheduled-tasks>) firing in your session started, rather than a prompt you typed| Asks before the first publish of each artifact Claude can’t read the file without your approval| Asks before publishing it. An allow rule for the `Artifact` tool doesn’t skip this prompt In [Manual](</docs/en/permission-modes>) or `acceptEdits` mode, Claude makes a small change to an artifact’s file it can’t edit without your approval, such as a project file in Manual mode| Asks before publishing the change. You’re asked even if an allow rule covers the `Artifact` tool, because the edit to the file needs your approval @@ -80,6 +80,22 @@ Anyone with the page open sees the update in place. Each publish becomes a version, and from the **Share** control in the page header you can choose which version viewers see. To update an artifact from a different session, give Claude its URL, or attach it with `/artifacts`. Without either, a new session creates a new artifact instead of updating one. Update https://claude.ai/code/artifact/5fbea6f3-... with today's numbers. + +### + +​ + +Turn off one-step artifact updates + +A one-step update is a small change Claude makes to an artifact’s file as part of a publish, instead of through an `Edit` or `Write` call. To turn one-step updates off, set [`CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS`](</docs/en/env-vars>) to `0`. This example adds the variable to the `env` block in `~/.claude/settings.json`: + + { + "env": { + "CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS": "0" + } + } + +Then quit and relaunch Claude Code, because a running session doesn’t reread the variable. ## @@ -105,6 +121,7 @@ A new artifact is visible only to you. To share it, open the artifact in your browser and use the **Share** control in the page header. The header also links to your gallery at [claude.ai/code/artifacts](<https://claude.ai/code/artifacts>), which lists every artifact you have created. Viewers in your organization can see who published the page: on an artifact shared within your organization, your name is in the title menu, and on a public artifact it’s in the page header for signed-in viewers in your organization. A viewer who opens a public link without signing in, or from outside your organization, sees the label `Content is user-generated and unverified.` instead of your name. Who you can share with depends on your plan: * **Within your organization** : on Team and Enterprise plans, grant access to specific people in your organization, or to everyone in it. Viewers sign in to claude.ai as members of your organization to see the page. + * **People with access to a shared folder** : on Team and Enterprise plans, move the artifact to a folder that you own or are an editor of. Move it from the [Artifacts page](<https://claude.ai/artifacts>), which is available if you can use claude.ai chat. Everyone with access to the folder can then open it, and the folder’s owner and editors can change it. * **Publicly** : share a link that anyone on the internet can open, with no claude.ai sign-in required. On Team and Enterprise plans, public sharing is off until an Owner enables it for the organization. ###
modified Auto mode classifier request charges View current →
--- a/auto-mode-classifier-billing.md +++ b/auto-mode-classifier-billing.md @@ -28,7 +28,7 @@ * **Requests** : to let the checks through, the gateway forwards both the `anthropic-beta` header and the `safeguards` body field unchanged, because [the two travel as a pair](</docs/en/llm-gateway-protocol#beta-header-and-body-field-pairs>). On the [Amazon Bedrock InvokeModel format](</docs/en/llm-gateway-protocol#api-formats>), it forwards the `anthropic_beta` body field in place of the header. * **Responses** : the gateway returns responses and streaming events without dropping fields or rewriting tool-use IDs. To let the checks’ results through, it keeps the `safeguard_results` field. -A gateway that passes traffic through this way keeps working with this feature and with future ones. New sessions then use the server’s checks again. If you already know that your gateway can’t provide the server’s checks, tell Claude Code not to ask for them there by setting `CLAUDE_CODE_AUTO_MODE_SERVER` to `0` before you start the session, in your shell or in the [`env` settings key](</docs/en/settings-reference#env>): +Once your gateway does this, new sessions use the server’s checks again. If you already know that your gateway can’t provide the server’s checks, tell Claude Code not to ask for them there by setting `CLAUDE_CODE_AUTO_MODE_SERVER` to `0` before you start the session, in your shell or in the [`env` settings key](</docs/en/settings-reference#env>): export CLAUDE_CODE_AUTO_MODE_SERVER=0
modified Configure auto mode View current →
--- a/auto-mode-config.md +++ b/auto-mode-config.md @@ -168,7 +168,7 @@ Claude Code scans in the background, then shows you the draft. You accept or discard it as a whole, so edit `~/.claude/settings.json` afterwards to adjust single entries. When you accept, Claude Code writes the draft and reconciles it with the settings you already have: - * Claude Code writes the `environment` list without `"$defaults"`, because the draft spells out the built-in entries it left unchanged + * If you chose to add to the `environment` list in `~/.claude/settings.json`, you keep any `"$defaults"` entry in it. If you chose to replace that list, you lose that entry, so add `"$defaults"` back if you want the default entries * Claude Code includes `"$defaults"` in each of the `allow`, `soft_deny`, and `hard_deny` lists the draft adds entries to, unless you already wrote an `allow` list without it, so the built-in rules you haven’t replaced stay in effect * After saving, Claude Code offers to remove `permissions.allow` rules in `~/.claude/settings.json` that auto mode ignores, such as `Bash(*)`, or that auto-approve destructive commands @@ -212,7 +212,7 @@ Three additional fields let you replace the classifier’s built-in rule lists: - * `autoMode.hard_deny`: unconditional security boundaries + * `autoMode.hard_deny`: actions to block even when the user asks for them * `autoMode.soft_deny`: destructive actions that user intent can clear * `autoMode.allow`: exceptions to soft block rules @@ -223,7 +223,7 @@ * `allow` rules then override matching `soft_deny` rules as exceptions. * Explicit user intent overrides the remaining soft blocks: if the user’s message directly and specifically describes the exact action Claude is about to take, the classifier allows it even when a `soft_deny` rule matches. -General requests don’t count as explicit intent. Asking Claude to “clean up the repo” doesn’t authorize force-pushing, but asking Claude to “force-push this branch” does. To loosen, add to `allow` when the classifier repeatedly flags a routine pattern the default exceptions don’t cover. To tighten, add to `soft_deny` for destructive risks specific to your environment that the defaults miss, or to `hard_deny` for security boundaries that must never be crossed. To keep the built-in rules while adding your own, include the literal string `"$defaults"` in the array. The default rules are spliced in at that position, so your custom rules can go before or after them, and you continue to inherit updates as the built-in list changes across releases. The following example keeps the defaults in all four lists and adds organization-specific rules to each. +General requests don’t count as explicit intent. Asking Claude to “clean up the repo” doesn’t authorize force-pushing, but asking Claude to “force-push this branch” does. To loosen, add to `allow` when the classifier repeatedly flags a routine pattern the default exceptions don’t cover. To tighten, add to `soft_deny` for destructive risks specific to your environment that the defaults miss, or to `hard_deny` for actions to block even when the user asks for them. To keep the built-in rules while adding your own, include the literal string `"$defaults"` in the array. The default rules are spliced in at that position, so your custom rules can go before or after them, and you continue to inherit updates as the built-in list changes across releases. The following example keeps the defaults in all four lists and adds organization-specific rules to each. { "autoMode": { @@ -239,7 +239,7 @@ "soft_deny": [ "$defaults", "Never run database migrations outside the migrations CLI, even against dev databases", - "Never modify files under infra/terraform/prod/: production infrastructure changes go through the review workflow" + "Running terraform apply in infra/terraform/prod/ needs an explicit request: production infrastructure changes go through the review workflow" ], "hard_deny": [ "$defaults",
modified Claude apps gateway for Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry View current →
--- a/claude-apps-gateway.md +++ b/claude-apps-gateway.md @@ -275,7 +275,7 @@ Some organizations number their internal network from a public IPv4 block they own, such as a carrier’s own address space or a legacy `/8`, so their gateway has no private address. List those blocks in the `gatewayInternalNetworks` managed setting. `/login` then accepts a gateway inside a listed block when the developer’s machine connects to it from an address inside the same block. This requires Claude Code v2.1.268 or later on the developer machine; earlier versions ignore the key and apply the private-address rule. -`gatewayInternalNetworks` is for internal networks that happen to be numbered from public address space. It doesn’t make it safe to expose a gateway to the internet: a trusted gateway can push settings that run commands on developer machines.Keep the gateway unreachable from outside your network with your firewall or load balancer rules. Set the gateway’s [`access_control.allow_cidrs`](</docs/en/claude-apps-gateway-config#http-tuning>) to the same blocks you declare here, so the gateway itself refuses clients from anywhere else. Behind a load balancer or ingress, set `listen.trusted_proxies` to that front end as well, because the gateway otherwise matches `allow_cidrs` against the front end’s own address rather than the developer’s. +`gatewayInternalNetworks` is for internal networks that happen to be numbered from public address space. It doesn’t make it safe to expose a gateway to the internet: a trusted gateway can push settings that run commands on developer machines.Keep the gateway unreachable from outside your network with your firewall or load balancer rules. Set the gateway’s [`access_control.allow_cidrs`](</docs/en/claude-apps-gateway-config#http-tuning>) to the same blocks you declare here. If a load balancer or ingress [belongs in `listen.trusted_proxies`](</docs/en/claude-apps-gateway-config#listen>), list it there as well, because the gateway otherwise matches `allow_cidrs` against the frontend’s own address rather than the developer’s. Add the key to the same managed settings source as the login keys: the managed settings file, MDM profile, or registry policy. Claude Code ignores it in user, project, and server-managed settings. This example declares one block. Replace `203.0.113.0/24` with your own block. It is a documentation range, and Claude Code refuses those.
modified Claude apps gateway configuration View current →
--- a/claude-apps-gateway-config.md +++ b/claude-apps-gateway-config.md @@ -59,7 +59,9 @@ `port`| No| Bind port. Default `8080`. `public_url`| Unless `host` is loopback| The externally visible `https://` origin, used to build the IdP `redirect_uri` and discovery metadata. Required whenever `host` isn’t a loopback address, whether TLS terminates at a proxy such as an ALB, Ingress, or Cloud Run or at the gateway itself through `tls`, because the gateway never derives its own origin from `X-Forwarded-*` headers; they are client-spoofable. Boot fails without it. `trusted_proxies` below governs client-IP resolution only. Also required to enable telemetry, because the gateway builds the OTLP endpoint it pushes to clients from this URL. `tls.cert` / `tls.key`| No| PEM paths if the gateway terminates TLS itself -`trusted_proxies`| No| CIDRs or IPs of load balancers in front of the gateway. When set, the gateway trusts `X-Forwarded-For` only from these peers and records the real client IP for per-IP rate limiting and audit. Equivalent to nginx `set_real_ip_from`. `X-Forwarded-For` entries written as `ipv4:port` or `[ipv6]:port`, as some load balancers do, are read with the port dropped. An IPv6 address with a port appended and no brackets may be read as a different address or not read at all, so turn off the port option on any proxy that writes that form. +`trusted_proxies`| No| CIDRs or IPs of the frontends to trust. When set, the gateway trusts `X-Forwarded-For` only from these peers and records the real client IP for per-IP rate limiting and audit. + +List a frontend in `trusted_proxies` only if the last `X-Forwarded-For` entry that it passes on is one that no developer wrote. List no address or range that developers connect from. A frontend that appends the address of each connection it receives qualifies. One that passes the header on as developers send it doesn’t. `X-Forwarded-For` entries written as `ipv4:port` or `[ipv6]:port`, as some load balancers do, are read with the port dropped. An IPv6 address with a port appended and no brackets may be read as a different address or not read at all. Turn off the port option on any proxy that writes that form. ### @@ -1501,7 +1503,7 @@ * **At boot** : a warning in the operational log recommends allowing only the private ranges `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, `100.64.0.0/10`, `127.0.0.0/8`, `::1/128`, and `fc00::/7`, plus any other internal ranges your developers connect from. If you bind the gateway to a loopback address and set neither `trusted_proxies` nor `public_url`, as in local development, the warning doesn’t appear. * **At runtime** : the first time a request arrives from an address outside those private ranges, the gateway logs a warning and emits an [`access.public_client` audit event](</docs/en/claude-apps-gateway-deploy#logs>) carrying the client IP. Both fire once per process. Link-local addresses, `169.254.0.0/16` and `fe80::/10`, don’t count as public. The gateway answers `/healthz` and `/readyz` before this check runs, so health probes from public ranges don’t trigger it. -Both signals use the client address as the gateway resolves it. If a load balancer, port-forward, or tunnel relays traffic and isn’t listed in `listen.trusted_proxies`, the gateway sees the relay’s address, which is usually private, so neither the runtime warning nor a private allow list catches traffic relayed through it. Behind such a front end, set `listen.trusted_proxies` first so the gateway sees real client addresses, and keep the gateway and everything in front of it unreachable from the public internet regardless. +Both signals use the client address as the gateway resolves it. If a load balancer, port-forward, or tunnel relays traffic and isn’t listed in `listen.trusted_proxies`, the gateway sees the relay’s address, which is usually private, so neither the runtime warning nor a private allow list catches traffic relayed through it. If the relay belongs in `listen.trusted_proxies`, list it there. Keep the gateway and everything in front of it unreachable from the public internet regardless. ###
modified Claude apps gateway deployment and operations View current →
--- a/claude-apps-gateway-deploy.md +++ b/claude-apps-gateway-deploy.md @@ -125,7 +125,7 @@ Sign-in is rate limited per client IP address, and the defaults suit a small team. Each address gets 30 sign-in starts and 10 code submissions every 10 minutes. A rollout to thousands of developers can reach those limits on the first morning, for one of two reasons: - * **The gateway can’t see past your load balancer.** Without [`listen.trusted_proxies`](</docs/en/claude-apps-gateway-config#listen>), every developer appears to come from the load balancer’s address and shares one limit. Set it before anything else. The gateway logs a warning the first time it ignores an `X-Forwarded-For` header. + * **The gateway can’t see past your load balancer.** Without [`listen.trusted_proxies`](</docs/en/claude-apps-gateway-config#listen>), every developer appears to come from the load balancer’s address and shares one limit. The gateway logs a warning the first time it ignores an `X-Forwarded-For` header. If the load balancer [belongs in `listen.trusted_proxies`](</docs/en/claude-apps-gateway-config#listen>), list it before you change anything else. If developers still share one address, raise [`rate_limits`](</docs/en/claude-apps-gateway-config#http-tuning>). * **Many developers share a few NAT or VPN egress addresses.** They share those addresses’ limits even when `trusted_proxies` is right. Raise [`rate_limits`](</docs/en/claude-apps-gateway-config#http-tuning>) to fit. To size `max`, divide the developers by the egress addresses they share. Estimate how many of those sign in within one `window_seconds` period, which is 10 minutes by default. Then double it to cover retries and developers who sign in to both Claude Code and Claude Desktop. For example, 10,000 developers behind 4 egress addresses sign in evenly over an hour. That is 2,500 developers per address and about 420 of them in each 10 minutes, which you double and round up to 1,000. The example below sets both limits to 1,000: @@ -425,7 +425,7 @@ Startup shows `Gateway login is configured in managed settings, but this Claude Code build does not include Cloud gateway support.`| The installed Claude Code build predates gateway support| Have the developer update Claude Code to a release that includes Cloud gateway support Startup exits with `Administrator policy requires a Cloud gateway sign-in on this machine`| The developer’s environment sets `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN`, their settings configure an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>), or an API key from an earlier Claude Console login is still saved| Have the developer clear each that applies: unset the variable, remove the `apiKeyHelper` entry, or run `claude auth logout` to remove the saved key. A session that selects a cloud provider with `CLAUDE_CODE_USE_*` then starts with no sign-in; for every other session, have them start `claude` and sign in with `/login`. See also [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>). Startup or `/login` reports `Claude Code may not be enabled for your organization` after a 403 on the managed settings load| The gateway, or something in front of it, answered the `/managed/settings` request with 403. The gateway’s own settings route never answers 403. The status comes from the [`access_control`](</docs/en/claude-apps-gateway-config#http-tuning>) IP checks or from a proxy or WAF in front of the gateway. The audit log records an IP-check denial as `access.denied` with the reason. The developer stays signed in.| Check the audit log for `access.denied` at the time of the failure and fix the `access_control` lists or the front end, then have the developer start `claude` again -CLI `/login`: `The gateway is limiting sign-in attempts right now`, or `Request failed with status code 429` on older versions. The `/device` page may show `Too many attempts` to developers who haven’t tried before| The per-IP sign-in rate limit was reached. Either `listen.trusted_proxies` doesn’t cover the load balancer, so every developer shares its address, or many developers share a NAT or VPN egress address. Audit events with `result: rate_limited` show the same one or few `client_ip` values.| Set `listen.trusted_proxies` to the load balancer’s source ranges first, then raise `rate_limits` if developers still share addresses. See Large rollouts. +CLI `/login`: `The gateway is limiting sign-in attempts right now`, or `Request failed with status code 429` on older versions. The `/device` page may show `Too many attempts` to developers who haven’t tried before| The per-IP sign-in rate limit was reached. Either `listen.trusted_proxies` doesn’t cover the load balancer, so every developer shares its address, or many developers share a NAT or VPN egress address. Audit events with `result: rate_limited` show the same one or few `client_ip` values.| If the load balancer [belongs in `listen.trusted_proxies`](</docs/en/claude-apps-gateway-config#listen>), list it first. Then raise `rate_limits` if developers still share addresses. See Large rollouts. CLI `/login`: `Gateway hosts must be on your organization's private network; <host> resolves to the public (or unrecognized) address <ip>`| The gateway hostname resolves to at least one public IP address. Claude Code checks each resolved address and requires every one to be private. A common cause is a dual-stack name where one family resolves to a public address, including AWS internal dual-stack load balancers, which return public-range AAAA addresses.| Have the gateway name resolve only to private addresses on developer machines. For a dual-stack name, drop the public-range record or serve a separate internal-only DNS name. See the [private-network prerequisite](</docs/en/claude-apps-gateway#prerequisites>). If the address is public space your organization owns and uses internally, [declare that block](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>) instead. CLI `/login`: `Gateway login would go through proxy <proxy>, which is not on a private network`| An `HTTPS_PROXY` or `HTTP_PROXY` applies to the gateway host and the proxy’s hostname resolves to a public address. A proxy whose host resolves only to private addresses is allowed and doesn’t trigger this error| Add the gateway host to `NO_PROXY` on the developer’s machine so the connection is direct, or use a proxy whose hostname resolves to private addresses. The message names the exact `NO_PROXY` entry to add CLI `/login`: `Claude Code only signs in to <host> from inside its declared network <block> (managed settings), and this machine is connecting from <ip>, outside it`| The gateway is on a block declared in [`gatewayInternalNetworks`](</docs/en/claude-apps-gateway#allow-a-gateway-on-public-address-space-you-own>), and the developer’s machine reached it from an address outside that block: a VPN address pool, a container or WSL2 NAT segment, or a network that isn’t yours| Have the developer run `/login` from the host OS on your network. If the address shown is also your organization’s own public space, replace the gateway’s entry with a block that covers both, up to `/8`; a second, overlapping entry is refused. If no block covers both, see Choose an address for the gateway
modified Claude apps gateway spend limits View current →
--- a/claude-apps-gateway-spend-limits.md +++ b/claude-apps-gateway-spend-limits.md @@ -64,7 +64,7 @@ 3. List price for the [`models[].id`](</docs/en/claude-apps-gateway-config#models>) you mapped to that upstream ID, for upstream strings that carry no model name, such as an Amazon Bedrock application-inference-profile ARN or a Microsoft Foundry deployment name. Requires v2.1.218 or later. 4. The unknown-model tier of $5/$25 per million input/output tokens, so an ID the meter can’t place is never free. The gateway warns at boot and once per ID at runtime when it uses this tier. -Whichever rate applies, the meter then multiplies the amount by [`pricing.multiplier`](</docs/en/claude-apps-gateway-config#pricing>), default `1`. Client aborts are billed too. When a stream ends without the upstream’s final usage frame, the meter bills a floor estimate of about four characters per output token for the text already sent to the client, so aborting requests early doesn’t evade a cap. +Whichever rate applies, the meter then multiplies the amount by [`pricing.multiplier`](</docs/en/claude-apps-gateway-config#pricing>), default `1`. Requires a gateway server running Claude Code v2.1.227 or later. Client aborts are billed too. When a stream ends without the upstream’s final usage frame, the meter bills a floor estimate of about four characters per output token for the text already sent to the client, so aborting requests early doesn’t evade a cap. ####
modified Use Claude Code in the cloud View current →
--- a/claude-code-on-the-web.md +++ b/claude-code-on-the-web.md @@ -24,7 +24,7 @@ Every cloud session runs in a [cloud environment](</docs/en/cloud-environments>), the saved configuration that controls network access, environment variables, and setup scripts. - * **Your first environment** : if you don’t have one yet, onboarding sets up a **Default** environment with [**Trusted** network access](</docs/en/cloud-environments#access-levels>), either by creating it for you or by asking you to create it. See [The Default environment](</docs/en/cloud-environments#the-default-environment>) for which of those happens on your plan + * **Your first environment** : if you don’t have one yet, onboarding sets up a **Default** environment with [**Limited** network access](</docs/en/cloud-environments#access-levels>). See [The Default environment](</docs/en/cloud-environments#the-default-environment>) for how that works on your plan * **Which environment a session uses** : see [The Default environment](</docs/en/cloud-environments#the-default-environment>) for how sessions choose an environment when you have more than one * **Change what sessions can reach or run at startup** : see [Configure cloud environments](</docs/en/cloud-environments>) * **What’s installed without any configuration** : see [Installed tools](</docs/en/cloud-environments#installed-tools>)
modified Explore the .claude directory View current →
--- a/claude-directory.md +++ b/claude-directory.md @@ -158,17 +158,18 @@ Session files in `sessions/`, auto memory, and Claude Desktop and Cowork transcripts each follow their own retention rule: * **`sessions/`** : holds one small file per running session, used to detect concurrent sessions and crashes. It isn’t part of the age-based sweep: Claude Code removes each file when its session exits and clears crash leftovers on the next launch. + * **`seed-admin/`** : scratch git directories Claude Code makes while packaging your repository for an [ultrareview](</docs/en/ultrareview>) or a [cloud session upload](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>). When an upload ends, or in a later session if it was interrupted, Claude Code removes that upload’s directory and leaves `seed-admin/` in place. * **Auto memory** : the sweep doesn’t delete the memory files in a project’s [auto memory](</docs/en/memory#auto-memory>) directory, `projects/<project>/memory/`. Claude Code removes that directory only if it has been empty for the whole retention period. Before v2.1.228, the sweep treated folders inside the memory directory as session data and could delete old files beneath it. - * **Claude Desktop and Cowork transcripts** : Claude Code keeps the transcript of a session you started or most recently continued in Claude Desktop or Cowork at any age. To give these transcripts an age limit, set [`desktopSessionCleanupPeriodDays`](</docs/en/settings-reference#desktopsessioncleanupperioddays>). Requires Claude Code v2.1.248 or later; earlier versions delete them after `cleanupPeriodDays`. Claude Code deletes these transcripts after `cleanupPeriodDays` instead in either of these cases: + * **Claude Desktop and Cowork transcripts** : Claude Code keeps the transcript of a session you started or most recently continued in Claude Desktop or Cowork at any age. To give these transcripts an age limit, set [`desktopSessionCleanupPeriodDays`](</docs/en/settings-reference#desktopsessioncleanupperioddays>). Requires Claude Code v2.1.248 or later; earlier versions delete them after `cleanupPeriodDays`. Claude Code deletes these transcripts after `cleanupPeriodDays` instead in cases such as these: * [Managed settings](</docs/en/managed-settings>) set `cleanupPeriodDays` * The [HIPAA configuration applies to your sessions](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>) Claude Code skips the age-based sweep in these cases: * **Bare mode** : when you run `claude -p` with [`--bare`](</docs/en/headless#start-faster-with-bare-mode>), Claude Code doesn’t run the sweep in that session. - * **Paused sweep** : if Claude Code can’t safely determine the retention period, it pauses the retention cleanup sweep; the [`retention_sweep` event](</docs/en/monitoring-usage#retention-sweep-event>) lists each configuration that pauses it. When the cause is a settings file that can’t be read or parsed, or settings errors with `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` explicitly set, Claude Code also shows a warning in `/status` until you fix the settings errors. When [managed settings](</docs/en/server-managed-settings>) provide `cleanupPeriodDays`, Claude Code runs the sweep at the managed value in either case. - -To check that the machines in your organization run the sweep with the retention period you set, see [Check the retention sweep](</docs/en/monitoring-usage#check-the-retention-sweep>). + * **Paused sweep** : if Claude Code can’t safely determine the retention period, it pauses the sweep; the [`retention_sweep` event](</docs/en/monitoring-usage#retention-sweep-event>) lists each configuration that pauses it. When the cause is a settings file that can’t be read or parsed, or settings errors with `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` set, `/status` shows a warning until you fix the cause. + +When [managed settings](</docs/en/managed-settings>) provide `cleanupPeriodDays`, Claude Code runs the sweep at the managed value even when a lower-priority settings file has errors. To check that the machines in your organization run the sweep with the retention period you set, see [Check the retention sweep](</docs/en/monitoring-usage#check-the-retention-sweep>). ### @@ -182,7 +183,7 @@ * **Linux** : `/tmp/claude-<uid>/<project>/<session-id>/scratchpad/`, or the same shape under `$TMPDIR` when your system sets one * **Windows** : `%TEMP%\claude\<project>\<session-id>\scratchpad\` -`<project>` is your working directory path with every character other than letters and digits replaced by `-`, such as `-Users-you-my-project`. If you set [`CLAUDE_CODE_TMPDIR`](</docs/en/env-vars>), the tree moves under that directory instead. Hooks receive the current session’s path as [`scratchpad_dir`](</docs/en/hooks#common-input-fields>). Scratchpad files last as long as the session’s transcript: the retention sweep deletes the directory when it deletes the transcript, and `claude purge` doesn’t touch the temp directory. Because the directory sits under the system temp location, your operating system can also clear it, such as on restart. To keep something Claude wrote there, ask Claude to move it into your project. A session has a scratchpad only when all of these hold: +`<project>` is your working directory path with every character other than letters and digits replaced by `-`, such as `-Users-you-my-project`. On Windows, `<project>` is a 16-character hash of that string, such as `73295dabccd14c56`. In a Desktop app session, it can be the string itself. To get the exact path, ask Claude. If you set [`CLAUDE_CODE_TMPDIR`](</docs/en/env-vars>), the tree moves under that directory instead. Hooks receive the current session’s path as [`scratchpad_dir`](</docs/en/hooks#common-input-fields>). Scratchpad files last as long as the session’s transcript: the retention sweep deletes the directory when it deletes the transcript, and `claude purge` doesn’t touch the temp directory. Because the directory sits under the system temp location, your operating system can also clear it, such as on restart. To keep something Claude wrote there, ask Claude to move it into your project. A session has a scratchpad only when all of these hold: * You’re signed in with a claude.ai account rather than an API key * The session uses the Anthropic API, not Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry
modified Claude Code on Claude Platform on AWS View current →
--- a/claude-platform-on-aws.md +++ b/claude-platform-on-aws.md @@ -1,6 +1,8 @@ -Claude Platform on AWS is the Anthropic-operated Claude API with AWS authentication, IAM access control, and AWS Marketplace billing. Requests reach Anthropic’s API directly, so you get the same models and API features as the [Claude API](<https://platform.claude.com/docs>) on the same release schedule. You authenticate with AWS credentials or a workspace API key, and you pay through AWS Marketplace. Client-side features that Claude Code turns on through Anthropic’s feature-flag service are off by default, and the [advisor tool](</docs/en/advisor>) isn’t available. See the [feature availability matrix](</docs/en/feature-availability#summary-by-provider>) for the full list. Use this guide to point Claude Code at a workspace you’ve already provisioned through Claude Platform on AWS. For the AWS subscription and workspace setup that comes before this, see the [Claude Platform on AWS documentation](<https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws>). +Claude Platform on AWS is the Anthropic-operated Claude API with AWS authentication, IAM access control, and AWS Marketplace billing. Requests reach Anthropic’s API directly, so you get the same models and API features as the [Claude API](<https://platform.claude.com/docs>) on the same release schedule. You authenticate with AWS credentials or a workspace API key, and you pay through AWS Marketplace. Use this guide to point Claude Code at a workspace you’ve already provisioned through Claude Platform on AWS. For the AWS subscription and workspace setup that comes before this, see the [Claude Platform on AWS documentation](<https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws>). Subscribing through AWS Marketplace provisions a new Anthropic organization tied to your AWS account. This organization is separate from any organization you already have with Anthropic, and credentials don’t transfer between them. Use the workspace ID and API keys from the AWS-linked organization, not from a pre-existing Claude Console account. + +Some Claude Code features are unavailable or work differently on Claude Platform on AWS. See the [feature availability matrix](</docs/en/feature-availability#summary-by-provider>) and the [features that need feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>). ##
modified Let Claude coordinate ongoing work with Projects View current →
Show diff (168 lines)
--- a/claude-projects.md +++ b/claude-projects.md @@ -4,7 +4,7 @@ * **Send work to one place** : paste a bug report, a stack trace, or a list of tasks into the conversation whenever one comes up. Claude starts a thread for each piece of work or passes it to the thread already working in that area, and answers quick questions in place. * **Set context once** : every new thread starts with the project’s instructions, so a rule you state once, such as which branch to target, reaches all of them. - * **Walk away and come back to finished work** : when you come back an hour later or the next morning, the **Overview** pane shows which threads finished, which pull requests are ready for review, and which thread is waiting for your answer. + * **Walk away and come back to finished work** : the Overview pane shows which threads finished, which pull requests are ready for review, and which thread is waiting for your answer. If you already know the work you want a project to run, go straight to Create a project. @@ -16,10 +16,10 @@ A project is worth creating when the work has a goal that outlasts one session and keeps producing tasks. These kinds of work suit a project well: - * **One goal across many repositories** : “Bring every service up to the new lint config.” Claude can run a thread per repository, each with its own pull request, and the **Overview** pane shows which ones are ready for review. + * **One goal across many repositories** : “Bring every service up to the new lint config.” Claude can run a thread per repository, each with its own pull request, and the Overview pane shows which ones are ready for review. * **An area you keep feeding** : the bugs, stack traces, and review requests for one service, pasted into the conversation as they reach you. A pitfall you tell Claude to remember after one fix is in project memory for the next. * **A build or migration bigger than a session** : “Build what `docs/spec.md` describes” or “Move the app off the deprecated ORM.” The work splits into threads that each take a part, decisions you ask Claude to remember early on reach the later cloud threads, and the spec changes and bugs you find during the build go into the same conversation. - * **Work that isn’t code** : a folder of contracts or a support-ticket export you keep coming back to with new questions, such as “find the ten most common integration mistakes in these tickets.” Upload the documents instead of adding a repository, and threads deliver each write-up as a file on the project’s **Library** tab. + * **Work that isn’t code** : a folder of contracts or a support-ticket export you keep coming back to with new questions, such as “find the ten most common integration mistakes in these tickets.” Upload the documents instead of adding a repository, and threads deliver each write-up as a file in the project’s **Library**. In any of them you can send a batch of tasks, tell Claude to start without asking you to confirm, and walk away. When you’re back, you can find the threads that need you under **Waiting on you**. You can also ask Claude to put part of the work on a schedule as a [cloud scheduled task](</docs/en/routines>). If one of these is your situation, create a project. @@ -53,9 +53,9 @@ * The `CLAUDE.md` in each of the project’s repositories, but not the repositories’ skills, `.claude/settings.json`, or `.mcp.json` * The connectors on your claude.ai account * A cloud environment that sets its network access, environment variables, network secrets, and installed tools - * **The Overview pane** : where you see all the threads at once and which of them need you. Its other tabs are **Library** for the files you added and the files threads produced, **Pull requests** for the ones threads opened, and **Scheduled tasks** for scheduled work in the project. - -Cloud threads don’t pick up anything from the Claude Code setup on your own machine. Get skills, plugins, connectors, and tools into threads covers how to give them what they’d otherwise be missing. Here is how those parts connect, from you through the conversation to the threads doing the work, with **Overview** tracking their state: + * **The Overview pane** : where you see all the threads at once and which of them need you. + +Cloud threads don’t pick up anything from the Claude Code setup on your own machine. Get skills, plugins, connectors, and tools into threads covers how to give them what they’d otherwise be missing. Here is how those parts connect, from you through the conversation to the threads doing the work, with Overview tracking their state: ## @@ -104,7 +104,7 @@ * **Name** : how the project appears in the **Projects** list. * **What do you want to work on?** (optional): one line that becomes the project’s goal, such as “Hold p95 API latency under 200 ms”. Claude in the conversation works toward it. Without a goal, Claude works from the tasks you send, and you can add a goal later in **Project settings > General**. - * **Context** (optional): the GitHub repositories this project works on, plus any files, folders, or Google Drive folders threads should read. Click **Add** for each. Add the repositories most tasks need rather than every one the work might touch; Decide which repositories to add covers the choice, and you can add more later in **Project settings > Environment**. + * **Context** (optional): the GitHub repositories this project works on, plus any files, folders, or Google Drive folders threads should read. Click **+** for each. Add the repositories most tasks need rather than every one the work might touch; Decide which repositories to add covers the choice, and you can add more later in **Project settings > Environment**. Standing rules for how threads should work go in project instructions, which you set after the project exists. @@ -117,7 +117,7 @@ * Start one thread that explores the repository without changing anything and proposes next steps, if the project has a repository it can read. * Post **Setup recommendations** drawn from your recent cloud sessions: repositories to add, scheduled tasks to create, and threads it could start. Every recommended repository and scheduled task starts switched on. Switch off the ones you don’t want, then click **Update setup** to add the rest, or ignore the recommendations and describe work yourself. -The project is now listed under **Projects** in the sidebar, and its conversation is open. Your first batch covers what to set up before you send it work. +The project is now in the sidebar, and its conversation is open. Your first batch covers what to set up before you send it work. ### @@ -198,7 +198,7 @@ * New work goes to a new thread or to a thread already working in that area, and Claude tells you which. Each new thread shows up under your message as a card: a box with the thread’s title and status, which you click to open the thread. * Several unrelated tasks in one message become separate threads. -If Claude routes something differently than you wanted, say so. Tune how Claude runs a project lists things you can tell it, such as reusing an existing thread for follow-ups or answering in place instead of starting a thread. A thread’s full results stay in the thread, and you open its card in the conversation to read them. Files a thread produced are also on the **Library** tab in **Overview**. Sometimes Claude proposes threads instead of starting them, in a **Suggested threads** list. Click the arrow on a suggestion to start that thread. When several are listed, a button under the list starts all of them. +If Claude routes something differently than you wanted, say so. Tune how Claude runs a project lists things you can tell it, such as reusing an existing thread for follow-ups or answering in place instead of starting a thread. A thread’s full results stay in the thread, and you open its card in the conversation to read them. Files a thread produced are also in the project’s **Library**. Sometimes Claude proposes threads instead of starting them, in a **Suggested threads** list. Click the arrow on a suggestion to start that thread. When several are listed, a button under the list starts all of them. ### @@ -226,7 +226,7 @@ See what needs you in Overview -The **Overview** pane beside the conversation tracks the project’s threads. It’s already open the first time you open a new project. The **Overview** button in the project header closes and reopens it, and shows a dot when a thread is waiting on you. In the desktop app, you also get a desktop notification when Claude posts in the conversation, a thread hits an error, or a thread needs your input, so you don’t have to keep the project open to find out. To also get one each time a thread finishes a turn, or to turn them off for a project, choose **Notifications** in the project’s sidebar menu. These notifications are desktop-only: in a browser, check the dot on the **Overview** button. The pane’s **Threads** tab groups threads by state: +The Overview pane beside the conversation tracks the project’s threads. It’s already open the first time you open a new project. To reopen it after you close it, click the **Threads** button in the project header. The button shows a dot when a thread is waiting on you. In the desktop app, a notification appears by default when Claude posts in the conversation, a thread hits an error, or a thread needs your input. None appears while you’re viewing the project. To also get one each time a thread finishes a turn, or to turn them off for a project, choose **Notifications** in the project’s sidebar menu. In a browser, check the dot on the **Threads** button. The pane’s **Threads** view groups threads by state: Group| What’s in it ---|--- @@ -237,11 +237,10 @@ **Idle**| Threads that finished and aren’t waiting on anything **Resolved**| Threads marked done: by you from the thread’s menu, by Claude once you’ve taken the last step, such as merging its pull request, or automatically after a week with no activity. You can reopen one from the same menu -The pane’s other tabs are: - - * **Library** : the files and folders you added and the files threads produced - * **Pull requests** : shown once threads have opened any - * **Scheduled tasks** : the [cloud scheduled tasks](</docs/en/routines>) Claude set up from this project +Open the project’s files and scheduled tasks in the pane from the project header: + + * **Library** : the files and folders you added and the files that threads produced. Click the **Library** button beside **Threads**. + * **Scheduled tasks** : the [cloud scheduled tasks](</docs/en/routines>) Claude set up from this project. Select it in the header’s **⋯** menu. ### @@ -249,7 +248,7 @@ Open a thread when you need control -Click a thread’s card in the conversation or its row in **Overview** to open its transcript in the Overview pane. From there you can: +Click a thread’s card in the conversation or its row in Overview to open its transcript in the Overview pane. From there you can: * Read what Claude did, step by step. * Steer the task by writing in the thread’s own message box. A message there goes straight to that thread, while a follow-up in the project conversation reaches it only when Claude matches the follow-up to that thread. @@ -348,7 +347,7 @@ ---|---|--- Project memory| Notes Claude keeps about the project, such as requirements, decisions, and pitfalls, stored as files. Every cloud thread reads the index file `MEMORY.md` when it starts and opens the other files when it needs them| Ask Claude in the project conversation or any cloud thread to remember a requirement, a decision, or a pitfall, or to forget one. Read, edit, and delete the files in **Project settings > Memory** Project instructions| Text sent to each new thread and to Claude in the project conversation, up to 16,000 characters. Write project instructions covers what to put in it| **Project settings > Memory > Project instructions**, or ask Claude to change the instructions -Repositories, files, and environment| The repositories every cloud thread clones, the folders and files it can read under `/mnt/project-files`, and the cloud environment it runs in| Repositories and environment in **Project settings > Environment**, or ask Claude in the conversation to add a repository to the project. Files and folders from **Add** on the **Library** tab in **Overview** +Repositories, files, and environment| The repositories every cloud thread clones, the folders and files it can read under `/mnt/project-files`, and the cloud environment it runs in| Repositories and environment in **Project settings > Environment**, or ask Claude in the conversation to add a repository to the project. Files and folders from **Add** in the project’s **Library** **Project settings > Memory** lists these files under **Auto memory** , because Claude writes them itself as it works in the project. They’re separate from the [auto memory](</docs/en/memory>) Claude Code keeps on your machine, even though both use a `MEMORY.md` index. Project memory is also separate from the `CLAUDE.md` files in the project’s repositories. Each cloud thread still reads those `CLAUDE.md` files from its clone when it starts, so put instructions about a repository in its `CLAUDE.md` and notes about the project in project memory. @@ -358,7 +357,7 @@ Write project instructions -Project instructions are the brief every new thread starts from. Click the gear icon in the project header to open **Project settings** , then go to **Memory > Project instructions**. A useful brief covers: +Project instructions are the brief every new thread starts from. Select **Settings** in the **⋯** menu in the project header to open **Project settings** , then go to **Memory > Project instructions**. A useful brief covers: * What the project is for * Where the work happens: which repositories, which branch to start from, how to name pull requests @@ -388,7 +387,7 @@ * **Add it to the project** , in the **New project** dialog, in **Project settings > Environment**, or by asking Claude in the conversation to add it to the project. Every cloud thread from then on clones it and starts with its `CLAUDE.md` loaded, whether or not the task touches it. * **Leave it off and let threads add it when needed.** A cloud thread whose task needs a repository the project doesn’t have can add it to itself, and a note in the thread says it was added to this thread only. The clone happens partway through the task, so that repository’s `CLAUDE.md` wasn’t there when the thread started. The next thread starts without it. A repository added this way needs the same prerequisites as a project repository: the Claude GitHub App installed on it and push access from your GitHub account. -A project doesn’t need a repository at all. Its cloud threads can still research, write documents, and write and run code in their own sandbox, and they deliver files to the **Library** tab. Any of its cloud threads can still add a repository to itself when a task calls for one. Once the project has repositories, Claude can only add repositories from a GitHub owner the project already uses, whether it adds one to the project or a thread adds one to itself. To bring in a repository from a different owner, add it to the project yourself in **Project settings > Environment**. For a project that spans many repositories, such as one feature with server, web, mobile, and desktop code, add the one or two repositories nearly every task touches and name the others in project instructions so Claude knows where the rest of the code lives. Cloud threads then start small and pull in the other repositories only for the tasks that need them. +A project doesn’t need a repository at all. Its cloud threads can still research, write documents, and write and run code in their own sandbox. They deliver files to the project’s **Library**. Any of its cloud threads can still add a repository to itself when a task calls for one. Once the project has repositories, Claude can only add repositories from a GitHub owner the project already uses, whether it adds one to the project or a thread adds one to itself. To bring in a repository from a different owner, add it to the project yourself in **Project settings > Environment**. For a project that spans many repositories, such as one feature with server, web, mobile, and desktop code, add the one or two repositories nearly every task touches and name the others in project instructions so Claude knows where the rest of the code lives. Cloud threads then start small and pull in the other repositories only for the tasks that need them. ### @@ -396,11 +395,10 @@ Add files and folders -Add the files and folders you want threads to read in the **New project** dialog’s **Context** field, or afterward with **Add** on the **Library** tab in **Overview**. These limits apply to what you add: - - * **Library tab** : up to 100 files and 2 GB in one pick, with a single file up to 480 MB. - * **New project dialog** : files over 30 MB are skipped, so add larger files from the **Library** tab after you create the project. - * **Folders** : when you add a folder from either place, the project receives a copy of its first 100 files up to 200 MB, without any files over 30 MB, hidden files, or `node_modules`. A project holds up to 10 folders and Google Drive folders combined, and single files don’t count toward that limit. +Add the files and folders you want threads to read in the **New project** dialog’s **Context** field, or afterward with **Add** in the project’s **Library**. These limits apply to what you add: + + * **Files you upload at claude.ai/code or in the desktop app** : up to 1,000 files and 2 GB at a time, with a single file up to 480 MB. + * **Folders you upload** : hidden files and `node_modules` aren’t added. A project holds up to 10 folders and Google Drive folders combined, and single files don’t count toward that limit. * **Changes after upload** : uploads are copies, so a change you make on your computer afterward doesn’t reach the project until you upload the file again and choose **Replace** when asked about the existing name. ### @@ -451,7 +449,7 @@ Project settings reference -You change project settings at claude.ai/code or in the desktop app, not in `settings.json`. Open **Project settings** from **Settings** in the project’s sidebar menu or from the gear icon in the project header. Settings save as you change them; a text field you’re editing, such as the goal or instructions, shows **Save changes** and **Discard** until you leave it. Changes to instructions, repositories, plugins, and environment in **Project settings** reach new threads, not threads already running. +You change project settings at claude.ai/code or in the desktop app, not in `settings.json`. Open **Project settings** from **Settings** in the project’s sidebar menu or in the project header’s **⋯** menu. Settings save as you change them; a text field you’re editing, such as the goal or instructions, shows **Save changes** and **Discard** until you leave it. Changes to instructions, repositories, plugins, and environment in **Project settings** reach new threads, not threads already running. Setting| Section| What it controls ---|---|--- @@ -524,7 +522,7 @@ * **Claude Tag** : [Claude Tag](<https://claude.com/docs/claude-tag/overview>) is Claude in your team’s Slack channels, on Team and Enterprise plans. Anyone in a channel can give it work, everyone in the channel sees and steers it, and it uses connections an admin set up for that channel. Projects are on Pro, Max, and Ultra. A project is yours alone: you’re the only one who sends it work or sees its threads, and it uses your own GitHub access and connectors. [How Claude Tag differs from Cowork and Claude Code](<https://claude.com/docs/claude-tag/concepts/how-it-works#how-claude-tag-differs-from-cowork-and-claude-code>) has the side-by-side. * **Cloud sessions** : every thread is a [cloud session](</docs/en/claude-code-on-the-web>) unless you ask Claude to run it on your machine. Either way, Claude starts and tracks it instead of you. You can also bring the work of a cloud session you started yourself into a project: choose **Continue in project** in that session’s sidebar menu. - * **Scheduled tasks** : when you ask for scheduled work in a project, Claude creates a [cloud scheduled task](</docs/en/routines>) that runs as threads in that project and appears on its **Scheduled tasks** tab. Scheduled tasks you create outside a project keep working on their own. + * **Scheduled tasks** : when you ask for scheduled work in a project, Claude creates a [cloud scheduled task](</docs/en/routines>) that runs as threads in that project and appears in its **Scheduled tasks** view. Scheduled tasks you create outside a project keep working on their own. * **Remote Control** : [Remote Control](</docs/en/remote-control>) connects claude.ai to a Claude Code session running on your machine. When you ask Claude in a project to run a thread on your computer, the project uses Remote Control to do it. * **Local sessions and agent view** : a session you start yourself in your terminal, IDE, or the desktop app’s local environment stays outside your projects, though you can bring its work into one. [Agent view](</docs/en/agent-view>) is a screen for tracking several local sessions side by side, and you still start each one and give it its task yourself. * **Worktrees** : a [worktree](</docs/en/worktrees>) gives each local session its own working copy of a repository. Cloud threads don’t need them: each clones its repositories into its own cloud sandbox and works on its own branch. @@ -572,7 +570,7 @@ When several threads come back having assumed something wrong, worked around missing access, or stopped with “blocked”, the cause is usually the same gap in the project’s setup rather than a problem with each task. Sort out which threads are sound before you fix anything: 1. Ask Claude in the conversation: “For every open thread, list what you asked it to do, what it assumed or couldn’t reach, and what it’s waiting on.” Claude reads each thread and answers in the conversation. - 2. For threads that started from a wrong assumption, open the thread from **Overview** and mark it resolved from its menu, or tell it what to do instead in its message box. Its branch and any pull request stay on GitHub until you delete them. + 2. For threads that started from a wrong assumption, open the thread from Overview and mark it resolved from its menu, or tell it what to do instead. Its branch and any pull request stay on GitHub until you delete them. 3. Fix the gap once, in project instructions or the environment, then send one thread before sending the rest of the work again as new threads. ###
modified Scan your codebase for vulnerabilities View current →
--- a/claude-security.md +++ b/claude-security.md @@ -77,7 +77,7 @@ Choose what to scan -The plugin reads your repository first, then offers the whole repository or a focused area, with each option’s file count and relative cost stated. Pick the whole repository, or answer “I don’t know” and the plugin picks a sensible default for your repository’s size. +The plugin reads your repository first, then offers the whole repository or a focused area. Pick the whole repository, or answer “I don’t know” and the plugin picks a sensible default for your repository’s size. 3 @@ -111,7 +111,7 @@ Scan only your changes -When your branch has commits its base doesn’t, the `/claude-security` menu offers to scan only that diff, so you can check a branch before merging. You can also scan one of your open pull requests, or a single commit by asking for it, such as “scan commit abc1234”. Only committed changes are scanned: commit or stash in-progress edits first, or run a full scan, which reads the working tree. Change scans need a git repository; full scans of an unversioned directory still work. Finding your open pull requests is the one step that reaches the network, and it’s offered only when your session already has permission to run the GitHub CLI and `gh` is signed in. +When your branch has commits its base doesn’t, the `/claude-security` menu offers to scan only that diff, so you can check a branch before merging. You can also scan one of your open pull requests, or a single commit by asking for it, such as “scan commit abc1234”. Only committed changes are scanned: commit or stash in-progress edits first, or run a full scan, which reads the working tree. Change scans need a git repository; full scans of an unversioned directory still work. Finding your open pull requests is offered only when your session already has permission to run the GitHub CLI and `gh` is signed in. ### @@ -146,9 +146,9 @@ * **`CLAUDE-SECURITY-RESULTS.md`** : the report, with each finding’s ID, such as `F1`, plus its impact, exploit scenario, severity, confidence, and recommendation * **`CLAUDE-SECURITY-RESULTS.jsonl`** : the same findings in machine-readable form, one JSON object per line * **`CLAUDE-SECURITY-RESULTS.sarif`** : the same findings as a [SARIF 2.1.0](<https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html>) log for GitHub code scanning and any other tool that reads the standard. The scan classifies findings under their [CWE](<https://cwe.mitre.org/>) weakness categories - * **`CLAUDE-SECURITY-REVISION-<commit>.json`**: the revision stamp, recording which commit was scanned, at what scan effort, whether uncommitted changes were part of the scanned tree, and how thoroughly the run was verified, so a report is always tied to the code it describes. A scan outside version control stamps `UNVERSIONED` in place of the commit - -That directory is the only change a scan makes to your checkout, and it carries its own `.gitignore`, so a stray `git add` never sweeps a report into a commit. To keep a report in history for an audit trail, delete that one `.gitignore` file and commit the directory like any other. Findings only appear in the report after independent verifier agents analyze them, which keeps reports short and worth reading. Scans are nondeterministic: two scans of the same code can surface different findings. Run scans regularly, and use the revision stamps to attribute each report to the exact code and settings it covered. + * **`CLAUDE-SECURITY-REVISION-<commit>.json`**: the revision stamp, recording which commit was scanned, at what scan effort, whether uncommitted changes were part of the scanned tree, and how thoroughly the run was verified. A scan outside version control stamps `UNVERSIONED` in place of the commit + +That directory is the only change a scan makes to your checkout, and it carries its own `.gitignore`, so a stray `git add` never sweeps a report into a commit. To keep a report in history for an audit trail, delete that one `.gitignore` file and commit the directory like any other. Findings only appear in the report after independent verifier agents analyze them, which keeps reports short and worth reading. Scans are nondeterministic: two scans of the same code can surface different findings. Run scans regularly. ##
modified Configure cloud environments View current →
Show diff (124 lines)
--- a/cloud-environments.md +++ b/cloud-environments.md @@ -27,7 +27,7 @@ **Default** carries no configuration of its own: - * **Trusted** network access: sessions reach package registries and other allowlisted domains, and nothing else through the session’s network. + * **Limited** network access: sessions reach package registries and other allowlisted domains. * No other configuration: **Default** defines no environment variables or setup script, so sessions start with just the pre-installed tools. With only **Default** available, every session runs in it. When you have more than one environment, sessions choose one per surface: @@ -98,7 +98,7 @@ * **Role** : on every plan, you can add and delete secrets on your own environments whatever your role. On Team and Enterprise, Owners hold an organization admin role in your claude.ai organization and Admins don’t, which changes what you see in these cases: * **Your own environment** : without an organization admin role, **Add secret** opens a shorter form * **A shared environment** : Owners add and delete its secrets from admin settings. Without an organization admin role, ask an Owner to add the secret, because the environment’s dialog has no **Network secrets** section - * **Environment type** : an Anthropic-hosted cloud environment that already exists. A [self-hosted environment](</docs/en/self-hosted-environments>) doesn’t have network secrets + * **Environment type** : an Anthropic-hosted cloud environment. A [self-hosted environment](</docs/en/self-hosted-environments>) doesn’t have network secrets * **API reachability** : the API accepts connections from the internet, because requests leave from Anthropic’s network * **Encryption keys** : if your organization uses customer-managed encryption keys, you can’t save network secrets @@ -222,7 +222,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 control that opens the selector appears on the app surfaces listed under The Default environment and in the [cloud scheduled task 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. +Each environment sets one network access level, which controls the outbound connections its sessions can make. A new environment starts at **Limited** with **Allow package managers** checked, so its sessions reach package registries and other allowlisted domains. 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 control that opens the selector appears on the app surfaces listed under The Default environment and in the [cloud scheduled task 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 scheduled task 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. @@ -232,14 +232,13 @@ Access levels -The **Network access** field in the environment dialog takes one of four levels: +The **Network access** field in the environment dialog takes one of three levels: Level| Outbound connections ---|--- **None**| No outbound network access through the session’s network -**Trusted**| Allowlisted domains only: package registries, GitHub, cloud SDKs +**Limited**| The default allowlist of package registries, GitHub, and cloud SDKs while **Allow package managers** is checked, plus any domains you list. See [what a blocked request looks like](</docs/en/errors#host-not-allowed-in-a-cloud-session>). **Full**| Any domain -**Custom**| Your own allowlist, optionally including the defaults Whichever level you pick, sessions can still reach these, because each one takes a path that doesn’t go through the session’s network allowlist: @@ -248,24 +247,29 @@ * The hosts you listed on the environment’s network secrets, except the hosts that never get the secret * The Anthropic API, for Claude Code’s own requests, even at **None** , as noted under [Security and isolation](</docs/en/claude-code-on-the-web#security-and-isolation>) +An environment saved as **Trusted** or **Custom** keeps reaching the same hosts and opens this way: + + * **Saved as Trusted** : opens as **Limited** with **Allow package managers** checked + * **Saved as Custom** : opens as **Limited** with its **Allowed domains** list and **Allow package managers** as you set them, or as **Full** if the list contained a bare `*` + ### ​ Allow specific domains -To allow domains that aren’t in the Trusted list, select **Custom** in the environment’s network access settings, then list one domain per line in the **Allowed domains** field. This example allows three hosts an internal project might need. +To allow domains that aren’t in the default allowlist, select **Limited** in the environment’s **Network access** selector, then list one domain per line in the **Allowed domains** field. A leading `*.` matches every subdomain. This example allows three hosts an internal project might need. api.example.com *.internal.example.com registry.example.com -Sessions in this environment can now reach `api.example.com`, any subdomain of `internal.example.com`, and `registry.example.com`, and no other domains through the session’s network. GitHub traffic, MCP connector traffic, and requests to the hosts of the environment’s network secrets, other than the hosts that never get the secret, don’t go through this allowlist. A leading `*.` matches every subdomain. To keep the Trusted domains too, check **Also include default list of common package managers** ; leave it unchecked to allow only what you list. If your organization uses [artifacts](</docs/en/artifacts#availability>), you don’t need `*.frame.claudeusercontent.com` in the list for sessions to read them. When the list leaves that host out, Claude Code reads artifact content through the session’s connection to Anthropic instead. Keep the host in an allowlist in two situations: +While **Allow package managers** is checked, sessions in this environment reach the default allowlist as well as the domains you list. Clear the checkbox to leave the default allowlist out. GitHub traffic, MCP connector traffic, and requests to the hosts of the environment’s network secrets, other than the hosts that never get the secret, don’t go through this allowlist. If your organization uses [artifacts](</docs/en/artifacts#availability>), you don’t need `*.frame.claudeusercontent.com` in the list for sessions to read them. When the list leaves that host out, Claude Code reads artifact content through the session’s connection to Anthropic instead. Keep the host in an allowlist in two situations: * **Sessions in this environment open another organization’s public artifacts** : Claude Code fetches those from the host directly, so add it to this list. * **You’re configuring the local CLI or a self-hosted runner** : keep the host in that allowlist. See [network access requirements](</docs/en/network-config#network-access-requirements>) and the self-hosted [network requirements](</docs/en/self-hosted-environments-deploy#network-requirements>). -Each environment has its own allowed-domains list; there’s no organization-level allowlist that admins can push to every member’s environments. No [server-managed setting](</docs/en/server-managed-settings>) adds domains to an environment’s network allowlist either. To give a team one standard list, an Owner can create an organization-shared environment with **Custom** network access and that list. +Each environment has its own allowed-domains list; there’s no organization-level allowlist that admins can push to every member’s environments. No [server-managed setting](</docs/en/server-managed-settings>) adds domains to an environment’s network allowlist either. To give a team one standard list, an Owner can create an organization-shared environment with **Limited** network access and that list. ### @@ -281,7 +285,7 @@ * **Repository scope** : the proxy serves GitHub API requests for the repositories attached to the session. An API request for another repository gets a 403 whose message starts with `GitHub access to` and contains `is not enabled for this session`. A source archive you fetch over a `github.com/{owner}/{repo}/archive/` or `codeload.github.com` URL gets that same 403 when the repository isn’t attached, even a public one. * **GraphQL restrictions** : the proxy rejects requests to GitHub’s GraphQL endpoint with a 403 whose message starts with `GitHub GraphQL is not available from Claude Code sessions` and names the REST fallback, `gh api repos/{owner}/{repo}/...`. `gh` subcommands that use GraphQL, such as `gh pr` and `gh issue`, get the same 403. The restriction applies to every request through the proxy regardless of the credentials you supply, so a `GH_TOKEN` you set gets the same 403. Claude can’t reach GitHub APIs that exist only in GraphQL, such as Projects v2, through the proxy. -Committed files from public repositories arrive through `raw.githubusercontent.com`, which the security proxy handles instead. That domain is in the default Trusted list, so those files stay reachable unless the environment’s access level excludes it. +Committed files from public repositories arrive through `raw.githubusercontent.com`, which the security proxy handles instead. That domain is on the default allowlist, so those files stay reachable as long as the environment’s network access allows that list. ### @@ -425,7 +429,7 @@ service redis-server start -Docker is available for running containerized services. Ask Claude to run `docker compose up` to start your project’s services. Network access to pull images follows your environment’s access level, and the Trusted defaults include Docker Hub and other common registries. If your images are large or slow to pull, add `docker compose pull` or `docker compose build` to your setup script. The environment cache keeps the pulled images, so each new session has them on disk. The cache stores files only, not running processes, so Claude still starts the containers each session. +Docker is available for running containerized services. Ask Claude to run `docker compose up` to start your project’s services. Network access to pull images follows your environment’s access level, and the default allowlist includes Docker Hub and other common registries. If your images are large or slow to pull, add `docker compose pull` or `docker compose build` to your setup script. The environment cache keeps the pulled images, so each new session has them on disk. The cache stores files only, not running processes, so Claude still starts the containers each session. #### @@ -493,7 +497,7 @@ * **Exit zero** : if the script exits non-zero, the session [fails to start](</docs/en/web-quickstart#setup-script-failed>) or starts without whatever the script failed to install. Append `|| true` to non-critical commands so an intermittent install failure doesn’t fail the script. * **Finish within five minutes** : keep the script’s total runtime under roughly five minutes so the environment cache can build. When setup takes longer than that, the environment isn’t cached. Run independent installs in parallel with `&` and `wait`, and move any single download that won’t fit into a SessionStart hook that launches it in the background. If new sessions stall or fail during setup, see [New sessions hang or time out during setup](</docs/en/web-quickstart#new-sessions-hang-or-time-out-during-setup>). - * **Network access for installs** : package installs need to reach registries. The default **Trusted** level covers common package registries including npm, PyPI, RubyGems, and crates.io; with **None** network access, installs fail. + * **Network access for installs** : package installs need to reach registries. The default **Limited** level with **Allow package managers** checked covers common package registries including npm, PyPI, RubyGems, and crates.io. With **None** network access, installs fail. * **The environment’s variables aren’t set yet** : the script runs before the session sets the environment’s environment variables. Set any value the script needs in the script itself. ### @@ -585,7 +589,7 @@ * **One repository per session** : in an Anthropic-hosted environment, a session with several repositories doesn’t load hooks from any repository’s `.claude/settings.json`, so a SessionStart hook you define there doesn’t run. Install dependencies for those sessions with a setup script instead. For a self-hosted environment, see [which repository’s settings apply](</docs/en/self-hosted-environments-configuration#repository-settings-in-sessions-with-several-repositories>). * **Not in a project’s cloud threads** : a cloud thread in a [project](</docs/en/claude-projects#what-threads-pick-up-from-your-repositories>) doesn’t run hooks from a repository’s `.claude/settings.json`, whatever the number of repositories. In an Anthropic-hosted environment, install dependencies for threads with a setup script. In a self-hosted environment, use a hook in the [runner host’s settings](</docs/en/self-hosted-environments-configuration#repository-settings-in-sessions-with-several-repositories>) instead. * **No cloud-only scoping** : hooks run in both local and cloud sessions. To skip local execution, exit early unless the `CLAUDE_CODE_REMOTE` environment variable is `true`, the way the dependency install script does. - * **Requires network access** : install commands need to reach package registries. If your environment uses **None** network access, these hooks fail. The default allowlist under **Trusted** covers npm, PyPI, RubyGems, and crates.io. + * **Requires network access** : install commands need to reach package registries. If your environment uses **None** network access, these hooks fail. Under the default **Limited** level with **Allow package managers** checked, the default allowlist covers npm, PyPI, RubyGems, and crates.io. * **Proxy compatibility** : in Anthropic-hosted environments, all outbound traffic passes through a security proxy, and some package managers don’t work correctly with it; Bun is a known example. In a [self-hosted environment](</docs/en/self-hosted-environments-deploy#default-deny-egress>), outbound traffic goes through your own network boundary instead. * **Adds startup latency** : hooks run each time a session starts or resumes, unlike setup scripts which benefit from environment caching. Keep install scripts fast by skipping work that’s already done, the way the dependency install script does. @@ -597,7 +601,7 @@ Default allowed domains -With **Trusted** network access, sessions can reach the following domains by default. Domains marked with `*` indicate wildcard subdomain matching, so `*.gcr.io` allows any subdomain of `gcr.io`. +When **Allow package managers** is checked under **Limited** network access, as it is in a new environment, sessions can reach the following domains. Domains marked with `*` indicate wildcard subdomain matching, so `*.gcr.io` allows any subdomain of `gcr.io`. Anthropic services
modified Common workflows View current →
--- a/common-workflows.md +++ b/common-workflows.md @@ -466,7 +466,7 @@ claude --worktree feature-auth -Run the same command with a different name in a second terminal to start an isolated parallel session. In a repository with no commits, the command fails with `Failed to resolve base branch "HEAD": git rev-parse failed`. See [Worktrees](</docs/en/worktrees>) for cleanup, `.worktreeinclude`, and non-git VCS support. To monitor parallel sessions from one screen instead of separate terminals, see [background agents](</docs/en/agent-view>). +Run the same command with a different name in a second terminal to start an isolated parallel session. See [Worktrees](</docs/en/worktrees>) for cleanup, `.worktreeinclude`, and non-git VCS support. To monitor parallel sessions from one screen instead of separate terminals, see [background agents](</docs/en/agent-view>). ##
modified Explore the context window View current →
--- a/context-window.md +++ b/context-window.md @@ -19,7 +19,7 @@ What survives compaction -When a long session compacts, Claude Code summarizes the conversation history to fit the context window. As of v2.1.198, the summarization request inherits your session’s [extended thinking](</docs/en/model-config#extended-thinking>) configuration, so it reasons with thinking enabled when your session has it enabled and stays off otherwise. Thinking affects only how the summary is produced; your session settings are unchanged afterward. What happens to each kind of content depends on how it was loaded: +When a long session compacts, Claude Code summarizes the conversation history to fit the context window. Mechanism| After compaction ---|---
modified Create a Claude Code plugin View current →
--- a/create.md +++ b/create.md @@ -165,7 +165,13 @@ Load a plugin for one session -You can load a plugin for a single session in three ways: from a directory or `.zip` archive on disk with `--plugin-dir`, from a URL with `--plugin-url`, or from an environment variable when you can’t add a flag. Each plugin loads for that session only, and nothing is written to your settings for it. When you edit the plugin’s files during the session, run `/reload-plugins` to load the changes. +You can load a plugin for a single session in three ways: + + * From a directory or `.zip` archive on disk with `--plugin-dir` + * From a URL with `--plugin-url` + * From an environment variable when you can’t add a flag + +When you edit the plugin’s files during the session, run `/reload-plugins` to load the changes. ####
modified Test iOS apps in the simulator View current →
--- a/desktop-ios-simulator.md +++ b/desktop-ios-simulator.md @@ -1,4 +1,4 @@ -The iOS Simulator pane is in public beta in Claude Code Desktop on macOS. It’s available on Pro, Max, Ultra, Team, and Enterprise plans, except in Enterprise organizations that have a HIPAA configuration enabled. +The iOS Simulator pane is in public beta in Claude Code Desktop on macOS. It’s available on Pro, Max, Ultra, Team, and Enterprise plans, except in Enterprise organizations that have a HIPAA configuration enabled. It isn’t available if you use a [third-party provider](</docs/en/third-party-integrations>). The iOS Simulator pane shows your app running in Apple’s iOS Simulator next to your conversation in Claude Code Desktop. When Claude builds, installs, launches, or checks your app in a simulator, the pane opens automatically and streams the device screen live. Use it to watch Claude run and test your app, or to tap through the app yourself while Claude keeps working. The simulator pane drives the simulator directly, so it doesn’t need [computer use](</docs/en/desktop#let-claude-use-your-computer>) and never takes over your screen or hides your other windows. From the CLI, Claude reaches the iOS Simulator through [computer use](</docs/en/computer-use#test-a-simulator-flow>) instead, which controls the simulator on your screen the same way you would with a mouse. @@ -169,7 +169,7 @@ * State the goal explicitly, for example “run the app in the iOS Simulator and tap through the signup flow”. * Confirm Xcode and the iOS simulators are installed and that you’re using a recommended Xcode version. * If your organization manages Claude Code, the simulator tools may be disabled by policy. - * If you’re in an Enterprise organization that has a HIPAA configuration enabled, the simulator pane isn’t available to you. + * If you’re in an Enterprise organization that has a HIPAA configuration enabled, or you use a [third-party provider](</docs/en/third-party-integrations>), the simulator pane isn’t available to you. * The simulator pane requires Claude Desktop v1.24012.0 or later. Open **Claude > Check for Updates…**, then restart the app. ###
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -186,7 +186,7 @@ `CLAUDE_CODE_ARTIFACT_AUTO_OPEN`| Set to `0` to stop Claude Code from opening the browser automatically when a new [artifact](</docs/en/artifacts#create-an-artifact>) is published `CLAUDE_CODE_ARTIFACT_COMMENTS`| Set to `0` to stop Claude reading and replying to [comments on an artifact](</docs/en/artifacts#collect-comments-on-an-artifact>). Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has [turned artifacts off](</docs/en/artifacts#availability>). Requires Claude Code v2.1.221 or later `CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT`| Set to `0` to stop Claude [replying on its own to comments sent to it](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>). Requires Claude Code v2.1.228 or later -`CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS`| Set to `0` to stop Claude from applying small changes to an [artifact’s](</docs/en/artifacts#update-an-artifact>) file as part of publishing it. Claude then edits the file with its file-editing tools and publishes it as a separate step. Requires Claude Code v2.1.300 or later +`CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS`| Set to `0` to stop Claude from [applying small changes](</docs/en/artifacts#turn-off-one-step-artifact-updates>) to an artifact’s file as part of publishing it. Claude then edits the file with its file-editing tools and publishes it as a separate step. Requires Claude Code v2.1.300 or later `CLAUDE_CODE_ATTRIBUTION_HEADER`| Set to `0` to omit the [attribution block](</docs/en/llm-gateway-protocol#system-prompt-attribution-block>), which carries the client version and a prompt fingerprint, from the start of the system prompt. Caching on a direct connection to the Anthropic API is unaffected either way. In some direct-connection setups, Claude Code keeps the block on [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier requests even when you set `0`. In [System prompt attribution block](</docs/en/llm-gateway-protocol#system-prompt-attribution-block>), check which connections and credentials this covers. Before v2.1.181 the block included a per-request token on custom base URLs and Microsoft Foundry connections, so on those versions set it to `0` when your LLM gateway caches on the request body or forwards requests to a third-party provider, or when you connect to Microsoft Foundry directly `CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDS`| Removed in v2.1.283. Use `CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE` instead `CLAUDE_CODE_AUTO_COMPACT_WINDOW`| Set the auto-compact window, how full the context gets before compaction, from `100000` to `1000000` tokens. Suffixed values such as `200k` require v2.1.304 or later. For precedence over the other ways to set the window and the effect on the status line’s `used_percentage`, see [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) @@ -225,11 +225,12 @@ `CLAUDE_CODE_DISABLE_BUNDLED_SKILLS`| Set to `1` to disable the [skills](</docs/en/skills>) and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model. `/doctor` stays typable like the built-in commands; hide it with `DISABLE_DOCTOR_COMMAND` instead. Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. Equivalent to the [`disableBundledSkills`](</docs/en/settings-reference#disablebundledskills>) setting `CLAUDE_CODE_DISABLE_CFC_PROMPT`| For hosts that embed Claude Code and supply their own browser guidance. Set to `1` to keep the [Claude in Chrome](</docs/en/chrome>) browser tools available while omitting the Chrome section of the system prompt and the `/claude-in-chrome` [bundled skill](</docs/en/skills#bundled-skills>). In VS Code, the extension at v2.1.314 or later also leaves the Claude in Chrome instructions out of a session’s messages. Requires Claude Code v2.1.257 or later `CLAUDE_CODE_DISABLE_CLAUDE_MDS`| Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto memory files -`CLAUDE_CODE_DISABLE_CRON`| Set to `1` to disable [session-scoped scheduled tasks](</docs/en/scheduled-tasks>). The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session +`CLAUDE_CODE_DISABLE_CRON`| Set to `1` to disable [session-scoped scheduled tasks](</docs/en/scheduled-tasks#disable-scheduled-tasks>). The `/loop` skill and `CronCreate` become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session `CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`| Set to `1` to turn off the `auto` and `bypassPermissions` [time limit and denials](</docs/en/permission-modes#time-limits-and-denials-in-auto-and-bypasspermissions-modes>) on critical-path removals. These removals then go to the classifier in `auto` mode, and get an untimed prompt in `bypassPermissions` mode wherever Claude Code can show one. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.281 or later `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`| Set to `1` to strip pre-release `anthropic-beta` request headers, the body fields that pair with them, and beta tool-schema fields such as `defer_loading` and `eager_input_streaming` from API requests. Use this when a proxy gateway rejects requests with an `Unexpected value(s)` error for the `anthropic-beta` header or an `Extra inputs are not permitted` error. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) lists what the variable removes, including [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>), and what Claude Code keeps sending `CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS`| Set to `1` to disable the built-in [Explore and Plan subagents](</docs/en/sub-agents#built-in-subagents>). Claude explores with its search tools or the general-purpose subagent instead, and [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) reads files directly rather than launching Explore and Plan agents. Custom subagents named `Explore` or `Plan` are unaffected. To remove every built-in subagent type in the Agent SDK or non-interactive mode, use `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` instead. Requires Claude Code v2.1.198 or later `CLAUDE_CODE_DISABLE_FAST_MODE`| Set to `1` to disable [fast mode](</docs/en/fast-mode>) +`CLAUDE_CODE_DISABLE_FEATURE_FLAGS`| Set to `1` to turn off feature-flag fetching. Requires Claude Code v2.1.319 or later. With this variable set, [Remote Control](</docs/en/remote-control#requirements>) and the other features that need feature-flag fetching are unavailable. Telemetry event logging stays on unless `DISABLE_TELEMETRY` is also set. The older name, `DISABLE_GROWTHBOOK`, still works, and it is the only one that v2.1.124 through v2.1.318 read `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY`| Set to `1` to disable the “How is Claude doing?” session quality surveys. Surveys are also disabled when `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, unless `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` opts back in. To set a sample rate instead of disabling outright, use the [`feedbackSurveyRate`](</docs/en/settings-reference#feedbacksurveyrate>) setting. See [Session quality surveys](</docs/en/data-usage#session-quality-surveys>) `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_FILE_MENTIONS`| Set to `1` to stop Claude Code from expanding [`@` mentions](</docs/en/common-workflows#reference-files-and-directories>) of files and directories. Claude instead gets the mentioned paths with a note to read them using its file tools. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). Requires Claude Code v2.1.299 or later @@ -433,7 +434,7 @@ `DISABLE_ERROR_REPORTING`| Set to any non-empty value, such as `1`, to opt out of error reporting. **Setting it to`0` or `false` still opts out**, unlike most on/off variables; unset the variable to turn error reporting back on `DISABLE_EXTRA_USAGE_COMMAND`| Set to `1` to hide the `/usage-credits` command that lets users purchase additional usage beyond rate limits `DISABLE_FEEDBACK_COMMAND`| Set to `1` to disable the `/feedback` command and [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>). Also disables `/bug` and `/share`, which report through the same path; before v2.1.212 they were aliases of `/feedback`, so the command was disabled under every name. The older name `DISABLE_BUG_COMMAND` is also accepted -`DISABLE_GROWTHBOOK`| Set to `1` or `true` to disable feature-flag fetching and use code defaults for every flag. This makes [Remote Control](</docs/en/remote-control#requirements>) and the other features that need feature-flag fetching unavailable. Setting it to `0` or `false` leaves fetching on. Telemetry event logging stays on unless `DISABLE_TELEMETRY` is also set +`DISABLE_GROWTHBOOK`| Set to `1` to turn off feature-flag fetching. Requires Claude Code v2.1.124 or later. Superseded by `CLAUDE_CODE_DISABLE_FEATURE_FLAGS`, which requires v2.1.319 or later: use that name unless a machine on v2.1.318 or earlier reads the configuration. This name still works `DISABLE_INSTALLATION_CHECKS`| Set to `1` to disable installation warnings. Use only when manually managing the installation location, as this can mask issues with standard installations `DISABLE_INSTALL_GITHUB_APP_COMMAND`| Set to `1` to hide the `/install-github-app` command. Already hidden when using third-party providers (Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry) `DISABLE_INTERLEAVED_THINKING`| Set to `1` to prevent sending the interleaved-thinking beta header. Useful when your LLM gateway or provider does not support [interleaved thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking#interleaved-thinking>) @@ -547,20 +548,20 @@ Claude Code turns some features on through feature flags it fetches from Anthropic. Claude Code skips that fetch in these sessions: - * A session where you set `DISABLE_GROWTHBOOK`, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`; each variable’s row in the variables table says which values turn fetching off + * A session where you set `CLAUDE_CODE_DISABLE_FEATURE_FLAGS`, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`; each variable’s row in the variables table says which values turn fetching off * A session on a [third-party provider](</docs/en/third-party-integrations>), such as Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry, unless a host platform that embeds Claude Code sets `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST` * A [Claude apps gateway](</docs/en/claude-apps-gateway>) session With fetching off, you can’t: - * Use [Remote Control](</docs/en/remote-control>) with `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or `DISABLE_GROWTHBOOK` set. For `DISABLE_TELEMETRY` and `DO_NOT_TRACK`, see the [Remote Control requirements](</docs/en/remote-control#requirements>) + * Use [Remote Control](</docs/en/remote-control>) with `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or `CLAUDE_CODE_DISABLE_FEATURE_FLAGS` set. For `DISABLE_TELEMETRY` and `DO_NOT_TRACK`, see the [Remote Control requirements](</docs/en/remote-control#requirements>) * [Message sessions beyond this machine](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) when [Remote Control](</docs/en/remote-control#requirements>) is unavailable. Messaging between sessions on this machine works with fetching off * Run [`claude import` or the `/import` command](</docs/en/cli-reference#cli-commands>) * Run [`/skill-doctor`](</docs/en/skills#find-unused-skills>) or open its report in the `/plugin` **Stats** tab * Run [`/restart`](</docs/en/commands>) on Pro, Max, and Ultra plans * Sync the [skills](</docs/en/skills#where-synced-skills-load>) and [plugins](</docs/en/plugins/loading#synced-plugins>) enabled for your claude.ai account into your terminal sessions * Turn on the [You should know mod](</docs/en/interactive-mode#you-should-know-suggestions>) - * Use [the advisor tool](</docs/en/advisor#requirements>) + * Use [the advisor tool](</docs/en/advisor#requirements>), except on Claude Platform on AWS with Claude Code v2.1.300 or later * Use [MCP tasks](</docs/en/mcp#mcp-tasks-that-run-on-the-server>) * Read or reply to [comments on an artifact](</docs/en/artifacts#collect-comments-on-an-artifact>) * Have Claude read [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>)
modified Error reference View current →
Show diff (270 lines)
--- a/errors.md +++ b/errors.md @@ -96,6 +96,8 @@ `Failed to authenticate: OAuth session expired and could not be refreshed`| Authentication `Could not refresh your login because another Claude Code process is refreshing it`| Authentication `Failed to refresh OAuth token: another Claude Code process is refreshing it or exited mid-refresh`| Authentication +`Could not refresh your login: the disk that holds the Claude Code config directory (~/.claude by default), or your disk quota on it, is full`| Authentication +`Failed to refresh OAuth token: the disk that holds the Claude Code config directory (~/.claude by default), or your disk quota on it, is full`| Authentication `Your account is on hold and can't use Claude Code. View details or appeal: https://claude.ai/restricted`| Authentication `Your account is on hold and can't sign in to Claude Code. View details or appeal: https://claude.ai/restricted`| Authentication `Anthropic profile login expired · Re-authenticate your Anthropic profile`| Authentication @@ -314,6 +316,7 @@ `The packages it lists are not installed` / `The packages it lists were not installed, because`| [Plugin troubleshooting](</docs/en/plugins/troubleshooting#the-packages-it-lists-are-not-installed>) `does not load (...), so Claude Code ignores the whole file`| [Plugin troubleshooting](</docs/en/plugins/troubleshooting#does-not-load-so-claude-code-ignores-the-whole-file>) `path escapes plugin directory`| Plugin errors +`path not read: <path> is absolute or has a ".." part`| Plugin errors `Plugin not loaded: its manifest <path> was not read`| Plugin errors `path could not be checked`| Plugin errors `its marketplace entry path does not stay inside the marketplace directory`| Plugin errors @@ -362,6 +365,7 @@ `Refusing to write <path>: where it leads on disk could not be determined` / `Refusing to read <path>: where it leads on disk could not be determined`| Tool errors `Refusing to search <path>: a path one of its Read deny rules is written through changed while the search was being prepared` / `Refusing to search <path>: it could not be opened`| Tool errors `its permission check expired before it ran (too many concurrent file operations)` / `ripgrep was found only by name on PATH`| Tool errors +`The search failed, so this is not a "no matches" result: matches may exist`| Tool errors `task output swap refused (tasks dir moved or linked)`| Tool errors `Command killed: its output file was replaced or could no longer be verified`| Tool errors `Disk full: this computer's volume holding <dir> (Claude Code's temporary directory) has <n> MB free` / `Nearly out of inodes: this computer's volume holding <dir>`| Tool errors @@ -371,6 +375,7 @@ `Command output was lost: the temp filesystem at <dir> is full` / `is out of inodes`| Tool errors `File is not valid UTF-8. It may use a legacy encoding such as Windows-1252, Shift-JIS or GBK, or be binary`| Tool errors `git is not installed on this Mac. To install it, run xcode-select --install, then try again.`| Tool errors +`Refusing to apply edits to <path>: a hook is configured for file edits in this session`| Tool errors `the source file is not valid UTF-8 text` / `the source file is not valid UTF-16 text`| Tool errors `the source file has the replacement character U+FFFD`| Tool errors `Not published: that file is on a network share`| Tool errors @@ -381,7 +386,7 @@ `The safety check for domain ... is rate-limited`| Tool errors `The safety check for domain ... is temporarily rate-limited`| Tool errors `Unable to verify if domain ... is safe to fetch`| Tool errors -`MCP tool "<tool>" on server "<server>" gave no answer that could be read` / `answered without its text`| [How an MCP tool hook’s result is read](</docs/en/hooks#how-the-tool%E2%80%99s-result-is-read>) +`MCP tool "<tool>" on server "<server>" gave no answer that could be read` / `answered without its text`| [How an MCP tool hook’s result is read](</docs/en/hooks#how-the-tools-result-is-read>) `Can't open MCP settings while no terminal is attached to this background session`| Background session errors `Can't open MCP settings in a background session`| Background session errors `blocked because the path is spelled in a form that cannot be safely resolved`| Background session errors @@ -392,6 +397,7 @@ `Can't open — this session is running in another terminal`| Background session errors `This conversation is already open in another running Claude session`| Background session errors `This session's saved conversation is no longer on disk`| Background session errors +`This forked session could not be started. Fork the conversation again to retry.`| Background session errors `Bypass permissions was requested at launch and ignored`| [Bypass permissions ignored in a background session](</docs/en/permission-modes#bypass-permissions-ignored-in-a-background-session>) `kept <id> — its worktree is still at <path>`| Background session errors if the message’s next line mentions unpushed commits, otherwise [What deleting a session removes](</docs/en/agent-view#what-deleting-a-session-removes>) `kept <id> — <n> unpushed commits on <branch>`| Background session errors @@ -557,12 +563,24 @@ [`CLAUDE_CODE_MAX_RETRIES`](</docs/en/env-vars>)| 10| Number of retry attempts. Capped at 15 as of v2.1.186; as of v2.1.199 `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. Lower it to surface failures faster in scripts. [`CLAUDE_CODE_RETRY_WATCHDOG`](</docs/en/env-vars>)| unset| Set to `1` in unattended sessions such as CI jobs to retry `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once when a standard-speed request gets a `429` that reports a spend limit or exhausted usage credits, even one from a gateway spend cap that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. For fast mode requests, see [Handle rate limits](</docs/en/fast-mode#handle-rate-limits>). On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. [`CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`](</docs/en/env-vars>)| unset| Maximum time in milliseconds that each API request spends waiting out `429` and `529` errors when `CLAUDE_CODE_RETRY_WATCHDOG` is set. When unset, the wait has no limit. Requires Claude Code v2.1.295 or later. +`CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS`| no cap| With `CLAUDE_CODE_RETRY_WATCHDOG` set, the longest time in milliseconds one request waits for your plan’s usage limit, such as the session or weekly limit, to reset. When the reset is further away than this cap, the request fails at once, unless usage credits have room or the API couldn’t check them. In those cases it’s retried, and fails if the cap passes before it succeeds. Requires Claude Code v2.1.301 or later. [`CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS`](</docs/en/env-vars>)| unset| Minimum interval in milliseconds between checks of whether a usage limit was already lifted, while a request waits for that limit to reset with `CLAUDE_CODE_RETRY_WATCHDOG` set. When a check finds the limit lifted, the request goes out at once. Give plain digits from `60000` to `10800000`. When unset or outside that range, no checks are made. For when Claude Code skips these checks, see the [environment variables reference](</docs/en/env-vars>). Requires Claude Code v2.1.305 or later. [`CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS`](</docs/en/env-vars>)| 500| Starting delay in milliseconds of the backoff between retries of a request that the API rejects with a `529` overloaded error. Raise it, up to 32000, to spread the retries over a longer window when the API is at capacity. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](</docs/en/fast-mode#handle-rate-limits>). Requires Claude Code v2.1.292 or later. [`CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS`](</docs/en/env-vars>)| 32000| Ceiling in milliseconds on the backoff between retries of a request that the API rejects with a `529` overloaded error. Raise it, up to 64000, so that later retries keep spreading apart when the API is at capacity. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](</docs/en/fast-mode#handle-rate-limits>). Requires Claude Code v2.1.296 or later. [`API_TIMEOUT_MS`](</docs/en/env-vars>)| 600000| Time in milliseconds that each request attempt has to receive its response headers. It doesn’t limit how long a streaming response runs after that. Raise it for slow networks or proxies. For how it caps the first-byte deadline, see No response from API. -[`CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIES`](</docs/en/env-vars>)| unset| Limit on re-sends of a non-streaming request that times out. At the limit, the request fails. A response from Claude that takes longer than the timeout to generate times out again on every re-send, so set a low number such as `0` to fail sooner. Each non-streaming attempt times out after 300 seconds in a local session, or after `API_TIMEOUT_MS` when you set a positive value. Requires Claude Code v2.1.285 or later. +[`CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIES`](</docs/en/env-vars>)| unset| Limit on re-sends of a non-streaming request that times out. At the limit, the request fails. A response from Claude that takes longer than the timeout to generate times out again on every re-send, so set a low number such as `0` to fail sooner. For each attempt’s timeout, see How long a non-streaming attempt waits. Requires Claude Code v2.1.285 or later. [`CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`](</docs/en/env-vars>)| unset| Deadline in milliseconds for the first response byte of a streaming request. Requires Claude Code v2.1.242 or later. For how Claude Code picks the deadline when this is unset, see No response from API. + +#### + +​ + +How long a non-streaming attempt waits + +A non-streaming attempt ends at its request timeout or at the body idle timeout, whichever comes first: + + * **Request timeout** : `API_TIMEOUT_MS` when you set a positive value, otherwise 300 seconds in a local session. + * **[Body idle timeout](</docs/en/network-config#streaming-idle-watchdogs>)** : 5 to 6 minutes without a response, however high you set `API_TIMEOUT_MS`, where it runs and you haven’t turned it off. ## @@ -1408,6 +1426,25 @@ ​ +Could not refresh your login: the disk that holds the Claude Code config directory is full + +Free space on the disk that holds the Claude Code config directory, then send your message again. Signing in wouldn’t help while the disk is full, because a new login couldn’t be saved. The config directory is `~/.claude` in your home directory unless you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>). + + Could not refresh your login: the disk that holds the Claude Code config directory (~/.claude by default), or your disk quota on it, is full · Delete files you no longer need on that disk, then try again · Signing in again won't help + +In [non-interactive mode](</docs/en/headless>) (`-p`) and the [Agent SDK](</docs/en/agent-sdk/overview>), the message reads: + + Failed to refresh OAuth token: the disk that holds the Claude Code config directory (~/.claude by default), or your disk quota on it, is full. Delete files you no longer need on that disk and retry; signing in again won't help + +**What to do:** + + * For a script, rerun its `claude -p` command + * If the disk already shows free space, running out of disk quota or of inodes produces the same message. Delete your own files on that disk. If the message returns, delete many small files rather than a few large ones, because each file takes one inode whatever its size. + +### + +​ + Couldn’t save your login You signed in with claude.ai, but Claude Code couldn’t save the login to its credential store, so the login didn’t complete. On macOS this can happen when the login keychain locks, for example on sleep or idle, after Claude Code has already read or saved credentials in it during the same session. @@ -2061,12 +2098,12 @@ You may also see a TLS certificate that doesn’t match the destination’s real certificate. Cloud sessions route outbound traffic through a proxy that enforces the network policy, so a mismatched certificate means the proxy terminated the connection, not the destination. This error is not a client-side network problem. Cloud sessions and [cloud scheduled tasks](</docs/en/routines>) run inside a sandboxed VM whose outbound traffic through the session’s network is filtered to the [cloud environment’s](</docs/en/cloud-environments>) allowlist: * **GitHub and connector traffic** : [GitHub operations](</docs/en/cloud-environments#github-proxy>) and MCP connector traffic use separate channels, which is why they can keep working while other hosts are blocked - * **Default environment** : the **Default** environment uses **Trusted** access, which permits the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) of package registries, cloud provider APIs, container registries, and common development domains and blocks other domains on that path + * **Default environment** : the **Default** environment uses **Limited** access with **Allow package managers** checked. Its sessions reach the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) of package registries, cloud provider APIs, container registries, and common development domains. **What to do:** These steps change one of your own environments. An [organization-shared environment](</docs/en/cloud-environments#organization-shared-environments>) opens read-only in the selector, so ask an Owner to change its network access from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>). * Open your environment for editing, either from the [cloud scheduled task’s form](</docs/en/routines#environments-and-network-access>) or from the [environment selector](</docs/en/cloud-environments#configure-your-environment>) where you start cloud sessions. - * In the **Edit 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. + * In the **Edit cloud environment** dialog, select **Limited** under **Network access** , then add the blocked domain to **Allowed domains**. Enter one domain per line. Check **Allow package managers** to allow the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) alongside your own domains. Select **Full** instead if you want unrestricted access. * 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. @@ -2300,17 +2337,22 @@ Context exceeds the token limit -`/context` shows this warning at the top of its output when the conversation has grown past the model’s context window. Requests fail with `Prompt is too long` until you free space. An interactive session shows that error as the `Context limit reached` line. +`/context` shows this warning at the top of its output when the conversation has grown past the model’s context window: Context exceeds the 200k-token limit by 94k tokens — run /compact or /clear to continue. +After a `Context exceeds` warning, you don’t need to run either command while [auto-compact](</docs/en/settings-reference#autocompactenabled>) is on, which is the default: + + * **Auto-compact on** : send your next message. If it still fails with `Prompt is too long`, see that entry. + * **Auto-compact off** : in the session, run `/compact` if the warning names it, or `/clear` to start over. Until you run one, messages fail with `Context limit reached`, or `Prompt is too long` in `-p` output. + When the limit you exceeded is a compaction window, such as the 200K boundary on 1M-context models, the warning reads differently. A compaction window can sit below the model’s context window, so requests past it can still succeed. Context is 94k tokens past the 200k-token compaction window — run /compact to reduce usage. Both forms name `/clear` instead of `/compact` when you have set [`DISABLE_COMPACT`](</docs/en/env-vars>). **What to do:** - * In a multi-turn conversation, run `/compact` to summarize earlier turns and free space. To start fresh instead, run `/clear` + * **After a compaction-window warning** : in a multi-turn conversation, run `/compact` to summarize earlier turns and free space. To start fresh instead, run `/clear`. * For more ways to reduce usage, see Prompt is too long Before v2.1.216, `/context` showed usage above 100% with no warning line explaining what that meant or how to recover. @@ -3138,7 +3180,7 @@ Configuration error in ~/.claude.json -Claude Code couldn’t parse `~/.claude.json`, the file that holds your account details, MCP servers, and per-project state. Your file is unchanged. A [non-interactive](</docs/en/headless>) start such as `claude -p` exits with code 1 each time until you repair the file. When Claude Code finds a [backup](</docs/en/claude-directory#cleaned-up-automatically>), the output names it and prints a `cp` line that copies it back: +Claude Code couldn’t parse `~/.claude.json`, the file that holds your account details, MCP servers, and per-project state. A [non-interactive](</docs/en/headless>) start such as `claude -p` exits with code 1. When Claude Code finds a [backup](</docs/en/claude-directory#cleaned-up-automatically>), the output names it and prints a `cp` line that copies it back: Claude configuration file at /home/user/.claude.json is corrupted: <JSON parser's message> The corrupted file has been backed up to: /home/user/.claude/backups/.claude.json.corrupted.1793664000000 @@ -3149,10 +3191,9 @@ **What to do:** - * **The output has a`cp` line**: run that line in your terminal. On Windows, run it in PowerShell. It replaces the broken file with the backup, an earlier version of `~/.claude.json`. - * **The output has no`cp` line, or the error returns after you run it**: fix the JSON in `~/.claude.json`, copy another `.claude.json.backup.<timestamp>` file from [`~/.claude/backups/`](</docs/en/claude-directory#cleaned-up-automatically>) over it if there is one, or rename it. With no file at `~/.claude.json`, Claude Code starts with default settings and none of what the file held. - -Before v2.1.318, you were left with defaults in `~/.claude.json` after a non-interactive start printed this error, so the next start ran without your configuration. + * **The output has a`cp` line**: run that line in your terminal. On Windows, run it in PowerShell. + * **The output has no`cp` line, or the error returns after you run it**: if `~/.claude.json` still has your configuration, fix its JSON. If you can’t, copy another `.claude.json.backup.<timestamp>` file from [`~/.claude/backups/`](</docs/en/claude-directory#cleaned-up-automatically>) over it if there is one, or rename it. With no file at `~/.claude.json`, Claude Code starts with default settings and none of what the file held. + * **`~/.claude.json` no longer has your configuration**: find a `.claude.json.corrupted.<timestamp>` file that still has it, in [`~/.claude/backups/`](</docs/en/claude-directory#cleaned-up-automatically>) or your home directory. Fix its JSON, then copy it over `~/.claude.json`. If you can’t find or fix one, try the same steps with a `.claude.json.backup.<timestamp>` file that has your configuration. If none does, rename `~/.claude.json` and add your MCP servers again with [`claude mcp add`](</docs/en/mcp#installing-mcp-servers>). ### @@ -3358,7 +3399,7 @@ * You haven’t started a session since installing, so Claude Code hasn’t fetched the flag yet. The first `claude import` can print this even when the feature is available to you. * You use Claude Code through Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or Claude Platform on AWS, or through a [Claude apps gateway](</docs/en/claude-apps-gateway#availability-and-limitations>). Claude Code doesn’t fetch feature flags in these sessions, so `claude import` stays unavailable. - * You set `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `DISABLE_GROWTHBOOK`, or [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>), which turn off feature-flag fetching, so `claude import` stays unavailable. + * You set `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, [`CLAUDE_CODE_DISABLE_FEATURE_FLAGS`](</docs/en/env-vars#variables>), `DISABLE_GROWTHBOOK`, or [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`](</docs/en/env-vars>), which turn off feature-flag fetching, so `claude import` stays unavailable. **What to do:** @@ -4309,6 +4350,22 @@ * If the message says a path the plugin declares contains a backslash, write the path with forward slashes, for example `./commands/deploy.md` * If the message ends with `EACCES`, restore your execute permission on every directory leading to the file or folder the path names. Check the directories above the path, then follow each symlink you reach and check the directories leading to where it points. For any other error code, look it up in the causes and steps for a path that couldn’t be checked. * To share files with other plugins in the same marketplace, link them with a symlink inside the plugin directory, following the [symlink rules](</docs/en/plugins/host-marketplace#share-files-within-a-marketplace-with-symlinks>) + +### + +​ + +Server file path not read + +The `path not read` message means Claude Code didn’t read an MCP or LSP server file that a plugin names, because of the file’s path. The rest of the plugin loads, without the servers the file defines. A `..` part counts even when the path stays inside the plugin, as in this example: + + mcp-servers path not read: ./sub/../x.json is absolute or has a ".." part + +**What to do:** + + * If you installed the plugin and don’t maintain it, report the message to its author + * If you maintain the plugin, keep the server file inside the plugin directory. Name it in the manifest or marketplace entry with a path that starts with `./` and has no `..`, for example `./servers/x.json` + * To share one server file between plugins in the same marketplace, link the file into each plugin with a symlink, following the [symlink rules](</docs/en/plugins/host-marketplace#share-files-within-a-marketplace-with-symlinks>) ### @@ -4930,6 +4987,25 @@ ​ +The search failed, so this is not a “no matches” result + +A [Grep](</docs/en/tools-reference#grep-tool-behavior>) or [Glob](</docs/en/tools-reference#glob-tool-behavior>) search Claude ran failed before returning any result, so whether matches exist is unknown. The message Claude receives in place of results starts: + + The search failed, so this is not a "no matches" result: matches may exist. What happened to the search program (ripgrep) is not known, and no results were read. Run the search once more. If it fails again, tell the user that searches are failing. + +**What to do:** + + * **The first time it appears** : nothing. The message asks Claude to search again first. + * **If Claude says searches are failing** : capture ripgrep’s error for a bug report: + 1. From your shell, start a session with the same flags as the session where searches failed, plus [`--debug-file claude-debug.log`](</docs/en/cli-reference#cli-flags>) + 2. Send Claude the request that led to the failed search + 3. If the search fails again, find the line containing `rg error (signal=` in `claude-debug.log` + 4. Include that line when you report the problem + +### + +​ + Task output swap refused Claude Code saves each Bash command’s output to a file under its temp directory. Every time it opens one of these files, it checks that the path still leads to the file it created, with no symbolic link, extra hard link, or moved directory redirecting it. This message means that check failed, so Claude Code refused the operation rather than write or read output through that path. The message appears in the Bash tool result: @@ -5014,6 +5090,23 @@ ​ +Refusing to apply edits: a hook is configured for file edits in this session + +Claude tried to publish an [artifact](</docs/en/artifacts>) with a [one-step update](</docs/en/artifacts#turn-off-one-step-artifact-updates>), a small change to the artifact’s file included in the publish, and Claude Code refused. Nothing was published and the file is unchanged. The message appears in the Artifact tool result: + + Refusing to apply edits to <path>: a hook is configured for file edits in this session, so a publish can't apply edits here. Edit the file, then publish it without edits. Nothing was published. + +Claude Code doesn’t allow one-step updates while your session has a [`PreToolUse` hook](</docs/en/hooks#pretooluse>) or [mod](</docs/en/plugins/mods/overview>) on `Edit` or `Write`. **What to do:** + + * Nothing, if Claude went on to edit the file and publish it + * If Claude stopped at the message, ask Claude to edit the file and publish + * If the message keeps coming back, quit and relaunch Claude Code + * If the message comes back even after a relaunch, [turn off one-step updates](</docs/en/artifacts#turn-off-one-step-artifact-updates>) + +### + +​ + The source file is not valid UTF-8 text Claude tried to publish an [artifact](</docs/en/artifacts>) from a file whose bytes don’t decode as text, or whose text already contains the replacement character `U+FFFD`, so Claude Code refused the publish before uploading anything. The message appears in the Artifact tool result and names the first position to fix: @@ -5456,6 +5549,20 @@ Before v2.1.257, the session appeared to start and then showed in agent view as a failed row with the same reason. Before v2.1.281, this message also appeared when the directory was already gone before you started the session. That case reports `could not be resolved on disk`. **What to do:** * Recreate the directory the message names, or dispatch from a directory that exists, then try again + +### + +​ + +This forked session could not be started + +You [forked a Remote Control session](</docs/en/remote-control#fork-a-session-from-your-browser>) from claude.ai, and Claude Code couldn’t finish starting the [background session](</docs/en/agent-view>) that runs the fork on your machine. This notice appears in the forked session’s transcript: + + This forked session could not be started. Fork the conversation again to retry. + +The session you forked keeps running. **What to do:** + + * Go back to the session you forked and fork it again once the session is idle ###
modified Speed up responses with fast mode View current →
Show diff (138 lines)
--- a/fast-mode.md +++ b/fast-mode.md @@ -1,6 +1,6 @@ Fast mode for Claude Fable 5.2 and Claude Opus 5.5 is available. Fast mode for Claude Opus 5 and Claude Opus 4.8 is in research preview. -Fast mode is a high-speed configuration for supported models, making the model up to 2.5x faster at a higher cost per token. Toggle it on with `/fast` when you need speed for interactive work such as rapid iteration or live debugging, and toggle it off when cost matters more than latency. Fast mode uses the same model with a different API configuration that prioritizes speed over cost efficiency, so quality and capabilities stay the same. Fast mode is supported on Fable 5.2, Opus 5.5, Opus 5, and Opus 4.8. It is not available on Sonnet, Haiku, or other models. +Fast mode is a high-speed configuration for supported models, making the model up to 2.5x faster at a higher cost per token. Toggle it on with `/fast` when you need speed for interactive work such as rapid iteration or live debugging, and toggle it off when cost matters more than latency. Fast mode uses the same model with a different API configuration that prioritizes speed over cost efficiency, so quality and capabilities stay the same. On the Anthropic API, fast mode is supported on Fable 5.2, Opus 5.5, Opus 5, and Opus 4.8, but not on Sonnet, Haiku, or other models. For the models on Google Cloud’s Agent Platform, see Use fast mode on Agent Platform. Fast mode for Opus 4.8 was deprecated on October 30, 2026, and will be removed on November 30, 2026. If Opus 4.8 is still your model with fast mode on after that date, the API rejects your requests. By that date, switch to Opus 5.5 or turn fast mode off in your session: @@ -9,9 +9,9 @@ Opus 4.7 doesn’t support fast mode, so switching to it turns fast mode off. Fast mode for Opus 4.7 was deprecated on June 25, 2026, and removed on July 24, 2026. What to know: - * Use `/fast` to toggle on fast mode in the Claude Code CLI. The [VS Code extension](</docs/en/vs-code>) offers a **Toggle fast mode** command when the selected model supports fast mode. Claude Code saves that toggle to your `fastMode` setting. - * Fast mode pricing per MTok input/output is $16/$80 on Fable 5.2, $8/$40 on Opus 5.5, and $10/$50 on Opus 5 and Opus 4.8. - * Available to Claude Code users on subscription plans (Pro/Max/Ultra/Team/Enterprise) and on Claude Console. Team and Enterprise organizations need an Owner to enable it first, and Console organizations need access provisioned first to use it with Opus 5 or Opus 4.8. Requirements describes both. + * Use `/fast` to toggle on fast mode in the Claude Code CLI. The [VS Code extension](</docs/en/vs-code>) offers a **Toggle fast mode** command when the selected model supports fast mode. On the Anthropic API, Claude Code saves that toggle to your `fastMode` setting. + * Anthropic’s fast mode pricing per MTok input/output: $16/$80 on Fable 5.2, $8/$40 on Opus 5.5, and $10/$50 on Opus 5 and Opus 4.8. + * Available to Claude Code users on subscription plans (Pro/Max/Ultra/Team/Enterprise), on Claude Console, and on Google Cloud’s Agent Platform with conditions. Team and Enterprise organizations need an Owner to enable it first, and Console organizations need access provisioned first to use it with Opus 5 or Opus 4.8. Requirements describes both. * For Claude Code users on subscription plans (Pro/Max/Ultra/Team/Enterprise), fast mode is available via usage credits only and not included in the subscription rate limits. ## @@ -20,20 +20,20 @@ Toggle fast mode -In the CLI, toggle fast mode in either of these ways: +On Agent Platform, `/fast` and the `fastMode` setting work differently, so follow Use fast mode on Agent Platform instead. In the CLI, toggle fast mode in either of these ways: * Run `/fast`, press Space to toggle on or off, then press Enter to confirm * On a model that supports fast mode, set `"fastMode": true` in your [user settings file](</docs/en/settings>). If you set it on any other model, you stay on that model with fast mode off. On Fable 5.2, that setting alone has no effect until you run `/fast` while using Fable 5.2. -By default, fast mode you turn on in an interactive session persists across sessions on a supported model. On Fable 5.2, it persists only if you turned it on while using Fable 5.2. You can configure fast mode to reset each session. See require per-session opt-in for details. Outside a cloud session, in [non-interactive mode](</docs/en/headless>) with the `-p` flag, `/fast` works only in a session launched with fast mode in its [`--settings`](</docs/en/cli-reference#cli-flags>) value, for example `claude -p --settings '{"fastMode": true}'`; the toggle then applies to that session only and isn’t saved as your default. The `-p` form requires Claude Code v2.1.205 or later. Elsewhere in non-interactive mode, the command reports that fast mode isn’t available. You can run `/fast` while Claude is working, and Claude Code toggles fast mode without waiting for the turn to end. Claude Code finishes the running turn at its original speed, so the speed change takes effect from your next turn. If your current model doesn’t support fast mode, turning it on also switches your model, and Claude Code uses the new model from its next request in that turn. For the best cost efficiency, enable fast mode at the start of a session rather than switching mid-conversation. See understand the cost tradeoff for details. When you enable fast mode with `/fast`: - - * If your current model doesn’t support fast mode, Claude Code switches to Opus +By default on the Anthropic API, fast mode you turn on in an interactive session persists across sessions on a supported model. On Fable 5.2, fast mode persists only if you turned it on while using Fable 5.2. You can configure fast mode to reset each session. See require per-session opt-in for details. Outside a cloud session, in [non-interactive mode](</docs/en/headless>) with the `-p` flag, `/fast` works only in a session launched with fast mode in its [`--settings`](</docs/en/cli-reference#cli-flags>) value, for example `claude -p --settings '{"fastMode": true}'`; the toggle then applies to that session only and isn’t saved as your default. The `-p` form requires Claude Code v2.1.205 or later. Elsewhere in non-interactive mode, the command reports that fast mode isn’t available. You can run `/fast` while Claude is working, and Claude Code toggles fast mode without waiting for the turn to end. Claude Code finishes the running turn at its original speed, so the speed change takes effect from your next turn. If your current model doesn’t support fast mode, turning it on also switches your model, and Claude Code uses the new model from its next request in that turn. For the best cost efficiency, enable fast mode at the start of a session rather than switching mid-conversation. See understand the cost tradeoff for details. When you enable fast mode with `/fast`: + + * On the Anthropic API, if your current model doesn’t support fast mode, Claude Code switches to Opus * Fast mode on Fable 5.2 requires Claude Code v2.1.321 or later * You’ll see a confirmation message: “Fast mode ON” * A small `↯` icon appears next to the prompt while fast mode is active * Run `/fast` again at any time to check whether fast mode is on or off -Opus 5.5 is the fast mode default in Claude Code v2.1.280 and later. Before v2.1.280, fast mode defaulted to Opus 5 from v2.1.219. When you disable fast mode with `/fast` again, you remain on your current model. To switch to a different model, use `/model`. +On the Anthropic API, Opus 5.5 is the fast mode default in Claude Code v2.1.280 and later. Before v2.1.280, fast mode defaulted to Opus 5 from v2.1.219. When you disable fast mode with `/fast` again, you remain on your current model. To switch to a different model, use `/model`. ### @@ -45,9 +45,9 @@ * **Switch away** : when you switch to a model that doesn’t support fast mode, Claude Code turns fast mode off. This includes Opus 4.7; before v2.1.221, fast mode stayed on after a switch to Opus 4.7 and the API rejected the requests. * **Switch back** : fast mode comes back on a supported Opus model when your saved preference is on. With per-session opt-in, run `/fast` instead. - * **Switch to Fable 5.2** : fast mode turns off unless you turned it on while using Fable 5.2. To turn it on, run `/fast` on Fable 5.2. Unless you’ve set per-session opt-in, that lasts across sessions until you turn it off or turn it on with another model. - -Whenever a model switch turns fast mode on or off, Claude Code shows a `Fast mode ON` or `Fast mode OFF` confirmation, and the `↯` icon appears while fast mode is on. This holds whether you switch with `/model`, with [`/config model=<model>`](</docs/en/settings>), or from a device connected through [Remote Control](</docs/en/remote-control>). Claude Code resends the session’s fast mode status to devices connected through Remote Control after a model switch, a reconnection, or a failed availability check. + * **Switch to Fable 5.2** : fast mode turns off unless you turned it on while using Fable 5.2. To turn it on, run `/fast` on Fable 5.2. Unless you’ve set per-session opt-in, that choice lasts across sessions on the Anthropic API until you turn fast mode off or turn it on with another model. + +Whenever a model switch turns fast mode on or off, Claude Code shows a `Fast mode ON` or `Fast mode OFF` confirmation, and the `↯` icon appears while fast mode is on. This holds whether you switch with `/model`, with [`/config model=<model>`](</docs/en/settings>), or from a device connected through [Remote Control](</docs/en/remote-control>). ### @@ -55,7 +55,7 @@ Use fast mode in cloud sessions -Fast mode works in [cloud sessions](</docs/en/claude-code-on-the-web>) when it’s available on your account, whether the session runs on Anthropic-managed infrastructure or a [self-hosted runner](</docs/en/self-hosted-environments>). Requires Claude Code v2.1.271 or later in the session’s environment. Type `/fast on` in the session to turn fast mode on. It stays on for that session only and isn’t saved as your default. The requirements apply in cloud sessions too. In the browser at [claude.ai/code](<https://claude.ai/code>), you can also turn fast mode on and off from the model menu on the message box. The menu shows the switch when your plan includes fast mode and the selected model supports it. +Fast mode works in [cloud sessions](</docs/en/claude-code-on-the-web>) when it’s available on your account, whether the session runs on Anthropic-managed infrastructure or a [self-hosted runner](</docs/en/self-hosted-environments>) on the Anthropic API. Requires Claude Code v2.1.271 or later in the session’s environment. Type `/fast on` in the session to turn fast mode on. It stays on for that session only and isn’t saved as your default. The requirements apply in cloud sessions too. In the browser at [claude.ai/code](<https://claude.ai/code>), you can also turn fast mode on and off from the model menu on the message box. The menu shows the switch when your plan includes fast mode and the selected model supports it. ## @@ -63,7 +63,7 @@ Understand the cost tradeoff -Fast mode has higher per-token pricing than standard speed: +Fast mode has higher per-token pricing than standard speed. These are Anthropic’s rates: Model| Input (MTok)| Output (MTok) ---|---|--- @@ -127,7 +127,7 @@ Fast mode requires all of the following: - * **Anthropic API or subscription only** : fast mode is available through the Anthropic Console API and for Claude subscription plans using usage credits. It is not available on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or Claude Platform on AWS. Console organizations must also have fast mode access provisioned to use it with Opus 5 or Opus 4.8. + * **Supported provider** : fast mode is available through the Anthropic Console API, for Claude subscription plans using usage credits, and on Google Cloud’s Agent Platform with conditions. It is not available on Amazon Bedrock, Microsoft Foundry, or Claude Platform on AWS, where `/fast` reports “Fast mode is not available on this provider”. Console organizations must also have fast mode access provisioned to use it with Opus 5 or Opus 4.8. * **Usage credits turned on for subscription plans** : on a Pro, Max, Ultra, Team, or Enterprise plan, your account must have [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) turned on, which allows billing beyond your plan’s included usage. Until they’re on, `/fast` reports “Fast mode requires usage credits”. To turn them on, follow the step for your plan: * On Pro, Max, and Ultra, turn them on in the **Usage credits** section of [**Settings > Usage**](<https://claude.ai/settings/usage>) on claude.ai, or run `/usage-credits` to open that page. * On Team and Enterprise, a member with billing access turns them on for the organization at [**Organization settings > Usage**](<https://claude.ai/admin-settings/usage>), and a member without it runs `/usage-credits` to send the organization’s admins a request. @@ -142,7 +142,7 @@ * **Fast mode not enabled** : if fast mode hasn’t been enabled for your organization, turning fast mode on with `/fast` shows “Fast mode has been disabled by your organization.” * **Fast mode turned off by managed settings** : if your organization deploys [managed settings](</docs/en/managed-settings>) that set [`fastMode: false`](</docs/en/settings-reference#fastmode>), turning fast mode on with `/fast` shows the same “Fast mode has been disabled by your organization” message. * **Per-session opt-in required** : managed settings that set `fastModePerSessionOptIn: true` refuse `/fast on` with the same message everywhere except an interactive terminal session. - * **Fast-mode model not allowed** : if your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes the fast-mode Opus model, turning it on is refused with “is not in your organization’s allowed models”. In a session already running on an allowed model that supports fast mode, `/fast` instead enables fast mode on your current model without switching models. + * **Fast-mode model not allowed** : if your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes the model `/fast` switches to, turning it on is refused with “is not in your organization’s allowed models”. In a session already running on an allowed model that supports fast mode, `/fast` instead enables fast mode on your current model without switching models. ### @@ -161,9 +161,29 @@ ​ +Use fast mode on Agent Platform + +On [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), you can turn fast mode on for Fable 5.2, with `/fast` in an interactive session or with launch flags in [non-interactive mode](</docs/en/headless>). Requires Claude Code v2.1.322 or later. Fast mode needs the [region](</docs/en/google-vertex-ai#region-configuration>) for Fable 5.2 to be `global`, `us`, or `eu`. In another region, `/fast` reports `Fast mode needs Vertex region global, us or eu`, and `claude -p` runs at standard speed. Set the region in your shell before you start Claude Code, for example to `global`: + + export VERTEX_REGION_CLAUDE_FABLE_5_2=global + +Then turn fast mode on: + + * **In an interactive session** : run `/fast`. It switches you to Fable 5.2 from an Opus model or another model without fast mode on Agent Platform. Fast mode isn’t saved as your default. + * **In non-interactive mode** : pass Fable 5.2 as [`--model`](</docs/en/cli-reference#cli-flags>) and fast mode in [`--settings`](</docs/en/cli-reference#cli-flags>), for example `claude -p "Summarize this project" --model claude-fable-5-2 --settings '{"fastMode": true}'` + +On Agent Platform, `"fastMode": true` in your user, project, local, or managed settings has no effect. If Agent Platform refuses fast mode, Claude Code falls back to standard speed. An interactive session then shows one of these terminal messages: + + * `Using standard speed on Fable 5.2 · fast mode wasn't available`: run `/fast on` to try fast mode again + * `Fast mode was refused for this project · trying again in 30m`: Agent Platform answered a fast mode request with a 403 or 404 error. To try sooner, run `/fast on`. + +### + +​ + Use fast mode behind proxies and LLM gateways -Before offering fast mode, Claude Code checks your organization’s fast mode availability with a request directly to `api.anthropic.com`. The check doesn’t follow [`ANTHROPIC_BASE_URL`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>), so on a network that routes Claude traffic through an [LLM gateway](</docs/en/llm-gateway>) and blocks direct egress to `api.anthropic.com`, the check fails even though inference requests work. The check does use a configured [HTTP proxy](</docs/en/network-config#proxy-configuration>), so a network block fails the check only where `api.anthropic.com` is unreachable even through the proxy. If your organization has fast mode enabled and `/fast` says otherwise, find the message it shows among these cases. +Before offering fast mode on the Anthropic API, Claude Code checks your organization’s fast mode availability with a request directly to `api.anthropic.com`. The check doesn’t follow [`ANTHROPIC_BASE_URL`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>), so on a network that routes Claude traffic through an [LLM gateway](</docs/en/llm-gateway>) and blocks direct egress to `api.anthropic.com`, the check fails even though inference requests work. The check does use a configured [HTTP proxy](</docs/en/network-config#proxy-configuration>), so a network block fails the check only where `api.anthropic.com` is unreachable even through the proxy. If your organization has fast mode enabled and `/fast` says otherwise, find the message it shows among these cases. #### @@ -207,7 +227,7 @@ Require per-session opt-in -By default, fast mode a user turns on in an interactive session persists across sessions on a supported model. On Fable 5.2, it persists only if the user turned it on while using Fable 5.2. To make every session start with fast mode off, set `fastModePerSessionOptIn` to `true` in any [settings file](</docs/en/settings#where-settings-live>). Users then enable it with `/fast` in each session. Owners on [Team](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_teams#team-&-enterprise>) or [Enterprise](<https://anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_enterprise>) plans can deploy it organization-wide through [server-managed settings](</docs/en/server-managed-settings>). +By default on the Anthropic API, fast mode a user turns on in an interactive session persists across sessions on a supported model. On Fable 5.2, fast mode persists only if the user turned it on while using Fable 5.2. To make every session start with fast mode off, set `fastModePerSessionOptIn` to `true` in any [settings file](</docs/en/settings#where-settings-live>). Users then enable it with `/fast` in each session. Owners on [Team](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_teams#team-&-enterprise>) or [Enterprise](<https://anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_enterprise>) plans can deploy it organization-wide through [server-managed settings](</docs/en/server-managed-settings>). { "fastModePerSessionOptIn": true
modified Feature availability View current →
--- a/feature-availability.md +++ b/feature-availability.md @@ -70,9 +70,9 @@ These features work in the local CLI but depend on a server-side capability that not every provider exposes. Feature| Claude subscription| Anthropic Console| Amazon Bedrock| Claude Platform on AWS| Google Cloud’s Agent Platform| Microsoft Foundry ---|---|---|---|---|---|--- [Web search](</docs/en/tools-reference#websearch-tool-behavior>)| ✓| ✓| ✗| ✓| See note 1| ✓ -[Fast mode](</docs/en/fast-mode>)| ✓ ([Owner-enabled](</docs/en/fast-mode#enable-fast-mode-for-your-organization>) on Team and Enterprise)| ✓ (Opus 5 and 4.8 need provisioning)| ✗| ✗| ✗| ✗ +[Fast mode](</docs/en/fast-mode>)| ✓ ([Owner-enabled](</docs/en/fast-mode#enable-fast-mode-for-your-organization>) on Team and Enterprise)| ✓ (Opus 5 and 4.8 need provisioning)| ✗| ✗| ✓ ([Fable 5.2, with conditions](</docs/en/fast-mode#use-fast-mode-on-agent-platform>))| ✗ [Auto mode](</docs/en/auto-mode-config>)| ✓| ✓| See note 2| ✓| See note 2| See note 2 -[Advisor](</docs/en/advisor>)| ✓| ✓| ✗| ✗| ✗| ✗ +[Advisor](</docs/en/advisor>)| ✓| ✓| ✗| ✓ (Claude Code v2.1.300 or later)| ✗| ✗ [Cross-session messaging](</docs/en/cross-session-messaging>)| ✓ 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5| ✓ (same machine) 5 [Channels](</docs/en/channels>)| ✓| ✓| ✗| ✗| ✗| ✗ [GitHub Actions](</docs/en/github-actions>)| ✓| ✓| ✓| ✗| ✓| ✓ @@ -95,7 +95,7 @@ 4 Dashboard and API only. [Contribution metrics](</docs/en/analytics#enable-contribution-metrics>) requires a claude.ai Team or Enterprise organization. 5 Requires Claude Code v2.1.224 or later on macOS and Linux, including Linux inside WSL 2. On native Windows, requires Claude Code v2.1.234 or later. With API key authentication, messaging is same-machine only. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, messaging is same-machine only and requires Claude Code v2.1.248 or later. Claude can find your [cloud sessions](</docs/en/claude-code-on-the-web>) and your sessions on other machines only from a session that is connected to [Remote Control](</docs/en/remote-control>). To connect, you need a claude.ai sign-in and the other [Remote Control requirements](</docs/en/remote-control#requirements>). See [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>). -If you authenticate through an [LLM gateway](</docs/en/llm-gateway>), feature availability matches the underlying provider the gateway forwards to, except for the features Claude Code itself turns off. Whenever `ANTHROPIC_BASE_URL` points at a host other than `api.anthropic.com`, Claude Code turns off features such as [Remote Control](</docs/en/remote-control#requirements>) and [server-managed settings](</docs/en/server-managed-settings#platform-availability>), whatever the gateway forwards. Some Anthropic-only features such as the [Advisor](</docs/en/advisor>) work only if the gateway forwards requests intact to the Anthropic API.For how the requests Claude Code sends differ between an Amazon Bedrock- or Agent Platform-format gateway, an `ANTHROPIC_BASE_URL` gateway, and a Claude apps gateway sign-in, see [client behavior by connection method](</docs/en/llm-gateway-protocol#how-the-connection-method-changes-client-behavior>). +If you authenticate through an [LLM gateway](</docs/en/llm-gateway>), feature availability matches the underlying provider the gateway forwards to, except for the features Claude Code itself turns off. Whenever `ANTHROPIC_BASE_URL` points at a host other than `api.anthropic.com`, Claude Code turns off features such as [Remote Control](</docs/en/remote-control#requirements>) and [server-managed settings](</docs/en/server-managed-settings#platform-availability>), whatever the gateway forwards. Some features, such as the [Advisor](</docs/en/advisor#requirements>), work only if the gateway forwards requests intact.For how the requests Claude Code sends differ between an Amazon Bedrock- or Agent Platform-format gateway, an `ANTHROPIC_BASE_URL` gateway, and a Claude apps gateway sign-in, see [client behavior by connection method](</docs/en/llm-gateway-protocol#how-the-connection-method-changes-client-behavior>). ### @@ -124,16 +124,17 @@ **Alternatives:** for scheduling, use [`/loop`](</docs/en/scheduled-tasks>) instead of `/schedule`. For cloud sessions, use [GitHub Actions](</docs/en/github-actions>) or [GitLab CI/CD](</docs/en/gitlab-ci-cd>). For web lookups, use the [WebFetch tool](</docs/en/tools-reference#webfetch-tool-behavior>) with a specific URL. -**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), [GitHub Actions](</docs/en/github-actions>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Available where Amazon Bedrock is not:** [web search](</docs/en/tools-reference#websearch-tool-behavior>).**Partial support:** +**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Channels](</docs/en/channels>), [GitHub Actions](</docs/en/github-actions>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Available here, not on Amazon Bedrock:** [web search](</docs/en/tools-reference#websearch-tool-behavior>), plus the [Advisor](</docs/en/advisor>) in Claude Code v2.1.300 or later.**Partial support:** * [Cross-session messaging](</docs/en/cross-session-messaging>): between your sessions on this machine only 5 **Alternatives:** for scheduling, use [`/loop`](</docs/en/scheduled-tasks>) instead of `/schedule`. For cloud sessions, use [GitLab CI/CD](</docs/en/gitlab-ci-cd>). -**Not available:** all features that require a Claude subscription, plus [fast mode](</docs/en/fast-mode>), [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:** +**Not available:** all features that require a Claude subscription, plus [Advisor](</docs/en/advisor>), [Channels](</docs/en/channels>), the [analytics dashboard](</docs/en/analytics>), [server-managed settings](</docs/en/server-managed-settings>), and the [`/design-sync` and `/import` commands](</docs/en/commands#all-commands>).**Partial support:** * [Desktop](</docs/en/desktop>): via [managed settings](<https://claude.com/docs/third-party/claude-desktop/configuration>) or [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>) * [Web search](</docs/en/tools-reference#websearch-tool-behavior>): Opus 4, Sonnet 4, Haiku 4.5, and later models + * [Fast mode](</docs/en/fast-mode#use-fast-mode-on-agent-platform>): Fable 5.2 in the `global`, `us`, and `eu` regions, or standard speed if Agent Platform refuses fast mode * [Auto mode](</docs/en/auto-mode-config>): Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and Fable models only * [Cross-session messaging](</docs/en/cross-session-messaging>): between your sessions on this machine only 5 * [Zero Data Retention](</docs/en/zero-data-retention>): subject to your Google Cloud agreement
modified Keep Claude working toward a goal View current →
--- a/goal.md +++ b/goal.md @@ -137,9 +137,10 @@ Errors you have to fix clear the goal -If a turn fails on an error that won’t clear until you fix it, Claude Code clears the goal and prints a warning naming the cause. The warning starts with `Goal cleared after an unrecoverable error` and ends with `Run /goal again to continue`. Fix the cause, then set the goal again with `/goal <condition>`. Four kinds of failure clear the goal: +If a turn fails on an error that won’t clear until you fix it, Claude Code clears the goal and prints a warning naming the cause. The warning starts with `Goal cleared after an unrecoverable error` and ends with `Run /goal again to continue`. Fix the cause, then set the goal again with `/goal <condition>`. Failures that clear the goal include: * An authentication failure, when Claude Code manages its own credentials. When a host manages them for you, such as the desktop app or a [cloud session](</docs/en/claude-code-on-the-web>), Claude Code leaves the goal active because the host restores access on its own. + * A disk too full for Claude Code to renew your claude.ai login, when Claude Code manages its own credentials. The warning shows `(disk full)`. [Free space on the disk holding the Claude Code config directory](</docs/en/errors#could-not-refresh-your-login-disk-full>). * An exhausted credit balance * A context overflow that [auto-compaction](</docs/en/model-config#set-the-auto-compact-window>) couldn’t clear * A model that isn’t available
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -285,7 +285,7 @@ `d`/`x`| Delete selection `y`| Yank selection `c`/`s`| Change selection -`p`| Replace selection with register contents +`p`/`P`| Replace selection with register contents `r{char}`| Replace every selected character with `{char}` `~`/`u`/`U`| Toggle, lowercase, or uppercase selection `>`/`<`| Indent or dedent selected lines @@ -348,7 +348,7 @@ * Press `Ctrl+C` to cancel and restore your original input * Press `Backspace` on empty search to cancel -Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. +Accepting a match or canceling the search takes effect immediately, even while Claude Code is still loading the history. To find an earlier prompt when all you remember is something long you pasted into it, such as an error log, press `Ctrl+R` and type a word from the paste. Requires Claude Code v2.1.314 or later. ##
modified Customize keyboard shortcuts View current →
--- a/keybindings.md +++ b/keybindings.md @@ -349,7 +349,7 @@ Diff actions -These actions reach only Claude Code’s earlier diff viewer, which `/diff` opens outside [fullscreen rendering](</docs/en/fullscreen>) after you disable the [`cc-plugin-diff` mod](</docs/en/plugins/mods/overview#mods-built-into-claude-code>) in `/plugin`. While that mod is enabled, `/diff` opens the [diff dialog](</docs/en/interactive-mode#diff-dialog>) instead. A `keybindings.json` that names these actions loads without errors either way. Actions available in the `DiffDialog` context: +These actions reach only Claude Code’s earlier diff viewer, which `/diff` opens outside [fullscreen rendering](</docs/en/fullscreen>) after you disable the [`cc-plugin-diff` mod](</docs/en/plugins/mods/overview#mods-built-into-claude-code>) in `/plugin`. While that mod is enabled, `/diff` opens the [diff dialog](</docs/en/interactive-mode#diff-dialog>) instead. Actions available in the `DiffDialog` context: Action| Default| Description ---|---|---
modified Other LLM gateways View current →
--- a/llm-gateway.md +++ b/llm-gateway.md @@ -43,7 +43,7 @@ Subscriptions and gateways -While a [gateway credential variable](</docs/en/llm-gateway-connect#set-the-credential-variable>) or `apiKeyHelper` is active, requests carry that credential in place of a developer’s claude.ai subscription login, and the subscription’s usage limits don’t apply to them. Claude Code keeps a saved claude.ai login on the machine but doesn’t send it with those requests. That traffic is billed per token to whoever owns the credential the gateway forwards, such as your organization’s Anthropic Console account, or your Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry account when the gateway routes there. [`ANTHROPIC_BASE_URL`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>) is the variable that points Claude Code at the gateway. Setting only that variable, without a gateway credential, doesn’t replace the subscription. Requests still route through the gateway, but a saved claude.ai login remains the active credential, so its usage limits and billing apply. Gateways that pass this traffic on to Anthropic must forward the OAuth capability in `anthropic-beta`; see the [request headers reference](</docs/en/llm-gateway-protocol#request-headers>). +While a [gateway credential variable](</docs/en/llm-gateway-connect#set-the-credential-variable>) or `apiKeyHelper` is active, requests carry that credential in place of a developer’s claude.ai subscription login, and the subscription’s usage limits don’t apply to them. Claude Code keeps a saved claude.ai login on the machine but doesn’t send it with those requests. That traffic is billed per token to whoever owns the credential the gateway forwards, such as your organization’s Anthropic Console account, or your Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry account when the gateway routes there. [`ANTHROPIC_BASE_URL`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>) is the variable that points Claude Code at the gateway. Setting only that variable, without a gateway credential, doesn’t replace the subscription. Requests still route through the gateway, but a saved claude.ai login remains the active credential, so its usage limits and billing apply. Gateways that pass this traffic on to Anthropic must forward `Authorization` and the OAuth capability in `anthropic-beta`; see the [request headers reference](</docs/en/llm-gateway-protocol#request-headers>). ##
modified Connect Claude Code to an LLM gateway View current →
--- a/llm-gateway-connect.md +++ b/llm-gateway-connect.md @@ -380,7 +380,7 @@ Setting the variable has these effects and limits: * It disables auto-updates, so plan for another update path, such as your package manager or managed distribution. - * It suppresses the [fast mode](</docs/en/fast-mode>) availability check. Unless a previous check already enabled fast mode on the machine, `/fast` reports that fast mode is unavailable. + * It suppresses the [fast mode](</docs/en/fast-mode>) availability check. On the Anthropic API, if `/fast` then reports that fast mode is unavailable, see [use fast mode behind proxies and LLM gateways](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>) to restore fast mode. * It doesn’t affect gateway model discovery, which queries only your gateway. Before v2.1.257, the variable also stopped discovery from refreshing, so the picker kept the previously cached list. * The WebFetch tool’s [domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>) isn’t affected and still calls `api.anthropic.com`. Turn it off separately with `skipWebFetchPreflight: true` in [settings](</docs/en/settings>) if your network blocks that host. * For each telemetry stream and the variable that controls it, see [telemetry services](</docs/en/data-usage#telemetry-services>).
modified Claude Code gateway compatibility guide View current →
--- a/llm-gateway-protocol.md +++ b/llm-gateway-protocol.md @@ -30,7 +30,7 @@ Format| Selected by| Endpoints| Forward unchanged ---|---|---|--- -Anthropic Messages| `ANTHROPIC_BASE_URL`| `/v1/messages`, `/v1/messages/count_tokens` (optional)| `anthropic-beta` and `anthropic-version` request headers +Anthropic Messages| `ANTHROPIC_BASE_URL`| `/v1/messages`, `/v1/messages/count_tokens` (optional)| `anthropic-beta` and `anthropic-version` request headers, plus `Authorization` when a claude.ai login authenticates the request to Anthropic Amazon Bedrock InvokeModel| `ANTHROPIC_BEDROCK_BASE_URL` with `CLAUDE_CODE_USE_BEDROCK=1`| `/model/{model}/invoke`, `/model/{model}/invoke-with-response-stream`, `/model/{model}/count-tokens` (optional)| `anthropic_beta` and `anthropic_version` request body fields Google Cloud’s Agent Platform rawPredict| `ANTHROPIC_VERTEX_BASE_URL` with `CLAUDE_CODE_USE_VERTEX=1`| `:rawPredict`, `:streamRawPredict`, `count-tokens:rawPredict` (optional)| `anthropic-beta` and `anthropic-version` request headers, and the `anthropic_version` request body field @@ -129,11 +129,11 @@ Request headers -Claude Code includes these headers on API requests. Header names are case-insensitive on the wire. Forward `anthropic-version` and `anthropic-beta` unchanged, plus `anthropic-workspace-id` when the upstream is the [Claude Platform on AWS](</docs/en/claude-platform-on-aws>); the rest the gateway may consume for routing, attribution, and tracing, and need not forward. +Claude Code includes these headers on API requests. Header names are case-insensitive on the wire. Forward `anthropic-version` and `anthropic-beta` unchanged, plus `anthropic-workspace-id` when the upstream is the [Claude Platform on AWS](</docs/en/claude-platform-on-aws>). Also forward `Authorization` when your gateway authenticates to Anthropic with the developer’s claude.ai login and not a key of its own. The rest the gateway may consume for routing, attribution, and tracing, and need not forward. Header| Description ---|--- -`Authorization`, `x-api-key`| The developer’s gateway credential, in one or both headers depending on which [credential variable](</docs/en/llm-gateway-connect#set-the-credential-variable>) they set +`Authorization`, `x-api-key`| The developer’s gateway credential, in one or both headers depending on which [credential variable](</docs/en/llm-gateway-connect#set-the-credential-variable>) they set. With a claude.ai login and no gateway credential, `Authorization` carries the login’s token `anthropic-version`| API version, currently `2023-06-01`. Amazon Bedrock- and Google Cloud’s Agent Platform-format requests also carry the `anthropic_version` body field, whose value is the provider dialect string, not this header’s value `anthropic-beta`| Comma-separated capability values for the request. Forward the header verbatim; don’t allowlist individual values, because the set changes with Claude Code releases. When the developer authenticates with a claude.ai login, which is possible when `ANTHROPIC_BASE_URL` is set without a gateway credential variable, this header also carries an OAuth capability that the upstream requires, and stripping it fails those requests with `401` `x-claude-code-session-id`| A unique identifier for the current Claude Code session. Use it to aggregate all requests from one session without parsing request bodies
modified Plugin loading reference View current →
--- a/loading.md +++ b/loading.md @@ -202,6 +202,22 @@ Disabled in user settings but still loads If you set a plugin to `false` in `~/.claude/settings.json` and it still loads, a `true` in a higher-precedence source is overriding it. The plugin’s row in `claude plugin list` and in `/plugin` shows `Disabled in ~/.claude/settings.json but still loads — project settings enable it, which overrides your user setting`. The message names the source that overrode you: `project`, `project, gitignored` for `.claude/settings.local.json`, `cli flag`, or `managed`. To opt out of a project-enabled plugin on your machine, set the id to `false` in `.claude/settings.local.json`, which has higher precedence than the project file. + +### + +​ + +Enabled in an `--add-dir` directory but not loaded + +Claude Code reads an `enabledPlugins` entry of `true` in one of the added directory’s files only when that file’s setting sources are on: + + * **`.claude/settings.json`** : `project` + * **`.claude/settings.local.json`** : `project` and `local` + +Check which setting sources the session loads. You set them with [`--setting-sources`](</docs/en/cli-reference#cli-flags>). In the CLI, `user`, `project`, and `local` are all on by default. For example, if you run `claude --setting-sources user --add-dir ./shared` in your shell, Claude Code reads neither file in `./shared`. Pass the flag for the file that holds the `true`: + + * **`settings.json`** : `--setting-sources user,project` + * **`settings.local.json`** : `--setting-sources user,project,local` ###
modified Control MCP server access for your organization View current →
--- a/managed-mcp.md +++ b/managed-mcp.md @@ -199,7 +199,7 @@ * `type` is `http` or `sse`. As in `.mcp.json`, `streamable-http` is accepted as an alias for `http`. * `url` is an `https://` URL. Claude Code refuses a plain `http://` URL, including one that points at `localhost`. - * The entry has no `command`, `args`, `env`, or `headersHelper` member, so a managed settings document never names a program to run on a user’s machine. + * The entry has no `command`, `args`, `env`, or `headersHelper` member. * No value contains a `${VAR}` reference. Claude Code doesn’t expand environment variables in these entries, so write literal values. * The server name contains only letters, numbers, hyphens, and underscores, and no key or value contains control or invisible formatting characters.
modified Deploy managed settings View current →
--- a/managed-settings.md +++ b/managed-settings.md @@ -56,7 +56,7 @@ * **Delivery controls** : [`policyHelper`](</docs/en/settings-reference#policyhelper>), [`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>), and [`managedSourcesBehavior`](</docs/en/settings-reference#managedsourcesbehavior>) * **Gateway login keys** : [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), [`gatewayInternalNetworks`](</docs/en/settings-reference#gatewayinternalnetworks>), and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) -A managed settings file, an MDM profile, or the claude.ai console applies one policy to everyone it reaches. To give one group of developers a different policy, deploy a different file or profile to that group; the claude.ai console [can’t target a group yet](</docs/en/server-managed-settings#current-limitations>), while a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) delivers managed settings per IdP group. When more than one mechanism delivers a policy to the same machine, Claude Code by default uses one and ignores the others. How Claude Code combines managed sources gives the order and the opt-in that applies every source. The MDM and file rows are together called endpoint-managed settings, because the policy is stored on the developer’s device, as opposed to the server-managed row, where Claude Code fetches it. Pick a mechanism by how you already manage devices, using the table below. +With a managed settings file or an MDM profile, everyone it reaches gets one policy. To give one group of developers a different policy, deploy a different file or profile to that group. On an Enterprise plan, you can also [give each group its own configuration](</docs/en/server-managed-settings#give-groups-different-settings>) in server-managed settings. A self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) delivers managed settings per IdP group. When more than one mechanism delivers a policy to the same machine, Claude Code by default uses one and ignores the others. How Claude Code combines managed sources gives the order and the opt-in that applies every source. The MDM and file rows are together called endpoint-managed settings, because the policy is stored on the developer’s device, as opposed to the server-managed row, where Claude Code fetches it. Pick a mechanism by how you already manage devices, using the table below. Mechanism| How you deliver it| When Claude Code reads it| Use it when ---|---|---|---
modified Plugin manifest reference View current →
--- a/manifest-reference.md +++ b/manifest-reference.md @@ -425,7 +425,7 @@ Every component path must resolve inside the plugin root and must exist. `claude plugin validate` checks the paths under every component key: - * **Containment** : a path that resolves outside the plugin root doesn’t load, and the `/plugin` **Errors** tab shows `<component> path escapes plugin directory: <path>`. A path containing `..` is the usual case, and `claude plugin validate` reports the error `Path contains ".." which could be a path traversal attempt` + * **Containment** : a path that resolves outside the plugin root doesn’t load, and the `/plugin` **Errors** tab shows `<component> path escapes plugin directory: <path>`. A path containing `..` is the usual case, and `claude plugin validate` reports the error `Path contains ".." which could be a path traversal attempt`. For an `mcpServers` or `lspServers` file, a [`path not read`](</docs/en/errors#server-file-path-not-read>) message means the path is absolute or contains `..` * **Existence** : a path that doesn’t exist doesn’t load, and the `/plugin` **Errors** tab shows `<component> path not found: <path>`. `claude plugin validate` reports the error `Path not found` For `outputStyles`, `lspServers`, `monitors`, and `themes` paths, the `claude plugin validate` check requires Claude Code v2.1.283 or later.
modified How Claude remembers your project View current →
--- a/memory.md +++ b/memory.md @@ -149,7 +149,7 @@ CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared-config -The inline form sets the variable for that one launch in Bash or Zsh. To keep it on for every session, add it to the `env` block in `~/.claude/settings.json` as shown in [Set environment variables](</docs/en/env-vars#set-environment-variables>). This loads `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules/*.md`, and `CLAUDE.local.md` from the additional directory. `CLAUDE.local.md` is skipped if you exclude `local` from [`--setting-sources`](</docs/en/cli-reference>). +The inline form sets the variable for that one launch in Bash or Zsh. To keep it on for every session, add it to the `env` block in `~/.claude/settings.json` as shown in [Set environment variables](</docs/en/env-vars#set-environment-variables>). With the variable set, Claude Code loads the additional directory’s `CLAUDE.md`, `.claude/CLAUDE.md`, `CLAUDE.local.md`, and `.claude/rules/*.md` files except rules that set a `paths` field. `CLAUDE.local.md` is skipped if you exclude `local` from [`--setting-sources`](</docs/en/cli-reference>). ###
modified Model configuration View current →
--- a/model-config.md +++ b/model-config.md @@ -61,9 +61,9 @@ * **Fable 5.2** : run `/model fable`, or launch with `claude --model fable`. In [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, run `/model claude-fable-5-2` instead. * **Fable 5.1 or Fable 5** : select it by model ID. On the Anthropic API, run `/model claude-fable-5-1` or `/model claude-fable-5`, or launch with `claude --model claude-fable-5-1`. On other providers, use your provider’s model ID or pin it with `ANTHROPIC_DEFAULT_FABLE_MODEL`. -On Pro, Max, Team, and Enterprise plans, a `claude-fable-5-1` model saved in your user settings moves to the `fable` alias: - - * **Pro or Max plan** : the move happens the first time you run v2.1.321 or later. In the terminal, the startup model line can show `(auto-updated)` once. +On Pro, Max, Ultra, Team, and Enterprise plans, a `claude-fable-5-1` model saved in your user settings moves to the `fable` alias: + + * **Pro, Max, or Ultra plan** : the move happens the first time you run v2.1.321 or later. In the terminal, the startup model line can show `(auto-updated)` once. * **Team or Enterprise plan** : the move waits for your organization’s settings, so it can come at a later startup, or not at all. It applies from the next session, with no `(auto-updated)` line. To check your model, run `/model`. After the move, sessions start at Fable 5.2’s default effort unless you’ve set a level for it. Console accounts, third-party providers, and project, local, or managed settings keep `claude-fable-5-1`. Requests that a Fable model’s safety classifiers flag, most often in cybersecurity and biology domains, trigger automatic model fallback. To get the most from Fable: @@ -700,9 +700,20 @@ ---|--- Toggle for the current session| Press `Option+T` on macOS or `Alt+T` on Windows and Linux Set the global default| Run `/config` and toggle thinking mode. Saved as `alwaysThinkingEnabled` in `~/.claude/settings.json` -Disable through an environment variable| Set [`MAX_THINKING_TOKENS=0`](</docs/en/env-vars>), which turns thinking off on the Anthropic API except on Opus 5.5, Sonnet 5.5, Haiku 5.5, and Fable models. On [third-party providers](</docs/en/third-party-integrations>), Claude Code omits the `thinking` parameter instead, and adaptive-reasoning models may still think - -You can’t turn thinking off on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models. The session toggle and the `/config` row show `Thinking can't be turned off` for these models instead of offering the switch, and a saved `alwaysThinkingEnabled: false` or `MAX_THINKING_TOKENS=0` has no effect there. On these models, the model decides per step how much to think based on the effort level. The saved setting applies again when you switch to a model that accepts it. Claude Code collapses thinking output by default. Press `Ctrl+O` to toggle verbose mode and see the reasoning as gray italic text. Interactive sessions on the Anthropic API receive redacted thinking blocks by default, so set `showThinkingSummaries: true` in [settings](</docs/en/settings>) if you want the full summaries available when you expand. You are charged for all thinking tokens generated, even when collapsed or redacted. +Disable through an environment variable| Set [`MAX_THINKING_TOKENS=0`](</docs/en/env-vars>) + +Claude Code collapses thinking output by default. Press `Ctrl+O` to toggle verbose mode and see the reasoning as gray italic text. Interactive sessions on the Anthropic API receive redacted thinking blocks by default, so set [`showThinkingSummaries: true`](</docs/en/settings-reference#showthinkingsummaries>) in settings if you want the full summaries available when you expand. You are charged for all thinking tokens generated, even when collapsed or redacted. + +#### + +​ + +Where you can’t turn thinking off + +You can’t turn thinking off on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models. The session toggle and the `/config` row show `Thinking can't be turned off` for these models instead of offering the switch, and a saved `alwaysThinkingEnabled: false` or `MAX_THINKING_TOKENS=0` has no effect there. On these models, the model decides per step how much to think based on the effort level. The saved setting applies again when you switch to a model that accepts it. To stop or reduce thinking, use the step for your provider: + + * **Anthropic API** : you can turn thinking off on models such as `claude-opus-5`, `claude-sonnet-5`, and `claude-haiku-4-5`. Aliases such as `sonnet` select models where you can’t, so set the model by its ID. + * **[Third-party providers](</docs/en/third-party-integrations>)** : on providers such as Amazon Bedrock and Microsoft Foundry, models with adaptive reasoning may still think with thinking off. Lower the effort level to reduce thinking. ###
modified Monitoring View current →
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -677,7 +677,8 @@ * `plugin.name`: Owning plugin when the active skill or subagent is provided by a plugin. Official-marketplace plugin names appear verbatim. Third-party plugin names are replaced with `"third-party"`. Absent when neither the skill nor the subagent has an owning plugin. * `marketplace.name`: Marketplace the owning plugin was installed from. Only emitted for official-marketplace plugins, even with `OTEL_LOG_TOOL_DETAILS=1` set. Absent otherwise. * `mcp_server.name`: MCP server whose tool result this request consumed. Built-in, claude.ai-proxied, and official-registry server names appear verbatim. User-configured server names are replaced with `"custom"`. Absent when the request consumed no MCP tool result. Before v2.1.222, Claude Code set this attribute on every request after an MCP tool call, not only on requests that consumed a tool result, so dashboards that aggregate it show a step down after you upgrade. - * `mcp_tool.name`: MCP tool whose result this request consumed, with the same redaction and version behavior as `mcp_server.name`. Absent when the request consumed no MCP tool result. + * From v2.1.312, the name of a remote server with a fixed URL that a plugin from Anthropic’s official marketplace declares also appears verbatim, as `plugin_<plugin>_<server>`. That name is replaced with `"custom"` when the plugin’s marketplace copy didn’t come from Anthropic’s registered source, such as one mounted from a seed directory in a cloud session. + * `mcp_tool.name`: MCP tool whose result this request consumed, with the same redaction and version behavior as `mcp_server.name`, except that it can read `"custom"` when `mcp_server.name` shows a `plugin_<plugin>_<server>` name. Absent when the request consumed no MCP tool result. #### @@ -970,7 +971,7 @@ * The auto mode classifier, whose verdict the same event records in `classifier_verdict` * A grant for the rest of the session, given at an earlier permission prompt in the same interactive CLI session * The tool being inherently safe -The `source` value doesn’t indicate which of these sources matched. To find which one refused a call, look for the Safety event with the same `tool_use_id` and read its `category` and `rule_source` attributes. Some refused calls have no safety event. Claude Code also reports `"config"` when the permission prompt request itself fails. For example, that request fails when the Agent SDK’s [`canUseTool`](</docs/en/agent-sdk/typescript#canusetool>) callback or the [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) tool returns an invalid result, or when the input stream closes while the request is pending. +The `source` value doesn’t indicate which of these sources matched. When `classifier_verdict` is present, it gives the classifier outcome that decided the call. No `tool_decision` attribute names the permission rule or setting that refused the call. Claude Code also reports `"config"` when the permission prompt request itself fails. For example, that request fails when the Agent SDK’s [`canUseTool`](</docs/en/agent-sdk/typescript#canusetool>) callback or the [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) tool returns an invalid result, or when the input stream closes while the request is pending. * `"hook"`: A `PreToolUse` or `PermissionRequest` hook returned the decision. * `"user_permanent"`: Emitted when the user chose “Yes, and don’t ask again for …” at a permission prompt, which saves an allow rule to their personal settings. In the interactive CLI this is emitted only for that choice itself; later calls that match the saved rule emit `"config"` instead. In Agent SDK or non-interactive `-p` sessions, both the initial choice and later rule matches emit `"user_permanent"`. Treated as an accept. * `"user_temporary"`: Emitted when the user chose “Yes” at a permission prompt for a one-time approval, or chose an option that grants access for the rest of the session on a file edit or read prompt. In the interactive CLI this is emitted only for the choice itself; later calls allowed by that session-scoped grant emit `"config"` instead. In Agent SDK or non-interactive `-p` sessions, both the choice and later matches emit `"user_temporary"`. Treated as an accept. @@ -1015,7 +1016,18 @@ Safety event -Logged when a check refuses a tool call or requires a permission prompt, except for calls without a safety event. Also logged when the [sandbox’s network proxy](</docs/en/sandboxing#network-isolation>) refuses a connection or request, and when a hook blocks a result. Requires Claude Code v2.1.307 or later. The event exports with the other events and has no separate setting. The event’s own attributes hold no command text, file paths, host names, or MCP server and tool names. The record also carries the standard attributes every event has, which can include `workspace.host_paths` and the repository attributes. To see the command or MCP tool behind an event, set `OTEL_LOG_TOOL_DETAILS=1` and read `tool_parameters` on the matching `tool_decision` event. **Event Name** : `claude_code.safety_event` **Attributes** : +Claude Code has stopped sending `claude_code.safety_event`: + + * **v2.1.312 and later** : these versions don’t send the event, and no setting turns it on + * **v2.1.307 through v2.1.311** : a session stops sending the event at its next feature-flag refresh. A session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, can keep sending it. + +To see refused tool calls, query `tool_decision` events, which show that a call was refused but not always which check refused it. The event details here describe events from v2.1.307 through v2.1.311, where a safety event records cases such as these: + + * A check refuses a tool call or requires a permission prompt, except for calls without a safety event + * The [sandbox’s network proxy](</docs/en/sandboxing#network-isolation>) refuses a connection or request + * A hook blocks a result or the end of a turn + +The event exports with the other events and has no separate setting. The event’s own attributes hold no command text, file paths, host names, or MCP server and tool names. The record also carries the standard attributes every event has, which can include `workspace.host_paths` and the repository attributes. To see the command or MCP tool behind an event, set `OTEL_LOG_TOOL_DETAILS=1` and read `tool_parameters` on the matching `tool_decision` event. **Event Name** : `claude_code.safety_event` **Attributes** : * All standard attributes * `event.name`: `"safety_event"` @@ -1413,15 +1425,20 @@ Retention sweep event -Logged once per run of the retention cleanup sweep, which deletes [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) older than the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) setting. Claude Code runs the sweep in the background at most once per session, and a run that deletes nothing still emits the event. If Claude Code ran the sweep in any session on the same machine in the last 24 hours, it delays this session’s sweep by at least 10 minutes, so a session that exits sooner emits nothing. When you run `claude -p` with `--bare`, Claude Code doesn’t run the sweep and emits nothing. Like every OTel event on this page, it goes only to the telemetry backend you configure. Requires Claude Code v2.1.227 or later. When Claude Code can’t safely determine the retention period, it pauses the sweep and emits the event with `result` set to `"skipped"` and a `skip_reason`. When [managed settings](</docs/en/server-managed-settings>) set `cleanupPeriodDays`, the managed value pins the retention period and the sweep runs even when a settings file in a lower-priority scope is broken or invalid. When `managed-settings.json` itself can’t be read, Claude Code still pauses the sweep unless the [managed tier](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) supplies `cleanupPeriodDays` from elsewhere, such as server-managed settings or a `managed-settings.d/` drop-in beside the broken file. The deletion counter attributes are present only when `result` is `"complete"`. **Event Name** : `claude_code.retention_sweep` **Attributes** : +Logged once per run of the retention cleanup sweep, which deletes [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) older than the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) setting. Claude Code runs the sweep in the background at most once per session, and a run that deletes nothing still emits the event. If Claude Code ran the sweep in any session on the same machine in the last 24 hours, it delays this session’s sweep by at least 10 minutes, so a session that exits sooner emits nothing. When you run `claude -p` with `--bare`, Claude Code doesn’t run the sweep and emits nothing. Like every OTel event on this page, it goes only to the telemetry backend you configure. Requires Claude Code v2.1.227 or later. Read `result` to see whether the sweep ran: + + * `"complete"`: the sweep ran, and the event carries its counts + * `"skipped"`: Claude Code couldn’t safely determine the retention period, so it paused the sweep and the event carries no counts. If `skip_reason` is `"settings_unknowable"` or `"settings_invalid_key_set"`, fix the settings error that `/status` reports on that machine so a later session can run the sweep + +When [managed settings](</docs/en/server-managed-settings>) set `cleanupPeriodDays`, the managed value pins the retention period and the sweep runs even when a settings file in a lower-priority scope is broken or invalid. **Event Name** : `claude_code.retention_sweep` **Attributes** : * All standard attributes * `event.name`: `"retention_sweep"` * `event.timestamp`: ISO 8601 timestamp * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `result`: `"complete"` when the sweep ran, `"skipped"` when Claude Code paused it - * `period_days`: The `cleanupPeriodDays` value from merged settings, in days, or `30` when no source sets it. On skipped events, the value the sweep would have used, computed from the settings sources Claude Code could read - * `used_default`: `"true"` when no readable settings source sets `cleanupPeriodDays`, `"false"` otherwise. On complete events, `"true"` means the 30-day default applied + * `period_days`: The retention period the sweep started with, in days: `cleanupPeriodDays` from merged settings, with any change from a [`settings.read` hook](</docs/en/plugins/mods/events#settings-read-hook>) applied. `30` when that leaves the key unset. On skipped events, the value the sweep would have used, computed from the settings sources Claude Code could read + * `used_default`: `"true"` when `period_days` fell back to `30`, `"false"` otherwise. On complete events, `"true"` means the 30-day default applied * `skip_reason`: Why Claude Code paused the sweep. Present only when `result` is `"skipped"`: * `"user_source_disabled"`: User settings are excluded, for example by the [`--setting-sources`](</docs/en/cli-reference#cli-flags>) flag or the SDK’s [`settingSources`](</docs/en/agent-sdk/typescript#options>) option, and no enabled source provides `cleanupPeriodDays` * `"settings_unknowable"`: A settings file couldn’t be read or parsed, so `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` may be set to a value Claude Code can’t see @@ -1623,7 +1640,7 @@ Map security questions to events -When building detection rules, look up the signal you want to monitor and query your backend for the corresponding event and attributes: +Rows for `safety_event` apply only to a session on v2.1.307 through v2.1.311 that still sends the event. When building detection rules, look up the signal you want to monitor and query your backend for the corresponding event and attributes: Signal| Event| Key attributes ---|---|--- @@ -1632,8 +1649,9 @@ Auto mode classifier allowed or blocked a tool call, or Claude Code denied the call without a classifier verdict| `tool_decision` where `classifier_verdict` is present. For a denial without a verdict, `classifier_verdict` is `"no_verdict"` or `"unavailable"`| `classifier_verdict`, `permission_mode`, `tool_name`; `classifier_category` when you set `OTEL_LOG_TOOL_DETAILS=1` Permission mode escalation| `permission_mode_changed`| `from_mode`, `to_mode`, `trigger` Which permission mode each tool call was checked in, including calls subagents make| `tool_decision`| `permission_mode`, `session.id` -Policy hook blocked an action| `hook_execution_complete`| `hook_event`, `num_blocking` -Which tool call a hook refused, and which result or turn end a hook blocked| `safety_event` where `category` is `"hook"` and `decision` is `"reject"` for a refused call, or `category` is `"hook_review"` for a blocked result or turn end| `category`, `decision`, `hook_event`; `tool_use_id` for a tool call +Policy hook blocked an action| `hook_execution_complete`, which isn’t tied to a call or to `tool_use_id`| `hook_event`, `num_blocking` +Tool call a hook refused| `tool_decision` where `decision` is `"reject"` and `source` is `"hook"`| `decision`, `source`, `tool_use_id` +Which result or turn end a hook blocked| `safety_event` where `category` is `"hook_review"`| `category`, `hook_event`; `tool_use_id` for a tool call Sandbox’s network proxy refused a connection or request from a Bash or PowerShell command| `safety_event` where `sandbox_violation_count` is present and isn’t `"0"`| `sandbox_violation_count`, `category`, `sandbox_enabled`, `tool_use_id` Login, logout, and authentication failure| `auth`| `action`, `success`, `error_category` MCP server connect or failure| `mcp_server_connection`| `status`, `server_name`, `is_plugin`, `error_code`
modified Observability with OpenTelemetry View current →
--- a/observability.md +++ b/observability.md @@ -212,11 +212,10 @@ After you attach end-user identity, these events become a per-user audit trail you can forward to a Security Information and Event Management (SIEM) platform: * `tool_decision` and `tool_result`: each tool call, whether it was allowed or denied, and its result - * `safety_event`: which check refused a tool call or required a permission prompt for it, such as a permission rule or the auto mode classifier. Some calls [have no safety event](</docs/en/monitoring-usage#calls-without-a-safety-event>). Requires Claude Code v2.1.307 or later * `mcp_server_connection`: MCP server connections and connection failures * `permission_mode_changed`: permission mode changes -These events export as log records named with a `claude_code.` prefix, such as `claude_code.safety_event`. See [Audit security events](</docs/en/monitoring-usage#audit-security-events>) in the Monitoring reference for the full list of security-relevant events and the attributes each one carries. +These events export as log records named with a `claude_code.` prefix, such as `claude_code.tool_decision`. See [Audit security events](</docs/en/monitoring-usage#audit-security-events>) in the Monitoring reference for the full list of security-relevant events and the attributes each one carries. ## @@ -229,7 +228,7 @@ Variable| Adds ---|--- `OTEL_LOG_USER_PROMPTS=1`| Prompt text on `claude_code.user_prompt` events and on the `claude_code.interaction` span -`OTEL_LOG_TOOL_DETAILS=1`| Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](</docs/en/monitoring-usage#cost-counter>). The built-in rule the auto mode classifier named when it blocked a call, as [`classifier_category`](</docs/en/monitoring-usage#tool-decision-event>) on `claude_code.tool_decision` and `claude_code.safety_event` events +`OTEL_LOG_TOOL_DETAILS=1`| Tool input arguments such as file paths, shell commands, and search patterns on `claude_code.tool_result` events, and real agent, skill, plugin, and MCP server names on the [cost and token metrics](</docs/en/monitoring-usage#cost-counter>). The built-in rule the auto mode classifier named when it blocked a call, as [`classifier_category`](</docs/en/monitoring-usage#tool-decision-event>) on `claude_code.tool_decision` events `OTEL_LOG_TOOL_CONTENT=1`| A [`tool.output` span event](</docs/en/monitoring-usage#tool-output-span-event>) on `claude_code.tool` with file contents, Bash output, and what MCP tools, WebFetch, and WebSearch return, truncated at 60 KB by default, configurable via `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`, which requires Claude Code v2.1.214 or later. Results from MCP tools, WebFetch, and WebSearch require Claude Code v2.1.283 or later. Requires tracing to be enabled. Span attributes carry tool content under [their own gates](</docs/en/monitoring-usage#new-context-gates>) `OTEL_LOG_RAW_API_BODIES`| Full Anthropic Messages API request and response JSON as `claude_code.api_request_body` and `claude_code.api_response_body` log events. Set to `1` for inline bodies truncated at 60 KB by default, or `file:<dir>` for untruncated bodies on disk with a `body_ref` path in the event. `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH` configures the inline truncation limit, and requires Claude Code v2.1.214 or later. Bodies include the entire conversation history and have extended-thinking content redacted. Enabling this implies consent to everything the three variables above would reveal
modified Manage Claude Code plugins for your organization View current →
--- a/org.md +++ b/org.md @@ -189,7 +189,7 @@ `disableSideloadFlags`| Rejects `--plugin-dir`, `--plugin-url`, `--agents`, the Agent SDK `plugins` option, and folders named in the [`CLAUDE_CODE_PLUGIN_DIRS`](</docs/en/env-vars#variables>) variable at startup, and `--mcp-config` too unless every server in it is an in-process `type: "sdk"` entry. Refuses plugin folders an Agent SDK application adds mid-session with [`addPlugins`](</docs/en/agent-sdk/typescript#load-more-plugin-folders-with-addplugins>)| Doesn’t restrict `.mcp.json`, `claude mcp add`, or SDK-provided servers. Pair it with [`allowedMcpServers`](</docs/en/managed-mcp>) `disableCommandPluginSources`| Blocks plugins with a `command` source from installing, updating, or loading. A `command` source is one whose plugin directory is produced by running a command on the machine. When unset, it takes the value of `allowManagedHooksOnly`| Doesn’t affect other source types `allowManagedHooksOnly`| Restricts which hooks run. See [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>)| Doesn’t trust hooks from plugins users enable themselves -`strictPluginOnlyCustomization`| Blocks skills, agents, hooks, and MCP servers that don’t come from a plugin, managed settings, or Claude Code’s built-ins. It also stops skills-directory plugins loading. Set `true` to cover all four types, or an array of `skills`, `agents`, `hooks`, and `mcp` values such as `["skills", "hooks"]` to cover some| Doesn’t restrict which plugins users install. Pair it with `strictKnownMarketplaces` +`strictPluginOnlyCustomization`| Blocks skills, agents, hooks, and MCP servers from user and project sources. It also stops skills-directory plugins loading. Set `true` to cover all four types, or an array of `skills`, `agents`, `hooks`, and `mcp` values such as `["skills", "hooks"]` to cover some| Doesn’t restrict which plugins users install, or reject the CLI flags that sideload plugins, agents, and MCP servers. Pair it with `strictKnownMarketplaces` and `disableSideloadFlags` `pluginSuggestionMarketplaces`| Marketplaces whose plugins may appear as install suggestions in the terminal. See Recommend plugins| Doesn’t affect the built-in tips `pluginTrustMessage`| Appends your text to the trust warning that `/plugin` shows before a plugin installs| Doesn’t change the warning’s own text `allowedChannelPlugins`| Replaces the default list of plugins allowed to push channel messages. Requires `channelsEnabled: true`| See [Restrict which channel plugins can run](</docs/en/channels#restrict-which-channel-plugins-can-run>) @@ -370,12 +370,13 @@ Assign release channels to user groups -To run stable and early-access channels, host two marketplaces that point at different refs of the same plugins. Then give each user group its own marketplace through either separate endpoint-managed settings or a gateway policy. Server-managed settings from the admin console [apply to every user in your organization](</docs/en/server-managed-settings#current-limitations>), so they can’t assign different settings to different groups. +To run stable and early-access channels, host two marketplaces that point at different refs of the same plugins. Then give each user group its own marketplace through separate endpoint-managed settings or a gateway policy. On an Enterprise plan, you can also use server-managed settings from the admin console. * Deploy separate [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>), such as a managed settings file or an MDM profile, to each group’s devices. To check whether the per-group file or profile applies on a device that also has an organization-wide source, see [How Claude Code combines managed sources](</docs/en/managed-settings#precedence-within-the-managed-tier>). * Define one [Claude apps gateway policy](</docs/en/claude-apps-gateway-config#managed>) per group. By default, the gateway applies the first policy whose match rule fits a user, so order the policies so that each user reaches their group’s policy. That policy’s `extraKnownMarketplaces` map doesn’t merge with any other policy’s, so list every marketplace the group needs in it, not only its channel marketplace. - -With either mechanism, the stable group receives this configuration: + * On an Enterprise plan, [give each group its own configuration](</docs/en/server-managed-settings#give-groups-different-settings>) in the admin console. A group’s configuration doesn’t merge with the organization-wide one, so put every setting the group needs in the group’s own configuration, including each marketplace. + +With any of these mechanisms, the stable group receives this setting: { "extraKnownMarketplaces": { @@ -429,7 +430,7 @@ These requests from security reviews have no dedicated key in the current settings schema. The nearest existing controls are: - * **Per-user or per-group targeting** : every plugin key applies to every user who receives the settings. Server-managed settings deliver one configuration per organization. For per-group policy, use separate endpoint-managed settings or gateway policies, as under Assign release channels to user groups. + * **Per-user or per-group targeting** : every plugin key applies to every user who receives the settings. For per-group policy, deliver each group its own settings, as under Assign release channels to user groups. * **Restricting entries inside an allowed marketplace** : the allowlist matches marketplace sources. To block one plugin from an allowed marketplace, set it to `false` in managed `enabledPlugins`. * **Hiding`/plugin`**: no key disables the command. The nearest equivalent combines an allowlist naming only your marketplace, managed `enabledPlugins` entries for the plugins you supply, and `disableSideloadFlags`. * **Gating`--plugin-dir` through the allowlist**: the allowlist doesn’t cover `--plugin-dir`. `disableSideloadFlags` does.
modified Choose a permission mode View current →
--- a/permission-modes.md +++ b/permission-modes.md @@ -17,7 +17,7 @@ `dontAsk`| File reads inside your working directories and pre-approved tools; anything that would prompt is denied, though a [mod](</docs/en/plugins/mods/overview>) you installed can still approve some of those calls| Locked-down CI and scripts `bypassPermissions`| Everything| Isolated containers and VMs only -The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Writes to protected paths are never auto-approved except in `bypassPermissions` mode and in plan-mode sessions where bypass permissions are available, meaning interactive terminal sessions started in a way that puts `bypassPermissions` in the mode cycle. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`. +The mode that reviews every action is named **Manual** in the CLI, in `claude --help`, in the VS Code and JetBrains extensions, and in the desktop app. Its config value is `default`, which is what hooks and SDK integrations use. The CLI accepts `manual` as an alias wherever you type the value, for example `claude --permission-mode manual` or `"defaultMode": "manual"`. Each mode has its own rule for writes to protected paths. Modes set the baseline. Layer [permission rules](</docs/en/permissions#manage-permissions>) on top to pre-approve or block specific tools. Deny rules block in every mode, including `bypassPermissions`. Deny and ask rules don’t apply to [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) as long as Claude still has at least one other tool it can call. Allow rules have no effect in `bypassPermissions`. ### @@ -618,7 +618,7 @@ * **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it. * **If you decline** : Claude Code exits. -In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings: +If you pass [`--setting-sources`](</docs/en/cli-reference#cli-flags>) without `user`, the dialog can appear again although you accepted it earlier. To skip it, add `user`, as in `--setting-sources user,project`. In [non-interactive mode](</docs/en/headless>) no dialog is shown. A [background session](</docs/en/agent-view>) honors your acceptance when it’s recorded in user or managed settings: * With no acceptance recorded, `claude --bg --permission-mode bypassPermissions` is refused. Accept the dialog in an interactive session first. * With `skipDangerousModePermissionPrompt` set only in `.claude/settings.local.json`, the background session starts with the bypass request ignored: @@ -660,13 +660,13 @@ Protected paths -Writes to a small set of paths are never auto-approved, except in `bypassPermissions` mode and in interactive terminal sessions in plan mode with bypass permissions available. This prevents accidental corruption of repository state and Claude’s own configuration. +A small set of paths holds repository state and Claude’s own configuration, so each mode has its own rule for writes to them: Mode| Protected-path writes ---|--- `default`, `acceptEdits`| Prompted `plan`| Allowed in interactive terminal sessions with bypass permissions available. Otherwise, routed to the classifier when auto mode is available during planning, and prompted when it isn’t -`auto`| Routed to the classifier +`auto`| Routed to the classifier, which decides `dontAsk`| Denied `bypassPermissions`| Allowed
modified How Claude Code uses prompt caching View current →
--- a/prompt-caching.md +++ b/prompt-caching.md @@ -85,7 +85,7 @@ [Fast mode](</docs/en/fast-mode>) and standard speed keep separate caches, so after you turn fast mode on or off, the next request can’t use what the other speed cached. The first time you turn fast mode on in a conversation, the next request reads the whole conversation so far uncached at [fast mode rates](</docs/en/fast-mode#understand-the-cost-tradeoff>). To keep that cost small, turn it on at the start of a session. * If you turn it on while Claude is working, that turn finishes at standard speed, and you pay for any uncached read on your next turn’s first request. - * If your current model doesn’t support fast mode, running `/fast` also [switches you to Opus](</docs/en/fast-mode#toggle-fast-mode>). That model switch starts a fresh cache on its own from the next request in the running turn. + * If your current model doesn’t support fast mode, running `/fast` also [switches your model](</docs/en/fast-mode#toggle-fast-mode>). That model switch starts a fresh cache on its own from the next request in the running turn. Each later toggle reads uncached whatever the speed you switch to doesn’t have cached. Speed changes Claude Code makes on its own, such as the [fallback to standard speed](</docs/en/fast-mode#handle-rate-limits>) after a rate limit and the return to fast mode later, count as toggles too.
modified Agent SDK reference - Python View current →
--- a/python.md +++ b/python.md @@ -1489,7 +1489,7 @@ ---|---|--- `adaptive`| `type`, `display`| Claude adaptively decides when to think `enabled`| `type`, `budget_tokens`, `display`| Enable thinking with a specific token budget -`disabled`| `type`| Disable thinking +`disabled`| `type`| Turn thinking off [where the model and provider allow it](</docs/en/model-config#where-you-cant-turn-thinking-off>) The optional `display` field controls whether thinking text is returned `"summarized"` or `"omitted"`. On Claude Opus 4.7 and later, the API default is `"omitted"`, so set `"summarized"` to receive thinking content in `ThinkingBlock` outputs. On providers such as Amazon Bedrock and Google Cloud’s Agent Platform, Claude Code doesn’t pass `display` for earlier models it recognizes. Those are Opus 4.6, Sonnet 4.6, Haiku 4.5, and earlier models, which use their default. Because these are `TypedDict` classes, they’re plain dicts at runtime. Either construct them as dict literals or call the class like a constructor; both produce a `dict`. Access fields with `config["budget_tokens"]`, not `config.budget_tokens`: @@ -1995,7 +1995,7 @@ `TaskStartedMessage` -Emitted when a background task starts. A background task is anything tracked outside the main turn: a backgrounded Bash command, a Monitor watch, a subagent spawned via the Agent tool, or a remote agent. The `task_type` field tells you which. This naming is unrelated to the `Task`-to-`Agent` tool rename. +Emitted when a background task starts. A background task is anything tracked outside the main turn, such as a backgrounded Bash command, a Monitor watch, a subagent spawned via the Agent tool, or a remote agent. This naming is unrelated to the `Task`-to-`Agent` tool rename. @dataclass class TaskStartedMessage(SystemMessage): @@ -2013,7 +2013,7 @@ `uuid`| `str`| Unique message identifier `session_id`| `str`| Session identifier `tool_use_id`| `str | None`| Associated tool use ID -`task_type`| `str | None`| Which kind of background task: `"local_bash"` for background Bash and Monitor watches, `"local_agent"`, or `"remote_agent"` +`task_type`| `str | None`| Which kind of background task, such as `"local_bash"` for background Bash and Monitor watches, `"local_agent"` for subagents, `"mcp_task"` for [background MCP tool calls](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>), or `"remote_agent"` ###
modified Mods reference View current →
--- a/reference.md +++ b/reference.md @@ -37,8 +37,7 @@ `next.origin`| `{ plugin, tier }` of whoever fired the event. Claude Code itself is `{ plugin: 'engine', tier: 'core' }`. A mod’s `tier` is its priority group in the [order mods run in](</docs/en/plugins/mods/events#the-order-mods-run-in>): `prepend`, `user`, `append`, or `builtin`. `next.budget`| The hook’s time limit in milliseconds: `next.budget.ms` is the whole limit, and `next.budget.remainingMs` is what’s left now `next.to(e, tier)`| Skips to a later tier, which is `append`, `builtin`, or `core`. `next.to(e, 'append')` skips the mods a user installed. Only a mod in `prependPlugins` or `appendPlugins` can call it. -`next.error`| In a `.catch` handler only. `kind` is `throw` or `timeout` when the hook failed, and `message` is the error’s text. `kind` is `re-entry` when the hook was skipped because the event came from inside a mods API call by that hook or by your mod’s code outside its hooks. `re-entry` requires Claude Code v2.1.292 or later. -`next.error.cause`| Set only when `kind` is `re-entry`. `rewritten` if a `tool.call` or [`PreToolUse`](</docs/en/hooks#pretooluse>) hook changed the mods API call the event came from, or an `agent.spawn` hook changed an agent started by that call. `lent` when a method another mod adds to the mods API fired that event, unless `rewritten` also applies. `lent` requires Claude Code v2.1.292 or later and `rewritten` v2.1.300 or later. +`next.error`| In a `.catch` handler only. `kind` is `throw` or `timeout`, and `message` is the error’s text. `next.called`| In a `.catch` handler only. `true` when the hook had called `next`. ##
modified Continue local sessions from any device with Remote Control View current →
--- a/remote-control.md +++ b/remote-control.md @@ -25,7 +25,7 @@ * You point [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) at a host other than `api.anthropic.com`, such as an [LLM gateway](</docs/en/llm-gateway>) or proxy. Unset the variable to use Remote Control. * You sign in through an enterprise [Claude apps gateway](</docs/en/claude-apps-gateway>). * **Feature-flag evaluation** : if you set an [environment variable that turns off feature-flag evaluation](</docs/en/env-vars#features-that-need-feature-flag-fetching>), whether Remote Control is available depends on which one: - * If you set `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or `DISABLE_GROWTHBOOK`, Remote Control is unavailable. Unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>), to use Remote Control. + * If you set `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or [`CLAUDE_CODE_DISABLE_FEATURE_FLAGS`](</docs/en/env-vars#variables>), Remote Control is unavailable. Unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>), to use Remote Control. * If you set only `DISABLE_TELEMETRY` or `DO_NOT_TRACK`, Remote Control stays available unless your organization requires Trusted Devices. If it does, unset the variable to use Remote Control. Using Remote Control with either variable set requires Claude Code v2.1.283 or later, or v2.1.304 or later in the Claude Desktop app. * **Workspace trust** : in a directory you haven’t trusted yet, `claude remote-control` prints what trusting it turns on and asks `Trust <directory>? [y/N]` before it starts. Answering `y` saves the choice, except in your home directory, where trust is never saved and the question returns on every run. When its standard input or output isn’t a terminal, the command can’t ask and exits with a [`Workspace not trusted`](</docs/en/errors#workspace-not-trusted-when-starting-remote-control>) error. @@ -163,6 +163,17 @@ ​ +Fork a session from your browser + +To try a different direction without interrupting a session, open it at [claude.ai/code](<https://claude.ai/code>) and select **Fork** in the session’s menu, or fork from an earlier message in the transcript. The fork opens as a new session in your session list and continues the conversation from that point while the original keeps running. Forking requires Claude Code v2.1.277 or later on your machine. A `claude remote-control` server started with `--spawn session` has room only for its one session, so it can’t run a fork. Claude Code declines the fork in cases such as these: + + * The session is busy. Fork when it’s idle. + * The session is hosted by the VS Code extension or another app built on the [Agent SDK](</docs/en/agent-sdk/overview>). + +### + +​ + Enable Remote Control for all sessions Remote Control only activates when you explicitly run `claude remote-control`, `claude --remote-control`, or `/remote-control`, unless auto-connect is turned on. To turn auto-connect on for every interactive session, run `/config` inside Claude Code and set **Enable Remote Control for all sessions**. The toggle takes three values: @@ -184,7 +195,7 @@ Auto-connect with `DISABLE_TELEMETRY` or `DO_NOT_TRACK` set -With only `DISABLE_TELEMETRY` or `DO_NOT_TRACK` set, your sessions don’t auto-connect through your organization’s admin default or Claude Code’s own default. If something else makes Remote Control unavailable for you, such as `DISABLE_GROWTHBOOK` or an LLM gateway, start with Requirements instead. Before you turn auto-connect on with only `DISABLE_TELEMETRY` or `DO_NOT_TRACK` set, confirm that your Claude Code version meets the requirement for these variables. Then check whether your organization requires Trusted Devices: +With only `DISABLE_TELEMETRY` or `DO_NOT_TRACK` set, your sessions don’t auto-connect through your organization’s admin default or Claude Code’s own default. If something else makes Remote Control unavailable for you, such as [`CLAUDE_CODE_DISABLE_FEATURE_FLAGS`](</docs/en/env-vars#variables>) or an LLM gateway, start with Requirements instead. Before you turn auto-connect on with only `DISABLE_TELEMETRY` or `DO_NOT_TRACK` set, confirm that your Claude Code version meets the requirement for these variables. Then check whether your organization requires Trusted Devices: * **Not required** : set **Enable Remote Control for all sessions** to `true` in `/config`. * **Required** : Remote Control isn’t available while `DISABLE_TELEMETRY` or `DO_NOT_TRACK` is set. Unset whichever of the two variables you set. If your sessions still don’t auto-connect, set **Enable Remote Control for all sessions** to `true` in `/config`. @@ -475,8 +486,8 @@ An [environment variable](</docs/en/env-vars#features-that-need-feature-flag-fetching>) that turns off feature-flag evaluation is set, and the full message names the variable Claude Code found. On versions before 2.1.154, the same configuration produces “Remote Control is not yet enabled for your account” instead. What to do depends on the variable the message names: - * **`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` or `DISABLE_GROWTHBOOK`**: unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>). - * **`DISABLE_TELEMETRY` or `DO_NOT_TRACK`**: on a Pro, Max, Ultra, Team, or Enterprise plan with `DISABLE_GROWTHBOOK` unset, Remote Control stays available with these variables set, unless your organization requires Trusted Devices. If it does, unset the variable wherever it’s set to use Remote Control. On v2.1.154 through v2.1.282, you see this message with either variable set, so update Claude Code to a version that meets the requirement for these variables. + * **`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `CLAUDE_CODE_DISABLE_FEATURE_FLAGS`, or `DISABLE_GROWTHBOOK`**: unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>). + * **`DISABLE_TELEMETRY` or `DO_NOT_TRACK`**: on a Pro, Max, Ultra, Team, or Enterprise plan with `CLAUDE_CODE_DISABLE_FEATURE_FLAGS` and `DISABLE_GROWTHBOOK` unset, Remote Control stays available with these variables set, unless your organization requires Trusted Devices. If it does, unset the variable wherever it’s set to use Remote Control. On v2.1.154 through v2.1.282, you see this message with either variable set, so update Claude Code to a version that meets the requirement for these variables. ###
modified Automate work with scheduled tasks View current →
--- a/routines.md +++ b/routines.md @@ -105,7 +105,7 @@ * **Environment variables** : provide values Claude can use during each run. They’re [visible to anyone who uses the environment](</docs/en/cloud-environments#what-carries-over-from-your-setup>), so in an Anthropic-hosted environment, store keys for the APIs Claude calls during a run as [network secrets](</docs/en/cloud-environments#add-network-secrets>) instead. That section also lists the requests that never get a secret * **Setup script** : install dependencies and tools the task needs. The result is [cached](</docs/en/cloud-environments#environment-caching>), so the script doesn’t re-run on every session -A **Default** environment is provided with **Trusted** network access, which allows only the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) of package registries, cloud provider APIs, container registries, and common development domains through the session’s network. Connectors you add to the task reach their services through Anthropic’s servers, so they don’t need allowlist changes.If your task needs to reach your own services directly, or a domain outside that list, edit the environment’s [network access](</docs/en/cloud-environments#network-access>) before running. To use a separate environment, [create one](</docs/en/cloud-environments#configure-your-environment>) first. +A **Default** environment is provided with **Limited** network access and **Allow package managers** checked. Its runs reach the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>): package registries, cloud provider APIs, container registries, and common development domains. Connectors you add to the task reach their services through Anthropic’s servers, so they don’t need allowlist changes.If your task needs to reach your own services directly, or a domain outside that list, edit the environment’s [network access](</docs/en/cloud-environments#network-access>) before running. To use a separate environment, [create one](</docs/en/cloud-environments#configure-your-environment>) first. 6 @@ -463,7 +463,7 @@ Environments and network access -Each scheduled task uses a [cloud environment](</docs/en/cloud-environments>) that controls network access, environment variables, and setup scripts. The task inherits the environment’s network policy on every run. The **Default** environment uses **Trusted** network access, which allows only the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) through the session’s network. Requests on that path to hosts outside the allowlist fail with `403` and `x-deny-reason: host_not_allowed`. MCP connector traffic is routed through Anthropic’s servers rather than that path, so the connectors you add to the task work without adding their hosts to **Allowed domains**. Remove any connectors you don’t need under Connectors. To allow additional domains on one of your own environments, follow these steps. An [organization-shared environment](</docs/en/cloud-environments#organization-shared-environments>) opens read-only here, so an Owner changes its network access from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>) instead. +Each scheduled task uses a [cloud environment](</docs/en/cloud-environments>) that controls network access, environment variables, and setup scripts. The task inherits the environment’s network policy on every run. The **Default** environment uses **Limited** access with **Allow package managers** checked, so its runs reach the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>). A request to a blocked host fails with `403` and `x-deny-reason: host_not_allowed`. MCP connector traffic is routed through Anthropic’s servers, so the connectors you add to the task work without adding their hosts to **Allowed domains**. Remove any connectors you don’t need under Connectors. To allow additional domains on one of your own environments, follow these steps. An [organization-shared environment](</docs/en/cloud-environments#organization-shared-environments>) opens read-only here, so an Owner changes its network access from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>) instead. 1 @@ -485,9 +485,9 @@ 4 -Change the network access level - -In the **Edit cloud environment** dialog, change **Network access** to **Custom** and enter your domains in **Allowed domains**. 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 for unrestricted access. +Add the domains + +In the **Edit cloud environment** dialog, select **Limited** under **Network access** and enter your domains in **Allowed domains**. Check **Allow package managers** to allow the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) alongside your own domains. Select **Full** instead for unrestricted access. 5 @@ -588,6 +588,6 @@ * [`/loop` and in-session scheduling](</docs/en/scheduled-tasks>): schedule local tasks within an open CLI session * [Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>): local scheduled tasks that run on your machine with access to local files * [Cloud environments](</docs/en/cloud-environments>): configure network access, environment variables, and setup scripts for cloud sessions - * [Projects](</docs/en/claude-projects>): ongoing work Claude coordinates across parallel cloud sessions; scheduled tasks created from a project appear on its **Scheduled tasks** tab + * [Projects](</docs/en/claude-projects>): ongoing work Claude coordinates across parallel cloud sessions; scheduled tasks created from a project appear in its **Scheduled tasks** view * [MCP connectors](</docs/en/mcp>): connect external services like Slack, Linear, and Google Drive * [GitHub Actions](</docs/en/github-actions>): run Claude in your CI pipeline on repository events
modified Choose a sandbox environment View current →
--- a/sandbox-environments.md +++ b/sandbox-environments.md @@ -1,4 +1,4 @@ -Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts, run it unattended, or point it at code you do not fully trust. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page compares them by what they isolate and what they require, helps you choose one for your threat model, and shows how to enforce that choice across an organization. +Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts or run it unattended. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page compares them by what they isolate and what they require, helps you choose one for your threat model, and shows how to enforce that choice across an organization. For the broader security model, see [Security](</docs/en/security>). For Agent SDK deployments, see [Secure deployment](</docs/en/agent-sdk/secure-deployment>). @@ -36,7 +36,6 @@ Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), configured with `/sandbox` Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime -Work on an untrusted repository| A dedicated virtual machine, or a [cloud session](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is not required when you launch with `claude --cloud` Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository Use Claude Code from a device with no local setup| A [cloud session](</docs/en/claude-code-on-the-web>), which requires a Claude subscription, and a connected GitHub account to clone a GitHub repository Require isolation for every developer in your organization| Enforce isolation across an organization @@ -153,7 +152,7 @@ Virtual machine -A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when you are evaluating untrusted code, when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. [Docker Sandboxes](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on any host with Docker Sandboxes installed. It is a free, standalone product from Docker that does not require Docker Desktop. +A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. [Docker Sandboxes](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on any host with Docker Sandboxes installed. It is a free, standalone product from Docker that does not require Docker Desktop. ##
modified Configure the sandboxed Bash tool View current →
--- a/sandboxing.md +++ b/sandboxing.md @@ -731,7 +731,7 @@ This configuration sandboxes the commands Claude runs. A developer can still type a command at the [`!` shell-mode prompt](</docs/en/interactive-mode#shell-mode-with-prefix>) and run it outside the sandbox, with the same access they already have in any terminal outside Claude Code. See strict sandbox mode for the sessions where typed commands run sandboxed. The sandbox doesn’t run on native Windows, so with `failIfUnavailable` set, Claude Code exits at startup on those machines. If your fleet includes Windows hosts, you can: - * **Deliver the configuration by operating system** : deploy it through your MDM or as a [managed settings file](</docs/en/managed-settings#delivery-mechanisms>) on macOS and Linux machines only. [Server-managed settings](</docs/en/server-managed-settings#current-limitations>) apply to all users in the organization + * **Deliver the configuration by operating system** : deploy it through your MDM or as a [managed settings file](</docs/en/managed-settings#delivery-mechanisms>) on macOS and Linux machines only. [Server-managed settings](</docs/en/server-managed-settings#give-groups-different-settings>) follow the member, not the device. * **Move Windows users into a supported environment** : have them run Claude Code inside WSL2 or a container ###
modified Run prompts on a schedule View current →
--- a/scheduled-tasks.md +++ b/scheduled-tasks.md @@ -88,11 +88,11 @@ * tend to the current branch’s pull request: review comments, failed CI runs, merge conflicts * run cleanup passes such as bug hunts or simplification when nothing else is pending -Claude does not start new initiatives outside that scope, and irreversible actions such as pushing or deleting only proceed when they continue something the transcript already authorized. +Each run goes through your session’s [permission checks](</docs/en/permissions>) before it pushes or deletes anything. A bare `/loop` runs this prompt at a dynamically chosen interval: /loop -A bare `/loop` runs this prompt at a dynamically chosen interval. Add an interval, for example `/loop 15m`, to run it on a fixed schedule instead. To replace the built-in prompt with your own default, see Customize the default prompt with loop.md. +Add an interval, for example `/loop 15m`, to run it on a fixed schedule instead. To replace the built-in prompt with your own default, see Customize the default prompt with loop.md. ### @@ -253,7 +253,7 @@ Disable session-scoped scheduled tasks -Set `CLAUDE_CODE_DISABLE_CRON=1` in your environment to disable the scheduler entirely. The cron tools and `/loop` become unavailable, and any already-scheduled tasks stop firing. See [Environment variables](</docs/en/env-vars>) for the full list of disable flags. +Set `CLAUDE_CODE_DISABLE_CRON=1` in your environment to disable the scheduler entirely. `CronCreate` and `/loop` become unavailable, and any already-scheduled tasks stop firing. While the project’s `.claude/scheduled_tasks.json` file holds tasks, `CronList` and `CronDelete` stay available, so you can still ask Claude to list or cancel them. See [Environment variables](</docs/en/env-vars>) for the full list of disable flags. ##
modified Customize sessions in self-hosted environments View current →
--- a/self-hosted-environments-configuration.md +++ b/self-hosted-environments-configuration.md @@ -187,8 +187,8 @@ The hook fails when it exits non-zero, or exits 0 without leaving a usable checkout behind: - * **A repository the session pushes results to** : the runner fails the session, and on a non-zero exit surfaces the tail of the script’s stderr to the user. Write the reason to stderr as one short line, write it last, and then exit non-zero. Don’t print secrets to stderr, and remove `set -x` before you deploy the hook. If git’s `couldn't find remote ref` appears in roughly the last 4 KB of the hook’s stderr, the runner reports a deleted branch instead. The session’s error message then says the branch no longer exists on the remote and asks the user to restore it. If that branch exists, see [A session fails with `no longer exists on the remote` or `couldn't find remote ref`](</docs/en/self-hosted-environments-deploy#no-longer-exists-on-the-remote>). - * **A repository the session only reads from** , such as a repository added to a running session: the runner skips it and continues with the remaining repositories. The runner posts a `Skipped` step to the session and removes whatever the hook left at the checkout path. When the `Skipped` step mentions the checkout hook, find the failure detail on the `[runner:warn] checkout hook failed` line in the runner’s log. When the step says a source ref `no longer exists on remote`, see [A session fails with `no longer exists on the remote` or `couldn't find remote ref`](</docs/en/self-hosted-environments-deploy#no-longer-exists-on-the-remote>). If skipping leaves the session with no repository at all, the runner fails the session anyway. + * **A repository the session pushes results to** : the runner fails the session, and on a non-zero exit surfaces the tail of the script’s stderr to the user. Write the reason to stderr as one short line, write it last, and then exit non-zero. Don’t print secrets to stderr, and remove `set -x` before you deploy the hook. If git’s `couldn't find remote ref` appears in roughly the last 4 KB of the hook’s stderr, the runner reports a missing branch instead. If that branch exists, see [A session fails with `couldn't be found in the remote repository` or `couldn't find remote ref`](</docs/en/self-hosted-environments-deploy#no-longer-exists-on-the-remote>). + * **A repository the session only reads from** , such as a repository added to a running session: the runner skips it and continues with the remaining repositories. The runner posts a `Skipped` step to the session and removes whatever the hook left at the checkout path. When the `Skipped` step mentions the checkout hook, find the failure detail on the `[runner:warn] checkout hook failed` line in the runner’s log. When the step says a source ref `no longer exists on remote`, see [A session fails with `couldn't be found in the remote repository` or `couldn't find remote ref`](</docs/en/self-hosted-environments-deploy#no-longer-exists-on-the-remote>). If skipping leaves the session with no repository at all, the runner fails the session anyway. When the hook succeeds, the runner removes the checkout path after the session ends. @@ -633,7 +633,7 @@ * The enterprise-scope [managed MCP file](</docs/en/managed-mcp>) at its standard system path: `/etc/claude-code/managed-mcp.json` on Linux runner hosts, `/Library/Application Support/ClaudeCode/managed-mcp.json` on macOS hosts. Use it for locked-down fleets where only administrator-listed servers may load. See [exclusive control with managed-mcp.json](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>) for the precedence rules. When this file is on the runner host, Claude Code skips the MCP servers Anthropic’s control plane delivers to a session, including claude.ai connectors, and names them in a warning on the session child’s stderr, which the runner records at the `debug` log level. Before v2.1.229, those sessions exited at startup with `You cannot dynamically configure MCP servers when an enterprise MCP config is present`. * The [`managedMcpServers`](</docs/en/settings-reference#managedmcpservers>) key in [managed settings](</docs/en/managed-settings>) on the runner host: provides HTTP and SSE servers without taking exclusive control, so servers from the other sources still load. Requires Claude Code v2.1.259 or later. - * `<repo>/.mcp.json`: project scope. Outside a [project](</docs/en/claude-projects#what-threads-pick-up-from-your-repositories>) thread, commit the file to the repository, and its servers are auto-approved in cloud sessions. In a session with several repositories, at most one repository’s file loads. + * `<repo>/.mcp.json`: project scope. Outside a [project](</docs/en/claude-projects#what-threads-pick-up-from-your-repositories>) thread, commit the file to the repository, and its servers are auto-approved in cloud sessions. In a session with several repositories, at most one repository’s file loads. With [`--trust-workspace false`](</docs/en/self-hosted-environments-reference#runner-cli-flags>), sessions skip the file’s servers unless settings the repository doesn’t commit approve them, such as [`enabledMcpjsonServers`](</docs/en/settings-reference#enabledmcpjsonservers>) in the host’s `~/.claude/settings.json`. Requires Claude Code v2.1.319 or later. * A [`--mcp-config`](</docs/en/cli-reference#cli-flags>) file from your wrapper script: append the flag after `"$@"`, as in `exec "$CLAUDE_RUNNER_CLAUDE_BIN" "$@" --mcp-config /etc/claude/mcp.json`. To keep that file’s servers running when the session’s delivered servers are updated mid-session, have your wrapper pass the full environment to the child, as `exec` does. Before v2.1.299, the stdio, HTTP, and SSE servers in that file shut down at the first such update that didn’t name them. When connector delivery is enabled for your organization, Anthropic’s control plane delivers the connectors you’ve configured on claude.ai to interactively-created sessions through server-provided MCP configuration, routed through `api.anthropic.com`. Sessions created programmatically, such as [CLI dispatches](</docs/en/self-hosted-environments-testing#run-the-test-loop>), don’t receive connector delivery; give them MCP servers through any of the other sources this section lists instead. The child’s OAuth token doesn’t carry a scope for fetching connectors directly, so the child doesn’t attempt that fetch itself; delivery is server-driven.
modified Deploy self-hosted environments to production View current →
--- a/self-hosted-environments-deploy.md +++ b/self-hosted-environments-deploy.md @@ -17,7 +17,8 @@ * **WithAnthropic-managed git**: with such a credential, Claude reaches GitHub directly instead of through Anthropic-managed git. * **Without Anthropic-managed git** : a clone credential can stay in the image if you scope it as tightly as Ship git config in your image describes. * **Keep the environment secret off session-running hosts** : the environment secret can register runners and pick up any session queued on the environment. On a fixed fleet it lives on every runner host, where any session’s code can read the secret file. Prefer [on-demand runners](</docs/en/self-hosted-environments-configuration#on-demand-runners>), where the secret stays on the orchestrator host, which never runs user code, and each runner receives a single-use work order that registers exactly one runner. On a fixed fleet, treat the environment-secret file as readable by every session and rotate the secret after any suspected session compromise. - * **After a suspected compromise** : have an [Owner](</docs/en/cloud-environments#organization-shared-environments>) create a new secret and revoke the old one from the environment’s **Configuration** tab, then roll out the new one. Anthropic refuses every orchestrator and runner on the old secret, on-demand runners from its work orders included. Your runners exit, interrupting their sessions. + * **After a suspected compromise, first revoke the suspect session** : before you stop its runner or revoke the secret, select **Revoke token** in the session’s menu on the **Activity** tab. No runner can then resume it. + * **Then replace the secret** : have an [Owner](</docs/en/cloud-environments#organization-shared-environments>) create a new secret and revoke the old one from the environment’s **Configuration** tab, then roll out the new one. Anthropic refuses every orchestrator and runner on the old secret, on-demand runners from its work orders included. Your runners exit, interrupting their sessions. * **Default-deny network egress** : restrict runner and session container outbound traffic at your own network boundary on every environment; Default-deny egress covers what to allow and why. * **Least-privilege host IAM** : the compute identity attached to the runner host, such as an instance profile or node service account, should grant only what the runner itself needs. Sessions should obtain their own credentials through your wrapper script rather than inheriting the host’s. * **Block the cloud metadata endpoint from sessions** : keeping sessions off the host identity requires blocking their access to the cloud metadata endpoint, and subnet-level egress policies don’t intercept link-local metadata traffic, so block it in the container itself: @@ -243,7 +244,7 @@ On a runner started with `--use-anthropic-git-proxy`, a session fails to start when Anthropic doesn’t serve its git. Look in the runner’s log for a git error that names an `api.anthropic.com` address containing `/git_proxy/`. For each session, a runner on Claude Code v2.1.267 or later also logs either a `[runner:session]` line containing `governed git ACTIVE` when Anthropic serves the session’s git, or one `[runner:warn]` line containing `the server withheld Anthropic-managed git for this session` when it doesn’t. Find the line you’re seeing among these cases: - * **Neither`governed git ACTIVE` nor the `withheld` line**: a runner older than Claude Code v2.1.267 logs neither line, and Anthropic doesn’t serve its sessions. Update the runner to v2.1.267 or later by following Pin the version. + * **Neither`governed git ACTIVE` nor the `withheld` line**: if the runner is older than Claude Code v2.1.267, Anthropic doesn’t serve its sessions. Update the runner to v2.1.267 or later by following Pin the version. * **The`withheld` line**: Anthropic didn’t serve the session. A runner that worked with the git proxy before can fail this way with no change on your side. * **A repository isn’t on github.com** : a session with even one repository on another git host, such as GitHub Enterprise Server, isn’t served, including its github.com repositories. Turn the Anthropic git proxy off for that environment’s runners. * **Every repository is on github.com** : report the failure to your Anthropic account team with the session ID from the `withheld` line. Anthropic records the reason on its side. @@ -415,6 +416,7 @@ Swap `linux-x64` for `linux-arm64` if your nodes are ARM, or for `linux-x64-musl` or `linux-arm64-musl` on a musl-based image such as Alpine; see [Alpine Linux setup](</docs/en/setup#alpine-linux-and-musl-based-distributions>) for the extra packages musl images need. The URL is the standard Claude Code release location, so you can verify the downloaded binary against the release’s signed manifest as described in [Binary integrity and code signing](</docs/en/setup#binary-integrity-and-code-signing>). The runner requires Claude Code version 2.1.224 or later, or 2.1.229 or later to serve Claude Tag sessions. Build the image, then push it to your registry and reference it in the recipes below: + # If your model needs a newer release, change stable to latest in the URL docker build \ --build-arg CLAUDE_CODE_VERSION="$(curl -fsSL https://downloads.claude.ai/claude-code-releases/stable)" \ -t <your-registry>/claude-runner:latest . @@ -445,7 +447,7 @@ Builds and tests are usually the largest and most variable part of a session’s load, so run a representative build of your repository, measure its peak CPU and memory, and raise any starting value that leaves no room for the Claude Code process on top of that peak. The runner uses `--capacity` to cap how many sessions it runs at once. It doesn’t divide CPU or memory between them, so the sessions on a runner share the container’s CPU and memory. To keep one session’s memory use from ending the others, run one session per runner with its own memory limit. * **One session per runner** : give each container one session’s values. Use this sizing at `--capacity 1`, which the hardening section recommends, and for [on-demand runners](</docs/en/self-hosted-environments-configuration#on-demand-runners>), where you set the values on the workload your [`spawn-runner` hook](</docs/en/self-hosted-environments-configuration#the-spawn-runner-hook>) submits, such as a Kubernetes Job’s pod template. - * **Several sessions per runner** : at a `--capacity` above one, multiply one session’s values by the capacity, because up to that many sessions can run in the container at the same time. The Kubernetes and Docker Compose recipes run `--capacity 4` with no CPU or memory limits, so add limits sized for the capacity you run. + * **Several sessions per runner** : at a `--capacity` above one, multiply one session’s values by the capacity, because up to that many sessions can run in the container at the same time, idle ones included. The Kubernetes and Docker Compose recipes run `--capacity 4` with no CPU or memory limits, so add limits sized for the capacity you run. * **Several runner containers on one host** : size the host for the sum of the runners’ capacities, because each runner counts only its own sessions against `--capacity`: * **Memory** : multiply one session’s memory by the sum, then add what the host’s own processes use * **CPU** : multiply one session’s CPU request by the sum. To let every session burst at once, multiply its CPU limit instead. @@ -980,13 +982,16 @@ * **Sessions fail to start on a runner that set`--use-anthropic-git-proxy`**: look in the runner’s log for `access denied by the git proxy`, or for a git error that names an `api.anthropic.com` address containing `/git_proxy/`. To tell whether Anthropic served the session and fix the cause, see When sessions fail to start on a runner with the git proxy. * **Sessions can’t reach the network through an authenticating egress proxy** : when the source you set with `--proxy-authorization-command` or `--proxy-authorization-file` fails, times out after 30 seconds, or yields an empty value, the runner answers that connection `502 Bad Gateway` and logs why. The runner redacts the command’s stderr in that log and never logs the header value. With `--proxy-authorization-command`, run the command yourself on the host to confirm it prints the whole header value on stdout. If the runner instead exits at startup with `could not start the proxy-authorization listener`, it couldn’t open its loopback listener. * **Runner logs`Poll failed` lines containing `rejecting the malformed poll response`**: the runner received a work-poll response whose body isn’t the queue’s expected JSON. One cause is an intercepting proxy or a captive portal answering with its own page. If the runner connects through a proxy, configure the proxy to pass responses from `api.anthropic.com` through unaltered. The runner rejects the malformed response, counts it under the `transport` kind of the `claude_code_self_hosted_runner_poll_errors_total` [metric](</docs/en/self-hosted-environments-reference#prometheus-metrics>), and retries on the failed-poll schedule described in [Session lifecycle](</docs/en/self-hosted-environments#session-lifecycle>). The runner keeps serving its live sessions. Before v2.1.246, the runner read such a response as an empty work queue, which could end its live sessions or make it exit. - * **A session fails with`no longer exists on the remote` or `couldn't find remote ref`**: the runner reads git’s `couldn't find remote ref` as a deleted branch. The branch can still exist. Look for it on your git host, under exactly the name in the message, then check each cause that fits: - * **The branch is gone** : restore it, as the message asks. + * **A session fails with`couldn't be found in the remote repository` or `couldn't find remote ref`**: look for the branch on your git host. Search for exactly the name in the message. The session’s error includes `Retrying will fail the same way until you fix the missing branch described below.` When the error names the branch, the text under `Last output before exit:` reads: + + The branch '<ref>' couldn't be found in the remote repository <repo>. If it was never pushed, push it. If it was deleted after a merge, restore it from its pull request. Then send a new message, or start a new session from a branch that has been pushed. (couldn't find remote ref) + + * **The branch isn’t on the host** : push it if it was never pushed, or restore it from its pull request if it was deleted after a merge. * **The branch exists and you don’t administer the runner** : send the runner’s administrator the full message and tell them the branch exists. * **The branch exists and the runner has a`checkout` hook**: a git command in your hook can print `couldn't find remote ref` to stderr before the hook exits non-zero. Find that command, and correct the ref it asks for or the remote it fetches from. The runner passes your hook the revision the session asked for as [`CLAUDE_RUNNER_REPO_REF`](</docs/en/self-hosted-environments-configuration#checkout>). * **The branch exists and the runner has no`checkout` hook**: the runner fetches the branch itself. If a `--git-host-rewrite` applies to the repository, confirm that the host it rewrites to has the branch under the same name, and push the branch there if it doesn’t. * **The branch exists and the runner is older than v2.1.301** : upgrade the runner as described in Pin the version, so that a different failure shows its own error. Before v2.1.301, other failures with `couldn't find remote ref` in their error output were also reported as a deleted branch. -Once the runner is upgraded or the cause is fixed, retry the session or start a new one. If none of these checks finds the cause, report an issue. For the source the session pushes results to, a deleted branch fails the session. For a git source the session only reads from, the runner skips that source and continues on the remaining ones. The runner fails the session when skipping would leave it with no repository at all. Before v2.1.228, such a session started in an empty directory. +Once the runner is upgraded or the cause is fixed, send the session a new message, or start a new session from a branch that has been pushed. If none of these checks finds the cause, report an issue. Before v2.1.314, the message said the branch `no longer exists on the remote`. Follow the same checks for that message. For the source the session pushes results to, a deleted branch fails the session. For a git source the session only reads from, the runner skips that source and continues on the remaining ones. The runner fails the session when skipping would leave it with no repository at all. Before v2.1.228, such a session started in an empty directory. * **Claude Tag sometimes doesn’t post its reply in Slack** : the reply reminder is a [hook the control plane supplies](</docs/en/self-hosted-environments-configuration#how-each-session%E2%80%99s-config-is-assembled>). Confirm the runner is Claude Code v2.1.229 or later with `claude --version`, since older runners ignore supplied hooks; confirm `python3 --version` succeeds inside the runner image, since the hooks run `python3`; and confirm no settings file turns hooks off, whether `disableAllHooks` in `managed-settings.json`, the runner user’s `~/.claude/settings.json`, or the repository’s `.claude/settings.json` or `.claude/settings.local.json`, or `allowManagedHooksOnly` or a [`strictPluginOnlyCustomization`](</docs/en/settings-reference#strictpluginonlycustomization>) that covers hooks in managed settings. * **A session starts without one of its repositories** : on a runner with no [`checkout` hook](</docs/en/self-hosted-environments-configuration#checkout>), the git host can refuse the runner’s access check for a repository the session only reads from. The runner then skips that repository, logs a `[runner:warn] could not access context source` line naming the refusal, and starts the session on the remaining ones. With its own git credentials, the runner can skip a repository when the host answers that the repository wasn’t found, git finds no credentials for the host, or authentication fails. With `--use-anthropic-git-proxy`, when the git proxy refuses a repository with `access denied by the git proxy`, the runner skips it. The log line then says `blocked by the git proxy`. For the causes to check, see the `remote: access denied by the git proxy` case in When sessions fail to start on a runner with the git proxy. A network failure, a timeout, or any other HTTP `403` still fails the session start, as does a refusal for a repository the session pushes results to. The runner still fails a session that skipping would leave with no repository at all. The access check runs again each time the session starts on a runner, so once the runner’s git identity has read access, the next start clones the repository. Before v2.1.274, each of these refusals failed the session start. * **The log shows`could not read context source`**: this line, unlike `could not access context source`, means the git host kept answering HTTP `429`, or a wrapper you installed as `git` kept exiting `75`. The runner skipped that repository. To retry, start a new session. The runner also tries the repository again each time this session starts on a runner. With no `checkout` hook, the runner can skip a repository the session only reads from, unless it’s first among the session’s repositories. Before v2.1.311, the session start failed.
modified Self-hosted environments reference View current →
--- a/self-hosted-environments-reference.md +++ b/self-hosted-environments-reference.md @@ -48,7 +48,7 @@ `--session-stop-grace-sec <n>`| `SELF_HOSTED_RUNNER_SESSION_STOP_GRACE_MS`| `5`| How long to wait for the Claude process to exit cleanly after a session ends, before force-killing it. Raise the value if the child’s own `SessionEnd` hooks need more time. `--startup-timeout-min <n>`| `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS`| `15`| How long to wait on a child process that hasn’t initialized before releasing the session’s slot. See Session startup timeout for where the count starts and which sessions it leaves running. `0` disables the timeout. `--trust-workspace [bool]`| `SELF_HOSTED_RUNNER_TRUST_WORKSPACE`| on| Seed persisted trust for each session’s repository paths so repo-committed `permissions.allow` and `additionalDirectories` are honored. Set `false` to drop repo-committed permission grants and configure allow rules in the host config’s `settings.json` instead; repository-committed `sandbox.*` settings still apply either way, which is why the [repo-settings guard](</docs/en/self-hosted-environments-deploy#harden-your-deployment>) scans them regardless of this flag. -`--use-anthropic-git-proxy`| `CLAUDE_RUNNER_USE_GIT_PROXY=1`| off| Clone repositories on github.com via the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>) instead of customer-managed git auth. Requires `--capacity 1` and git 2.32 or later; the runner refuses to start otherwise. Supersedes the rewrite flags. +`--use-anthropic-git-proxy`| `CLAUDE_RUNNER_USE_GIT_PROXY=1`| off| Clone repositories on github.com via the [Anthropic git proxy](</docs/en/self-hosted-environments-deploy#use-the-anthropic-git-proxy>) instead of customer-managed git auth. Requires `--capacity 1` and git 2.32 or later; the runner refuses to start otherwise. Also requires Claude Code v2.1.267 or later. Supersedes the rewrite flags. Most duration flags have a maximum, chosen to keep each timeout inside the runtime’s 32-bit timer ceiling of roughly 24.85 days. The `--*-min` flags cap at 10080 minutes, 7 days; `--drain-grace-sec` at 604800 seconds, also 7 days; and `--drain-wait-sec` at 86400 seconds, 24 hours. `--session-stop-grace-sec` and `--post-session-hook-timeout-sec` are uncapped. Overrunning a cap behaves differently per surface: @@ -145,7 +145,7 @@ Telemetry -Session children send operational telemetry to Anthropic unless you turn it off. No code or repository content is sent. Set telemetry variables on the runner process; the runner re-asserts them after applying server-provided environment variables, so the operator’s setting always takes precedence. One control is specific to self-hosted environments: `CLAUDE_CODE_BYOC_ENABLE_DATADOG=1` opts in to Datadog operational metrics, which are off by default in self-hosted environments. The general Claude Code telemetry controls, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `DISABLE_ERROR_REPORTING`, and `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, apply to session children as documented in the [environment variable reference](</docs/en/env-vars>). `DISABLE_GROWTHBOOK` is related but different: setting `DISABLE_GROWTHBOOK=1` disables feature-flag fetching, and telemetry stays on unless `DISABLE_TELEMETRY` is also set. `CLAUDE_CODE_ENABLE_TELEMETRY` is unrelated: it enables OpenTelemetry export to your own collector, as described in [Monitoring](</docs/en/monitoring-usage>), and doesn’t control Anthropic’s analytics. +Session children send operational telemetry to Anthropic unless you turn it off. No code or repository content is sent. Set telemetry variables on the runner process; the runner re-asserts them after applying server-provided environment variables, so the operator’s setting always takes precedence. One control is specific to self-hosted environments: `CLAUDE_CODE_BYOC_ENABLE_DATADOG=1` opts in to Datadog operational metrics, which are off by default in self-hosted environments. The general Claude Code telemetry controls, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `DISABLE_ERROR_REPORTING`, and `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, apply to session children as documented in the [environment variable reference](</docs/en/env-vars>). [`CLAUDE_CODE_DISABLE_FEATURE_FLAGS`](</docs/en/env-vars#variables>) is related but different: setting `CLAUDE_CODE_DISABLE_FEATURE_FLAGS=1` disables feature-flag fetching, and telemetry stays on unless `DISABLE_TELEMETRY` is also set. `CLAUDE_CODE_DISABLE_FEATURE_FLAGS` requires Claude Code v2.1.319 or later. `CLAUDE_CODE_ENABLE_TELEMETRY` is unrelated: it enables OpenTelemetry export to your own collector, as described in [Monitoring](</docs/en/monitoring-usage>), and doesn’t control Anthropic’s analytics. ##
modified Test self-hosted environments end to end View current →
--- a/self-hosted-environments-testing.md +++ b/self-hosted-environments-testing.md @@ -1,6 +1,6 @@ Self-hosted environments are in public beta on Team and Enterprise plans; [Availability and limitations](</docs/en/self-hosted-environments#availability-and-limitations>) covers the enablement path. This page is the CI test recipe; see the [quickstart](</docs/en/self-hosted-environments-quickstart>) for setup and [Deploy to production](</docs/en/self-hosted-environments-deploy>) for the fleet recipes. -In a [self-hosted environment](</docs/en/self-hosted-environments>), Claude Code [cloud sessions](</docs/en/claude-code-on-the-web>) run on a runner image you build and maintain. Before rolling a new image to your production environment, drive a full session against a test environment from a script: create a session, read Claude’s reply, send a follow-up, and read that reply too. This is the shape of a CI smoke test that verifies your runner image, git access, and any custom tools before you promote a change. This recipe assumes you’ve already [set up an environment and a runner](</docs/en/self-hosted-environments-quickstart#set-up-an-environment-and-runner>), and that your CI job starts the runner process on the same host as the test script, the natural setup for testing a new runner image. A Stop hook you install on the runner writes each turn’s final reply to a local file, and the script reads it from there, so the only calls to the Anthropic API are the two dispatches themselves. If your test runners are on separate infrastructure, see Remote test runners. +In a [self-hosted environment](</docs/en/self-hosted-environments>), Claude Code [cloud sessions](</docs/en/claude-code-on-the-web>) run on a runner image you build and maintain. Before rolling a new image to your production environment, drive a full session against a test environment from a script: create a session, read Claude’s reply, send a follow-up, and read that reply too. This is the shape of a CI smoke test that verifies your runner image, git access, and any custom tools before you promote a change. This recipe assumes you’ve already [set up an environment and a runner](</docs/en/self-hosted-environments-quickstart#set-up-an-environment-and-runner>), and that your CI job starts the runner process on the same host as the test script. A Stop hook you install on the runner writes each turn’s final reply to a local file, and the script reads it from there. If your test runners are on separate infrastructure, see Remote test runners. ##
modified Configure server-managed settings View current →
--- a/server-managed-settings.md +++ b/server-managed-settings.md @@ -89,7 +89,7 @@ Verify settings delivery -To confirm that settings are being applied, ask a user to restart Claude Code. If the configuration includes settings that trigger the security approval dialog, the user sees a prompt describing the managed settings the next time Claude Code fetches them: at the next start, or within an hour in a running interactive session. You can also verify that managed permission rules are active by having a user run `/permissions` to view their effective permission rules. To check the fetch outcome on a specific machine, have the user run `claude doctor` and read the `Managed settings (remote)` line. Requires Claude Code v2.1.248 or later. The line reports one of four outcomes: +To confirm that settings are being applied, ask a user to restart Claude Code. If the configuration includes settings that trigger the security approval dialog, the user sees a prompt describing the managed settings the next time Claude Code fetches them: at the next start, or within an hour in a running interactive session. You can also verify that managed permission rules are active by having a user run `/permissions` to view their effective permission rules. In a session, have the user run `/status`. The [`Setting sources` line](</docs/en/managed-settings#read-the-source-in-/status>) lists `Enterprise managed settings` with `remote` in parentheses when server-managed settings apply. To check the fetch outcome on a specific machine, have the user run `claude doctor` and read the `Managed settings (remote)` line. Requires Claude Code v2.1.248 or later. The line reports one of four outcomes: * The delivered settings loaded * Your organization has no server-managed settings configured @@ -102,6 +102,51 @@ ​ +Give groups different settings + +On an Enterprise plan, you can give each group of members its own configuration instead of one organization-wide configuration. If your organization has [HIPAA enabled](</docs/en/hipaa-setup>), group configurations aren’t available yet. Each group must already exist, either synced from your identity provider through SCIM or as a custom group you manage in the admin console. Each member receives at most one configuration, the same on every device: + + * **A member of a group with a configuration** : the configuration ranked highest among their groups + * **Anyone else** , including a member whose only group with a configuration was deleted: the catch-all configuration, if you set one + +Configurations don’t merge with each other or with the organization-wide configuration, so each one must hold every setting you want that group to have. To apply a restriction to every member, put it in every group configuration and in the catch-all. Members keep receiving the organization-wide configuration until the last of these steps, so you can set up and test everything first: + +1 + +Add a configuration for each group + +In [**Organization settings > Claude Code > Managed settings**](<https://claude.ai/admin-settings/claude-code>), click **Add configuration** , pick the group, and choose a starting point. To loosen policy for a group, pick a group that your identity provider syncs, so that no one can add themselves to it in the admin console.To keep what members have today and change a few settings, start from a copy of your organization-wide configuration. Edit the configuration and save it. + +2 + +Set the catch-all + +Click **Set** on **Everyone else** and add the JSON for members who match no group configuration. To leave them with what they have today, paste in your organization-wide configuration. If you skip this step, their local sessions receive no server-managed settings, and any [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) on the device still apply. + +3 + +Rank the groups + +Drag the configurations into order. A member of several groups receives only the highest-ranked configuration, so put your most restrictive or most specific groups at the top. + +4 + +Check who gets what + +Under **Check effective settings** at the bottom of the page, search for a member to see which configuration they would receive. Check a member from each group, a member of several groups, and a member who matches no group configuration. + +5 + +Switch to group-based mode + +Click **Switch to group-based configurations** in the banner at the top of the page and confirm. Members receive their configurations within about an hour, apart from the keys that apply only at the next launch. To go back, switch to organization-wide mode from the same banner: the organization-wide configuration applies again, if you have one, and your group configurations are kept. + +A group’s model limits hold only in local sessions. Cloud and remote Cowork sessions use the [`availableModels`](</docs/en/model-config#restrict-model-selection>) list in the catch-all. If you set no catch-all, it comes from your organization-wide configuration, even after you switch to group-based mode. If you leave the key out of the catch-all, members aren’t limited by this list in those sessions. If you use a group’s configuration to set where API requests go, that applies only to Claude Code, not to other tools that call the API. + +### + +​ + Access control The following roles can manage server-managed settings: @@ -109,7 +154,7 @@ * **Primary Owner** * **Owner** -Restrict access to trusted personnel, as settings changes apply to all users in the organization. +Restrict access to trusted personnel, as settings changes can apply to all users in the organization. ### @@ -127,7 +172,7 @@ Server-managed settings have the following limitations: - * Settings apply uniformly to all users in the organization. Per-group configurations are not yet supported. + * On a Team plan, settings apply uniformly to all users in the organization. Group configurations require an Enterprise plan. * You can’t distribute a [`managed-mcp.json`](</docs/en/managed-mcp>) file through server-managed settings. Deliver the `allowedMcpServers` and `deniedMcpServers` policy keys there instead. On Claude Code v2.1.259 or later, you can also provide remote servers with [`managedMcpServers`](</docs/en/managed-mcp#provide-servers-through-managed-settings>), which accepts `http` and `sse` servers only and doesn’t take exclusive control the way the file does. Claude Code reads a `managed-mcp.json` deployed at its [system path](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>) separately from the managed settings tier, so the file still applies when server-managed settings are in effect. * Settings restricted to OS-level policy sources, such as `policyHelper` and `wslInheritsWindowsSettings`, aren’t honored. Deploy them through MDM or a system `managed-settings.json` file instead. A `policyHelper` deployed that way runs only when its source is the one selected under [precedence within the managed tier](</docs/en/managed-settings#precedence-within-the-managed-tier>). @@ -249,13 +294,13 @@ * If the gateway answers an attended interactive launch with a `401` and this setting is off, the gateway has ended that sign-in. Claude Code prints [`Cloud gateway session expired — run /login to reconnect.`](</docs/en/errors#cloud-gateway-session-expired>) and opens the session signed out of the gateway until the user runs `/login`. * When the fetch fails in any other way, or in any other kind of launch except a `claude auth` subcommand, the client exits with an error. -When this setting is active in a session that fetches server-managed settings, the CLI blocks at startup until remote settings are freshly fetched. If the fetch fails, the CLI exits rather than proceeding without the policy. This setting self-perpetuates: once delivered from the server, it is also cached locally so that subsequent startups enforce the same behavior even before the first successful fetch of a new session. A session that doesn’t fetch server-managed settings starts without waiting. To enable this, add the key to your managed settings configuration: +When this setting is active in a session that fetches server-managed settings, the CLI blocks at startup until remote settings are freshly fetched. If the fetch fails, the CLI exits rather than proceeding without the policy. A session that doesn’t fetch server-managed settings starts without waiting. To enable this, add the key to your managed settings configuration: { "forceRemoteSettingsRefresh": true } -You can also set this key in an [endpoint-managed](</docs/en/managed-settings#delivery-mechanisms>) MDM profile or system `managed-settings.json` file to enforce fail-closed behavior on first launch, before any server payload has arrived. This flag is an exception to the precedence rule above: Claude Code honors it when any admin-controlled managed source sets it, even if a cached server-managed payload is also present, so it doesn’t ignore an MDM-delivered value when server-managed settings exist. When a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings, its output replaces every other managed source for the keys Claude Code reads after startup. For the sources Claude Code reads this key from, see [its settings entry](</docs/en/settings-reference#forceremotesettingsrefresh>). The `policyHelper` entry says which sources Claude Code reads the helper from and when it runs. The settings fetch also sends a `Cache-Control: no-cache` header so intermediate HTTP proxies don’t serve a stale response. Before enabling this setting, ensure your network policies allow connectivity to `api.anthropic.com`. If that endpoint is unreachable, the CLI exits at startup and users cannot start Claude Code. The `claude auth` subcommands such as `claude auth login` are exempt from this check and from the gateway startup exit, so users can re-authenticate when expired credentials are the reason the settings fetch fails. +You can also set this key in an [endpoint-managed](</docs/en/managed-settings#delivery-mechanisms>) MDM profile or system `managed-settings.json` file to enforce fail-closed behavior on first launch, before any server payload has arrived. This flag is an exception to the precedence rule above: Claude Code honors it when any admin-controlled managed source sets it, even if a cached server-managed payload is also present, so it doesn’t ignore an MDM-delivered value when server-managed settings exist. On later startups, Claude Code reads a server-delivered value from the cached settings, so the setting is active before the new session’s first fetch. To keep the setting active without relying on the cached copy, also set the key in an endpoint-managed source. When a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings, its output replaces every other managed source for the keys Claude Code reads after startup. For the sources Claude Code reads this key from, see [its settings entry](</docs/en/settings-reference#forceremotesettingsrefresh>). The `policyHelper` entry says which sources Claude Code reads the helper from and when it runs. The settings fetch also sends a `Cache-Control: no-cache` header so intermediate HTTP proxies don’t serve a stale response. Before enabling this setting, ensure your network policies allow connectivity to `api.anthropic.com`. If that endpoint is unreachable, the CLI exits at startup and users cannot start Claude Code. The `claude auth` subcommands such as `claude auth login` are exempt from this check and from the gateway startup exit, so users can re-authenticate when expired credentials are the reason the settings fetch fails. ###
modified Settings files and precedence View current →
--- a/settings.md +++ b/settings.md @@ -197,7 +197,7 @@ * **Settings Error** : a user, project, or local file has invalid JSON or a value the schema rejects. At the start of an interactive session Claude Code shows a dialog that lets you fix the file with Claude’s help, exit, or continue without the broken settings. * **Settings Warning** : only individual entries fail, such as a malformed permission rule or an unknown hook event name. Claude Code skips those values and keeps the rest of the file in effect. * **Managed settings** : Claude Code keeps enforcing the rest of the file. [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value until you fix them. For a managed settings document that isn’t valid JSON, see [Managed settings document could not be parsed](</docs/en/errors#managed-settings-document-could-not-be-parsed>). - * **Configuration error** : [`~/.claude.json`](</docs/en/claude-directory#ce-claude-json>) can’t be parsed. A `claude -p` run exits, and your file is unchanged. See [Configuration error in ~/.claude.json](</docs/en/errors#configuration-error-in-claude-json>) to restore an earlier copy. Claude Code copies the broken file to `~/.claude/backups/.claude.json.corrupted.<timestamp>`, and in an interactive session asks whether to exit and fix it or reset to the default configuration. When the file is blank and there’s no backup to restore, Claude Code starts with default settings. + * **Configuration error** : [`~/.claude.json`](</docs/en/claude-directory#ce-claude-json>) can’t be parsed. A `claude -p` run exits. See [Configuration error in ~/.claude.json](</docs/en/errors#configuration-error-in-claude-json>) to restore an earlier copy. Claude Code copies the broken file to `~/.claude/backups/.claude.json.corrupted.<timestamp>`, and in an interactive session asks whether to exit and fix it or reset to the default configuration. When the file is blank and there’s no backup to restore, Claude Code starts with default settings. After you continue, run `/status` to see the affected files and `claude doctor` for the details of each error. A `-p` run shows no dialog. Unless [a managed settings document can’t be parsed](</docs/en/errors#managed-settings-document-could-not-be-parsed>), Claude Code skips a broken user, project, or local file or its broken values and continues with the rest. After a `-p` run that ignores a setting, run `claude doctor` from your terminal to see what it dropped.
modified Example settings files View current →
--- a/settings-example.md +++ b/settings-example.md @@ -247,7 +247,7 @@ * `cleanupPeriodDays` shortens retention of session transcripts and other local data to seven days * `companyAnnouncements` shows a message at startup -Administrators deploy a file like this as `managed-settings.json`, or the same JSON through MDM or [server-managed settings](</docs/en/server-managed-settings>). One deployed file applies to every machine or account it reaches. To give a group different values, deploy a different file or profile to that group, since [server-managed settings don’t support per-group policy yet](</docs/en/server-managed-settings#current-limitations>). +Administrators deploy a file like this as `managed-settings.json`, or the same JSON through MDM or [server-managed settings](</docs/en/server-managed-settings>). One deployed file applies to every machine or account it reaches. To give a group different values, deploy a different file or profile to that group. On an Enterprise plan, you can instead [give the group its own configuration](</docs/en/server-managed-settings#give-groups-different-settings>) in server-managed settings. * Copyable settings file
modified All settings View current →
--- a/settings-reference.md +++ b/settings-reference.md @@ -223,10 +223,10 @@ `statusLine`| Run your own command to render a [status line](</docs/en/statusline>) below the prompt| Interface and terminal| Any file `strictKnownMarketplaces`| Allowlist the [marketplace](</docs/en/plugins/overview>) sources users can add and install from| Plugins and skills| Managed `strictPluginOnlyCustomization`| Block [skills](</docs/en/skills>), [agents](</docs/en/sub-agents>), [hooks](</docs/en/hooks>), and [MCP servers](</docs/en/mcp>) from user and project sources| Plugins and skills| Managed -`strictPluginOnlyCustomization.agents`| Lock [agents](</docs/en/sub-agents>) to plugin and managed sources| Plugins and skills| Managed -`strictPluginOnlyCustomization.hooks`| Lock [hooks](</docs/en/hooks>) to plugin and managed sources| Plugins and skills| Managed -`strictPluginOnlyCustomization.mcp`| Lock [MCP servers](</docs/en/mcp>) to plugin and managed sources| Plugins and skills| Managed -`strictPluginOnlyCustomization.skills`| Lock [skills](</docs/en/skills>) to plugin and managed sources| Plugins and skills| Managed +`strictPluginOnlyCustomization.agents`| Block [agents](</docs/en/sub-agents>) from user and project sources| Plugins and skills| Managed +`strictPluginOnlyCustomization.hooks`| Block [hooks](</docs/en/hooks>) from user and project sources| Plugins and skills| Managed +`strictPluginOnlyCustomization.mcp`| Block [MCP servers](</docs/en/mcp>) from user and project sources| Plugins and skills| Managed +`strictPluginOnlyCustomization.skills`| Block [skills](</docs/en/skills>) from user and project sources| Plugins and skills| Managed `subagentPromptCacheTtl`| Choose the [prompt cache lifetime](</docs/en/prompt-caching#cache-lifetime>) for subagents and other requests outside the main conversation| Model and responses| Any file `subagentStatusLine`| Rewrite rows in the [subagent](</docs/en/sub-agents>) task display with your own command| Interface and terminal| Any file `switchModelsOnFlag`| Switch models automatically or pause when a [safety classifier](</docs/en/model-config#ask-before-switching>) flags a request| Model and responses| Any file @@ -287,7 +287,7 @@ "advisorModel": "opus" } -The key has no effect on providers where the advisor [isn’t available](</docs/en/advisor#requirements>), such as Amazon Bedrock and Claude Platform on AWS. `"fable"` requires [Fable access](</docs/en/advisor#choose-an-advisor-model>). +The key has no effect on providers where the advisor [isn’t available](</docs/en/advisor#requirements>), such as Amazon Bedrock. On Claude Platform on AWS, the key requires Claude Code v2.1.300 or later. `"fable"` requires [Fable access](</docs/en/advisor#choose-an-advisor-model>). ### @@ -463,7 +463,7 @@ `fastMode` -Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available, for interactive work such as rapid iteration or live debugging where you want speed at a higher cost per token. You don’t usually edit this key yourself. Running `/fast` writes `fastMode: true` to `~/.claude/settings.json`, and running it again to turn fast mode off removes the key. Only Fable 5.2, Opus 5.5, Opus 5, and Opus 4.8 support fast mode. Running `/fast` from another model switches you to Opus, and switching to an unsupported model turns fast mode off. See [Switch models while fast mode is on](</docs/en/fast-mode#switch-models-while-fast-mode-is-on>). +Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available, for interactive work such as rapid iteration or live debugging where you want speed at a higher cost per token. You don’t usually edit this key yourself. Running `/fast` writes `fastMode: true` to `~/.claude/settings.json`, and running it again to turn fast mode off removes the key. On the Anthropic API, only Fable 5.2, Opus 5.5, Opus 5, and Opus 4.8 support fast mode. Running `/fast` from another model switches you to Opus, and switching to an unsupported model turns fast mode off. See [Switch models while fast mode is on](</docs/en/fast-mode#switch-models-while-fast-mode-is-on>). On Google Cloud’s Agent Platform, [`/fast` switches you to Fable 5.2](</docs/en/fast-mode#use-fast-mode-on-agent-platform>) instead and doesn’t write this key, and Claude Code ignores a saved `true`. * **Scope** : `Any file` * **Type** : Boolean @@ -1375,7 +1375,7 @@ Skip the confirmation dialog Claude Code shows before a session enters `bypassPermissions` mode, whether from `--dangerously-skip-permissions` or from `defaultMode: "bypassPermissions"`. Claude Code writes `true` here in your user settings when you accept that dialog once. - * **Scope** : `User, local, or managed`. An untrusted repository can’t skip the dialog for you. + * **Scope** : `User, local, or managed`, and files passed with `--settings`. [Background sessions](</docs/en/permission-modes#bypass-permissions-ignored-in-a-background-session>) count only user and managed settings. An untrusted repository can’t skip the dialog for you. * **Type** : Boolean * `true`: Claude Code skips the confirmation dialog before a session enters `bypassPermissions` mode * `false`: the same as unset; the dialog appears unless another of these files sets `true` @@ -3609,7 +3609,7 @@ `syntaxHighlightingDisabled` -Claude Code colors code by language in the diffs, code blocks, and file previews it shows in the terminal, with its built-in highlighter; no plugin or language server is involved. Set this key to `true` to show them as plain text instead, for example if the colors clash with your terminal theme or slow a screen reader. +Claude Code colors code by language in the diffs, code blocks, and file previews it shows in the terminal, with its built-in highlighter. Set this key to `true` to show them as plain text instead, for example if the colors clash with your terminal theme or slow a screen reader. * **Scope** : `Any file` * **Type** : Boolean @@ -4755,10 +4755,10 @@ `strictPluginOnlyCustomization` -Block skills, agents, hooks, and MCP servers from user and project sources, so they can come only from plugins or managed settings. Combine it with `strictKnownMarketplaces` to control the full customization supply chain: the marketplace allowlist controls which plugins users can install. +Block skills, agents, hooks, and MCP servers from user and project sources. Combine it with `strictKnownMarketplaces` to choose which marketplaces users can install plugins from. Add `disableSideloadFlags` to reject the CLI flags that sideload plugins, agents, and MCP servers for a single run. * **Scope** : `Managed` - * **Type** : `true` to lock all four kinds of customization, or an array naming the kinds to lock, from `"skills"`, `"agents"`, `"hooks"`, and `"mcp"` + * **Type** : `true` to lock all of them, or an array naming the ones to lock, from `"skills"`, `"agents"`, `"hooks"`, and `"mcp"` * **Default** : unset, so nothing is locked This example locks skills and hooks and leaves agents and MCP servers unlocked: @@ -6042,12 +6042,12 @@ `forceLoginMethod` -Restrict which kind of account people can log in with. Set `"claudeai"` to allow only claude.ai accounts, `"console"` to allow only Claude Console accounts, or `"gateway"` to send people to a [cloud gateway](</docs/en/claude-apps-gateway>) instead of a first-party login. Administrators set it in managed settings and pair it with `forceLoginOrgUUID` to keep developers’ claude.ai logins inside one organization. If you set it to `"claudeai"` in any settings file, Claude Code also stops offering the [keyless Console sign-in](</docs/en/authentication#sign-in-without-an-api-key>) in the sessions that file applies to. With `"console"` alone, people can still reach the keyless sign-in after a failed login. To stop Claude Code offering it, see [Stop offering the keyless sign-in on managed machines](</docs/en/authentication#stop-offering-the-keyless-sign-in-on-managed-machines>), which also lists what else `forceLoginOrgUUID` changes. +Restrict which kind of account people can log in with: `"claudeai"` for claude.ai sign-in or `"console"` for Claude Console sign-in. Set `"gateway"` to send people to a [cloud gateway](</docs/en/claude-apps-gateway>) instead of a first-party login. Administrators set it in managed settings and pair it with `forceLoginOrgUUID` to keep developers’ claude.ai logins inside one organization. If you set it to `"claudeai"` in any settings file, Claude Code also stops offering the [keyless Console sign-in](</docs/en/authentication#sign-in-without-an-api-key>) in the sessions that file applies to. With `"console"` alone, people can still reach the keyless sign-in after a failed login. To stop Claude Code offering it, see [Stop offering the keyless sign-in on managed machines](</docs/en/authentication#stop-offering-the-keyless-sign-in-on-managed-machines>), which also lists what else `forceLoginOrgUUID` changes. * **Scope** : `Any file`. Claude Code honors `"gateway"` from the same sources as `forceLoginGatewayUrl` and treats it as unset everywhere else. * **Type** : string, one of: - * `"claudeai"`: only claude.ai accounts can log in - * `"console"`: only Claude Console accounts can log in + * `"claudeai"`: claude.ai sign-in + * `"console"`: Claude Console sign-in * `"gateway"`: Claude Code sends people to a cloud gateway instead of a first-party login * **Default** : unset, so people pick a login method @@ -6340,7 +6340,7 @@ `cleanupPeriodDays` -Set how many days Claude Code keeps [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) before deleting them. Claude Code runs the deletion as a background sweep after a session starts, as long as it can safely determine the retention period. The sweep deletes transcripts without showing a message, so a session you haven’t used for longer than the retention period no longer appears in the [`/resume`](</docs/en/sessions#resume-a-session>) picker. +Set how many days Claude Code keeps [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) before deleting them. Claude Code runs the deletion as a background sweep after a session starts, as long as it can safely determine the retention period. The sweep deletes transcripts without showing a message, so a session you haven’t used for longer than the retention period no longer appears in the [`/resume`](</docs/en/sessions#resume-a-session>) picker. By default, Claude Code keeps transcripts of sessions you started or most recently continued in Claude Desktop or Cowork past this period, even if you set this key yourself. This period [still applies to them in some cases](</docs/en/claude-directory#cleaned-up-automatically>), such as under the HIPAA configuration. Before v2.1.248, Claude Code deleted them after this period. * **Scope** : `Any file` * **Type** : number of days, a whole number, minimum `1` @@ -6360,7 +6360,7 @@ `desktopSessionCleanupPeriodDays` -Set an age limit in days for the transcripts of sessions you started or most recently continued in Claude Desktop or Cowork. Without this key, Claude Code [keeps those transcripts at any age](</docs/en/claude-directory#cleaned-up-automatically>). Claude Code deletes each one once it’s older than both this limit and `cleanupPeriodDays`, so with `cleanupPeriodDays` at its default of 30, a value of `7` still keeps them 30 days. [Cleaned up automatically](</docs/en/claude-directory#cleaned-up-automatically>) lists the cases where `cleanupPeriodDays` applies instead and Claude Code ignores this key. Requires Claude Code v2.1.248 or later. +Set an age limit in days for the transcripts of sessions you started or most recently continued in Claude Desktop or Cowork. Without this key, Claude Code [keeps those transcripts at any age](</docs/en/claude-directory#cleaned-up-automatically>), except in cases such as a session you deleted in Claude Desktop. Requires Claude Code v2.1.248 or later. Claude Code deletes each transcript once it’s older than both this limit and `cleanupPeriodDays`, so with `cleanupPeriodDays` at its default of 30, a value of `7` still keeps them 30 days. [Cleaned up automatically](</docs/en/claude-directory#cleaned-up-automatically>) lists cases where `cleanupPeriodDays` applies instead and Claude Code ignores this key. * **Scope** : `User or managed`. Claude Code also reads the key from a file you pass with `--settings`, and ignores it in project and local settings. * **Type** : number of days, a whole number, minimum `0`
modified Get structured output from agents View current →
Show diff (127 lines)
--- a/structured-outputs.md +++ b/structured-outputs.md @@ -74,7 +74,7 @@ } })) { // The result message contains structured_output with validated data - if (message.type === "result" && message.subtype === "success" && message.structured_output) { + if (message.type === "result" && message.subtype === "success" && !message.is_error && message.structured_output) { console.log(message.structured_output); // { company_name: "Anthropic", founded_year: 2021, headquarters: "San Francisco, CA" } } @@ -108,7 +108,11 @@ ), ): # The result message contains structured_output with validated data - if isinstance(message, ResultMessage) and message.structured_output: + if ( + isinstance(message, ResultMessage) + and not message.is_error + and message.structured_output + ): print(message.structured_output) # {'company_name': 'Anthropic', 'founded_year': 2021, 'headquarters': 'San Francisco, CA'} except Exception as error: @@ -164,7 +168,7 @@ } } })) { - if (message.type === "result" && message.subtype === "success" && message.structured_output) { + if (message.type === "result" && message.subtype === "success" && !message.is_error && message.structured_output) { // Validate and get fully typed result const parsed = FeaturePlan.safeParse(message.structured_output); if (parsed.success) { @@ -209,7 +213,11 @@ } ), ): - if isinstance(message, ResultMessage) and message.structured_output: + if ( + isinstance(message, ResultMessage) + and not message.is_error + and message.structured_output + ): # Validate and get fully typed result plan = FeaturePlan.model_validate(message.structured_output) print(f"Feature: {plan.feature_name}") @@ -286,7 +294,7 @@ } } })) { - if (message.type === "result" && message.subtype === "success" && message.structured_output) { + if (message.type === "result" && message.subtype === "success" && !message.is_error && message.structured_output) { const data = message.structured_output as { total_count: number; todos: Array<{ file: string; line: number; text: string; author?: string; date?: string }> }; console.log(`Found ${data.total_count} TODOs`); data.todos.forEach((todo) => { @@ -338,7 +346,11 @@ output_format={"type": "json_schema", "schema": todo_schema} ), ): - if isinstance(message, ResultMessage) and message.structured_output: + if ( + isinstance(message, ResultMessage) + and not message.is_error + and message.structured_output + ): data = message.structured_output print(f"Found {data['total_count']} TODOs") for todo in data["todos"]: @@ -371,14 +383,19 @@ Error handling -Structured output generation can fail when the agent cannot produce valid JSON matching your schema. This typically happens when the schema is too complex for the task, the task itself is ambiguous, or the agent hits its retry limit trying to fix validation errors. It can also happen without any validation failure: a [model fallback](</docs/en/model-config#automatic-model-fallback>) can retract an already-completed output mid-stream, and if no retry replaces it the run ends with the same error. Check the `errors` list on the error result message to tell the two causes apart before debugging your schema. When an error occurs, the result message has a `subtype` indicating what went wrong: +Structured output generation can fail when the agent cannot produce valid JSON matching your schema. This typically happens when the schema is too complex for the task, the task itself is ambiguous, or the agent hits its retry limit trying to fix validation errors. It can also happen without any validation failure: a [model fallback](</docs/en/model-config#automatic-model-fallback>) can retract an already-completed output mid-stream, and if no retry replaces it the run ends with the same error. Check the `errors` list on the error result message to tell the two causes apart before debugging your schema. Check the result message’s `subtype`: Subtype| Meaning ---|--- -`success`| Output was generated and validated successfully +`success`| The run ended without an error subtype `error_max_structured_output_retries`| No valid output remained after multiple attempts (validation failures, or a model-fallback retraction with no successful retry) -A result can also end with subtype `success` but no `structured_output` value, for example when the run completes without the agent producing a structured output. Treat that case as a failure as well. The troubleshooting entry [structured_output is None but the result says success](</docs/en/agent-sdk/troubleshooting#structured_output-is-none-but-the-result-says-success>) covers this case. The example below treats a result as successful only when the `subtype` is `success` and `structured_output` is present, and handles every other result as a failure: +A `success` subtype doesn’t by itself mean the run produced an answer. Treat a result as a failure when the result’s `is_error` is `true` or `structured_output` is absent: + + * **`is_error` on the result is `true`**: for example, the final model request ended in an API error or a refusal. Don’t use a `structured_output` value on such a result. + * **`structured_output` is absent**: to find the cause, see [structured_output is None but the result says success](</docs/en/agent-sdk/troubleshooting#structured_output-is-none-but-the-result-says-success>) + +The example below applies these checks: TypeScript @@ -406,13 +423,13 @@ } })) { if (msg.type === "result") { - if (msg.subtype === "success" && msg.structured_output) { + if (msg.subtype === "success" && !msg.is_error && msg.structured_output) { // Use the validated output console.log(msg.structured_output); } else if (msg.subtype === "error_max_structured_output_retries") { console.error("Could not produce valid output"); } else { - console.error("Run ended without a structured output"); + console.error("Run ended with an error or without a structured output"); } } } @@ -444,13 +461,17 @@ ), ): if isinstance(message, ResultMessage): - if message.subtype == "success" and message.structured_output: + if ( + message.subtype == "success" + and not message.is_error + and message.structured_output + ): # Use the validated output print(message.structured_output) elif message.subtype == "error_max_structured_output_retries": print("Could not produce valid output") else: - print("Run ended without a structured output") + print("Run ended with an error or without a structured output") except Exception as error: # A single-shot query() raises after yielding an error result. If the # failure was an error result, the error subtype branches above have
modified Tools reference View current →
--- a/tools-reference.md +++ b/tools-reference.md @@ -197,7 +197,7 @@ In a session that runs unattended, such as a run with the `-p` flag, an Agent SDK application, a CI job, or a cloud session, background Bash and PowerShell commands have a time limit. A local session you work in from a terminal, the desktop app, or the VS Code extension has no time limit on background commands. The time limit requires Claude Code v2.1.285 or later. Before v2.1.288, it applied in every session. The time limit counts 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 at its timeout, gets 30 minutes from the move + * A command that starts in the foreground and then moves to the background at its timeout gets 30 minutes from the move In a run with the `-p` flag whose prompt you pass as text rather than with `--input-format stream-json`, both defaults are 10 minutes instead of 30, because the run [waits for background commands after its result](</docs/en/headless#background-tasks-at-exit>). 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`.
modified Troubleshoot installation and login View current →
--- a/troubleshoot-install.md +++ b/troubleshoot-install.md @@ -25,7 +25,7 @@ `EACCES: permission denied` during install| Fix the install directory’s permissions `TLS connect error` or `SSL/TLS secure channel`| Update CA certificates `CRYPT_E_NO_REVOCATION_CHECK` or `CRYPT_E_REVOCATION_OFFLINE`| Work around blocked revocation checks -`Failed to fetch version` or can’t reach download server| Check network and proxy settings +`Failed to fetch version` or can’t reach download server| Check network and proxy settings, or for a certificate error, configure corporate CA certificates `The connection dropped while downloading the update` or `Download timed out: exceeded the total deadline`| Run the update again or set your proxy `Release verification failed for Claude Code`| Run `claude update` or `claude install` again `Auto-update failed · Run claude doctor` in red in the session footer| Run `claude update` from your shell @@ -92,11 +92,11 @@ * `403`: usually a proxy or network filter blocking the host, or Claude Code is [not available in your region](<https://www.anthropic.com/supported-countries>) * `5xx`: usually a temporary service issue; wait a few minutes and retry -If you see no output, `Could not resolve host`, or a connection timeout, your network is blocking the connection. Common causes: +If you see no output, or the installer shows `Could not resolve host` or a connection timeout, the connection failed, so check for these causes: * Corporate firewalls or proxies blocking `downloads.claude.ai` * Regional network restrictions: try a VPN or alternative network - * TLS/SSL issues: update your system’s CA certificates, or check if `HTTPS_PROXY` is configured + * TLS/SSL issues: see TLS or SSL connection errors If you’re behind a corporate proxy, set `HTTPS_PROXY` and `HTTP_PROXY` to your proxy’s address before installing. Ask your IT team for the proxy URL if you don’t know it, or check your browser’s proxy settings. This example sets both proxy variables, then runs the installer through your proxy: @@ -467,13 +467,19 @@ irm https://claude.ai/install.ps1 | iex - 3. **Check for proxy or firewall interference** : corporate proxies that perform TLS inspection can cause these errors, including `unable to get local issuer certificate` and `SELF_SIGNED_CERT_IN_CHAIN`. For the install step, make the install download trust your corporate proxy’s CA: + 3. **Check for proxy or firewall interference** : corporate proxies that perform TLS inspection can cause these errors, including `unable to get local issuer certificate`, `unable to verify the first certificate`, and `SELF_SIGNED_CERT_IN_CHAIN`. Make the install download trust your corporate proxy’s CA: * macOS/Linux * Windows PowerShell - curl --cacert /path/to/corporate-ca.pem -fsSL https://claude.ai/install.sh | bash +Set `CURL_CA_BUNDLE` for the install script’s `curl` downloads, and [`NODE_EXTRA_CA_CERTS`](</docs/en/network-config#custom-ca-certificates>) for the `claude install` command the script then runs. Ask your IT team for a PEM file with your proxy’s root CA certificate if you don’t have it. This example sets both to your proxy’s CA file and runs the script in the same terminal: + + export CURL_CA_BUNDLE=/path/to/corporate-ca.pem + export NODE_EXTRA_CA_CERTS=/path/to/corporate-ca.pem + curl -fsSL https://claude.ai/install.sh | bash + +If the install still fails with one of those certificate errors, ask your IT team for a file with both the public root certificates and your proxy’s full CA chain. Then set both variables to that file. The PowerShell installer downloads through .NET, which validates TLS against the Windows certificate store. Ask your IT team to add the proxy’s CA certificate to the Windows store if it isn’t already there, then run the installer: @@ -489,7 +495,6 @@ $env:NODE_EXTRA_CA_CERTS = 'C:\path\to\corporate-ca.pem' -Ask your IT team for the certificate file if you don’t have it. You can also try on a direct connection to confirm the proxy is the cause. 4. **On Windows, work around blocked revocation checks**. The errors `CRYPT_E_NO_REVOCATION_CHECK (0x80092012)` and `CRYPT_E_REVOCATION_OFFLINE (0x80092013)` mean curl reached the server but your network blocks the certificate revocation lookup, which is common behind corporate firewalls. If the failing command is the `curl` that downloads `install.cmd`, rerun it from a Command Prompt with `--ssl-revoke-best-effort` added: curl --ssl-revoke-best-effort -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd @@ -506,7 +511,7 @@ `Failed to fetch version from downloads.claude.ai` -The installer couldn’t reach the download server. This typically means `downloads.claude.ai` is blocked on your network. See Check network connectivity. +The end of the message gives the reason. If it’s a certificate error such as `unable to verify the first certificate`, see TLS or SSL connection errors. For any other reason, see Check network connectivity. ###
modified Troubleshoot the Agent SDK View current →
--- a/troubleshooting.md +++ b/troubleshooting.md @@ -152,7 +152,7 @@ structured_output is None but the result says success -A result message can end with `subtype: "success"` while `structured_output` is `None` in Python or `undefined` in TypeScript. The run completes, but no validated output exists. Treat this result as a failure in application code. Check both that `subtype` is `success` and that `structured_output` is present before using it. The [Error handling](</docs/en/agent-sdk/structured-outputs#error-handling>) section shows this pattern for both SDKs. Then check for these causes: +A result message can end with `subtype: "success"` while `structured_output` is `None` in Python or `undefined` in TypeScript. The run completes, but no validated output exists. Treat this result as a failure in application code. The [Error handling](</docs/en/agent-sdk/structured-outputs#error-handling>) section shows this pattern for both SDKs. Then check for these causes: * **A request that Claude declined** : to detect this case in your code, check the result message’s `stop_reason` for `"refusal"`. For what to try next, see [Usage Policy refusal](</docs/en/errors#usage-policy-refusal>). * **A schema no output can satisfy** : for example, a string whose `minLength` is greater than its `maxLength`. If `structured_output` is missing repeatedly with a schema you believe is correct, look for constraints that contradict each other. If you find none, simplify the schema until outputs validate, then reintroduce your constraints one at a time.
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -758,7 +758,7 @@ `rewindFiles(userMessageId, options?)`| Restores files to their state at the specified user message. Pass `{ dryRun: true }` to preview changes. Requires `enableFileCheckpointing: true`. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>) `setPermissionMode()`| Changes the permission mode (only available in streaming input mode) `setModel()`| Changes the model (only available in streaming input mode). Passing `undefined` or the string `"default"` resets to [Claude Code’s default model](</docs/en/model-config>). A session in `auto` mode [changes to `default` mode](</docs/en/agent-sdk/permissions#auto-mode-auto>) if the new model doesn’t support auto mode -`setMaxThinkingTokens()`| _Deprecated:_ Use the `thinking` option instead. Changes the maximum thinking tokens. Passing `null` resets thinking to the session default: a mid-session override is cleared, and thinking stays off for sessions that have it disabled +`setMaxThinkingTokens()`| _Deprecated:_ Use the `thinking` option instead. Changes the maximum thinking tokens. Pass `null` to undo earlier calls and restore the `thinking` or `maxThinkingTokens` option the session started with `applyFlagSettings(settings)`| Merges settings into the session’s flag settings layer at runtime (only available in streaming input mode). See `applyFlagSettings()` `updateSettings(source, settings)`| Writes one allowlisted key to the project’s local settings file or your user settings file, so the value persists for later sessions. See `updateSettings()`. Requires TypeScript SDK v0.3.257 or later, which bundles Claude Code v2.1.257 `initializationResult()`| Returns the full initialization result including supported commands, models, account info, and output style configuration @@ -2023,9 +2023,9 @@ `extra_usage_disabled`| Usage credits are turned off for the account `network_error`| The [availability check](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>) couldn’t reach `api.anthropic.com` `unknown`| Claude Code couldn’t determine availability -`not_first_party`| The session uses a provider other than the Anthropic API -`disabled_by_env`| [`CLAUDE_CODE_DISABLE_FAST_MODE`](</docs/en/env-vars>) is set -`model_not_allowed`| The fast mode Opus model isn’t in the organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist +`not_first_party`| The session uses a provider that doesn’t offer fast mode +`disabled_by_env`| [`CLAUDE_CODE_DISABLE_FAST_MODE`](</docs/en/env-vars>) is set, or the model’s region on [Google Cloud’s Agent Platform](</docs/en/fast-mode#use-fast-mode-on-agent-platform>) doesn’t offer fast mode +`model_not_allowed`| The fast mode model isn’t in the organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist, or the provider refused fast mode for the session’s model `sdk_opt_in_required`| The session hasn’t opted in to fast mode: pass `fastMode: true` in the `settings` option or through `applyFlagSettings()` `pending`| The availability check hasn’t completed yet @@ -2107,7 +2107,7 @@ `startup_failure_reason` -Why Claude Code refused to start, so your application can offer the fix instead of a retry. Claude Code sets it on the `error_during_execution` result it writes before exiting on a known startup failure. That result carries zeroed totals, and its `errors` array carries the same text as stderr. The field is absent on every other result. Requires Agent SDK v0.3.274 or later. Set `CLAUDE_CODE_STARTUP_FAILURE_RESULTS` to `1` in `env` to receive this result for every `SDKStartupFailureReason` value. Without that variable, Claude Code writes the result only for these failures, and the rest end with stderr output, a non-zero exit, and no result message: +Why Claude Code refused to start, so your application can offer the fix instead of a retry. Claude Code sets it on the `error_during_execution` result it writes before exiting on a known startup failure. That result carries zeroed totals, and its `errors` array carries the failure message. The field is absent on every other result. Requires Agent SDK v0.3.274 or later. Set `CLAUDE_CODE_STARTUP_FAILURE_RESULTS` to `1` in `env` to receive this result for every `SDKStartupFailureReason` value. Without that variable, Claude Code writes the result only for these failures, and the rest end with stderr output, a non-zero exit, and no result message: * A resume that Claude Code stops because it [can’t return the session to its worktree](</docs/en/worktrees#the-session-resumes-outside-its-worktree>), with `worktree_unverified` or `worktree_resume_refused`. That section says which error carries which value. * A refused `continue` of a conversation that a background session holds, with `session_held_by_background`. For a refused `resume` of such a conversation, Claude Code writes the result only when the variable is set. @@ -5777,9 +5777,9 @@ type ThinkingConfig = | { type: "adaptive"; display?: ThinkingDisplay } // The model determines when and how much to reason (Opus 4.6+) | { type: "enabled"; budgetTokens?: number; display?: ThinkingDisplay } // Fixed thinking token budget - | { type: "disabled" }; // No extended thinking - -The optional `display` field controls whether thinking text is returned `"summarized"` or `"omitted"`. On Claude Opus 4.7 and later, the API default is `"omitted"`, so set `"summarized"` to receive thinking content in `thinking` blocks. On providers such as Amazon Bedrock and Google Cloud’s Agent Platform, Claude Code doesn’t pass `display` for earlier models it recognizes. Those are Opus 4.6, Sonnet 4.6, Haiku 4.5, and earlier models, which use their default. + | { type: "disabled" }; // Turn thinking off where the model and provider allow it + +For `disabled`, see [where you can’t turn thinking off](</docs/en/model-config#where-you-cant-turn-thinking-off>). The optional `display` field controls whether thinking text is returned `"summarized"` or `"omitted"`. On Claude Opus 4.7 and later, the API default is `"omitted"`, so set `"summarized"` to receive thinking content in `thinking` blocks. On providers such as Amazon Bedrock and Google Cloud’s Agent Platform, Claude Code doesn’t pass `display` for earlier models it recognizes. Those are Opus 4.6, Sonnet 4.6, Haiku 4.5, and earlier models, which use their default. ### @@ -6061,7 +6061,7 @@ `SDKTaskStartedMessage` -Emitted when a task begins. The `task_type` field is `"local_bash"` for Bash commands and Monitor watches, `"local_agent"` for subagents, or `"remote_agent"`. +Emitted when a task begins. `task_type` names the kind of task, such as `"local_bash"` for Bash commands and Monitor watches, `"local_agent"` for subagents, `"mcp_task"` for [background MCP tool calls](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>), or `"remote_agent"`. type SDKTaskStartedMessage = { type: "system"; @@ -6257,12 +6257,13 @@ errorCode?: "credits_required"; canUserPurchaseCredits?: boolean; hasChargeableSavedPaymentMethod?: boolean; + overageEnabled?: boolean; }; uuid: UUID; session_id: string; }; -When `errorCode` is `"credits_required"`, the rejection is from a claude.ai subscription whose included usage is exhausted, and the session cannot continue until the user buys usage credits. `canUserPurchaseCredits` indicates whether the authenticated user can buy credits for the account, and `hasChargeableSavedPaymentMethod` indicates whether a saved payment method is on file. All three fields are absent on rate-limit events that are not credits-required rejections. Requires Claude Code v2.1.181 or later. +When `errorCode` is `"credits_required"`, the rejection is from a claude.ai subscription whose included usage is exhausted, and the session cannot continue until the user buys usage credits. `canUserPurchaseCredits` indicates whether the authenticated user can buy credits for the account, and `hasChargeableSavedPaymentMethod` indicates whether a saved payment method is on file. All three fields are absent on rate-limit events that are not credits-required rejections. Requires Claude Code v2.1.181 or later. On a warning about a plan usage limit, where `status` is `"allowed_warning"`, `overageEnabled` reports whether the account has [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) turned on. Requires Claude Code v2.1.295 or later. ###
modified Get started with Claude Code in the cloud View current →
--- a/web-quickstart.md +++ b/web-quickstart.md @@ -76,7 +76,7 @@ * **Pro, Max, and Ultra** : you get an environment named **Default** automatically. * **Team and Enterprise** : onboarding shows a **Create your first cloud environment** form. Leave the prefilled name and network access unchanged and click **Create & finish** to create the **Default** environment. If an Owner has turned on [Quick setup](</docs/en/claude-code-on-the-web#quick-setup-for-team-and-enterprise>), onboarding creates **Default** for you instead. -**Default** uses [`Trusted` network access](</docs/en/cloud-environments#access-levels>): sessions reach [common package registries](</docs/en/cloud-environments#default-allowed-domains>) and other allowlisted domains, and nothing else through the session’s network. See [Installed tools](</docs/en/cloud-environments#installed-tools>) for what’s available without any configuration.For a first project, the **Default** environment works as is. To change its network access, add environment variables, or run a [setup script](</docs/en/cloud-environments#setup-scripts>) before sessions start, [edit it or create additional environments](</docs/en/cloud-environments#configure-your-environment>). +**Default** uses [**Limited** network access](</docs/en/cloud-environments#access-levels>): sessions reach [common package registries](</docs/en/cloud-environments#default-allowed-domains>) and other allowlisted domains. See [Installed tools](</docs/en/cloud-environments#installed-tools>) for what’s available without any configuration.For a first project, the **Default** environment works as is. To change its network access, add environment variables, or run a [setup script](</docs/en/cloud-environments#setup-scripts>) before sessions start, [edit it or create additional environments](</docs/en/cloud-environments#configure-your-environment>). ### @@ -110,7 +110,7 @@ /web-setup -Confirm the prompt to send your `gh` token to your Claude account. On success, Claude Code prints `Connected as <your-github-username>` and opens [claude.ai/code](<https://claude.ai/code>) in your browser. If you don’t have a cloud environment yet, `/web-setup` creates one with Trusted network access and no setup script. You can [edit the environment or add variables](</docs/en/cloud-environments#configure-your-environment>) afterward. Once `/web-setup` completes, you can start cloud sessions from your terminal with [`--cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) or set up recurring tasks with [`/schedule`](</docs/en/routines>). +Confirm the prompt to send your `gh` token to your Claude account. On success, Claude Code prints `Connected as <your-github-username>` and opens [claude.ai/code](<https://claude.ai/code>) in your browser.If you don’t have a cloud environment yet, `/web-setup` creates one with the default **Limited** network access and no setup script. You can [edit the environment or add variables](</docs/en/cloud-environments#configure-your-environment>) afterward. Once `/web-setup` completes, you can start cloud sessions from your terminal with [`--cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) or set up recurring tasks with [`/schedule`](</docs/en/routines>). #### @@ -290,7 +290,7 @@ The [setup script](</docs/en/cloud-environments#setup-scripts>) exited with a non-zero status, so the session failed to start or started without whatever the script failed to install. If the session started, you can keep working in it. Common causes: - * A package install failed because the registry isn’t in your [network access level](</docs/en/cloud-environments#access-levels>). `Trusted` covers most package managers; `None` blocks them all. + * A package install failed because the registry isn’t in your [network access level](</docs/en/cloud-environments#access-levels>). **Limited** with **Allow package managers** checked covers most package managers; **None** blocks them all. * The script references a file or path that doesn’t exist in a fresh clone. * A command that works locally needs a different invocation on Ubuntu.
removed 2026-w13 View current →
Show diff (119 lines)
--- a/2026-w13.md +++ b/2026-w13.md @@ -1,116 +0,0 @@ -Releases [v2.1.83 → v2.1.85](</docs/en/changelog#2-1-83>)6 features · March 23–27 - -Auto moderesearch preview - -Auto mode hands your permission prompts to a classifier. Safe edits and commands run without interrupting you; anything destructive or suspicious gets blocked and surfaced. It’s the middle ground between approving every file write and running with `--dangerously-skip-permissions`. - -Cycle to auto with Shift+Tab, or set it as your default: - -~/.claude/settings.json - - { - "permissions": { - "defaultMode": "auto" - } - } - -[Permission modes guide](</docs/en/permission-modes>) - -Computer useDesktop - -Claude can now control your actual desktop from the Claude Code Desktop app: open native apps, click through the iOS simulator, drive hardware control panels, and verify changes on screen. It’s off by default and asks before each action. Best for the things nothing else can reach: apps without an API, proprietary tools, anything that only exists as a GUI. - -Enable it in Settings, grant the OS permissions, then ask Claude to verify a change end to end: - -Claude Code - - Open the iOS simulator, tap through the onboarding flow, and screenshot each step - -[Computer use guide](</docs/en/desktop#let-claude-use-your-computer>) - -PR auto-fixWeb - -Flip a switch when you open a PR and walk away. Claude watches CI, fixes the failures, handles the nits, and pushes until it’s green. No more babysitting a PR through six rounds of lint errors. - -After creating a PR on Claude Code web, toggle Auto fix in the CI panel. - -[Auto-fix pull requests](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) - -Transcript searchv2.1.83 - -Press `/` in transcript mode to search your conversation. `n` and `N` step through matches. Finally a way to find that one Bash command Claude ran 400 messages ago. - -Open transcript mode and search: - -Claude Code - - Ctrl+O # open transcript - /migrate # search for "migrate" - n # next match - N # previous match - -[Fullscreen guide](</docs/en/fullscreen#search-and-review-the-conversation>) - -PowerShell toolpreviewv2.1.84 - -Windows gets a native PowerShell tool alongside Bash. Claude can run cmdlets, pipe objects, and work with Windows-native paths without translating everything through Git Bash. - -Opt in from settings: - -.claude/settings.json - - { - "env": { - "CLAUDE_CODE_USE_POWERSHELL_TOOL": "1" - } - } - -[PowerShell tool docs](</docs/en/tools-reference#powershell-tool>) - -Conditional hooksv2.1.85 - -Hooks can now declare an `if` field using permission rule syntax. Your pre-commit check only spawns for `Bash(git commit *)` instead of every bash call, cutting the process overhead on busy sessions. - -Scope a hook to git commits only: - -.claude/settings.json - - { - "hooks": { - "PreToolUse": [{ - "hooks": [{ - "if": "Bash(git commit *)", - "type": "command", - "command": ".claude/hooks/lint-staged.sh" - }] - }] - } - } - -[Hooks reference](</docs/en/hooks>) - -Other wins - -Plugin `userConfig` now public: prompt for settings at enable time, keychain-backed secrets - -Pasted images insert `[Image #N]` chips you can reference positionally - -`managed-settings.d/` drop-in directory for layered policy fragments - -`CwdChanged` and `FileChanged` hook events for direnv-style setups - -Agents can declare `initialPrompt` in frontmatter to auto-submit a first turn - -`Ctrl+X Ctrl+E` opens your external editor, matching readline - -Interrupting before any response restores your input automatically - -`/status` now works while Claude is responding - -Deep links open in your preferred terminal, not first-detected - -Idle-return nudge to `/clear` after 75+ minutes away - -VS Code: rate limit banner, Esc-twice rewind picker - -[Full changelog for v2.1.83–v2.1.85 →](</docs/en/changelog#2-1-83>)
removed 2026-w14 View current →
--- a/2026-w14.md +++ b/2026-w14.md @@ -1,88 +0,0 @@ -Releases [v2.1.86 → v2.1.91](</docs/en/changelog#2-1-86>)5 features · March 30 – April 3 - -Computer use in the CLIresearch preview - -Last week computer use landed in the Desktop app. This week it’s in the CLI: Claude can open native apps, click through UI, test its own changes, and fix what breaks, all from your terminal. Web apps already had verification loops; native iOS, macOS, and other GUI-only apps didn’t. Now they do. Best for closing the loop on apps and tools where there’s no API to call. Still early; expect rough edges. - -Requires macOS and a Pro or Max plan; otherwise, `computer-use` won’t appear in `/mcp`. Run `/mcp`, find `computer-use`, and toggle it on. Then ask Claude to verify a change end to end: - -Claude Code - - Open the iOS simulator, tap through onboarding, and screenshot each step - -[Computer use guide](</docs/en/computer-use>) - -/powerupv2.1.90 - -Interactive lessons that teach Claude Code features through animated demos, right inside your terminal. Claude Code releases frequently, and features that would have changed how you work last month can slip by. Run `/powerup` once and you’ll know what’s there. - -Run it: - -Claude Code - - /powerup - -[Commands reference](</docs/en/commands>) - -Flicker-free renderingv2.1.89 - -Opt into a new alt-screen renderer with virtualized scrollback. The prompt input stays pinned to the bottom, mouse selection works across long conversations, and the flicker on redraw is gone. Unset `CLAUDE_CODE_NO_FLICKER` to roll back. - -Set the env var and restart Claude Code: - - export CLAUDE_CODE_NO_FLICKER=1 - claude - -[Fullscreen rendering](</docs/en/fullscreen>) - -MCP result-size overridev2.1.91 - -MCP server authors can now raise the truncation cap on a specific tool by setting `anthropic/maxResultSizeChars` in the tool’s `tools/list` entry, up to a hard ceiling of 500K characters. The cap used to be global, so tools that occasionally returned inherently large payloads like database schemas or full file trees hit the default limit and got persisted to disk with a file reference. Per-tool overrides keep those results inline when the tool really needs them. - -Annotate the tool in your server’s `tools/list` response: - - { - "name": "get_schema", - "description": "Returns the full database schema", - "_meta": { - "anthropic/maxResultSizeChars": 500000 - } - } - -[MCP reference](</docs/en/mcp#raise-the-limit-for-a-specific-tool>) - -Plugin executables on PATHv2.1.91 - -Place an executable in a `bin/` directory at your plugin root and Claude Code adds that directory to the Bash tool’s `PATH` while the plugin is enabled. Claude can then invoke the binary as a bare command from any Bash tool call, with no absolute path or wrapper script needed. Handy for packaging CLI helpers next to the commands, agents, and hooks that call them. - -Add a `bin/` directory at the plugin root: - - my-plugin/ - ├── .claude-plugin/ - │ └── plugin.json - └── bin/ - └── my-tool - -[Plugins reference](</docs/en/plugins/manifest-reference#standard-layout>) - -Other wins - -Auto mode follow-ups: new `PermissionDenied` hook fires on classifier denials (return `retry: true` to let Claude try a different approach), and `/permissions` → Recently denied lets you retry manually with `r` - -New `defer` value for `permissionDecision` in `PreToolUse` hooks: `-p` sessions pause at a tool call and exit with a `deferred_tool_use` payload so an SDK app or custom UI can surface it, then resume with `--resume` - -`/buddy`: hatch a small creature that watches you code. An April Fools’ joke, no longer available - -`disableSkillShellExecution` setting blocks inline shell from skills, custom commands, and plugin commands - -Edit tool now works on files viewed via `cat` or `sed -n` without a separate Read - -Hook output over 50K saved to disk with a path + preview instead of injected into context - -Thinking summaries off by default in interactive sessions (`showThinkingSummaries: true` to restore) - -Voice mode: push-to-talk modifier combos, Windows WebSocket, macOS Apple Silicon mic permission - -`claude-cli://` deep links accept multi-line prompts (encoded `%0A`) - -[Full changelog for v2.1.86–v2.1.91 →](</docs/en/changelog#2-1-86>)
removed 2026-w15 View current →
--- a/2026-w15.md +++ b/2026-w15.md @@ -1,83 +0,0 @@ -Releases [v2.1.92 → v2.1.101](</docs/en/changelog#2-1-92>)4 features · April 6–10 - -Ultraplanresearch preview - -Kick off plan mode in the cloud from your terminal, then review the result in your browser. Claude drafts the plan in a Claude Code on the web session while your terminal stays free; when it’s ready you comment on individual sections, ask for revisions, and choose to execute remotely or send it back to your CLI. As of v2.1.101 the first run auto-creates a default cloud environment, so there’s no web setup step before you can try it. - -Run the command, or just include the keyword in any prompt: - -Claude Code - - /ultraplan migrate the auth service from sessions to JWTs - -[Ultraplan guide](</docs/en/ultraplan>) - -Monitor toolv2.1.98 - -A new built-in tool that spawns a background watcher and streams its events into the conversation: each event lands as a new transcript message that Claude reacts to immediately. Tail a training run, babysit a PR’s CI, or auto-fix a dev server crash the moment it happens, all without a Bash sleep loop holding the turn open. - -Ask Claude to watch something while you keep working: - -Claude Code - - Tail server.log in the background and tell me the moment a 5xx shows up - -This pairs with `/loop`, which now self-paces: omit the interval and Claude schedules the next tick based on the task, or reaches for the Monitor tool to skip polling altogether. - -Claude Code - - /loop check CI on my PR - -[Monitor tool reference](</docs/en/tools-reference#monitor-tool>) - -/autofix-prCLI - -PR auto-fix landed on the web in Week 13. Now you can turn it on without leaving your terminal: `/autofix-pr` infers the open PR for your current branch and enables auto-fix for it on Claude Code on the web in one step. Push your branch, run the command, walk away; Claude watches CI and review comments and pushes fixes until it’s green. - -Run it from the PR’s branch: - -Claude Code - - /autofix-pr - -[Auto-fix pull requests](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) - -/team-onboardingv2.1.101 - -Generates a teammate ramp-up guide from your local Claude Code usage. Run it in a project you know well and hand the output to a new teammate so they can replay your setup instead of starting from defaults. - -Run it from a project you’ve spent real time in: - -Claude Code - - /team-onboarding - -[Commands reference](</docs/en/commands>) - -Other wins - -Focus view: press `Ctrl+O` in flicker-free mode to collapse the view to your last prompt, a one-line tool summary with diffstats, and Claude’s final response - -Guided [Amazon Bedrock](</docs/en/amazon-bedrock>) and [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) setup wizards on the login screen: pick “3rd-party platform” for step-by-step auth, region, credential check, and model pinning - -`/agents` gets a tabbed layout: a Running tab shows live subagents with a `● N running` count, plus Run agent and View running instance actions in the Library tab - -Default effort level is now `high` for API-key, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, Team, and Enterprise users (control with `/effort`) - -`/cost` shows a per-model and cache-hit breakdown for subscription users - -`/release-notes` is now an interactive version picker - -Status line: new `refreshInterval` setting re-runs the command every N seconds, and `workspace.git_worktree` in the JSON input - -`CLAUDE_CODE_PERFORCE_MODE`: Edit/Write fail on read-only files with a `p4 edit` hint instead of silently overwriting - -OS CA certificate store is now trusted by default, so enterprise TLS proxies work without extra setup (`CLAUDE_CODE_CERT_STORE=bundled` to opt out) - -Amazon Bedrock powered by Mantle: set `CLAUDE_CODE_USE_MANTLE=1` - -Hardened Bash tool permissions: backslash-escaped flags, env-var prefixes, `/dev/tcp` redirects, and compound commands now prompt correctly - -`UserPromptSubmit` hooks can set the session title via `hookSpecificOutput.sessionTitle` - -[Full changelog for v2.1.92–v2.1.101 →](</docs/en/changelog#2-1-92>)
removed 2026-w16 View current →
--- a/2026-w16.md +++ b/2026-w16.md @@ -1,91 +0,0 @@ -Releases [v2.1.105 → v2.1.113](</docs/en/changelog#2-1-105>)5 features · April 13–17 - -Claude Opus 4.7new model - -Anthropic’s strongest coding model yet is now the default on Max and Team Premium, and available everywhere else from `/model`. It adds a new `xhigh` effort level that sits between `high` and `max`: best results for most coding and agentic tasks, applied as the default the first time you switch to 4.7. `/effort` now opens an interactive arrow-key slider when you call it without arguments, so you can dial intelligence against speed without remembering the level names. - -Switch model and effort in one go: - -Claude Code - - > /model opus - > /effort xhigh - -[Model config: effort levels](</docs/en/model-config#adjust-effort-level>) - -Routinesweb - -Templated cloud agents that fire on a schedule, a GitHub event, or an API call. Define a routine once on Claude Code on the web with a prompt, the repos it can touch, and the connectors it needs, then let PR-opened, release-published, or your own webhook trigger it without your machine running. The trigger picker now covers GitHub events with optional filters and gives every routine a tokened `/fire` endpoint for external systems. - -Create one from the web UI, or scaffold from your terminal: - -Claude Code - - > /schedule daily PR review at 9am - -[Routines guide](</docs/en/routines>) - -/usage breakdownCLI - -More visibility into where your Claude Code usage goes. `/usage` now shows what’s driving your limits: parallel sessions, subagents, cache misses, and long context, each with a percentage of your last 24 hours and a tip to optimize it. Press `d` or `w` to switch between day and week views. - -Run it any time: - -Claude Code - - > /usage - -[Commands reference](</docs/en/commands>) - -Mobile push notificationsmobile - -With [Remote Control](</docs/en/remote-control>) connected, Claude can send a push notification to your phone when a long task finishes or it needs a decision to keep going. Turn it on with “Push when Claude decides” in `/config`, or ask for one in your prompt. Useful when you kick off a long agent run and want to step away from the terminal. - -Ask Claude to ping you when it’s done: - -Claude Code - - > notify me when the tests pass - -[Remote Control: mobile push notifications](</docs/en/remote-control#mobile-push-notifications>) - -Native binariesv2.1.113 - -The `claude` CLI now spawns a native per-platform binary instead of bundled JavaScript, so the installed `claude` command no longer invokes Node. The npm package pulls the right binary in through an optional dependency such as `@anthropic-ai/claude-code-darwin-arm64`, so your install command doesn’t change. The standalone installer already shipped this binary; npm now matches it. - -Upgrade and check what you’re running: - - claude update - claude --version - -[Setup guide](</docs/en/setup>) - -Other wins - -New [`/ultrareview`](</docs/en/ultrareview>): comprehensive code review in the cloud using parallel multi-agent analysis and an adversarial critique pass. Run it bare to review your current branch, or `/ultrareview <PR#>` for a specific PR - -[Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) is now available for Max subscribers on Opus 4.7, and the `--enable-auto-mode` flag is no longer required - -[Session recap](</docs/en/interactive-mode#session-recap>) shows a one-line summary of what happened while you were away; run `/recap` on demand or turn it off from `/config` - -New `/tui` command and `tui` setting switch between classic and flicker-free rendering mid-conversation; focus view moved from `Ctrl+O` to its own `/focus` command - -Plugins can ship background watchers via a top-level `monitors` manifest key that auto-arms at session start or on skill invoke - -”Auto (match terminal)” option in `/theme` follows your terminal’s dark/light mode - -`/fewer-permission-prompts` scans your transcripts for common read-only Bash and MCP calls and proposes an allowlist for `.claude/settings.json` - -Claude can now discover and run built-in commands like `/init`, `/review`, and `/security-review` via the Skill tool - -`PreCompact` hooks can block compaction by exiting with code 2 or returning `“decision”:“block”` - -`ENABLE_PROMPT_CACHING_1H` opts API key, Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry users into 1-hour prompt cache TTL - -`sandbox.network.deniedDomains` setting carves specific domains out of a broader `allowedDomains` wildcard - -`/undo` is now an alias for `/rewind`, and `/proactive` is an alias for `/loop` - -Hardened Bash permissions: deny rules now match through `env`/`sudo`/`watch` wrappers, and `Bash(find:*)` allow rules no longer auto-approve `-exec` or `-delete` - -[Full changelog for v2.1.105–v2.1.113 →](</docs/en/changelog#2-1-105>)
removed 2026-w17 View current →
--- a/2026-w17.md +++ b/2026-w17.md @@ -1,77 +0,0 @@ -Releases [v2.1.114 → v2.1.119](</docs/en/changelog#2-1-114>)4 features · April 20–24 - -/ultrareviewresearch preview - -Now in public research preview. Ultrareview runs a fleet of bug-hunting agents in the cloud against your branch or a PR, and findings land back in the CLI or Desktop automatically. Run it before merging critical changes such as auth or data migrations. - -Review the branch you’re on: - -Claude Code - - > /ultrareview - -Or point it at a PR: - -Claude Code - - > /ultrareview 1234 - -[Ultrareview guide](</docs/en/ultrareview>) - -Session recapCLI - -Switch focus away from a session and come back to a one-line recap of what happened while you were gone. Helpful for staying in flow while running several Claude sessions at once. - -Generate a recap on demand, or turn the automatic one off from `/config`: - -Claude Code - - > /recap - -[Interactive mode: session recap](</docs/en/interactive-mode#session-recap>) - -Custom themesv2.1.118 - -Build and switch between named color themes from `/theme`, or hand-edit JSON files in `~/.claude/themes/`. Each theme picks a base preset and overrides only the tokens you care about. Plugins can ship themes too. - -Open the theme picker and create a new one: - -Claude Code - - > /theme - -[Terminal config: create a custom theme](</docs/en/terminal-config#create-a-custom-theme>) - -Claude Code on the webweb - -A new look for [claude.ai/code](<https://claude.ai/code>) that matches the redesigned desktop app: sessions sidebar, drag-and-drop layout, and a refreshed routines view. Key parts were rebuilt for quicker responses and a more reliable experience. - -[Claude Code on the web](</docs/en/claude-code-on-the-web>) - -Other wins - -[Vim visual mode](</docs/en/interactive-mode#vim-editor-mode>): press `v` for character selection or `V` for line selection in the prompt input, with operators and visual feedback - -Hooks can now call MCP tools directly via [`type: “mcp_tool”`](</docs/en/hooks#mcp-tool-hook-fields>), so a hook can hit an already-connected server without spawning a process - -`/cost` and `/stats` are merged into [`/usage`](</docs/en/commands>); the old names still work as typing shortcuts that open the relevant tab - -`/config` changes (theme, editor mode, verbose, and similar) now persist to `~/.claude/settings.json` and follow the same project/local/policy precedence as other [settings](</docs/en/settings>) - -[Forked subagents](</docs/en/sub-agents#fork-the-current-conversation>) can be enabled on external builds with `CLAUDE_CODE_FORK_SUBAGENT=1`: a fork inherits your full conversation context instead of starting fresh - -Default [effort level](</docs/en/model-config#adjust-effort-level>) for Pro and Max subscribers on Opus 4.6 and Sonnet 4.6 is now `high` (was `medium`) - -Native macOS and Linux builds replace the `Glob` and `Grep` tools with embedded `bfs` and `ugrep` available through Bash, for faster searches without a separate tool round-trip - -`--from-pr` now accepts GitLab merge request, Bitbucket pull request, and GitHub Enterprise PR URLs in addition to github.com - -Auto mode: include `“$defaults”` in [`autoMode.allow`, `soft_deny`, or `environment`](</docs/en/auto-mode-config>) to add custom rules alongside the built-in list instead of replacing it - -New [`claude plugin tag`](</docs/en/plugins/dependencies#tag-plugin-releases-for-version-resolution>) command creates release git tags for plugins with version validation - -Opus 4.7 sessions now compute against the model’s native 1M context window, fixing inflated `/context` percentages and premature autocompaction - -`/resume` on large sessions is up to 67% faster and now offers to summarize stale, large sessions before re-reading them - -[Full changelog for v2.1.114–v2.1.119 →](</docs/en/changelog#2-1-114>)
removed 2026-w18 View current →
--- a/2026-w18.md +++ b/2026-w18.md @@ -1,81 +0,0 @@ -Releases [v2.1.120 → v2.1.126](</docs/en/changelog#2-1-120>)4 features · April 27 – May 1 - -Sign in without a browser callbackv2.1.126 - -`claude auth login` now accepts the OAuth code pasted directly into the terminal when the browser callback can’t reach localhost. That covers WSL2, SSH sessions, and containers, where the redirect to a local port doesn’t work. The same release also fixes login timeouts on slow or proxied connections and in IPv6-only devcontainers. - -Sign in, then paste the code from the browser: - - claude auth login - -[CLI reference](</docs/en/cli-reference#cli-commands>) - -claude project purgev2.1.124 - -Delete all Claude Code state for a project: transcripts, tasks, file history, and the project’s config entry. Supports `--dry-run` to preview, `-y`/`--yes` to skip confirmation, `-i`/`--interactive` to choose, and `--all` to clear every project. - -Preview what would be removed: - - claude project purge --dry-run - -Then run it for real: - - claude project purge - -[CLI reference](</docs/en/cli-reference>) - -Resume by PR URLv2.1.122 - -When you create a pull request with `gh pr create`, Claude Code links it to the session that produced it. Now you can get back to that session from the PR URL alone, without remembering its name. - -Open the session picker: - -Claude Code - - > /resume - -Paste the PR URL into the picker. The first character of the paste drops you into search mode, and the list filters to the session that created that PR. Press Enter to resume it. GitHub, GitHub Enterprise, GitLab, and Bitbucket pull and merge request URLs all work. - -Claude Code - - https://github.com/your-org/your-repo/pull/1234 - -To open the picker already filtered to the PR, pass the PR number on the command line: - - claude --from-pr 1234 - -[Sessions: use the session picker](</docs/en/sessions#use-the-session-picker>) - -Windows without Git BashWindows - -Git for Windows is no longer required. When Bash is absent, Claude Code uses PowerShell as the shell tool, and when the PowerShell tool is enabled it is treated as the primary shell. PowerShell 7 installed via the Microsoft Store, MSI without PATH, or a `.NET` global tool is now detected automatically. - -[Setup guide](</docs/en/setup>) - -Other wins - -MCP servers can opt out of tool-search deferral with `alwaysLoad: true` in their config so all of that server’s tools are always available - -New `claude plugin prune` removes orphaned auto-installed plugin dependencies, and `plugin uninstall --prune` cascades - -`/skills` now has a type-to-filter search box so you can find a skill in a long list without scrolling - -`PostToolUse` hooks can replace tool output for any tool via `hookSpecificOutput.updatedToolOutput`, not only MCP tools - -New [`claude ultrareview`](</docs/en/ultrareview>) subcommand runs `/ultrareview` non-interactively from CI or scripts: prints findings to stdout (`--json` for raw output) and exits 0 on completion or 1 on failure - -`--dangerously-skip-permissions` now bypasses prompts for writes to `.claude/`, `.git/`, `.vscode/`, shell config files, and other previously protected paths, while catastrophic removal commands still prompt as a safety net - -The `/model` picker can list models from your gateway’s `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway; opt in with `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1` since v2.1.129 - -MCP servers that hit a transient error during startup now auto-retry up to 3 times instead of staying disconnected - -`ANTHROPIC_BEDROCK_SERVICE_TIER` selects an Amazon Bedrock service tier: `default`, `flex`, or `priority` - -`/terminal-setup` enables iTerm2’s clipboard access setting so `/copy` works, including from tmux - -Google Cloud’s Agent Platform now supports X.509 certificate-based Workload Identity Federation (mTLS ADC) - -Significant memory leak fixes: image-heavy sessions, `/usage` on large transcript histories, and long-running tools without progress events - -[Full changelog for v2.1.120–v2.1.126 →](</docs/en/changelog#2-1-120>)
removed 2026-w19 View current →
--- a/2026-w19.md +++ b/2026-w19.md @@ -1,47 +0,0 @@ -Releases [v2.1.128 → v2.1.136](</docs/en/changelog#2-1-128>)2 features · May 4–8 - -Plugins from .zip archives and URLs - -`--plugin-dir` now accepts a `.zip` plugin archive in addition to a directory, and the new `--plugin-url` flag fetches a plugin archive from a URL for the current session. Useful for trying a plugin before adding it to a marketplace, or for shipping internal plugins from an artifact store. - -Load a plugin straight from a URL: - -terminal - - claude --plugin-url https://example.com/my-plugin.zip - -[Plugins guide](</docs/en/plugins/overview>) - -History search across all your projectsv2.1.129 - -`Ctrl+R` reverse-search now defaults to all prompts across every project, restoring the behavior from before v2.1.124. Press `Ctrl+S` while searching to narrow back to the current project or session. Handy when you remember a command you ran in another repo last week and don’t want to go digging for it. - -[Interactive mode: command history](</docs/en/interactive-mode#command-history>) - -Other wins - -New `worktree.baseRef` setting (`fresh` | `head`) controls whether `--worktree`, the `EnterWorktree` tool, and agent-isolation worktrees branch from the remote default branch or local `HEAD`; the default `fresh` keeps unpushed commits out of new worktrees - -New `settings.autoMode.hard_deny` rules block matching actions unconditionally in auto mode, regardless of allow exceptions, for actions that should never run automatically even when broader allow rules apply - -Hooks now receive the active effort level via the `effort.level` JSON input field and the `$CLAUDE_EFFORT` environment variable, and Bash tool commands can read `$CLAUDE_EFFORT` - -`CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1` opts out of the fullscreen alternate-screen renderer and keeps the conversation in the terminal’s native scrollback - -`CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE` lets Homebrew or WinGet installations run the upgrade in the background and prompt to restart - -`CLAUDE_CODE_SESSION_ID` is now in the Bash tool subprocess environment, matching the `session_id` passed to hooks - -`/mcp` now shows the tool count for connected servers and flags servers that connected with 0 tools - -`--channels` now works with console (API key) authentication - -Subprocesses such as Bash, hooks, MCP, and LSP no longer inherit `OTEL_*` environment variables, so OTEL-instrumented apps run via the Bash tool no longer pick up the CLI’s own OTLP endpoint - -Sub-agent progress summaries now hit the prompt cache, cutting `cache_creation` token cost by roughly 3x - -Several OAuth and credential reliability fixes: parallel sessions no longer dead-end at 401 after a refresh-token race, MCP OAuth refresh tokens are no longer lost when multiple servers refresh concurrently, and a rare login loop from a concurrent credential write is fixed - -New `parentSettingsBehavior` admin key lets admins opt SDK `managedSettings` into the policy merge - -[Full changelog for v2.1.128–v2.1.136 →](</docs/en/changelog#2-1-128>)
removed 2026-w20 View current →
--- a/2026-w20.md +++ b/2026-w20.md @@ -1,63 +0,0 @@ -Releases [v2.1.139 → v2.1.142](</docs/en/changelog#2-1-139>)3 features · May 11–15 - -Agent viewresearch preview - -`claude agents` opens one screen for every Claude Code session: what’s running, what’s blocked on your input, and what’s done. Dispatch a bug fix, a pull request review, and a flaky-test investigation as three rows, keep working in another window, and step in only when a row needs you. Attach to any row to drop into its full conversation, then press `←` to return to the list. Each background session keeps running without a terminal attached. - -Open the dashboard from your shell: - -terminal - - claude agents - -[Agent view](</docs/en/agent-view>) - -/goalv2.1.139 - -Set a completion condition and Claude keeps working toward it across turns without you prompting each step. After every turn, a fast model checks whether the condition holds; if not, Claude starts another turn instead of handing control back. Useful for substantial work with a verifiable end state, like migrating a module until every call site compiles and tests pass. The goal clears once the condition is met, and works in interactive, `-p`, and Remote Control. - -Set a goal and let Claude run until it holds: - -Claude Code - - > /goal all tests in test/auth pass and the lint step is clean - -[Goals](</docs/en/goal>) - -Fast mode on Opus 4.7research preview - -`/fast` now runs on Opus 4.7 by default instead of Opus 4.6. Fast mode is a high-speed Opus configuration: the same model quality at about 2.5x the speed for a higher per-token cost, useful for rapid iteration and live debugging. Pricing is unchanged at $30/$150 per MTok, the same as Opus 4.6 fast mode. To pin fast mode to Opus 4.6, set `CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE=1`. - -Toggle fast mode, now running on Opus 4.7: - -Claude Code - - > /fast - -[Fast mode on Opus 4.7](</docs/en/fast-mode#understand-the-cost-tradeoff>) - -Other wins - -`claude agents` gained dispatch flags (`--add-dir`, `--settings`, `--mcp-config`, `--plugin-dir`, `--permission-mode`, `--model`, `--effort`, `--dangerously-skip-permissions`) to configure background sessions, and `claude agents --cwd <path>` scopes the session list to a directory - -New hook `args: string[]` exec form spawns the command directly without a shell, so path placeholders never need quoting - -New `continueOnBlock` config option for `PostToolUse` hooks feeds the hook’s rejection reason back to Claude and continues the turn instead of ending it - -New `terminalSequence` field in hook JSON output lets hooks emit desktop notifications, window titles, and bells without a controlling terminal - -The Rewind menu added “Summarize up to here” to compress earlier context while keeping recent turns intact - -Remote Control, `/schedule`, claude.ai MCP connectors, and notification preferences are now disabled when `ANTHROPIC_API_KEY`, `apiKeyHelper`, or `ANTHROPIC_AUTH_TOKEN` is set, even alongside a claude.ai login; unset the API key to use these features - -MCP stdio servers now receive `CLAUDE_PROJECT_DIR` in their environment, matching hooks, and plugin configs can reference `$CLAUDE_PROJECT_DIR` in commands - -`claude plugin details <name>` shows a plugin’s component inventory and projected per-session token cost, and the `/plugin` details pane now also lists the LSP servers a plugin provides - -Plugins with a root-level `SKILL.md` and no `skills/` subdirectory are now surfaced as a skill - -`/feedback` can now include recent sessions from the last 24 hours or 7 days for issues spanning more than the current session - -Agent tool `subagent_type` now matches case- and separator-insensitively, so `“Code Reviewer”` resolves to `code-reviewer` - -[Full changelog for v2.1.139–v2.1.142 →](</docs/en/changelog#2-1-139>)
removed 2026-w21 View current →
--- a/2026-w21.md +++ b/2026-w21.md @@ -1,43 +0,0 @@ -Releases [v2.1.143 → v2.1.149](</docs/en/changelog#2-1-143>)1 feature · May 18–22 - -Auto mode on the Pro planCLI - -Auto mode is now available on the Pro plan and supports Sonnet 4.6 alongside Opus. It replaces permission prompts with background safety checks: routine actions run without interrupting you, and destructive or suspicious ones are blocked and surfaced. - -Update Claude Code, then cycle modes with Shift+Tab; auto mode appears in the cycle once your account meets the requirements: - -terminal - - claude update - -The command prints `Successfully updated` with the new version number, or `Claude Code is up to date` if no update is needed. Once auto mode is active, the prompt footer shows `auto mode on`. - -[Auto mode requirements](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) - -Other wins - -[`/usage`](</docs/en/costs#track-your-costs>) now shows a per-category breakdown of what’s driving your plan limits, attributing recent usage to skills, subagents, plugins, and individual MCP servers - -”Extra usage” is renamed to “usage credits” across the CLI, and `/extra-usage` is now `/usage-credits`. The old name still works. The command requires signing in with your claude.ai subscription through `/login` and isn’t available with API key authentication. - -New [`/code-review`](</docs/en/code-review>) command reports correctness bugs at a chosen effort level such as `/code-review high`, and `--comment` posts findings as inline GitHub PR comments. `/simplify` remains as a separate cleanup-only review. - -Background sessions now appear in `/resume` alongside interactive ones, marked with `bg`, and sessions pinned with `Ctrl+T` in `claude agents` stay alive when idle - -`claude agents --json` lists live sessions as JSON for scripting, such as status bars and session pickers - -The PowerShell tool is now enabled by default on Windows for Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry users; opt out with `CLAUDE_CODE_USE_POWERSHELL_TOOL=0` - -`claude plugin disable` now refuses when another enabled plugin depends on the target, and `claude plugin enable` force-enables transitive dependencies - -The `/plugin` marketplace browse pane shows projected context cost, and the Discover and Browse screens list a plugin’s commands, agents, skills, hooks, and MCP/LSP servers before installation - -New `worktree.bgIsolation: “none”` setting lets background sessions edit the working copy directly without `EnterWorktree`, for repos where worktrees are impractical - -Markdown output renders GFM task list checkboxes, and the `/diff` detail view scrolls with the keyboard - -Status line JSON input now includes GitHub repo and PR information when detected - -Enterprise: the `allowAllClaudeAiMcps` managed setting loads claude.ai cloud MCP connectors alongside `managed-mcp.json` - -[Full changelog for v2.1.143–v2.1.149 →](</docs/en/changelog#2-1-143>)
removed 2026-w22 View current →
--- a/2026-w22.md +++ b/2026-w22.md @@ -1,83 +0,0 @@ -Releases [v2.1.150 → v2.1.157](</docs/en/changelog#2-1-150>)4 features · May 25–29 - -Claude Opus 4.8new model - -Opus 4.8 is now the default on Max, Team Premium, Enterprise pay-as-you-go, and the Anthropic API. It defaults to high effort; use `/effort xhigh` for harder tasks. Requires v2.1.154 or later. - -Switch to Opus 4.8 by name, or pick it from the model picker: - -Claude Code - - /model claude-opus-4-8 - -[Model configuration](</docs/en/model-config#available-models>) - -Dynamic workflowsresearch preview - -A workflow is an orchestration script Claude writes for your task and runs across many subagents in the background. Use one when a task is too large for one conversation to coordinate: a codebase-wide audit, a large migration, a research question that needs cross-checking. Manage runs with `/workflows`. - -Describe the task and ask for a workflow: - -Claude Code - - create a workflow that migrates every internal fetch() call to the new HttpClient wrapper - -[Dynamic workflows](</docs/en/workflows>) - -Security guidance pluginplugin - -The security-guidance plugin reviews Claude’s code changes for vulnerabilities and fixes them in the same session. It runs a fast pattern check on each edit, a model review at the end of each turn, and a deeper agentic review on commit or push. Add project rules in `.claude/claude-security-guidance.md`. - -Install it from the official Anthropic marketplace: - -Claude Code - - /plugin install security-guidance@claude-plugins-official - -Then activate it in the current session: - -Claude Code - - /reload-plugins - -[Security guidance plugin](</docs/en/security-guidance>) - -Fast mode on Opus 4.8research preview - -Fast mode now defaults to Opus 4.8 at $10/$50 per MTok: 2x the standard rate for about 2.5x the speed. Opus 4.7 and 4.6 stay at $30/$150. Opus 4.6 fast mode is deprecated. - -Toggle fast mode, now on Opus 4.8: - -Claude Code - - /fast - -[Fast mode pricing](</docs/en/fast-mode#understand-the-cost-tradeoff>) - -Other wins - -In `claude agents`, prefix a shell command with `!` to run it as a background job you can attach to and detach from; also available as `claude --bg --exec 'pytest -x'` - -Plugins in `.claude/skills` directories are now loaded automatically, no marketplace required, and `claude plugin init <name>` scaffolds a new plugin - -New `/reload-skills` command re-scans skill directories without restarting, and `SessionStart` hooks can return `reloadSkills: true` to make skills they install available in the same session - -Skills and commands can set `disallowed-tools` in frontmatter to remove tools from the model while the skill is active - -New `MessageDisplay` hook event lets hooks transform or hide assistant message text as it is displayed - -Claude Code now switches to your configured `--fallback-model` for the rest of the session when the primary model is not found, instead of failing every request - -Plugins can declare `defaultEnabled: false` in `plugin.json` or a marketplace entry, so they install without turning on until you enable them - -Vim mode: `/` in NORMAL mode opens reverse history search, matching Bash and Zsh vi-mode - -Streaming tool execution is now always enabled, including with telemetry disabled and on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry - -`←←` to open the agents view now works on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and with telemetry disabled - -Claude in Chrome: pick which connected browser to use via `/chrome` → “Select browser…”, or in-chat when a browser action runs with multiple connected - -`claude mcp list` and `claude mcp get` now show unapproved `.mcp.json` servers as pending approval instead of auto-approving and connecting when output is piped - -[Full changelog for v2.1.150–v2.1.157 →](</docs/en/changelog#2-1-150>)
removed 2026-w23 View current →
--- a/2026-w23.md +++ b/2026-w23.md @@ -1,77 +0,0 @@ -Releases [v2.1.158 → v2.1.165](</docs/en/changelog#2-1-158>)4 features · June 1–5 - -Auto mode on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundryv2.1.158 - -Auto mode is now available on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry for Opus 4.7 and Opus 4.8, replacing permission prompts with background safety checks on third-party providers. Opt in by setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`. - -Opt in on a third-party provider, then cycle to auto mode with Shift+Tab: - -terminal - - export CLAUDE_CODE_ENABLE_AUTO_MODE=1 - -[Auto mode on third-party providers](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>) - -Safer automatic editsv2.1.160 - -Claude Code now prompts before writing files that can run code, even in `acceptEdits` mode. The protected set covers shell startup files such as `.zshenv` and `.bash_login`, git config under `~/.config/git/`, and build-tool configs such as `.npmrc`, `.bazelrc`, and `.pre-commit-config.yaml`. These writes are never auto-approved in any mode except `bypassPermissions`. - -Work in acceptEdits mode; Claude now pauses before writing these files: - -terminal - - claude --permission-mode acceptEdits - -[Protected paths](</docs/en/permission-modes#protected-paths>) - -List installed plugins with /plugin listv2.1.163 - -The new `/plugin list` command prints your installed plugins inline, without opening the `/plugin` menu, and is also available as `claude plugin list` from the shell. In the interactive form, add `--enabled` or `--disabled` to show only plugins in that state. - -List the plugins that are currently turned on: - -Claude Code - - > /plugin list --enabled - -[Plugin commands](</docs/en/plugins/cli-reference#plugin-list>) - -Version requirements for managed deploymentsv2.1.163 - -Two managed settings, `requiredMinimumVersion` and `requiredMaximumVersion`, let your organization require an approved Claude Code version range. A client outside the range exits at startup and tells the user to update through the organization’s method. `claude update`, `claude install`, and `claude doctor` keep working so users can still recover. - -Add a floor to your managed settings so older clients refuse to start: - -managed-settings.json - - { - "requiredMinimumVersion": "2.1.163" - } - -[Decide what to enforce](</docs/en/admin-setup#decide-what-to-enforce>) - -Other wins - -The trigger keyword for [dynamic workflows](</docs/en/workflows>) changed from `workflow` to `ultracode`; asking for a workflow in your own words still works, and the keyword is highlighted in violet in the prompt - -[Stop and SubagentStop hooks](</docs/en/hooks>) can return `hookSpecificOutput.additionalContext` to give Claude feedback and keep the turn going instead of being treated as an error - -`claude mcp` list, get, and add no longer print secrets: environment-variable references are not expanded, and credential headers and URL secrets are redacted - -A failed Bash command in a parallel tool batch no longer cancels the others; each tool returns its own result independently - -Editing a file no longer needs a separate Read first when you viewed it with a single-file `grep`, `egrep`, or `fgrep` - -Clicking a command in the autocomplete menu now fills it into your prompt instead of running it immediately; press Enter to run - -Listing `Grep` or `Glob` in `--tools` now provides the dedicated search tools on native builds with embedded search, instead of silently ignoring those names - -`/effort` now confirms when your chosen level will persist as the default for new sessions - -`OTEL_RESOURCE_ATTRIBUTES` values are now attached as labels on metric datapoints, so you can slice usage metrics by custom dimensions like team or repo - -Windsurf is renamed to Devin Desktop in `/ide`, `/terminal-setup`, and `/scroll-speed`, following the editor’s rebrand - -`/btw` gains a `c to copy` shortcut that copies the raw markdown answer to the clipboard - -[Full changelog for v2.1.158–v2.1.165 →](</docs/en/changelog#2-1-158>)
removed 2026-w24 View current →
--- a/2026-w24.md +++ b/2026-w24.md @@ -1,65 +0,0 @@ -Releases [v2.1.166 → v2.1.176](</docs/en/changelog#2-1-166>)3 features · June 8–12 - -Move a session with /cdv2.1.169 - -The new `/cd` command moves the current session to a different working directory without rebuilding the prompt cache: the new directory’s `CLAUDE.md` is appended as a message instead of replacing the system prompt. The session relocates to the new directory’s project storage, so `--resume` and `--continue` find it there. Claude prompts you to trust the directory if you haven’t worked in it before. - -Move the session into another project without restarting: - -Claude Code - - > /cd ../other-project - -[Commands reference](</docs/en/commands#all-commands>) - -Subagents can spawn subagentsv2.1.172 - -Subagents can now spawn their own subagents. The subagent panel below the prompt shows the full tree: each row carries a count of its descendants and a path back to `main`. Subagent chains are capped at five levels deep to prevent runaway concurrent trees. - -Open the agents view to watch the nested tree as work fans out: - -Claude Code - - > /agents - -[Spawn nested subagents](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>) - -Troubleshoot with safe modev2.1.169 - -Start Claude Code with `--safe-mode`, or set `CLAUDE_CODE_SAFE_MODE`, to launch with all customizations disabled: `CLAUDE.md`, skills, plugins, hooks, MCP servers, and custom commands and agents do not load. Authentication, model selection, built-in tools, and permissions still work. If a problem disappears in safe mode, one of those surfaces is the cause. - -Launch a clean session to isolate a broken configuration: - -terminal - - claude --safe-mode - -[Test against a clean configuration](</docs/en/debug-your-config#test-against-a-clean-configuration>) - -Other wins - -[`fallbackModel`](</docs/en/model-config#fallback-model-chains>) configures up to three fallback models tried in order when the primary is overloaded or unavailable, and `--fallback-model` now applies to interactive sessions too - -Session titles are now generated in the language of your conversation; pin a specific one with the `language` setting - -`claude agents --json` adds `--all` to include completed sessions plus new `id` and `state` fields, and no longer omits blocked or newly dispatched sessions - -Browsing a marketplace’s plugins in `/plugin` now has a search bar - -New `disableBundledSkills` setting and `CLAUDE_CODE_DISABLE_BUNDLED_SKILLS` hide bundled skills, workflows, and built-in commands from the model - -Deny rules accept a glob in the tool-name position, so `”*”` denies all tools, and unknown tool names in deny rules now warn at startup - -Agent messaging is hardened: messages relayed via `SendMessage` from other agents no longer carry user authority, and auto mode blocks them - -Amazon Bedrock reads the AWS region from `~/.aws` config files when `AWS_REGION` is unset, and `/status` shows where the region came from - -New `enforceAvailableModels` managed setting makes the `availableModels` allowlist also constrain the Default model - -Claude in Chrome browser tools now load in a single batched call instead of one per tool - -`claude update` announces the target version before downloading instead of going silent - -New `footerLinksRegexes` setting adds regex-matched link badges to the footer row - -[Full changelog for v2.1.166–v2.1.176 →](</docs/en/changelog#2-1-166>)
removed 2026-w25 View current →
--- a/2026-w25.md +++ b/2026-w25.md @@ -1,67 +0,0 @@ -Releases [v2.1.178 → v2.1.183](</docs/en/changelog#2-1-178>)3 features · June 15–19 - -Artifacts - -An artifact is a live, interactive page that Claude Code publishes from your session to a private URL on claude.ai, and it updates in place as the session keeps working. Ask for one when terminal text is the wrong medium, such as a PR walkthrough with the diff annotated inline or a dashboard built from session data. Artifacts are in beta on Team and Enterprise plans. - -Ask Claude for a page, then approve the publish prompt: - -Claude Code - - Make an artifact that walks through this PR with the diff annotated inline. - -[Create an artifact](</docs/en/artifacts#create-an-artifact>) - -Match by input parameterv2.1.178 - -Deny and ask permission rules can now match a tool’s input parameters with the `Tool(param:value)` syntax. For example, `Agent(model:opus)` matches subagent spawns that request the Opus model tier. The value accepts `*` as a wildcard, so `Agent(isolation:*)` matches any explicit isolation value. - -Add a parameter rule to the deny list in `settings.json`: - -.claude/settings.json - - { - "permissions": { - "deny": ["Agent(model:opus)"] - } - } - -[Match by input parameter](</docs/en/permissions#match-by-input-parameter>) - -Set any setting from the promptv2.1.181 - -Pass `key=value` to `/config` to change a setting directly without opening the Settings interface. The syntax also works in non-interactive mode with the `-p` flag and from Remote Control. - -Set the `thinking` setting from the prompt: - -Claude Code - - /config thinking=false - -[Commands reference](</docs/en/commands#all-commands>) - -Other wins - -Auto mode now blocks destructive git commands (`git reset --hard`, `git clean -fd`, `git stash drop`) when you didn’t ask to discard local work, and blocks `terraform destroy` unless you asked for the specific stack - -Set the new `attribution.sessionUrl` setting to `false` to omit the claude.ai session link from commits and PRs in web and Remote Control sessions - -In the `/config` interface, Enter and Space both change the selected setting, and Esc now saves and closes instead of reverting - -New `sandbox.allowAppleEvents` opt-in setting lets sandboxed commands send Apple Events on macOS - -Point `CLAUDE_CLIENT_PRESENCE_FILE` at a marker file to suppress mobile push notifications while you’re at the machine - -Long paragraphs now stream line by line instead of waiting for the first line break - -API connection drops mid-thinking now retry automatically instead of showing “Connection closed while thinking” - -With `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` set, every session has one implicit team, so you spawn teammates directly with the Agent tool’s `name` parameter - -Skills in nested `.claude/skills` directories load when working on files there; on a name clash the nested skill appears as `<dir>:<name>` so both stay available - -Fixed prompt caching not reading on a custom `ANTHROPIC_BASE_URL` and on Microsoft Foundry - -Fixed Write and Edit producing zero-byte or truncated files on network drives and cloud-synced folders - -[Full changelog for v2.1.178–v2.1.183 →](</docs/en/changelog#2-1-178>)
removed 2026-w26 View current →
--- a/2026-w26.md +++ b/2026-w26.md @@ -1,51 +0,0 @@ -Releases [v2.1.185 → v2.1.193](</docs/en/changelog#2-1-185>)2 features · June 22–26 - -Authenticate MCP servers from the CLIv2.1.186 - -New `claude mcp login <name>` and `claude mcp logout <name>` commands authenticate a configured MCP server from your shell instead of the interactive `/mcp` menu. `claude mcp login` runs the server’s OAuth flow directly, and `claude mcp logout` clears the stored credentials. - -Run the OAuth flow for a configured server without opening a session: - -terminal - - claude mcp login sentry - -[Authenticate from the command line](</docs/en/mcp#authenticate-from-the-command-line>) - -Shell mode responds to command outputv2.1.186 - -Commands you run with the `!` prefix now get a response from Claude once the output lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To keep the earlier behavior, where the output is added to context without a response, set `respondToBashCommands` to `false` in `settings.json`. - -Run a command and get a response to its output: - -Claude Code - - > ! npm test - -[Shell mode with the ! prefix](</docs/en/interactive-mode#shell-mode-with-prefix>) - -Other wins - -`/rewind` can now resume a conversation from before `/clear` was run - -New `sandbox.credentials` setting blocks sandboxed commands from reading credential files and secret environment variables - -Org-configured model restrictions now apply to the model picker, `--model`, `/model`, and `ANTHROPIC_MODEL`, with a “restricted by your organization’s settings” message when a restricted model is selected - -New `autoMode.classifyAllShell` setting routes all Bash and PowerShell commands through the auto-mode classifier, and denial reasons now show in the transcript, the denial toast, and `/permissions` - -New `claude_code.assistant_response` OpenTelemetry log event carries the model’s response text; deployments that already log prompt content start receiving it on upgrade, so set `OTEL_LOG_ASSISTANT_RESPONSES=0` to keep prompts only - -Background subagents now surface permission prompts in the main session instead of auto-denying; the dialog shows which agent is asking, and Esc denies only that tool - -`/install-github-app` can now install only the GitHub App and skip the Actions workflow and secret steps - -Hosts you allow in the sandbox network permission dialog are remembered for the rest of the session instead of re-prompting on every connection - -Streaming responses use about 37% less CPU, and long-session memory growth from the terminal output cache is reduced - -`/review <pr>` now uses the same review engine as `/code-review medium` - -Bash mode `!` commands get live file path autocomplete - -[Full changelog for v2.1.185–v2.1.193 →](</docs/en/changelog#2-1-185>)
removed 2026-w27 View current →
--- a/2026-w27.md +++ b/2026-w27.md @@ -1,69 +0,0 @@ -Releases [v2.1.195 → v2.1.201](</docs/en/changelog#2-1-195>)5 features · June 29 – July 3 - -Claude Sonnet 5new model - -Sonnet 5 is the new default model for Pro, Team Standard, and Enterprise subscription seats: top-tier coding and tool use at Sonnet pricing, with a native 1M-token context window and adaptive thinking on by default. API pricing is promotional at $2/$10 per MTok through August 31. Requires v2.1.197 or later. - -Switch to Sonnet 5 by name, or pick it from the model picker: - -Claude Code - - > /model claude-sonnet-5 - -[Model configuration](</docs/en/model-config#available-models>) - -Claude in Chrome is generally availablev2.1.198 - -The Chrome integration is out of preview for everyone on a direct Anthropic plan. Claude Code drives your browser through the Claude in Chrome extension: it opens tabs, clicks through pages, fills forms, reads console logs, and shares your login state, so it can test the app it builds without you switching contexts. - -[Use Claude Code with Chrome](</docs/en/chrome>) - -Subagents run in the background by defaultv2.1.198 - -Claude now keeps working while subagents run and picks up their results when they finish, instead of pausing the conversation to wait. Claude still runs a subagent in the foreground when it needs the result before continuing, and background subagents surface every permission prompt in your main session. Pin a subagent’s behavior with the `background` frontmatter field. - -[Run subagents in foreground or background](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) - -Claude Desktop on LinuxDesktop - -The Claude desktop app is now available on Ubuntu 22.04+ and Debian 12+ in beta, on x86_64 and arm64. You get the same Chat, Cowork, and Claude Code experience as macOS and Windows: parallel sessions, visual diff review, an integrated terminal and editor, and live app preview. Installs from Anthropic’s apt repository, so updates arrive through regular package updates. - -[Claude Desktop on Linux](</docs/en/desktop-linux>) - -/radioCLI - -Claude FM is on the air. `/radio` opens the lo-fi radio stream in your browser for something to code to, and prints the stream URL when no browser is available. Not available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. - -Tune in from any session: - -Claude Code - - > /radio - -[All commands](</docs/en/commands#all-commands>) - -Other wins - -[Artifacts](</docs/en/artifacts>) are now generally available and included on Pro and Max plans, joining Team and Enterprise - -Admins can set an [organization default model](</docs/en/model-config#organization-default-model>) in the org console; it shows as “Org default” in `/model` when you haven’t picked a model yourself - -Stacked skill invocations like `/skill-a /skill-b do XYZ` now load all leading skills (up to 5), not only the first - -`AskUserQuestion` dialogs no longer auto-continue by default; opt into an idle timeout via `/config` - -The “default” permission mode is now named “Manual” across the CLI, `--help`, VS Code, and JetBrains; `--permission-mode manual` is accepted alongside `default` - -New `/dataviz` skill gives chart and dashboard design guidance, with a runnable color-palette validator - -The built-in Explore agent now inherits the main session’s model (capped at Opus) instead of running on Haiku - -Background agents launched from `claude agents` now commit, push, and open a draft PR when they finish code work in a worktree, instead of stopping to ask - -Hook matchers with hyphenated identifiers like `code-reviewer` now exact-match instead of substring-matching; use `mcp__brave-search__.*` to match all tools from a hyphenated MCP server - -Transient server rate-limit errors unrelated to your usage limit are now retried automatically with backoff for subscribers instead of failing the turn - -The streaming idle watchdog is now on by default for all providers: it aborts and retries when a response stream produces no events for 5 minutes (`CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable) - -[Full changelog for v2.1.195–v2.1.201 →](</docs/en/changelog#2-1-195>)
removed 2026-w28 View current →
--- a/2026-w28.md +++ b/2026-w28.md @@ -1,43 +0,0 @@ -Releases [v2.1.202 → v2.1.206](</docs/en/changelog#2-1-202>)2 features · July 6–10 - -In-app browser on DesktopDesktop - -Claude Code on desktop now has a built-in browser. Claude can pull up docs, designs, or any other site, and read, click through, and interact with pages the same way it does with your local dev server previews. The browser is sandboxed and configurable: you choose whether browsing sessions persist, and safety classifiers review actions on external sites. - -[Browse external sites](</docs/en/desktop#browse-external-sites>) - -/doctor is a full setup checkupv2.1.205 - -`/doctor` now diagnoses issues and can fix them, instead of printing a read-only report. It checks installation health, finds unused skills, MCP servers, and plugins versus their context cost, deduplicates local `CLAUDE.md` files against checked-in ones, proposes trimming `CLAUDE.md` content Claude could derive from the codebase, and flags slow hooks. It reports findings first and asks for confirmation before changing anything. `/checkup` is its alias. - -Run a checkup from any session: - -Claude Code - - > /doctor - -[All commands](</docs/en/commands#all-commands>) - -Other wins - -Auto mode now blocks tampering with session transcript files, and asks before running `rm -rf` on a variable it can’t resolve from context - -`/cd` now suggests directory paths as you type, matching `/add-dir` - -`/commit-push-pr` auto-allows `git push` to the repo’s configured push remote in addition to `origin` - -Gateway: `/login` now supports Anthropic-operated public gateway endpoints - -`EnterWorktree` asks for confirmation before entering a git worktree outside the project’s `.claude/worktrees/` directory - -Background agents upgrade to a new version in the background right after a Claude Code update, instead of paying a slow stale-session upgrade when you attach - -Agent view rows now show a colored state word and a classifier-written headline instead of raw tool call text, and sessions that edit, merge, comment on, or push to an existing PR link it in `claude agents` - -Auto-update binary downloads now stream to disk instead of buffering in memory, cutting the updater’s peak memory usage by roughly 400 MB - -Background task notifications now explicitly state that no human input has occurred, preventing fabricated in-transcript approvals from being acted on - -Improved `/code-review` findings quality on Opus 4.8 across all effort levels - -[Full changelog for v2.1.202–v2.1.206 →](</docs/en/changelog#2-1-202>)
removed 2026-w29 View current →
--- a/2026-w29.md +++ b/2026-w29.md @@ -1,51 +0,0 @@ -Releases [v2.1.207 → v2.1.212](</docs/en/changelog#2-1-207>)2 features · July 13–17 - -Artifacts call your MCP connectorsweb - -A published artifact can now call MCP connectors each time someone views it, so a dashboard shows live data and can take actions on demand rather than a snapshot from the session that built it. Each call runs through the viewing account’s own connections, and viewers approve access before the page’s first connector call. This week also adds public sharing links, editor roles for shared editing on Team and Enterprise plans, and artifacts created from Claude Tag sessions. - -Name the connector and the data you want in your prompt: - -Claude Code - - Build a dashboard artifact of open pull requests that pulls the live list through my GitHub connector when the page loads. - -[Pull live data with MCP connectors](</docs/en/artifacts#pull-live-data-with-mcp-connectors>) - -Screen reader modeCLI - -Screen reader mode replaces the visual terminal interface with plain, linear text: instead of boxes, spinners, and in-place redraws, Claude Code prints labeled lines that a screen reader such as VoiceOver or NVDA reads in order, so you can approve permissions and review output end to end. Turn it on per session with a flag, per shell with the `CLAUDE_AX_SCREEN_READER` environment variable, or everywhere with the `axScreenReader` setting. - -Start a session in screen reader mode: - -terminal - - claude --ax-screen-reader - -[Turn on screen reader mode](</docs/en/accessibility#turn-on-screen-reader-mode>) - -Other wins - -`/fork` now copies your conversation into a new background session with its own row in `claude agents` while you keep working; the in-session forked subagent it used to launch is now `/subtask` - -[Auto mode](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>) no longer needs the `CLAUDE_CODE_ENABLE_AUTO_MODE` opt-in on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry; administrators can turn it off with `disableAutoMode` - -MCP tool calls that run longer than two minutes now move to the background automatically so the session stays usable; tune or disable the threshold with `CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS` - -New `claude auto-mode reset` restores the default auto-mode configuration, and `--yes` skips the confirmation prompt - -New [corporate launcher](</docs/en/corporate-launcher>) support: `CLAUDE_CODE_PROCESS_WRAPPER` or the `processWrapper` setting runs the processes Claude Code starts from its own binary, such as the background service and agent view sessions, through a required wrapper executable - -`vimInsertModeRemaps` setting maps two-key insert-mode sequences such as `jj` to Escape in vim mode - -`--forward-subagent-text` and `CLAUDE_CODE_FORWARD_SUBAGENT_TEXT` include subagent text and thinking blocks in [stream-json output](</docs/en/headless>) - -Session-wide caps stop runaway loops: WebSearch calls and subagent spawns each default to 200, tunable with `CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION` and `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION` - -”Always allow” permission rules save at the repository root, so approvals granted in a git worktree persist across sessions and worktrees - -Amazon Bedrock, Google Cloud’s Agent Platform, and Claude Platform on AWS now default to Claude Opus 4.8 - -The collapsed tool summary line shows a live elapsed-time counter, so long-running tool calls visibly tick instead of looking stuck - -[Full changelog for v2.1.207–v2.1.212 →](</docs/en/changelog#2-1-207>)
removed 2026-w30 View current →
--- a/2026-w30.md +++ b/2026-w30.md @@ -1,63 +0,0 @@ -Releases [v2.1.214 → v2.1.219](</docs/en/changelog#2-1-214>)3 features · July 20–24 - -Claude Opus 5new model - -Claude Opus 5 is the new default Opus model in Claude Code. It’s the default on Max, Team Premium, Enterprise pay-as-you-go, and the Anthropic API, and on Claude Platform on AWS, Amazon Bedrock, and Google Cloud’s Agent Platform. On the Anthropic API and on Max, Team, and Enterprise plans, Opus 5 runs with a [1M-token context window](</docs/en/model-config#extended-context>); on Amazon Bedrock and Google Cloud’s Agent Platform, select the 1M model variant. Fast mode moves to Opus 5 at $10/$50 per MTok. Requires v2.1.219 or later. - -Switch to Opus 5 by name, or pick it from the model picker: - -Claude Code - - > /model claude-opus-5 - -[Model configuration](</docs/en/model-config#available-models>) - -iOS Simulator in Claude Code DesktopDesktop - -Claude Code Desktop on macOS gets an iOS Simulator pane, in public beta on Pro, Max, and Team plans. When Claude builds, launches, or checks your app in a simulator, the pane opens next to the conversation and streams the device screen live, so you can watch Claude tap through the app to verify its changes or drive the device yourself. Requires Xcode with the iOS platform installed, and Claude Desktop v1.24012.0 or later. - -Ask Claude to run or test your app, and the pane opens when the app launches: - -Claude Code - - > Build the app and run it in the simulator to check the onboarding flow. - -[Test iOS apps in the simulator](</docs/en/desktop-ios-simulator#run-your-app-in-the-simulator>) - -Claude Security pluginplugin - -The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session: agents map your architecture, build a threat model, hunt for vulnerabilities, and independently review every finding before writing the report to a `CLAUDE-SECURITY-<timestamp>/` directory. Scan a whole repository or only a branch’s diff, a pull request, or a single commit, then turn the findings you choose into reviewed patches that you apply yourself. - -Install the plugin from the official Anthropic marketplace, run `/reload-plugins`, then start a scan with `/claude-security`: - -Claude Code - - > /plugin install claude-security@claude-plugins-official - -[Scan and fix your codebase](</docs/en/claude-security#scan-and-fix-your-codebase>) - -Other wins - -[`/code-review`](</docs/en/code-review-local>) now runs as a background subagent with its own context window, so review work stays out of your conversation and the findings arrive when it completes - -`/verify`, `/code-review`, and `/deep-research` run only when you invoke them; Claude no longer launches them on its own - -[Emoji shortcodes](</docs/en/interactive-mode#emoji-shortcodes>) autocomplete in the prompt input: type `:heart:` to insert an emoji, or two or more characters after `:` for suggestions; turn it off with `emojiCompletionEnabled` - -Skills with `context: fork` [run in the background](</docs/en/skills#run-skills-in-a-subagent>) by default, and `background: false` in the skill’s frontmatter waits for the result in the same turn - -A session runs up to 20 subagents concurrently by default; change the [limit](</docs/en/sub-agents#concurrent-subagent-limit>) with `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS` - -`--max-budget-usd` now enforces the cap on subagents: once spend reaches it, Claude can’t start more and running background subagents stop - -New [`sandbox.filesystem.disabled`](</docs/en/sandboxing#disable-filesystem-isolation>) setting skips filesystem isolation while keeping network egress control - -In auto mode, the checks for dangerous `rm` commands, background jobs, and suspicious Windows paths no longer open permission dialogs; the auto-mode classifier adjudicates them instead - -Bash permission checks fail closed on more shell forms, including file-descriptor redirects, Zsh variable subscripts in `[[ ]]` comparisons, `help` and `man` invocations that could run unsafe options, and commands over 10,000 characters - -[Fast mode](</docs/en/fast-mode>) no longer supports Opus 4.7: `/fast` now applies to Opus 5 and Opus 4.8 - -Long-running tool calls emit a periodic progress heartbeat instead of going silent - -[Full changelog for v2.1.214–v2.1.219 →](</docs/en/changelog#2-1-214>)
removed 2026-w32 View current →
--- a/2026-w32.md +++ b/2026-w32.md @@ -1,77 +0,0 @@ -Releases [v2.1.220 → v2.1.224](</docs/en/changelog#2-1-220>)3 features · August 3–7 - -Cross-session messagingv2.1.224 - -Your Claude Code sessions can now message each other. Claude discovers your other sessions with the `ListAgents` tool and sends with `SendMessage`, either when you ask it to or on its own, such as after a change in one session affects what another is working on. A message is text Claude writes for the other session, never your conversation history or files. Available on macOS and Linux. Requires v2.1.224 or later. - -With two sessions open on the same machine, ask one of them to pass something along: - -Claude Code - - Tell the session working on the payments API that users.name is now users.display_name - -The other session shows a `Message from` row once Claude has read the message; press `Ctrl+O` to expand it. To see which sessions Claude can reach, run `/list-agents`. - -[Message another session](</docs/en/cross-session-messaging#message-another-session>) - -Self-hosted environmentsv2.1.224 - -Self-hosted environments run Claude Code cloud sessions on your organization’s own infrastructure, in public beta on Team and Enterprise plans. Run `claude self-hosted-runner` on your machines or containers to turn them into runners. When someone picks your environment while starting a session from claude.ai, the mobile or desktop apps, or `claude --cloud`, that session runs inside your network, with access to your internal services. An Owner turns on **Allow self-hosted environments** in [admin settings](<https://claude.ai/admin-settings/cloud-environments>) first. - -Signed in as an Owner, run the guided setup, which walks you through creating the environment and starts a runner: - -terminal - - claude self-hosted-runner setup - -The environment shows **Healthy** in admin settings once the runner registers. - -[Self-hosted environments quickstart](</docs/en/self-hosted-environments-quickstart#set-up-an-environment-and-runner>) - -Auto mode becomes the defaultCLI - -Starting August 14, auto mode is the default permission mode for new sessions on Pro, Max, and Team plans. If you set a default mode yourself, it stays in place unless you accept the one-time switch prompt, and a default your organization manages doesn’t change. You can still switch modes at any time. Already in effect on those plans: the classifier calls auto mode makes no longer count toward your usage limits. - -To start every session in auto mode before the switch, set it as your default in your user settings: - -~/.claude/settings.json - - { - "permissions": { - "defaultMode": "auto" - } - } - -New sessions then show `auto mode on` in the status bar. - -[Auto mode requirements and controls](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) - -Other wins - -The VS Code extension gets [Focus view](</docs/en/vs-code#extension-settings>), which hides tool activity behind one expandable row per turn; toggle it from the command menu or with `Ctrl+Alt+F` (`Ctrl+Option+F` on Mac) - -Sandbox credential files accept [`mode: “mask”`](</docs/en/sandboxing#mask-credential-files>) on Linux and WSL2, so sandboxed commands read a sentinel copy while the sandbox proxy substitutes the real value on egress; credential masking also gains `extract`, JWT-aware `decode`, and AWS SigV4 re-signing options - -Marketplaces can distribute a plugin as a [zip archive](</docs/en/plugins/marketplace-reference#archive-plugin-source>) with the new `archive` source, downloaded over HTTPS with an optional SHA-256 pin, so installs work without git or npm - -`/review` is now an alias of [`/code-review`](</docs/en/code-review-local>), and `/code-review` with no effort level reuses the level you typed last - -A session you copy with [`/fork`](</docs/en/agent-view#copy-the-session-with-%2Ffork>) now makes its code changes in a worktree of its own instead of the original session’s checkout - -Plugins you install from [`/plugin`](</docs/en/plugins/install#install-a-plugin>) activate in the current session when it’s safe to do so; the install summary reports `Plugin is now active.` or tells you to run `/reload-plugins` - -[Background sessions](</docs/en/agent-view#how-file-edits-are-isolated>) that changed code in a worktree now commit and push before finishing, open a draft pull request only when the task calls for one, and follow the git instructions in your `CLAUDE.md` - -The 200-subagent-per-session cap is removed, so long-running sessions no longer refuse new subagents; the [concurrency](</docs/en/sub-agents#concurrent-subagent-limit>) and depth limits still apply - -A repository’s checked-in settings can no longer turn on [Remote Control auto-connect](</docs/en/remote-control#enable-remote-control-for-all-sessions>); set `remoteControlAtStartup` in your user or managed settings instead, and project and local settings can only turn it off - -[Worktree isolation](</docs/en/worktrees#how-claude-code-enforces-isolation>) now blocks not only file edits but also Bash commands and git redirects that reach the main checkout, in every session type and in the session’s subagents - -A Bash command can no longer hide part of itself from permission checks, and tab or invisible-Unicode padding no longer hides part of a command from the approval dialog - -PreToolUse auto-allow hooks no longer bypass tool restrictions in Claude Code’s internal side tasks such as summaries and compaction - -The [Ultraplan](</docs/en/ultraplan>) research preview is removed, including the `/ultraplan` command and the `ultraplan` keyword; use plan mode or Claude Code on the web instead - -[Full changelog for v2.1.220–v2.1.224 →](</docs/en/changelog#2-1-220>)
removed 2026-w33 View current →
--- a/2026-w33.md +++ b/2026-w33.md @@ -1,63 +0,0 @@ -Releases [v2.1.225 → v2.1.233](</docs/en/changelog#2-1-225>)3 features · August 10–14 - -Auto-continue after a usage limit on DesktopDesktop - -When you hit your session limit in the Code tab of Claude Code Desktop, the limit card now offers an **Auto-continue when limits reset** checkbox. Check it, and the Desktop app retries the interrupted turn after the reset. The card shows the retry time. The weekly-limit card doesn’t offer it. - -The next time a session-limit card appears, check **Auto-continue when limits reset** and leave the session open. The card shows `Auto-resuming at` followed by the reset time, and the turn picks up on its own once the limit resets. - -[What to do when you hit a usage limit](</docs/en/errors#youve-hit-your-session-limit>) - -Fork mode on by defaultv2.1.232 - -Fork mode is now on by default in interactive sessions. Claude can request the `fork` subagent type, which inherits the full conversation and prompt cache instead of starting fresh, so you don’t have to re-explain the context for a side task. Subagents Claude spawns in interactive sessions, apart from the ones an agent-team teammate spawns, also run in the background by default. - -Start a fork yourself with a task that needs everything you’ve discussed so far: - -Claude Code - - > /subtask draft unit tests for the parser changes so far - -The fork appears in the panel below your prompt and its result arrives in your conversation when it finishes. To turn fork mode off, set `CLAUDE_CODE_FORK_SUBAGENT=0`. - -[Turn fork mode on or off](</docs/en/sub-agents#turn-fork-mode-on-or-off>) - -GitLab merge requests and marketplacesv2.1.232 - -Plugin marketplaces clone bare `gitlab.com` URLs, including nested subgroups. On v2.1.233 or later, pass a GitLab merge request URL to `--worktree` to branch from it, and the `claude agents` view labels sessions linked to a merge request as `!N`. Claude Code also redacts GitLab token families such as `glpat-` and `glrt-`, and protects the `glab` CLI’s config store the same way it protects `gh`. - -Start a session in a worktree branched from a merge request: - -terminal - - claude --worktree https://gitlab.com/group/project/-/merge_requests/42 - -When `origin` is on gitlab.com, Claude Code fetches `merge-requests/42/head` and opens the session on that branch in its own worktree. - -[Branch a worktree from a pull or merge request](</docs/en/worktrees#branch-from-a-pull-request>) - -Other wins - -Type `@` in the prompt to [mention another Claude session](</docs/en/cross-session-messaging#message-another-session>) by name, and Claude messages it directly with `SendMessage`; a bare name that matches exactly one live session now delivers without a confirmation step - -Interactive sessions on one machine keep [unique names](</docs/en/cross-session-messaging#see-which-sessions-claude-can-reach>): if you start or rename a session with a name another live session already uses, Claude Code gives yours a `name-word-word` variant and tells you - -Plugin marketplaces accept [`command` sources](</docs/en/plugins/marketplace-reference#command-plugin-source>): a local command prints the plugin directory, which Claude Code re-resolves each session and applies without a restart - -On Linux and WSL, set [`CLAUDE_CODE_TOOL_MEMORY_LIMIT`](</docs/en/tools-reference#memory-limit-on-linux-and-wsl>) to a size such as `4G` to cap the memory Bash and PowerShell tool commands can use - -The task-tracking tools, such as `TaskCreate`, `TaskUpdate`, and `TodoWrite`, are [no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later models in those families](</docs/en/tools-reference#task-tool-availability>); set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` to re-enable them - -[`/code-review`](</docs/en/code-review-local>) at high, xhigh, and max effort now runs in a background agent like the other levels - -[`/plugin install plugin@marketplace`](</docs/en/plugins/install#install-a-plugin>) refreshes the marketplace first, so newly published plugins install without a manual marketplace update - -Settings accept [`additionalMarketplaces` and `allowedMarketplaces`](</docs/en/settings-reference#marketplace-key-aliases>) as aliases for `extraKnownMarketplaces` and `strictKnownMarketplaces` - -On newer models, Claude can [overwrite an existing file with the Write tool](</docs/en/tools-reference#write-tool-behavior>) without reading it first this session, matching the Edit tool’s rules; older models require the read - -The VS Code extension can [organize the sessions list into groups](</docs/en/vs-code#organize-sessions-into-groups>): right-click to create, rename, or delete a group, and Cmd/Ctrl- or Shift-click to move several sessions at once - -If your organization routes Claude Code through a [Claude apps gateway with spend limits](</docs/en/claude-apps-gateway-spend-limits>), Claude Code shows the limit period, its reset time, and the operator’s message when you reach the limit - -[Full changelog for v2.1.225–v2.1.233 →](</docs/en/changelog#2-1-225>)
removed 2026-w34 View current →
--- a/2026-w34.md +++ b/2026-w34.md @@ -1,75 +0,0 @@ -Releases [v2.1.234 → v2.1.239](</docs/en/changelog#2-1-234>)3 features · August 17–21 - -/designresearch preview - -The `/design` skill brings Claude Design’s artboard workflow into the CLI and Claude Code Desktop, built on artifacts. Run it with a brief and Claude publishes a canvas of editable artboards for your UI. Pick one, tweak it, then have Claude implement it. Available on Pro, Max, Team, and Enterprise. Requires v2.1.234 or later. - -Describe what you want designed and let Claude draft the options: - -Claude Code - - > /design redesign the composer based on what people actually use it for - -Claude prints a link to the published canvas. Open it, pick an artboard, and tell Claude which option to implement. - -[Where artifacts are available](</docs/en/artifacts#availability>) - -Concise output stylev2.1.237 - -Concise is a new built-in output style. Claude leads with the result and skips preamble and narration, while doing the work as thoroughly as in the Default style. When you ask for an explanation or more detail, Claude answers in full. Error reports, security warnings, and confirmations for destructive actions keep their complete content. - -Turn it on under **Output style** in `/config`, or set it in your settings file: - -~/.claude/settings.json - - { - "outputStyle": "Concise" - } - -Run `/clear` or start a new session, and Claude’s replies lead with the result. - -[Built-in output styles](</docs/en/output-styles#built-in-output-styles>) - -Start a session on your machine from your phonemobile - -Any machine running `claude remote-control` now shows up as a device card at the top of the Code tab in the Claude app. Remote Control is also out of research preview. - -Start Remote Control on the machine you want to reach, then open the Code tab on your phone: - -terminal - - claude remote-control - -Your machine appears as a device card at the top of the Code tab. Tap it to pick a directory and start a session there. - -[Start a Remote Control session](</docs/en/remote-control#start-a-remote-control-session>) - -Other wins - -Claude Code now continues your session automatically when a claude.ai usage limit resets; turn it off from the **Continue automatically at usage limit** row in `/config` - -The optional [`spellcheck` setting](</docs/en/interactive-mode#check-spelling-as-you-type>) underlines misspelled words in the prompt input as you type, using your installed `aspell`, `hunspell`, or `ispell` - -On a branch with an open GitLab merge request, with the `glab` CLI authenticated through `glab auth login`, the footer shows an [`MR !N` badge](</docs/en/interactive-mode#gitlab-merge-requests>) colored by whether the merge request is a draft, open, or mergeable - -Change the effort level from your phone or claude.ai/code and it [applies to the session on your machine](</docs/en/remote-control#what-connected-devices-see>); Remote Control sessions hosted by Desktop or VS Code also show connected devices the session’s current permission mode - -You can open [`/permissions`](</docs/en/permissions#manage-permissions>) or run `/add-dir <path>` while Claude is working; permission rule changes apply to the rest of the current turn - -When background tasks keep a [`/goal`](</docs/en/goal#background-work-defers-evaluation>) waiting, Claude checks in on them after 30 minutes instead of waiting indefinitely and keeps checking in, at longer intervals while the session sits idle; set `CLAUDE_CODE_GOAL_CHECKIN_MINUTES=0` to opt out - -Your own prompts now render markdown in the transcript, with highlighted code blocks, inline code, and lists, the same way replies do - -The new [`ANTHROPIC_DEFAULT_MODEL`](</docs/en/model-config#set-a-default-model-for-new-sessions>) environment variable sets the model new sessions start on; a `/model` pick still overrides it and persists across restarts - -With the `notify_when_idle` input on `SendMessage`, Claude can ask another Claude Code session on the same machine to [send one notice when it next goes idle](</docs/en/cross-session-messaging#get-a-notice-when-another-session-goes-idle>) - -Set [`keybindingFlavor`](</docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>) to `“readline”` to make `Ctrl+W` in the prompt delete back to the previous whitespace, as Bash does, instead of stopping at punctuation such as `/` - -On native Windows, your Claude Code sessions can now [message each other](</docs/en/cross-session-messaging#availability>) with `SendMessage` and find each other with `ListAgents`, as on macOS and Linux - -Self-hosted runners accept `--defer-shutdown-max-min`, which [keeps serving attached sessions](</docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal>) for a set number of minutes after SIGTERM - -Self-hosted runners accept `--proxy-authorization-command` or `--proxy-authorization-file` to supply a fresh `Proxy-Authorization` header for [egress proxies that require one](</docs/en/self-hosted-environments-deploy#authenticate-to-an-egress-proxy>) - -[Full changelog for v2.1.234–v2.1.239 →](</docs/en/changelog#2-1-234>)
removed 2026-w35 View current →
--- a/2026-w35.md +++ b/2026-w35.md @@ -1,71 +0,0 @@ -Releases [v2.1.240 → v2.1.250](</docs/en/changelog#2-1-240>)3 features · August 24–28 - -Resume terminal sessions in the Desktop appDesktop - -Type `/resume` in the Claude Code Desktop prompt box to pick up any session you started from the CLI and continue it in the app with the full conversation and context intact. Search your sessions by title, folder, or branch, and preview where you left off before you resume. - -In a Desktop session, run the command to list your terminal sessions: - -Claude Code - - > /resume - -Select a session and press `Enter`. The conversation opens in the app where you left off. - -[Move between the CLI and Desktop](</docs/en/desktop#coming-from-the-cli>) - -Claude-drafted feedbackCLI - -When a tool keeps failing, Claude can’t help with a request, or you point out a mistake, Claude now drafts a feedback report for you with the `SendFeedback` tool. A card above your prompt shows the draft, and you can review, send, or dismiss it from there. Nothing reaches Anthropic until you send it. Requires v2.1.238 or later. - -Run `/feedback` with no argument to open your queue of drafts from every session: - -Claude Code - - > /feedback - -Select a draft, then edit, send, or discard it. To turn drafting off, set **Claude-drafted feedback** to `off` in `/config`. - -[SendFeedback tool behavior](</docs/en/tools-reference#sendfeedback-tool-behavior>) - -Restricted modev2.1.248 - -Restricted mode starts Claude Code without the built-in tools that run commands or code. Use it when an evaluation harness drives `claude` on a shared machine. Start it with `--restricted` or set `CLAUDE_CODE_RESTRICTED=1`. Claude Code also removes `WebFetch`, confines the file tools to the working directories, loads only managed settings and `--settings`, and refuses the `bypassPermissions` permission mode. - -Run a non-interactive query without the command-running tools: - -terminal - - claude --restricted -p "review src/ for SQL injection risks" - -To give Claude one of the removed tools back, list it in `--tools` together with the other built-in tools you want, for example `--tools "Bash,Read,Edit"`. `--tools` is an allowlist, and its `default` preset doesn’t restore the removed tools. - -[CLI flags](</docs/en/cli-reference#cli-flags>) - -Other wins - -Set the new [`modelPicker`](</docs/en/settings-reference#modelpicker>) setting to extend or replace the `/model` picker’s built-in list with your own ordered, labeled entries, including Amazon Bedrock or Google Cloud’s Agent Platform model IDs - -Set [`promptCacheTtl`](</docs/en/prompt-caching#choose-the-ttl-yourself>) to `1h` to keep a one-hour prompt cache on the main conversation when you use an API key or a cloud provider; `subagentPromptCacheTtl` sets the TTL for subagents and all other requests outside the main conversation - -On Pro, Max, Team, and Enterprise plans, [`/usage`](</docs/en/costs#plan-usage-breakdown>) adds a Loops breakdown: run count, total tokens, tokens per run, and last run for the `/loop` and scheduled tasks that used the most tokens - -Organizations on contracted rates can set the [`modelPricing`](</docs/en/costs#report-spend-at-your-contracted-rates>) managed setting so `/usage`, the status line, and OpenTelemetry report cost at those rates instead of list price - -`/login` offers **Sign in with your Console account** under the **Anthropic Console account** option, so members of Console organizations that don’t allow API keys can sign in without creating one - -Run `/permissions` and open the new [**Auto mode** tab](</docs/en/auto-mode-config#edit-rules-from-permissions>) to view and edit auto mode classifier rules without opening a settings file - -When auto mode is available, Bash permission prompts in the Manual and `acceptEdits` permission modes offer a [**Yes, and switch to auto mode**](</docs/en/permission-modes#switch-permission-modes>) option; select it to approve the command and switch the session to auto mode - -After you [move a session with `/cd`](</docs/en/permissions#move-the-session-to-another-directory>), the new directory’s project settings, hooks, `.mcp.json` servers, skills, and subagents take effect immediately instead of on the next `--resume` - -In non-interactive sessions, including `-p` runs, Agent SDK runs, and cloud sessions, Claude Code [continues a response](</docs/en/errors#the-response-above-may-be-incomplete>) that a server error, dropped connection, or stall cut off mid-stream, when the partial response contains text and no tool calls - -A subagent that stops at its `maxTurns` limit returns its output marked as partial, with a hint that Claude can [continue it with `SendMessage`](</docs/en/sub-agents#resume-subagents>), instead of appearing finished - -On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, sessions on the same machine can now [message each other](</docs/en/cross-session-messaging#availability>), `/loop` can [choose its own interval](</docs/en/scheduled-tasks#let-claude-choose-the-interval>), and `/model` and `/effort` apply immediately instead of after the turn ends - -The native installer and auto-updater download a zstd-compressed build, about 75 MB instead of 340 MB on Linux x64, and native builds load code on demand, using roughly 40 to 70 MB less memory per session - -[Full changelog for v2.1.240–v2.1.250 →](</docs/en/changelog#2-1-240>)
removed 2026-w36 View current →
--- a/2026-w36.md +++ b/2026-w36.md @@ -1,77 +0,0 @@ -Releases [v2.1.251 → v2.1.261](</docs/en/changelog#2-1-251>)4 features · August 31 – September 4 - -Claude Fable 5.1new model - -Claude Fable 5.1 is available in Claude Code with a 1M-token context window, and the `fable` alias now selects it. In Claude apps gateway sessions, `fable` still selects Fable 5. If your gateway serves Fable 5.1, run `/model claude-fable-5-1`. Requires v2.1.257 or later. - -Switch the current session to Fable 5.1 and save it as your default: - -Claude Code - - > /model fable - -On the Anthropic API, the picker lists Fable only once the server reports it available for your organization, but typing `/model fable` checks with the server directly. - -[Work with Fable](</docs/en/model-config#work-with-fable>) - -Computer use runs in the background on DesktopDesktop - -On macOS, computer use in the Claude Code Desktop app now works in the background: Claude sees and acts in the apps you’ve approved while you keep working. Background computer use is in beta on Pro and Max plans. - -[Let Claude use your computer](</docs/en/desktop#let-claude-use-your-computer>) - -Live diff panel in fullscreen renderingv2.1.260 - -In fullscreen rendering, `/diff` now opens a panel beside the conversation instead of a viewer you have to close. The panel lists the changed files with their added and removed line counts and refreshes each time Claude edits a file or runs a shell command. Select lines in the panel with the mouse to attach them to your next prompt. - -With fullscreen rendering on, inside a git repository, and in a terminal at least 110 columns wide, toggle the panel: - -Claude Code - - > /diff - -Run `/diff` again or click the `✕` in its header to close it. - -[Diff panel](</docs/en/interactive-mode#diff-panel>) - -Find unused skills with /skill-doctorCLI - -`/skill-doctor` shows what each of your skills costs in context and how often it gets used, so you can decide which ones to turn off. Every skill in the [skill listing](</docs/en/skills#skill-descriptions-are-cut-short>) adds to your context on every turn, whether or not Claude ever uses it. Requires v2.1.252 or later and isn’t available in sessions that skip [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>). - -Run it in an interactive session to open the report in the `/plugin` manager’s **Stats** tab: - -Claude Code - - > /skill-doctor - -In non-interactive mode with `-p`, Claude Code prints the report as text instead. - -[Find unused skills](</docs/en/skills#find-unused-skills>) - -Other wins - -A [`PreModelSwitch`](</docs/en/hooks#premodelswitch>) hook can block a model switch you request, and a [`PostModelSwitch`](</docs/en/hooks#postmodelswitch>) hook can add context for Claude after the session’s model changes - -[`/cost`](</docs/en/costs#prompt-cache-statistics>) adds a `Prompt cache (main)` line: the share of input tokens served from cache, the cache misses, whether the cache is warm, and a likely cause for the last miss when Claude Code can name one. Status line scripts get a matching `prompt_cache` object - -Organizations can list HTTP and SSE MCP servers under the [`managedMcpServers`](</docs/en/managed-mcp#provide-servers-through-managed-settings>) managed setting to give them to every user, in addition to the servers that users add on their own - -`/effort` and the `/model` picker now [save a separate effort level for each model](</docs/en/model-config#adjust-effort-level>); press `s` instead of `Enter` to apply a level to the current session only - -By default, the auto mode classifier [now also blocks](</docs/en/permission-modes#what-the-classifier-blocks-by-default>) actions such as requesting credentials from the cloud instance-metadata endpoint or connecting to sibling containers that Claude didn’t start - -In auto mode, Claude Code asks you before Claude [first reads a file outside your working directories](</docs/en/permission-modes#first-read-outside-the-working-directories>), with an option to block such reads from then on - -Raise [`bashOutputMaxChars`](</docs/en/settings-reference#bashoutputmaxchars>) and [`taskOutputMaxChars`](</docs/en/settings-reference#taskoutputmaxchars>), up to 128,000 characters, so Claude receives more of the output from a successful command or background task inline - -The prompt’s [word-editing shortcuts follow readline](</docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>) for everyone, and the `keybindingFlavor` setting no longer has any effect. `Ctrl+W` deletes back to the previous whitespace, and `Alt+B`, `Alt+F`, and `Alt+D` treat punctuation such as `/` and `.` as word breaks - -If you set `defaultMode` to `“bypassPermissions”` in a project’s `.claude/settings.json` or `.claude/settings.local.json`, it [no longer takes effect](</docs/en/permission-modes#which-mode-a-session-starts-in>) and the session starts in Manual mode; set `“bypassPermissions”` in user or managed settings instead, or pass `--permission-mode` - -Seat-based Enterprise plans now [default to Opus 5](</docs/en/model-config#default-model-setting>) - -In the VS Code extension, click the model name at the bottom of the prompt box to [open the model picker](</docs/en/vs-code#use-the-prompt-box>) - -In the VS Code extension, select **Output styles** in the command menu’s Customize section to [pick an output style](</docs/en/vs-code#use-the-prompt-box>), including your custom ones - -[Full changelog for v2.1.251–v2.1.261 →](</docs/en/changelog#2-1-251>)
removed 2026-w37 View current →
--- a/2026-w37.md +++ b/2026-w37.md @@ -1,45 +0,0 @@ -Releases [v2.1.263 → v2.1.269](</docs/en/changelog#2-1-263>)2 features · September 7–11 - -Test plugins with claude plugin evalv2.1.269 - -`claude plugin eval` runs your plugin against a suite of test cases, scores the results, and by default runs each case again without the plugin so you can see what it contributes. `claude plugin eval init` asks you what a good result looks like, then proposes test cases and the checks that score them, tries the suite once, and writes the files. Every run, and every check that has a second model judge the reply, is a real model call on your account. - -From your plugin’s root directory, have Claude draft the suite: - -terminal - - claude plugin eval init - -When Claude tells you the suite is ready, exit the session that `claude plugin eval init` opened and run `claude plugin eval .` to score every case. The summary table prints in your terminal, and `report.html` under `evals/results/` has the per-run detail. - -[Test plugins with evals](</docs/en/plugin-evals>) - -Pop Desktop panes out into their own windowsDesktop - -In the Claude Code Desktop app, you can pop any pane out into its own window. Drag the diff or terminal to a second screen while Claude keeps working in the main window, then dock the pane back when you’re done. - -[Arrange your workspace](</docs/en/desktop#arrange-your-workspace>) - -Other wins - -Set [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) at the top level or per model under `modelSettings` to cap the effort level on every provider, including Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry; any higher level runs at the cap - -Point `--plugin-dir` at a folder of plugins to [load each immediate subfolder that has a manifest](</docs/en/plugins/create#load-a-directory-or-archive-for-one-session>) - -If WebFetch hasn’t finished downloading a page within five minutes, [the fetch fails with a deadline error](</docs/en/tools-reference#webfetch-tool-behavior>) instead of hanging; set `CLAUDE_CODE_WEBFETCH_DEADLINE_MS` to change the deadline, or to `0` to remove the limit - -Pass `--json` to `claude plugin install`, `uninstall`, `update`, `enable`, or `disable` to print the result as [one JSON object on the last line of stdout](</docs/en/plugins/cli-reference#plugin-json-result>) - -When the auto mode classifier blocks an action, the reason Claude receives [usually names the rule that matched](</docs/en/auto-mode-config#fix-a-denial-with-an-allow-rule-an-environment-entry-or-a-retry>), such as `[Data Exfiltration]` - -When you type `/` partway through a prompt, you can now pick from [a list of matching commands](</docs/en/interactive-mode#complete-a-command-mid-prompt>) instead of a single suggestion. The list opens as you type in fullscreen rendering. A plugin skill also matches on its name without the plugin prefix - -In the VS Code extension, click the agent count at the bottom of the prompt box to open the [agent map](</docs/en/vs-code#use-the-prompt-box>), where you can open a subagent’s read-only transcript or stop it - -In the VS Code extension, select **Hooks** or **Permissions** in the command menu’s Customize section to [add or remove hooks and permission rules](</docs/en/vs-code#use-the-prompt-box>) in your user, project, and local settings - -Claude can pick a [browser-tab icon](</docs/en/artifacts#create-an-artifact>) to match each artifact it publishes - -In Claude Code on the web, take back a queued message in a cloud session before Claude reads it: remove it from the queue, or press `Esc` or `Up`, and the text returns to the message box - -[Full changelog for v2.1.263–v2.1.269 →](</docs/en/changelog#2-1-263>)
removed index View current →
Show diff (244 lines)
--- a/index.md +++ b/index.md @@ -1,241 +0,0 @@ -The weekly dev digest highlights the features most likely to change how you work. Each entry includes runnable code, a short demo, and a link to the full docs. For every bug fix and minor improvement, see the [changelog](</docs/en/changelog>). - -​ - -Week 37 - -v2.1.263–v2.1.269 - -September 7–11, 2026 - -**`claude plugin eval`** : run your plugin against a suite of test cases, score the results, and compare against a no-plugin baseline. `claude plugin eval init` drafts the cases and graders for you.Also this week: pop any **Claude Code Desktop pane** out into its own window and dock it back later; the **`maxEffortLevel`** setting caps the effort level on every provider; and a page that **WebFetch** hasn’t finished downloading within five minutes fails instead of hanging.[Read the Week 37 digest →](</docs/en/whats-new/2026-w37>) - -​ - -Week 36 - -v2.1.251–v2.1.261 - -August 31 – September 4, 2026 - -**Claude Fable 5.1** : available in Claude Code with a 1M-token context window.Also this week: on Pro and Max plans, **computer use in the Desktop app** works in the background on macOS while you keep working; in fullscreen rendering, **`/diff`** opens a live panel beside the conversation that refreshes as Claude edits; and **`/skill-doctor`** shows what each of your skills costs in context and how often it gets used.[Read the Week 36 digest →](</docs/en/whats-new/2026-w36>) - -​ - -Week 35 - -v2.1.240–v2.1.250 - -August 24–28, 2026 - -**Resume terminal sessions in the Desktop app** : type `/resume` in the Claude Code Desktop prompt box to pick up any session you started from the CLI, with the full conversation and context intact.Also this week: **Claude-drafted feedback** has Claude write up a feedback report when something goes wrong in a session, which you review and send from `/feedback`; **`--restricted`** starts a session without the command-running tools or your user and project settings, for evaluation harnesses on shared machines; and the **`modelPicker`** setting controls which models the `/model` picker lists.[Read the Week 35 digest →](</docs/en/whats-new/2026-w35>) - -​ - -Week 34 - -v2.1.234–v2.1.239 - -August 17–21, 2026 - -**`/design`** : a research preview that brings Claude Design’s artboard workflow into the CLI and Claude Code Desktop, built on artifacts, so Claude drafts editable artboards for your UI and implements the one you pick.Also this week: the built-in **Concise output style** makes Claude lead with the result and skip preamble; any machine running `claude remote-control` shows up as a **device card** on your phone so you can start a session on it from the Code tab; and **`ANTHROPIC_DEFAULT_MODEL`** sets the model new sessions start on.[Read the Week 34 digest →](</docs/en/whats-new/2026-w34>) - -​ - -Week 33 - -v2.1.225–v2.1.233 - -August 10–14, 2026 - -**Auto-continue after a usage limit on Desktop** : when you hit your session limit in Claude Code Desktop, check **Auto-continue when limits reset** on the limit card and the app retries the interrupted turn once the limit resets.Also this week: **fork mode** is on by default in interactive sessions, so Claude can delegate a side task to a subagent that inherits the full conversation; **GitLab** merge request URLs work with `--worktree` and the `claude agents` view, and marketplaces clone bare `gitlab.com` URLs; and typing **`@`** in the prompt mentions another Claude session by name.[Read the Week 33 digest →](</docs/en/whats-new/2026-w33>) - -​ - -Week 32 - -v2.1.220–v2.1.224 - -August 3–7, 2026 - -**Cross-session messaging** : on macOS and Linux, your Claude Code sessions can now message each other, so Claude passes a finding or a decision from one session to another instead of you re-explaining it.Also this week: **self-hosted environments** run Claude Code cloud sessions on infrastructure your organization operates, in public beta on Team and Enterprise plans; **auto mode** becomes the default permission mode for new sessions on Pro, Max, and Team plans starting August 14; and the **VS Code extension** gets Focus view.[Read the Week 32 digest →](</docs/en/whats-new/2026-w32>) - -​ - -Week 30 - -v2.1.214–v2.1.219 - -July 20–24, 2026 - -**Claude Opus 5** : the new default Opus model in Claude Code, with a 1M-token context window and fast mode at $10/$50 per MTok.Also this week: **Claude Code Desktop** opens an iOS Simulator pane in public beta so Claude can run your app and tap through it while you watch; the **Claude Security plugin** runs a multi-agent vulnerability scan of your codebase and turns the findings you pick into patches you apply yourself; and **`/code-review`** runs as a background subagent.[Read the Week 30 digest →](</docs/en/whats-new/2026-w30>) - -​ - -Week 29 - -v2.1.207–v2.1.212 - -July 13–17, 2026 - -**Artifacts call your MCP connectors** : a published artifact can pull live data and take actions through each viewer’s own MCP connectors when they open the page, and this week also adds public sharing links, editor roles on Team and Enterprise, and artifacts created from Claude Tag sessions.Also this week: **screen reader mode** replaces the visual terminal interface with plain, linear text for screen readers such as VoiceOver and NVDA; **`/fork`** copies your conversation into a new background session while you keep working; and **auto mode** no longer needs an opt-in variable on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry.[Read the Week 29 digest →](</docs/en/whats-new/2026-w29>) - -​ - -Week 28 - -v2.1.202–v2.1.206 - -July 6–10, 2026 - -**In-app browser on Desktop** : Claude Code on desktop gets a built-in browser, so Claude can pull up docs, designs, or any other site and interact with pages the same way it does with your local dev server previews.Also this week: **`/doctor`** is a full setup checkup that diagnoses issues and can fix them, with `/checkup` as its alias; **auto mode** blocks transcript tampering and asks before `rm -rf` on unresolved variables; and **agent view rows** show a colored state word and a classifier-written headline.[Read the Week 28 digest →](</docs/en/whats-new/2026-w28>) - -​ - -Week 27 - -v2.1.195–v2.1.201 - -June 29 – July 3, 2026 - -**Claude Sonnet 5** : the new default model for Pro, Team Standard, and Enterprise subscription seats, with top-tier coding and tool use at Sonnet pricing, a native 1M-token context window, and adaptive thinking on by default.Also this week: **Claude in Chrome** is generally available on all direct Anthropic plans; **subagents run in the background by default** so Claude keeps working while they run; **Claude Desktop on Linux** lands in beta on Ubuntu and Debian; and **`/radio`** tunes into Claude FM lo-fi radio.[Read the Week 27 digest →](</docs/en/whats-new/2026-w27>) - -​ - -Week 26 - -v2.1.185–v2.1.193 - -June 22–26, 2026 - -**`claude mcp login`** : authenticate a configured MCP server from your shell instead of the interactive `/mcp` menu, and clear its stored credentials later with `claude mcp logout`.Also this week: **shell mode responds to command output** (`! npm test` gets an explanation without a second prompt); **`/rewind`** can resume a conversation from before `/clear` was run; and **background subagents** now surface permission prompts in the main session instead of auto-denying.[Read the Week 26 digest →](</docs/en/whats-new/2026-w26>) - -​ - -Week 25 - -v2.1.178–v2.1.183 - -June 15–19, 2026 - -**Artifacts** : turn a session’s output into a live, shareable page on claude.ai that updates in place as the session works, now in beta on Team and Enterprise plans.Also this week: **deny and ask rules match tool parameters** with `Tool(param:value)`, for example `Agent(model:opus)`; **`/config key=value`** sets any setting from the prompt, in `-p` mode, and from Remote Control; and **auto mode blocks destructive git commands** when you didn’t ask to discard local work.[Read the Week 25 digest →](</docs/en/whats-new/2026-w25>) - -​ - -Week 24 - -v2.1.166–v2.1.176 - -June 8–12, 2026 - -**`/cd`** : move the current session to a new working directory mid-conversation without rebuilding the prompt cache.Also this week: **sub-agents can spawn their own sub-agents** (background chains are capped at five levels deep); **`--safe-mode`** starts Claude Code with all customizations disabled for troubleshooting; and **`fallbackModel`** configures up to three fallback models tried in order.[Read the Week 24 digest →](</docs/en/whats-new/2026-w24>) - -​ - -Week 23 - -v2.1.158–v2.1.165 - -June 1–5, 2026 - -**Auto mode on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry** : auto mode is now available on third-party providers for Opus 4.7 and Opus 4.8, replacing permission prompts with background safety checks.Also this week: **safer automatic edits** prompt before writing files that can run code in `acceptEdits` mode; **`/plugin list`** prints your installed plugins inline; and **version requirements** let managed deployments require an approved Claude Code version range.[Read the Week 23 digest →](</docs/en/whats-new/2026-w23>) - -​ - -Week 22 - -v2.1.150–v2.1.157 - -May 25–29, 2026 - -**Claude Opus 4.8** : the new default model for Max, Team Premium, Enterprise pay-as-you-go, and Anthropic API accounts, with high effort by default and `/effort xhigh` for the hardest tasks.Also this week: **dynamic workflows** orchestrate dozens to hundreds of subagents from a script Claude writes; the **security-guidance plugin** reviews Claude’s changes for vulnerabilities as it works; and **fast mode** runs on Opus 4.8 at $10/$50 per MTok.[Read the Week 22 digest →](</docs/en/whats-new/2026-w22>) - -​ - -Week 21 - -v2.1.143–v2.1.149 - -May 18–22, 2026 - -**Auto mode on the Pro plan** : auto mode now runs on Pro accounts and supports Sonnet 4.6 alongside Opus, replacing permission prompts with background safety checks.Also this week: **`/usage`** breaks down what drives your plan limits by skill, subagent, plugin, and MCP server; the new **`/code-review`** command reports correctness bugs; and **background sessions** appear in `/resume` and stay alive when pinned.[Read the Week 21 digest →](</docs/en/whats-new/2026-w21>) - -​ - -Week 20 - -v2.1.139–v2.1.142 - -May 11–15, 2026 - -**Agent view** : `claude agents` opens one screen for every Claude Code session, showing what’s running, what’s blocked on you, and what’s done.Also this week: **`/goal`** keeps Claude working across turns until a completion condition holds; **fast mode** now runs on Opus 4.7 by default; and the **Rewind menu** can compress earlier context with “Summarize up to here”.[Read the Week 20 digest →](</docs/en/whats-new/2026-w20>) - -​ - -Week 19 - -v2.1.128–v2.1.136 - -May 4–8, 2026 - -**Plugins load from`.zip` archives and URLs**: `--plugin-dir` now accepts `.zip` files, and `--plugin-url` fetches a plugin archive for the current session.Also this week: **`worktree.baseRef`** chooses whether new worktrees branch from the remote default or local `HEAD`; **auto mode hard deny rules** block actions unconditionally regardless of allow exceptions; and **hooks see the active effort level** via `effort.level` and `$CLAUDE_EFFORT`.[Read the Week 19 digest →](</docs/en/whats-new/2026-w19>) - -​ - -Week 18 - -v2.1.120–v2.1.126 - -April 27 – May 1, 2026 - -**Windows without Git Bash** : Git for Windows is no longer required, and Claude Code uses PowerShell as the shell tool when Bash is absent.Also this week: **`claude ultrareview`** brings cloud code review to CI and scripts; **`claude project purge`** cleans up local state for a project; and pasting a **PR URL into`/resume`** finds the session that created it.[Read the Week 18 digest →](</docs/en/whats-new/2026-w18>) - -​ - -Week 17 - -v2.1.114–v2.1.119 - -April 20–24, 2026 - -**`/ultrareview`** opens as a public research preview: a fleet of bug-hunting agents runs in the cloud and findings land back in your CLI or Desktop automatically.Also this week: **session recap** shows you what happened while a terminal was unfocused; **custom themes** let you build and ship color palettes from `/theme` or a plugin; and **Claude Code on the web** gets a redesign with a new sessions sidebar and drag-and-drop layout.[Read the Week 17 digest →](</docs/en/whats-new/2026-w17>) - -​ - -Week 16 - -v2.1.105–v2.1.113 - -April 13–17, 2026 - -**Claude Opus 4.7** lands as the new default on Max and Team Premium, with a new `xhigh` effort level that’s the recommended setting for most coding work and an interactive `/effort` slider to dial it in.Also this week: **Routines** on Claude Code on the web fire templated cloud agents from a schedule, GitHub event, or API call; **mobile push notifications** ping your phone when a long task finishes or Claude needs you; `/usage` shows what’s driving your limits; and the CLI moves to native binaries.[Read the Week 16 digest →](</docs/en/whats-new/2026-w16>) - -​ - -Week 15 - -v2.1.92–v2.1.101 - -April 6–10, 2026 - -**Ultraplan** enters early preview: draft a plan in the cloud from your CLI, review and comment on it in a web editor, then run it remotely or pull it back local. The first run now auto-creates a cloud environment for you.Also this week: the **Monitor** tool streams background events into the conversation so Claude can tail logs and react live, `/loop` self-paces when you omit the interval, `/team-onboarding` packages your setup into a replayable guide, and `/autofix-pr` turns on PR auto-fix from your terminal.[Read the Week 15 digest →](</docs/en/whats-new/2026-w15>) - -​ - -Week 14 - -v2.1.86–v2.1.91 - -March 30 – April 3, 2026 - -**Computer use** comes to the CLI in research preview: Claude can open native apps, click through UI, and verify changes from your terminal. Best for closing the loop on things only a GUI can verify.Also this week: `/powerup` interactive lessons, flicker-free alt-screen rendering, a per-tool MCP result-size override up to 500K, and plugin executables on the Bash tool’s `PATH`.[Read the Week 14 digest →](</docs/en/whats-new/2026-w14>) - -​ - -Week 13 - -v2.1.83–v2.1.85 - -March 23–27, 2026 - -**Auto mode** lands in research preview: a classifier handles your permission prompts so safe actions run without interruption and risky ones get blocked. The middle ground between approving everything and `--dangerously-skip-permissions`.Also this week: computer use in the Desktop app, PR auto-fix on Web, transcript search with `/`, a native PowerShell tool for Windows, and conditional `if` hooks.[Read the Week 13 digest →](</docs/en/whats-new/2026-w13>)