modified How the agent loop works View current →
--- a/agent-loop.md +++ b/agent-loop.md @@ -167,7 +167,7 @@ Tool permissions -Claude determines which tools to call based on the task, but you control whether those calls are allowed to execute. You can auto-approve specific tools, block others entirely, or require approval for everything. Three options work together to determine what runs: +Claude determines which tools to call based on the task, but you control whether those calls are allowed to execute. Use these options to auto-approve tools, block tools, and set the permission mode: * **`allowed_tools` / `allowedTools`** auto-approves listed tools. A read-only agent with `["Read", "Glob", "Grep"]` in its allowed tools list runs those tools without prompting, apart from reads from [network paths](</docs/en/permissions#network-paths>). Tools not listed are still available, and calls to them that need approval fall through to the permission mode and `canUseTool`. * **`disallowed_tools` / `disallowedTools`** blocks listed tools, regardless of other settings. See [Permissions](</docs/en/agent-sdk/permissions>) for the order that rules are checked before a tool runs.
modified Orchestrate teams of Claude Code sessions View current →
--- a/agent-teams.md +++ b/agent-teams.md @@ -278,7 +278,7 @@ An in-process teammate that isn’t in plan mode runs in the lead’s mode while the lead is in [`acceptEdits`](</docs/en/permission-modes#auto-approve-file-edits-with-acceptedits-mode>), [`auto`](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), or [`bypassPermissions`](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) mode. Switching the teammate to Manual doesn’t change that, even if its status bar shows Manual.To have it ask before it edits, press Enter on the `main` row in the agent panel and switch the lead to Manual mode too. The lead then asks too, as does any other teammate in Manual mode. -You can’t set per-teammate permission modes at spawn time. A new teammate starts with the lead’s mode, including `bypassPermissions` mode, which `--dangerously-skip-permissions` turns on. If the lead is in [`dontAsk` mode](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>), the teammate starts in [Manual mode](</docs/en/permission-modes#available-modes>) instead. An in-process teammate runs under the lead’s live allow and deny rules, so [`--disallowedTools`](</docs/en/cli-reference#cli-flags>), `--tools`, and `--allowedTools` all apply to it. For a split-pane teammate, check each flag: +You can’t set per-teammate permission modes at spawn time. A new teammate starts with the lead’s mode, including `bypassPermissions` mode, which `--dangerously-skip-permissions` turns on. If the lead is in [`dontAsk` mode](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>), the teammate starts in [Manual mode](</docs/en/permission-modes#available-modes>) instead. For a split-pane teammate of a lead in Manual or `dontAsk` mode, this requires Claude Code v2.1.317 or later. An in-process teammate runs under the lead’s live allow and deny rules, so [`--disallowedTools`](</docs/en/cli-reference#cli-flags>), `--tools`, and `--allowedTools` all apply to it. For a split-pane teammate, check each flag: * **`--disallowedTools` and `--tools`**: the teammate starts with the lead’s command-line deny rules and tool list. Requires Claude Code v2.1.309 or later. * **`--allowedTools`** : Claude Code doesn’t pass this flag to a split-pane teammate, so an action you allowed with it alone isn’t pre-approved there. To approve those actions ahead of time, put the rules under `permissions.allow` in [`--settings`](</docs/en/settings#change-a-setting-for-one-session>) when you start the lead. For example, run `claude --settings '{"permissions":{"allow":["Bash(npm *)"]}}'` in your shell. The rules apply to the lead and each split-pane teammate for that session.
modified Share session output as artifacts View current →
--- a/artifacts.md +++ b/artifacts.md @@ -137,7 +137,7 @@ * **Cloud session without network access** : for a [cloud environment](</docs/en/cloud-environments#access-levels>), that’s the **None** level. In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the classifier can approve instead; in a [Cowork](<https://claude.com/product/cowork>) session, the approval is yours alone. * **Another organization’s public artifact** : Claude Code asks you first, even in auto mode. Where Claude Code can’t ask you, such as in `bypassPermissions` mode, Claude can’t read the artifact. Claude can read these artifacts only while [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) is on. - * **Unconfirmed owner or network setting** : when Claude Code can’t confirm who made the artifact, or can’t confirm a cloud session’s network setting, it asks, and your approval covers that one request. + * **Unconfirmed owner or network setting** : when Claude Code can’t confirm who made the artifact, or can’t confirm a cloud session’s network setting, it asks, and your approval covers that one request. In [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), the classifier can approve or block the read instead of asking you. * **Plan mode** : in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), Claude Code asks before the Artifact tool reads an artifact someone else in your organization made. When Claude reads the artifact with WebFetch, WebFetch’s own [prompting rules](</docs/en/tools-reference#webfetch-tool-behavior>) still apply.
modified Push events into a running session with channels View current →
--- a/channels.md +++ b/channels.md @@ -332,7 +332,7 @@ Feature| What it does| Good for ---|---|--- [Cloud sessions](</docs/en/claude-code-on-the-web>)| Run tasks in a fresh cloud sandbox, cloned from GitHub| Delegating self-contained async work you check on later -[Claude in Slack](</docs/en/slack>)| Spawns a cloud session from an `@Claude` mention in a channel or thread| Starting tasks directly from team conversation context +[Claude in Slack](</docs/en/slack>)| Spawns a cloud session from an `@Claude` mention in a channel or thread| Starting tasks directly from a team conversation Standard [MCP server](</docs/en/mcp>)| Claude queries it during a task; nothing is pushed to the session| Giving Claude on-demand access to read or query a system [Remote Control](</docs/en/remote-control>)| You drive your local session from claude.ai or the Claude mobile app| Steering an in-progress session while away from your desk
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 @@ -304,7 +304,7 @@ Deliver policy to Claude Desktop sessions -Claude Desktop runs its Cowork and Code tabs, plus Chat when you enable it, on embedded Claude Code sessions and sends their model requests through the gateway. It passes policy to each of those sessions, built from the configuration the gateway serves it at `/user/bootstrap`: the model allowlist, disabled tools, and egress allowlist derived from the matched policy’s `cli` or `code` block, plus the [`desktop` overlay](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>). The block’s other keys, such as hooks, `env`, and scoped permission rules like `Bash(npm *)`, reach clients that sign in through `/login`. Under `code`, they also reach the Code tab’s session when the [conditions for the Code tab](</docs/en/claude-apps-gateway-config#apply-code-settings-in-the-code-tab>) hold. They don’t reach Cowork or Chat sessions. Claude Desktop reads the gateway URL from its own managed configuration and signs in with its own flow, separate from the `forceLoginMethod` and `forceLoginGatewayUrl` keys in Set the gateway URL. Settings passed by a launching process are parent settings. Claude Code ignores parent settings on any machine that has an admin-deployed managed source, unless the [source that delivers the policy](</docs/en/managed-settings#which-managed-source-claude-code-uses>) sets `parentSettingsBehavior: "merge"`. +Claude Desktop runs its tabs on embedded Claude Code sessions and sends their model requests through the gateway. It passes policy to each of those sessions, built from the configuration the gateway serves it at `/user/bootstrap`. That configuration holds the model allowlist, disabled tools, and egress allowlist derived from the matched policy’s `cli` or `code` block, plus the [`desktop` overlay](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>). The block’s other keys, such as hooks, `env`, and scoped permission rules like `Bash(npm *)`, reach clients that sign in through `/login`. Under `code`, they also reach the Code tab’s session when the [conditions for the Code tab](</docs/en/claude-apps-gateway-config#apply-code-settings-in-the-code-tab>) hold. They don’t reach Cowork or Chat sessions. Claude Desktop reads the gateway URL from its own managed configuration and signs in with its own flow, separate from the `forceLoginMethod` and `forceLoginGatewayUrl` keys in Set the gateway URL. Settings passed by a launching process are parent settings. Claude Code ignores parent settings on any machine that has an admin-deployed managed source, unless the [source that delivers the policy](</docs/en/managed-settings#which-managed-source-claude-code-uses>) sets `parentSettingsBehavior: "merge"`. #### @@ -440,7 +440,7 @@ Connect Claude Desktop -[Claude Desktop](</docs/en/desktop>) connects to the same gateway through a different MDM key: set `bootstrapUrl` in Claude Desktop’s [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`, and opt the user’s policy in with a `desktop` key. [Claude Desktop overlay](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>) covers both halves. Requires Claude Code v2.1.203 or later on the gateway server. Claude Desktop signs the developer in through the gateway’s identity provider with the same browser SSO step, then fetches its configuration from the gateway instead of from Anthropic. Model access and policy follow the same per-group rules as the CLI. A developer who uses both the CLI and Claude Desktop signs in to each separately; the gateway session isn’t shared between them. Once connected, Claude Desktop sends model requests from every enabled tab through the gateway. It shows the Cowork and Code tabs by default. To make Chat available as well, set `chatTabEnabled` to `true` in the policy’s [`desktop` block](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>) on a gateway running Claude Code v2.1.227 or later. With Cowork on, Claude Desktop then shows Chat and Cowork together in one tab. +[Claude Desktop](</docs/en/desktop>) connects to the same gateway through a different MDM key: set `bootstrapUrl` in Claude Desktop’s [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`, and opt the user’s policy in with a `desktop` key. [Claude Desktop overlay](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>) covers both halves. Requires Claude Code v2.1.203 or later on the gateway server. Once connected, Claude Desktop sends model requests from every enabled tab through the gateway. Claude Desktop signs the developer in through the gateway’s identity provider with the same browser SSO step, then fetches its configuration from the gateway instead of from Anthropic. Model access and policy follow the same per-group rules as the CLI. A developer who uses both the CLI and Claude Desktop signs in to each separately; the gateway session isn’t shared between them. ### @@ -493,7 +493,7 @@ Inference forwarding (Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, Microsoft Foundry, Anthropic)| Available| With per-upstream model translation and failover. The Amazon Bedrock upstream uses the `bedrock-runtime` endpoint and the AWS default credential chain. The [Amazon Bedrock Mantle upstream](</docs/en/claude-apps-gateway-config#amazon-bedrock-mantle-endpoint>) requires Claude Code v2.1.283 or later on the gateway server, and the [Claude Platform on AWS upstream](</docs/en/claude-apps-gateway-config#claude-platform-on-aws>) requires v2.1.198 or later. 1M token context window| Available| Fable models, Sonnet 5 and later, and Opus 4.7 and later run with the 1M window by default; see [Extended context](</docs/en/model-config#extended-context>). The 1M default for the Fable and Opus models requires Claude Code v2.1.287 or later on the developer machine Model access and managed settings by IdP group| Available| Model access is enforced server-side; managed settings are delivered per IdP group and applied by the CLI at the [managed settings tier](</docs/en/settings#settings-precedence>) -Claude Desktop| Available with opt-in| The gateway serves Claude Desktop’s configuration at `/user/bootstrap` once a policy [opts in with a `desktop` key](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>), and Claude Desktop sends its model requests through the gateway. To turn on Chat, see Connect Claude Desktop. Requires Claude Code v2.1.203 or later on the gateway server. +Claude Desktop| Available with opt-in| Opt a policy in with a [`desktop` key](</docs/en/claude-apps-gateway-config#claude-desktop-overlay>). Requires Claude Code v2.1.203 or later on the gateway server. Telemetry fan-out (OTLP/HTTP)| Available| Identity-stamped per export; both protobuf and JSON encodings OIDC identity providers| Available| Any OIDC-compliant IdP; the gateway runs standard OIDC discovery and the authorization-code flow. See [Identity provider setup](</docs/en/claude-apps-gateway-deploy#identity-provider-setup>) for per-IdP configuration Per-user and per-group spend limits| Available| See [Spend limits](</docs/en/claude-apps-gateway-spend-limits>) @@ -510,7 +510,7 @@ Multi-tenant (multiple OIDC issuers)| Not supported| One issuer per gateway. Run separate instances Windows server| Not supported| Deploy on Linux. macOS for local development only Helm chart| Not available| The gateway runs as a standard stateless Deployment; see the [deployment guide](</docs/en/claude-apps-gateway-deploy#kubernetes>) -Admin UI| Not available| Configuration is the YAML file; redeploy to change it +Admin UI| Spend limits only| In Claude Desktop 4.23118.0 or later connected to the gateway, members of [`admin.admin_groups`](</docs/en/claude-apps-gateway-config#admin>) can manage spend limits. Other configuration is the YAML file; redeploy to change it ##
modified Claude apps gateway configuration View current →
--- a/claude-apps-gateway-config.md +++ b/claude-apps-gateway-config.md @@ -1491,7 +1491,7 @@ `reply_tokens`| No| Default `750`. Roughly how many tokens of text each canned reply carries, a whole number from 1 to 100000. `reply_seconds`| No| Default `9.5`. How long a streamed reply takes, from 0 to 600. `0` sends the whole reply at once. A reply to a non-streaming request always comes back at once. -A load test in this mode covers the gateway, your Postgres, and everything in front of the gateway. It doesn’t cover the provider’s limits, speed, or network path. No model request is sent to the provider, so a replica’s CPU per request is an estimate and reads lower than production, which also encrypts its traffic to the provider. Confirm a replica count with a small pilot against the real provider. Before v2.1.283, the estimate reads much lower. While the mode is on, a request can carry an `x-load-test-user` header holding a whole number of up to seven digits. The gateway counts each number as a separate developer, with the email and groups of the developer whose token came with the request. Give the load-test deployment its own empty database, because the gateway refuses to start with the mode on against a database in which any developer has already spent anything. +A load test in this mode covers the gateway, your Postgres, and everything in front of the gateway. It doesn’t cover the provider’s limits, speed, and network path, or the wait at each replica’s [limit on concurrent upstream requests](</docs/en/claude-apps-gateway-deploy#concurrent-upstream-requests>). A replica still logs the `client requests are open` warning when more requests are open than that limit, the point where production requests start to wait. No model request is sent to the provider, so a replica’s CPU per request is an estimate and reads lower than production, which also encrypts its traffic to the provider. Confirm a replica count with a small pilot against the real provider. Before v2.1.283, the estimate reads much lower. While the mode is on, a request can carry an `x-load-test-user` header holding a whole number of up to seven digits. The gateway counts each number as a separate developer, with the email and groups of the developer whose token came with the request. Give the load-test deployment its own empty database, because the gateway refuses to start with the mode on against a database in which any developer has already spent anything. Never turn this on for a gateway that developers use. Every request gets the canned reply and no model is called. The gateway logs a `load_test_mode is on` warning at boot and marks each `inference` [audit event](</docs/en/claude-apps-gateway-deploy#logs>) with `load_test: true` while the mode is on.
modified Claude apps gateway deployment and operations View current →
--- a/claude-apps-gateway-deploy.md +++ b/claude-apps-gateway-deploy.md @@ -186,6 +186,8 @@ A replica fills its limit at a request rate of about the limit divided by the average number of seconds a request stays open. For example, if requests stay open for 10 seconds on average, a replica at the default limit of 256 fills it at about 26 requests a second. If you autoscale on CPU, a replica at the limit queues requests without triggering a scale-out, so set the target below the CPU level your replicas show when they log the `client requests are open` warning. Every open request holds memory in the gateway process while it streams and while it waits for a slot. If you keep the limit at 256, memory on an overloaded replica still grows, because waiting requests keep their request bodies. Size the container’s memory for the number of requests open at peak, and watch memory when you change the limit. A replica that runs out of memory is killed and drops every stream it holds. + +In a load test with [`load_test_mode`](</docs/en/claude-apps-gateway-config#load_test_mode>), requests don’t wait at this limit, but a replica still logs the `client requests are open` warning. ###
modified Deploy Claude apps gateway on AWS View current →
--- a/claude-apps-gateway-on-aws.md +++ b/claude-apps-gateway-on-aws.md @@ -602,5 +602,6 @@ * [Configuration reference](</docs/en/claude-apps-gateway-config>): every `gateway.yaml` option, including `managed.policies` and `telemetry` * [Deployment and operations](</docs/en/claude-apps-gateway-deploy>): IdP setup, health checks, JWT secret rotation, upgrades, and the security model + * [Load-test mode](</docs/en/claude-apps-gateway-config#load_test_mode>): load testing a gateway without calling a model provider * [Claude apps gateway overview](</docs/en/claude-apps-gateway>): quickstart and connecting developers * [AWS samples for Claude apps gateway](<https://github.com/aws-samples/anthropic-on-aws/tree/main/claude-apps-gateway>): AWS-maintained deployment samples covering a range of customer environments
modified Deploy Claude apps gateway on Google Cloud View current →
--- a/claude-apps-gateway-on-gcp.md +++ b/claude-apps-gateway-on-gcp.md @@ -310,4 +310,5 @@ * [Configuration reference](</docs/en/claude-apps-gateway-config>): every `gateway.yaml` option, including `managed.policies` and `telemetry` * [Deployment and operations](</docs/en/claude-apps-gateway-deploy>): IdP setup, health checks, JWT secret rotation, upgrades, and the security model + * [Load-test mode](</docs/en/claude-apps-gateway-config#load_test_mode>): load testing a gateway without calling a model provider * [Claude apps gateway overview](</docs/en/claude-apps-gateway>): quickstart and connecting developers
modified Let Claude coordinate ongoing work with Projects View current →
--- a/claude-projects.md +++ b/claude-projects.md @@ -103,7 +103,7 @@ Scope the project to one stream of work you’ll keep adding to, such as everything it takes to keep one API under its latency target. When to use a project has more examples. Then fill in the dialog’s fields: * **Name** : how the project appears in the **Projects** list. - * **Goal** (optional): one line of what you’re trying to get done, 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**. + * **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**. Standing rules for how threads should work go in project instructions, which you set after the project exists. @@ -464,6 +464,7 @@ Plugins| Plugins| The plugins that load into each new cloud thread Usage| Usage| Token use by thread and by model Memory| Memory| The project’s memory files +Auto-continue when usage limits reset| General| Whether a thread or the project conversation that stops at a usage limit continues on its own when the limit resets. On by default. Restart Claude| General| Restarts the project conversation when Claude stops responding there Pause, Archive, Delete| General| Stops, hides, or removes the project; see Pause, archive, or delete a project @@ -485,7 +486,7 @@ Usage and cost -Project usage counts against the same [plan limits](</docs/en/errors#youve-hit-your-session-limit>) as your other Claude Code sessions, and a project can’t spend past those limits on its own. A thread that reaches your plan’s limit waits and continues on its own when the limit resets, so work you left running starts using your next usage window without a message from you. A thread hit the usage limit covers what you see, how to stop it, and the one case that doesn’t wait. Work goes past your plan’s limits only if you have turned on [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) for your account. A thread can’t turn them on for you. +Project usage counts against the same [plan limits](</docs/en/errors#youve-hit-your-session-limit>) as your other Claude Code sessions, and a project can’t spend past those limits on its own. A thread that stops at your plan’s limit waits and by default continues on its own when the limit resets. Its work then counts against your next usage window. To keep threads from continuing, see A thread hit the usage limit. Work goes past your plan’s limits only if you have turned on [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) for your account. A thread can’t turn them on for you. ### @@ -602,7 +603,7 @@ A thread hit the usage limit -When a thread or the project conversation reaches your plan’s five-hour or weekly limit, it keeps retrying on its own and continues when the limit resets. A thread that a scheduled task started doesn’t wait: its turn stops with a limit error, and you send it a message after the limit resets. While a thread waits, it shows **Service is busy** with “Claude is still retrying and will continue automatically.” You don’t need to do anything for the work to continue. If you’d rather it not use your next usage window, click **Stop** in the thread, or pause the project to hold every thread. [Usage limit errors](</docs/en/errors#youve-hit-your-session-limit>) explain the limits and when they reset. +When a thread or the project conversation stops at your plan’s five-hour or weekly limit, it waits and by default continues on its own when the limit resets. To keep a thread or conversation from continuing at the reset time its message shows, turn off **Auto-continue when usage limits reset** in **Project settings > General** before then. The setting is for the whole project, not only the thread you’re looking at. To continue with the setting off, send the thread or conversation a message after the reset. [Usage limit errors](</docs/en/errors#youve-hit-your-session-limit>) explain the limits and when they reset. ### @@ -637,7 +638,7 @@ ”Unable to connect to repository” with “Claude couldn’t access your repository or environment”| Your GitHub account needs push access to the repository, and the environment must still exist. Check both in **Project settings > Environment**, then retry ”Couldn’t show the setup proposal”| The app you have open is older than the **Setup recommendations** Claude sent. Refresh the page or restart the desktop app, or ask Claude to propose the setup again ”The project’s environment was removed”| Choose a different environment in **Project settings > Environment**; the change applies to new threads -”Setup script failed”| Click **Edit setup script** on the error, fix the script in the environment, then send another message. [Setup script failed](</docs/en/web-quickstart#setup-script-failed>) lists common causes +”Setup script failed”| [Setup script failed](</docs/en/web-quickstart#setup-script-failed>) lists common causes. Fix the script in the environment, then ask Claude in the project conversation to run the task in a new thread, so the script runs again ”Claude ran out of context on this turn”| The thread filled its context window. If the message says the thread continues in a fresh session, it carries on by itself; otherwise ask Claude in the project conversation to start a new thread for the remaining work ”Couldn’t start in” followed by your folder’s name| You allowed a thread to run on your computer, but the session couldn’t start there. When a line under the message gives the reason, fix that, then ask Claude to run the task again ”Claude is out of date on your device”| The computer you picked to run a thread has a Claude Code version older than v2.1.280. Update Claude Code there, or update the desktop app if that’s what connects the folder, then ask Claude to run the task again
modified Configure cloud environments View current →
--- a/cloud-environments.md +++ b/cloud-environments.md @@ -122,9 +122,8 @@ Select **Add secret** , labeled **Add** in admin settings, and fill in the form. Keep the default **Secret type** , **Bearer** , for an API key that travels in a request header, and fill in these fields: - * **Name** : a label for the secret, such as `Internal billing API` * **Allowed websites** : the API’s hosts, such as `api.example.com`. A leading `*.` matches every subdomain - * **Custom headers** : one row for the header that carries the key. The row starts with `Authorization` as the header’s **Name** and `Bearer` as its **Prefix** ; paste the key itself as the **Value**. For a header like `X-Api-Key` that takes the bare value, change the name and clear the prefix + * **Custom headers** : one row for the header that carries the key. The row already has `Authorization` as the **Header name** and `Bearer` as the **Prefix** ; paste the key itself as the **Value**. For a header like `X-Api-Key` that takes the bare value, change the name and clear the prefix For an API that authenticates another way, pick a different **Secret type**. The list is the same one [Claude Tag](<https://claude.com/docs/claude-tag/overview>), the Slack integration for Team and Enterprise plans, offers for [connections](<https://claude.com/docs/claude-tag/admins/add-connections>). @@ -145,8 +144,7 @@ If you’re on a Team or Enterprise plan and don’t hold an organization admin role, the **Add secret** form takes one secret for one host. Select your environment’s **Network secrets** row and then **Add secret**. Fill in these fields and select the form’s **Add secret** button: * **Host** : the one host that gets the secret, such as `api.example.com`. The form doesn’t accept a `*.` wildcard - * **Name** : an optional label for the secret - * **Secret type** : **Token** for a key that travels in a request header, or **Username and password**. For a token, paste the key as the **Value** + * **Secret type** : **Token** for a key that travels in a request header, or **Username and password**. For a token, paste the key in the **Token** field. For a header other than `Authorization`, such as `X-Api-Key`, change **Header** to its name #### @@ -493,7 +491,7 @@ A setup script has four constraints to write around: - * **Exit zero** : if the script exits non-zero, the session fails to start. Append `|| true` to non-critical commands so an intermittent install failure doesn’t block the session. + * **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. * **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.
modified Customize Code Review View current →
--- a/code-review-customize.md +++ b/code-review-customize.md @@ -21,7 +21,7 @@ Use REVIEW.md for review-only rules -`REVIEW.md` is a file at your repository root that tailors Code Review to your repository. You can also add a `REVIEW.md` in a subdirectory to add checks for changes under that path, on top of the root file. The agents that find issues and the agents that verify them receive its contents as your repository’s review instructions, alongside Code Review’s default review guidance. The step that writes the final review consults it before settling severity and writing the summary. This example layout has a root file and one subdirectory file: +`REVIEW.md` is a file at your repository root that tailors Code Review to your repository. On a protected branch, you can also add a `REVIEW.md` in most subdirectories to add checks for changes under that subdirectory, on top of the root file. The agents that find issues and the agents that verify them receive its contents as your repository’s review instructions, alongside Code Review’s default review guidance. The step that writes the final review consults it before settling severity and writing the summary. This example layout has a root file and one subdirectory file: your-repo/ ├── REVIEW.md # Root file @@ -38,6 +38,21 @@ ​ +When a subdirectory REVIEW.md doesn’t apply + +Code Review doesn’t apply a `REVIEW.md` in or below a subdirectory with one of these names, whatever the subdirectory holds. A subdirectory name matches only as a whole, in any letter case and at any depth, so `Tests` matches and `integration-tests` doesn’t: + + * **Tests** : `test`, `tests`, `__tests__`, `testdata`, `fixtures`, `__fixtures__`, `golden`, `corpus`, `snapshots`, `__snapshots__` + * **Examples** : `example`, `examples`, `sample`, `samples`, `demo`, `demos` + * **Generated code** : `generated` + * **Third-party code** : `vendor`, `third_party`, `third-party`, `thirdparty`, `node_modules`, `bower_components`, `external`, `extern`, `deps`, `godeps`, `pods`, `carthage`, `site-packages`, `contrib` + +Put checks for those subdirectories in the root `REVIEW.md`, or in a parent subdirectory’s `REVIEW.md` when neither that parent nor anything above it is on the list. The remaining subdirectory `REVIEW.md` files on the paths a pull request changes share a limit of 150,000 bytes, not counting the root file. If the [check run](</docs/en/code-review-pull-requests#check-run-output>) reports that some of them didn’t fit, shorten the files to fit that limit. + +### + +​ + Example REVIEW.md This `REVIEW.md` recalibrates severity for a backend service, caps nits, skips generated files, and adds repo-specific checks. @@ -225,8 +240,8 @@ Branch protection| Copy read| Files read ---|---|--- -The default branch is protected, and the pull request targets it or targets a branch no ruleset protects| Default branch| Root file, the files it includes, and subdirectory files -The pull request targets another branch that a ruleset protects| That base branch| Root file, the files it includes, and subdirectory files +The default branch is protected, and the pull request targets it or targets a branch no ruleset protects| Default branch| Root file, the files it includes, and most subdirectory files +The pull request targets another branch that a ruleset protects| That base branch| Root file, the files it includes, and most subdirectory files The default branch isn’t protected, and the base branch has no protection rule of either kind| Default branch| Root file Code Review can’t confirm the protection settings. This includes an unprotected default branch with a base branch that has only a classic rule| None| None
modified Track cost and usage View current →
--- a/cost-tracking.md +++ b/cost-tracking.md @@ -289,7 +289,7 @@ Read output tokens from the result message -Claude Code builds each assistant message from the usage the API reported when the response began, so the message’s `output_tokens` is only the count the API had reported at `message_start`, before the response was generated. One API response can produce several assistant messages, and every one of them carries that same placeholder. The API reports the real output count at the end of the response, and Claude Code adds it to the result message. Read output tokens from the result’s `usage`, or from `modelUsage` for a per-model breakdown. To watch a response’s output count grow while it streams, set `includePartialMessages`, or `include_partial_messages` in Python, and read `usage` from each `message_delta` stream event, typed as [`SDKPartialAssistantMessage`](</docs/en/agent-sdk/typescript#sdkpartialassistantmessage>) in TypeScript and [`StreamEvent`](</docs/en/agent-sdk/python#streamevent>) in Python. +Claude Code builds each assistant message from the usage the API reported when the response began, so the message’s `output_tokens` is only the count the API had reported at `message_start`, before the response was generated. One API response can produce several assistant messages, and every one of them carries that same placeholder. The API reports the real output count at the end of the response, and Claude Code adds it to the result message. Read output tokens from the result’s `usage`, or from `modelUsage` for a per-model breakdown. ###
modified Launch sessions from links View current →
--- a/deep-links.md +++ b/deep-links.md @@ -94,7 +94,7 @@ 2. [Open Claude Code in the gateway repo](claude-cli://open?repo=acme/web-gateway&q=5xx%20rate%20is%20elevated%20on%20web-gateway.%20Check%20recent%20deploys%2C%20error%20logs%20from%20the%20last%2030%20minutes%2C%20and%20open%20incidents%20in%20Linear.) 3. Post initial findings in #incident. -To use this in your own runbook, replace `acme/web-gateway` with your service’s repository slug. Before engineers click step 2, they must have sent a prompt in an interactive Claude Code session on their machine and opened Claude Code in their local clone. +To use this in your own runbook, replace `acme/web-gateway` with your service’s repository slug. Before engineers click step 2, their machine must have the `claude-cli://` handler registered, and they must have run `claude` in their local clone or worktree. ###
modified Test iOS apps in the simulator View current →
--- a/desktop-ios-simulator.md +++ b/desktop-ios-simulator.md @@ -84,7 +84,7 @@ How sessions manage devices -Each device belongs to the session that launched it, so [parallel sessions](</docs/en/desktop#work-in-parallel-with-sessions>) don’t share a device: what you see in one session’s pane reflects that session’s work, not another’s. Switching sessions in the sidebar switches the simulator view along with the conversation, and switching back resumes the same device where it left off. If Claude works with more than one device, each opens its own pane, up to 4 per session. Claude Code Desktop shuts down the simulators it booted once they’re no longer in use: when you quit the app, when you archive the session, or 10 minutes after you detach a device from its pane. Devices you boot outside Claude Code Desktop, such as in Apple’s Simulator app or in Device Hub, are never shut down automatically. To shut down the attached device right away, use the shutdown button in the pane. +If your prompt doesn’t name a simulator, Claude uses one that’s already running, even if another [parallel session](</docs/en/desktop#work-in-parallel-with-sessions>) opened it. To give each session its own simulator, name a different one in each session’s prompt. Claude Code Desktop shuts down the simulators it booted once they’re no longer in use: when you quit the app, when you archive the session, or 10 minutes after you detach a device from its pane. Devices you boot outside Claude Code Desktop, such as in Apple’s Simulator app or in Device Hub, are never shut down automatically. To shut down the attached device right away, use the shutdown button in the pane. ## @@ -100,7 +100,13 @@ Allow a device the first time -The first time Claude uses a simulator, the desktop app asks you to allow it. The consent covers controlling that device and taking screenshots of it, and you give it once per device rather than once per session. Claude’s screenshots of the device are sent to Anthropic and kept under your normal conversation retention settings, so don’t sign in to real accounts on a device Claude uses. After you allow a device, Claude’s actions on it, such as tapping, typing, and taking screenshots, run without prompts, but you approve launching the app as your permission mode requires. They carry the same trust as you clicking in the pane, and they only touch the simulated device, so the pane doesn’t need the macOS Accessibility and Screen Recording permissions that computer use requires. If you decline, the device still boots and the pane still works for your own taps; only Claude’s access stays off. To change your mind later, click **Let Claude use it** in the pane. +The first time Claude uses a simulator, the desktop app asks you to allow it. The consent covers controlling that device and taking screenshots of it, and you give it once per device rather than once per session. Claude’s screenshots of the device are sent to Anthropic and kept under your normal conversation retention settings, so don’t sign in to real accounts on a device Claude uses. After you allow a device, Claude’s actions on it, such as tapping, typing, and taking screenshots, run without prompts, but you approve launching the app as your permission mode requires. They carry the same trust as you clicking in the pane, and they only touch the simulated device, so the pane doesn’t need the macOS Accessibility and Screen Recording permissions that computer use requires. If you decline Claude’s request, the device doesn’t attach and Desktop doesn’t boot it. To use the device yourself: + + 1. Click **Attach simulator** in the pane. + 2. Click **Continue** on the permission screen. + 3. Click **Cancel** in the dialog that follows. + +The device attaches and works for your own taps, and Claude’s access stays off. After that, to give Claude access, click **Let Claude use it** in the pane. ###
modified Schedule recurring tasks in Claude Code Desktop View current →
--- a/desktop-scheduled-tasks.md +++ b/desktop-scheduled-tasks.md @@ -184,7 +184,7 @@ Permissions for scheduled tasks -Each task has its own permission mode, which you set when creating or editing the task. Allow rules from `~/.claude/settings.json` also apply to scheduled task sessions. If a task runs in [Manual mode](</docs/en/desktop#choose-a-permission-mode>) and needs to run a tool it doesn’t have permission for, the run stalls until you approve it. To approve it, find the run’s session and answer the permission prompt there. To avoid stalls, click **Run now** after creating a task, watch for permission prompts, and select “always allow” for each one. Future runs of that task auto-approve the same tools without prompting. You can review and revoke these approvals from the task’s detail page. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt on every call and don’t offer an always-allow option. Runs that call these tools stall each time. +Each task has its own [permission mode](</docs/en/desktop#choose-a-permission-mode>), which you set when creating or editing the task. Allow rules from `~/.claude/settings.json` also apply to scheduled task sessions. When a run is stalled on a permission prompt, find the run’s session and answer the prompt there. To avoid stalls, click **Run now** after creating a task, watch for permission prompts, and select “always allow” for each one. Future runs skip most of those prompts. You can review and revoke these approvals from the task’s detail page. If you select “always allow” on a file edit in the task’s folder, only that session moves to **Accept edits** , so set the task’s permission mode to **Accept edits**. MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) prompt on every call and don’t offer an always-allow option. Runs that call these tools stall each time. ## @@ -201,7 +201,7 @@ * **Review allowed permissions** : see and revoke saved tool approvals for this task from the **Always allowed** panel * **Delete** : remove the task. The sessions the task created are [archived](</docs/en/desktop#organize-and-find-sessions>), not deleted. The folder holding the task’s `SKILL.md` file stays on disk at `~/.claude/scheduled-tasks/<task-name>/`, or at `scheduled-tasks/<task-name>/` under [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) if you set that variable. To remove that folder, delete it yourself. -You can also list, create, edit, and pause tasks by asking Claude in any Desktop session. For example, “pause my dependency-audit task” or “show me my scheduled tasks.” To delete a task, use the **Delete** button on its detail page. A scheduled task can also modify its own schedule or prompt from within a running session using the `update_scheduled_task` MCP tool. This lets a task reschedule itself based on what it finds, for example, rescheduling a code review to run earlier when it detects a release branch has been created. To edit a task’s prompt on disk, open `~/.claude/scheduled-tasks/<task-name>/SKILL.md` (or under [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) if set). The file uses YAML frontmatter for `name` and `description`, with the prompt as the body. Changes take effect on the next run. Schedule, folder, model, and enabled state are not in this file: change them through the Edit form or ask Claude. +You can also list, create, edit, and pause tasks by asking Claude in any Desktop session. For example, “pause my dependency-audit task” or “show me my scheduled tasks.” To delete a task, use the **Delete** button on its detail page. To let a task change its own schedule or prompt with the `update_scheduled_task` MCP tool, click **Run now** and approve the call each time. To edit a task’s prompt on disk, open `~/.claude/scheduled-tasks/<task-name>/SKILL.md` (or under [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) if set). The file uses YAML frontmatter for `name` and `description`, with the prompt as the body. Changes take effect on the next run. Schedule, folder, model, and enabled state are not in this file: change them through the Edit form or ask Claude. ##
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -277,7 +277,7 @@ `CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS`| Set to `1` to [run dangerous `rm` commands with no prompt](</docs/en/permission-modes#turn-off-the-critical-path-removal-prompt-in-bypasspermissions-mode>) in `bypassPermissions` mode, which removes a safety prompt for destructive deletes. The linked section lists where it has no effect. Set it in the environment that launches Claude Code, because Claude Code [ignores it in a settings `env` block](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). Requires Claude Code v2.1.311 or later `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY`| Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`| Set to `1` to enable [agent teams](</docs/en/agent-teams>). Agent teams are experimental and disabled by default -`CLAUDE_CODE_EXTRA_BODY`| JSON object to merge into the top level of every API request body. Useful for passing provider-specific parameters that Claude Code doesn’t expose directly. A value exported in your shell also applies to the [background sessions](</docs/en/agent-view>) you dispatch with `claude agents` or `--bg`. Before v2.1.206, background sessions ignored a shell-exported value and used whatever copy the background supervisor process inherited +`CLAUDE_CODE_EXTRA_BODY`| JSON object to merge into the top level of model request bodies except on some requests outside the conversation, such as `/model` checks. Useful for passing provider-specific parameters that Claude Code doesn’t expose directly. A value exported in your shell also applies to the [background sessions](</docs/en/agent-view>) you dispatch with `claude agents` or `--bg`. Before v2.1.206, background sessions ignored a shell-exported value and used whatever copy the background supervisor process inherited `CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS`| Override the default token limit for [file reads](</docs/en/tools-reference#large-files>), which is 25,000 tokens. Useful when you need to read larger files in full. A read that Claude makes with the `allow_large` parameter can go past this limit when the context window has room `CLAUDE_CODE_FORCE_SESSION_PERSISTENCE`| Set to `1` to force transcript persistence, prompt history, and `claude agents` registration even when this `claude` was launched from inside another Claude Code session. Use when an inherited `CLAUDE_CODE_CHILD_SESSION` value, for example from a `screen` session or a background launcher first started by Claude Code’s Bash tool, causes a genuine top-level session to be misclassified as nested. As of v2.1.178, Claude Code detects the tmux case automatically and ignores the inherited marker, so tmux no longer needs this variable. Also honored on v2.1.169 and earlier; has no effect on v2.1.170 and v2.1.171, where the nested-session detection it overrides was removed `CLAUDE_CODE_FORCE_STRIKETHROUGH`| Set to `1` to force strikethrough rendering for `~~text~~` in Claude’s responses when your terminal supports it but is not auto-detected, such as over SSH without `TERM_PROGRAM` forwarded. Without this, undetected terminals show the literal `~~` markers instead of rendering the text as strikethrough. Requires Claude Code v2.1.186 or later @@ -295,7 +295,7 @@ `CLAUDE_CODE_GZIP_REQUEST_BODIES`| Set to `0` to turn off gzip compression of Claude API, telemetry, and [artifact](</docs/en/artifacts>) publish request bodies sent to `api.anthropic.com`. By default, Claude Code compresses large request bodies on direct connections and skips compression when you send requests through a proxy, configure a client certificate, or set `NODE_EXTRA_CA_CERTS`. Use `0` if a [TLS-inspecting proxy](</docs/en/network-config#ca-certificate-store>) that Claude Code can’t detect mishandles compressed requests `CLAUDE_CODE_HIDE_CWD`| Set to `1` to hide the working directory in the startup logo. Useful for screenshares or recordings where the path exposes your OS username `CLAUDE_CODE_IDE_HOST_OVERRIDE`| Override the host address used to connect to the IDE extension. By default Claude Code auto-detects the correct address, including WSL-to-Windows routing -`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`| Set to `1` to stop `/ide` from installing the IDE extension. Equivalent to setting [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false` +`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`| Set to `1` to stop `/ide` from installing the IDE extension. Equivalent to setting [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false`. Claude Code versions before v2.1.318 also install or update the extension when you start `claude` in a VS Code, Cursor, or Devin Desktop terminal. This variable stops that too `CLAUDE_CODE_IDE_SKIP_VALID_CHECK`| Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running `CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS`| Context size, in tokens, at which [idle compaction](</docs/en/settings-reference#idlecompaction>) applies to a conversation (default: `200000`). Accepts a positive whole number, and anything else is ignored. Values below `100000` are raised to `100000`, the lowest threshold. Idle compaction is on by default for conversations that meet its conditions. To turn it off, set `idleCompaction` to `false`. Requires Claude Code v2.1.290 or later `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`| How many [subagents](</docs/en/sub-agents#concurrent-subagent-limit>) can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can’t disable it. Requires Claude Code v2.1.217 or later
modified Error reference View current →
--- a/errors.md +++ b/errors.md @@ -53,7 +53,9 @@ `Could not resolve authentication method`| Authentication `Invalid API key`| Authentication `Your apiKeyHelper script is failing`| Authentication -`Claude Code didn't send your claude.ai login, because the API key helper your administrator set isn't in effect`| Authentication +`Your organization's settings need an update`| Authentication +`Couldn't load your organization's settings. Check your connection`| Authentication +`Restart Claude Code to finish signing in`| Authentication `Invalid auth token · Fix external auth token`| Authentication `Invalid ANTHROPIC_CUSTOM_HEADERS · Fix the environment variable`| Authentication `Invalid request header from the environment · Fix the environment variable`| Authentication @@ -1083,14 +1085,21 @@ Claude Code didn’t send your claude.ai login -Send this full message to your administrator. It lists the changes they can make. The message means Claude Code refused your prompt. While you use your claude.ai login, Claude Code keeps refusing prompts, after a restart too: - - Claude Code didn't send your claude.ai login, because the API key helper your administrator set isn't in effect. Your organization's managed settings may be overriding it. Ask your administrator to keep the key helper and its API address in effect, to name Anthropic's API address in those managed settings, or to remove the key helper. Run /status to see your setting sources. - -**What to do:** - - * To tell your administrator which managed sources your machine has, run `/status` at the Claude Code prompt and copy the [`Setting sources` line](</docs/en/managed-settings#read-the-source-in-/status>). If a `Skipped sources` line appears, copy it too - * If you administer the settings, see [why the machine’s key helper isn’t in effect](</docs/en/server-managed-settings#machine-apikeyhelper-not-in-effect>) +These messages mean Claude Code refused your request and didn’t send your claude.ai login: + + Your organization's settings need an update. Ask your administrator to fix the API key helper configuration. + Couldn't load your organization's settings. Check your connection, then restart Claude Code. + Restart Claude Code to finish signing in. + +**What to do:** + + * `Your organization's settings need an update`: ask your administrator to fix the API key helper configuration + * To tell your administrator which managed sources your machine has, run `/status` at the Claude Code prompt and copy the [`Setting sources` line](</docs/en/managed-settings#read-the-source-in-/status>). If a `Skipped sources` line appears, copy it too + * If you administer the settings and the helper is in a machine’s managed settings file or MDM policy, see [When a machine’s `apiKeyHelper` isn’t in effect](</docs/en/server-managed-settings#machine-apikeyhelper-not-in-effect>) + * `Couldn't load your organization's settings`: check your connection, then restart Claude Code. If the message comes back after a restart, tell your administrator + * `Restart Claude Code to finish signing in`: restart Claude Code + +Before v2.1.315, a refused prompt or file upload printed one message that began `Claude Code didn't send your claude.ai login`. ###
modified Speed up responses with fast mode View current →
--- a/fast-mode.md +++ b/fast-mode.md @@ -23,9 +23,9 @@ 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 - * Set `"fastMode": true` in your [user settings file](</docs/en/settings>) - -By default, fast mode you turn on in an interactive session persists across sessions. 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: + * 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. + +By default, fast mode you turn on in an interactive session persists across sessions on a supported model. 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 * You’ll see a confirmation message: “Fast mode ON” @@ -204,7 +204,7 @@ Require per-session opt-in -By default, fast mode a user turns on in an interactive session persists across sessions. To change this, set `fastModePerSessionOptIn` to `true` in any [settings file](</docs/en/settings#where-settings-live>), which causes each session to start with fast mode off and requires users to explicitly enable it with `/fast`. 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, fast mode a user turns on in an interactive session persists across sessions on a supported model. To change this, set `fastModePerSessionOptIn` to `true` in any [settings file](</docs/en/settings#where-settings-live>), which causes each session to start with fast mode off and requires users to explicitly enable it with `/fast`. 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 @@ -227,7 +227,7 @@ To disable fast mode manually instead of waiting for cooldown, run `/fast` again. If you run out of usage credits mid-session, Claude Code retries each rejected fast mode request at standard speed and pricing, so you keep working, and there is no cooldown. How you see the rejection depends on the session type: - * In an interactive session, Claude Code shows a “Fast mode disabled · usage credits exhausted” notification and turns fast mode off for the rest of the session. Your saved fast mode preference doesn’t change; run `/fast` to turn fast mode back on. + * In an interactive session, Claude Code shows a “Fast mode disabled · Out of usage credits” notification and turns fast mode off. Your saved fast mode preference doesn’t change; run `/fast` to turn fast mode back on. * In [non-interactive mode](</docs/en/headless>) with `--output-format stream-json`, and through the Agent SDK, Claude Code emits the same text on the message stream as a `system` message with subtype `notification`, once per turn while you’re out of usage credits. Fast mode stays on. Requires Claude Code v2.1.221 or later. ##
modified Intercept and control agent behavior with hooks View current →
--- a/hooks.md +++ b/hooks.md @@ -237,7 +237,7 @@ `timeout`| `number`| `undefined`| Timeout in seconds. When omitted, Claude Code applies the event’s default timeout. Your SDK callbacks follow the `command` hook defaults `onFailure`| `"continue" | "block"`| `undefined`| What a failed callback does. Set `"block"` to block the action when a callback fails. In Python, use `on_failure` -Use the `matcher` pattern to target specific tools whenever possible. A matcher with `'Bash'` only runs for Bash commands, while omitting the pattern runs your callbacks for every occurrence of the event. +Use the `matcher` pattern to target specific tools whenever possible. With a `'Bash'` matcher, your callbacks run for Bash commands. On Claude Code v2.1.314 or later, they also run on `PreToolUse` and `PermissionRequest` for Monitor commands, which they [can deny but not approve](</docs/en/hooks#match-monitor-commands>). With no matcher, they run for every occurrence of the event. ###
modified Automate actions with hooks View current →
--- a/hooks-guide.md +++ b/hooks-guide.md @@ -155,13 +155,14 @@ This command opens a dialog box rather than a notification in the corner of your screen, so the dialog can open behind your terminal window. Test the command directly in PowerShell first.If you run Claude Code inside WSL, `powershell.exe` must be available on your `PATH` through Windows interop. -The empty `matcher` fires on all notification types. To fire only on specific events, set it to one of these values: +The empty `matcher` fires on all notification types. To fire only on specific events, set it to a notification type, such as one of these: Matcher| Fires when ---|--- `permission_prompt`| Claude needs you to approve a tool use or a sandboxed command’s [network request](</docs/en/sandboxing#network-isolation>), and the prompt has waited about six seconds `idle_prompt`| Claude finished responding about 60 seconds ago and you haven’t typed since `auth_success`| Authentication completes +`auth_storage_failure`| Your sign-in completes, but Claude Code can’t save the new credentials to its [credential storage](</docs/en/authentication#credential-management>). Fires in place of `auth_success` `elicitation_dialog`| An MCP server opens an elicitation form and you haven’t typed for about six seconds `elicitation_url_dialog`| An MCP server asks you to open a browser URL and you haven’t typed for about six seconds `elicitation_complete`| An MCP server reports that a [URL-mode elicitation](</docs/en/hooks#elicitation-input>) is complete @@ -173,7 +174,7 @@ `quota_auto_resume_disabled`| Claude Code ends its wait for a claude.ai usage limit without continuing your task: [`autoContinueAtUsageLimit`](</docs/en/settings-reference#autocontinueatusagelimit>) turned off or the reset moved more than 24 hours away during a wait Claude Code started on its own, the continued task kept hitting the limit, or the continuation was blocked before it reached the model. Doesn’t fire when you press `Esc` or `Ctrl+C`, or pick **Don’t continue automatically** `plugin_notification`| A [mod](</docs/en/plugins/mods/api#show-something-without-starting-a-turn>) raises a notification with `$.ui.notify`. The hook’s `title` is the mod’s name unless the mod set one -Claude Code times `permission_prompt` differently in a terminal and in Claude Desktop, the VS Code extension, and other hosts that answer permission requests through the Agent SDK. See [when each notification type fires](</docs/en/hooks#notification>) for both timings. The `quota_auto_resume_fired`, `quota_auto_resume_stale`, and `quota_auto_resume_disabled` matchers require Claude Code v2.1.234 or later. In terminal sessions, `permission_prompt` for a sandboxed command’s network request requires Claude Code v2.1.246 or later. `agent_needs_input` for a teammate’s terminal setup question requires Claude Code v2.1.248 or later. Type `/hooks` at the Claude Code prompt and confirm the hook appears under `Notification`. +Claude Code times `permission_prompt` differently in a terminal and in Claude Desktop, the VS Code extension, and other hosts that answer permission requests through the Agent SDK. See [when each notification type fires](</docs/en/hooks#notification>) for both timings. The `quota_auto_resume_fired`, `quota_auto_resume_stale`, and `quota_auto_resume_disabled` matchers require Claude Code v2.1.234 or later. The `auth_storage_failure` matcher requires v2.1.288 or later. In terminal sessions, `permission_prompt` for a sandboxed command’s network request requires Claude Code v2.1.246 or later. `agent_needs_input` for a teammate’s terminal setup question requires Claude Code v2.1.248 or later. Type `/hooks` at the Claude Code prompt and confirm the hook appears under `Notification`. ### @@ -636,7 +637,7 @@ `SessionStart`| how the session started| `startup`, `resume`, `clear`, `compact`, `fork` `Setup`| which CLI flag triggered setup| `init`, `maintenance` `SessionEnd`| why the session ended| `clear`, `resume`, `logout`, `prompt_input_exit`, `other` -`Notification`| notification type| `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog`, `elicitation_url_dialog`, `elicitation_complete`, `elicitation_response`, `agent_needs_input`, `agent_completed`, `quota_auto_resume_fired`, `quota_auto_resume_stale`, `quota_auto_resume_disabled`, `plugin_notification` +`Notification`| notification type| `permission_prompt`, `idle_prompt`, `auth_success`, `auth_storage_failure`, `elicitation_dialog`, `elicitation_url_dialog`, `elicitation_complete`, `elicitation_response`, `agent_needs_input`, `agent_completed`, `quota_auto_resume_fired`, `quota_auto_resume_stale`, `quota_auto_resume_disabled`, `plugin_notification` `SubagentStart`| agent type| `general-purpose`, `Explore`, `Plan`, or custom agent names `PreCompact`, `PostCompact`| what triggered compaction| `manual`, `auto` `PreModelSwitch`, `PostModelSwitch`| canonical name of the model the session switches to, as described under [PreModelSwitch](</docs/en/hooks#premodelswitch>)| `claude-opus-5`, `claude-opus-4-6|claude-opus-5`, `.*opus.*`
modified Model configuration View current →
--- a/model-config.md +++ b/model-config.md @@ -484,8 +484,21 @@ * If both models flag the same request, you can edit the prompt and retry, or start a new session. * In [cloud sessions](</docs/en/claude-code-on-the-web>) on the mobile app, editing and retrying is not supported. Switch models, or continue the session from a desktop browser or the desktop app. * In [non-interactive mode](</docs/en/cli-reference#cli-flags>) and SDK integrations that can’t show the prompt, a flagged request ends the turn with a refusal instead. - * In a [subagent](</docs/en/sub-agents>), Claude Code doesn’t show the prompt, and a flagged request that would switch models re-runs on the fallback model. + * In a subagent that Claude starts with the [Agent tool](</docs/en/tools-reference#agent-tool-behavior>), Claude Code doesn’t pause to ask, and the subagent fails instead of switching models. See Subagents switch or fail without asking. * When the fallback target is blocked by `availableModels`, Claude Code doesn’t show the prompt. The flagged request ends with the refusal, the same as automatic fallback when the target is blocked. + +#### + +​ + +Subagents switch or fail without asking + +In a built-in or custom [subagent](</docs/en/sub-agents>) that Claude starts with the [Agent tool](</docs/en/tools-reference#agent-tool-behavior>), Claude Code doesn’t pause to ask at a flagged request. If a fallback model is available, the request re-runs on it or the subagent fails, according to your **Switch models when a message is flagged** choice in `/config`: + + * **Switch automatically** , or no choice yet: the request re-runs on the fallback model, and your session’s model is unchanged + * **Ask each time** : the subagent fails with [`Agent terminated early due to an API error`](</docs/en/errors#agent-terminated-early-due-to-an-api-error>) and the refusal message. Claude receives that error and decides what to do about the unfinished task. To let subagents switch models, choose **Switch automatically**. Your main conversation then switches without asking too. + +When no fallback model is available, the subagent fails the same way with either choice. Before v2.1.318, a subagent’s flagged request re-ran on an available fallback model whichever you chose. ####
modified Choose a permission mode View current →
--- a/permission-modes.md +++ b/permission-modes.md @@ -215,7 +215,7 @@ On [claude.ai/code](<https://claude.ai/code>), use the mode dropdown in the row under the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes: - * **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears only when your organization allows it and the selected model supports it. Bypass permissions isn’t available. + * **[Cloud sessions](</docs/en/claude-code-on-the-web>)** : Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears unless your organization turns it off, and on claude.ai/code it’s grayed out if the selected model doesn’t support it. Bypass permissions isn’t available. * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can’t select Bypass permissions from the app. To use Auto, the session has to meet the auto mode availability requirements. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>). * Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal. * Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
modified Plugins in the SDK View current →
--- a/plugins.md +++ b/plugins.md @@ -63,6 +63,14 @@ * **Absolute paths** : full file system paths (for example, `"/home/user/plugins/my-plugin"`) The path should point to the plugin’s root directory: the parent of `skills/`, `agents/`, `hooks/`, `commands/`, or `.claude-plugin/`. + +### + +​ + +Reload plugins in a running session + +To apply a change to a plugin’s skills, commands, agents, or hooks without starting a new session, call [`reloadPlugins()`](</docs/en/agent-sdk/typescript#query-object>) on the TypeScript SDK’s `Query` object. The Python SDK doesn’t expose an equivalent method; send [`/reload-plugins`](</docs/en/plugins/cli-reference#reload-plugins>) as a prompt in the session instead. ###
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, enabling fast mode 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 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. 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 @@ -2721,7 +2721,7 @@ Hook Usage Example -This example registers two hooks: one that blocks dangerous Bash commands like `rm -rf /`, and another that logs all tool usage for auditing. The security hook only runs on Bash commands (via the `matcher`), while the logging hook runs on all tools. +This example registers two hooks: one that blocks dangerous Bash commands like `rm -rf /`, and another that logs all tool usage for auditing. With its [`Bash` matcher](</docs/en/agent-sdk/hooks#matchers>), the security hook runs on Bash tool calls. The logging hook has no matcher, so it runs on every tool call. import asyncio from claude_agent_sdk import query, ClaudeAgentOptions, HookMatcher, HookContext @@ -3787,16 +3787,9 @@ `SandboxIgnoreViolations` -Configuration for ignoring specific sandbox violations. - - class SandboxIgnoreViolations(TypedDict, total=False): - file: list[str] - network: list[str] - -Property| Type| Default| Description ----|---|---|--- -`file`| `list[str]`| `[]`| File path patterns to ignore violations for -`network`| `list[str]`| `[]`| Network patterns to ignore violations for +Violations to leave out of the sandbox’s violation report. Each key matches part of a command, or `*` for every command, and each value lists text to match in a violation line: `{"*": ["/etc/hosts"]}` hides violations that mention `/etc/hosts`. A matching access is still blocked. See [`sandbox.ignoreViolations`](</docs/en/settings-reference#sandbox-ignoreviolations>). + + SandboxIgnoreViolations = dict[str, list[str]] ###
modified Customize sessions in self-hosted environments View current →
--- a/self-hosted-environments-configuration.md +++ b/self-hosted-environments-configuration.md @@ -34,7 +34,7 @@ `CLAUDE_CODE_REMOTE_SLACK_CHANNEL_ID`| For a Claude Tag session, the ID of the Slack channel or direct message that the session serves or that its thread is in, such as `C0123ABCDE`. A Slack timestamp identifies a message within one channel, so record this ID together with `CLAUDE_CODE_REMOTE_SLACK_THREAD_TS`. Unset for other sessions, and can be unset for a Claude Tag session too. `CLAUDE_SESSION_INGRESS_TOKEN_FILE`| Absolute path to a per-session file holding the current session JWT, kept fresh across token refreshes. Shell subprocesses read it for their `Authorization` header when downloading attachments the user added to the session. `exec` preserves the variable automatically; a wrapper that rebuilds the child’s environment must carry the variable over, or attachment downloads silently stop working. `CLAUDE_CONFIG_DIR`| Per-session Claude config directory, written at session start from the snapshot of the runner host’s config that the runner captures at startup; see Permissions and tool approval. Writes here are isolated to this session. The directory stays under `<base-dir>/_sessions/` after the session ends unless you start the runner with [`--remove-session-state`](</docs/en/self-hosted-environments-reference#runner-cli-flags>); see [Reuse a pre-warmed checkout](</docs/en/self-hosted-environments-deploy#reuse-a-pre-warmed-checkout>). -`CLAUDE_CODE_REMOTE_MCP_CONFIG`| Path to a file in `CLAUDE_CONFIG_DIR` holding the MCP server definitions that Anthropic’s control plane delivered for this session. If your wrapper rebuilds the child’s environment, carry this variable over. Without it, when the control plane updates the delivered servers, the child shuts down any stdio, HTTP, or SSE server your wrapper adds with [`--mcp-config`](</docs/en/cli-reference#cli-flags>) that isn’t in the update. Requires Claude Code v2.1.299 or later. +`CLAUDE_CODE_REMOTE_MCP_CONFIG`| Path to a file in `CLAUDE_CONFIG_DIR` holding the control plane’s delivered MCP servers. If your wrapper rebuilds the child’s environment, carry this variable, [`CLAUDE_CODE_REMOTE`](</docs/en/env-vars#variables>), and `CLAUDE_CODE_ENVIRONMENT_KIND` over unchanged; the runner sets all three. If `CLAUDE_CODE_REMOTE` arrives but this variable or `CLAUDE_CODE_ENVIRONMENT_KIND` doesn’t, the child stops stdio, HTTP, and SSE servers your wrapper adds with [`--mcp-config`](</docs/en/cli-reference#cli-flags>) that an update of the delivered servers omits. Requires Claude Code v2.1.299 or later. `ANTHROPIC_BASE_URL`| The API base URL the child will use, delivered by the control plane per session and normally `https://api.anthropic.com`. Don’t override it: the session’s inference credential is an Anthropic-issued OAuth token that other providers don’t accept. `CLAUDE_CODE_OAUTH_TOKEN`| The short-lived OAuth access token the child uses for model inference, with a lifetime of about 30 minutes. The runner re-mints it before expiry and delivers the rotation over the child’s stdin, so a wrapper that doesn’t keep stdin attached sees only the initial value. Don’t rely on your organization’s IP allowlist to bound this token’s use: treat it as a bearer credential that stays usable for roughly 30 minutes if it leaks, and don’t log it, write it to disk, or forward it outside the session container. `CLAUDE_RUNNER_ALIVE_EVERY_MS`| The runner sets how often, in milliseconds, the child reports that it’s alive when a [turn starts before the child initializes](</docs/en/self-hosted-environments-reference#session-startup-timeout>). If your wrapper rebuilds the child’s environment, carry this variable over, or the runner can release the session during that turn and log `no child output for <n> — releasing`. Requires v2.1.309 or later on the runner and child. @@ -817,14 +817,28 @@ A self-hosted session has no terminal attached, so an unanswered permission prompt stalls the turn until the user responds in the UI. Anthropic’s control plane sends each session’s tool list and permission rules with the work payload; the default configuration pre-approves routine tool calls, including `Bash`, and cloud sessions [pre-approve file edits regardless of mode](</docs/en/permission-modes#switch-permission-modes>). A call that nothing pre-approves prompts through the session UI. +### + +​ + +Pin a permission mode from your wrapper + Only pin auto mode on an environment whose session containers run with [default-deny network egress](</docs/en/self-hosted-environments-deploy#default-deny-egress>) and the rest of the [hardening section](</docs/en/self-hosted-environments-deploy#harden-your-deployment>) in place. Routine tool calls, including `Bash` network requests, run without a human in the loop on both the default pre-approved tool set and in auto mode, so the network boundary is what limits where those calls can reach. -To keep prompts to a minimum regardless of what the control plane sends, pin [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from your wrapper script or `command` hook. Auto mode lets sessions run without routine permission prompts: a separate classifier model reviews actions before they run and blocks the ones it rejects, and explicit ask rules still force a prompt; the permission modes page covers what the classifier checks. The runner appends server-computed flags before invoking the wrapper, and for single-value flags such as `--permission-mode` the parser honors the last occurrence, so a flag you append after `"$@"` overrides the server-sent value: +To start sessions in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) until claude.ai/code or another client sets a permission mode for them, pin it from your wrapper script or `command` hook. The runner invokes the wrapper with its own flags as arguments, and Claude Code applies the last `--permission-mode` on the command line, so append yours after `"$@"`: #!/bin/bash exec "$CLAUDE_RUNNER_CLAUDE_BIN" "$@" --permission-mode auto -To pre-approve specific tools instead, append `--allowed-tools` with your rules, for example `--allowed-tools "Bash(bazel *) Bash(yarn *) mcp__internal__*"`. List flags such as `--allowed-tools` and `--disallowed-tools` accumulate across occurrences rather than overriding, so your rules apply on top of any rules the control plane sends. To narrow, append `--disallowed-tools`, which denies tools even if another rule allows them. +Once a client sets a mode, your appended mode no longer applies, even after the session restarts on the runner. claude.ai/code, for example, sets one with the session’s first message when its mode dropdown shows Auto, or when someone picked a mode there. In auto mode, a separate classifier model reviews actions before they run and blocks the ones it rejects. An explicit ask rule still forces a prompt. A call that a [deny rule](</docs/en/permissions#manage-permissions>) blocks stays blocked in every mode. + +### + +​ + +Pre-approve specific tools + +To pre-approve specific tools, append `--allowed-tools` with your rules after `"$@"` in your wrapper script, for example `--allowed-tools "Bash(bazel *) Bash(yarn *) mcp__internal__*"`. List flags such as `--allowed-tools` and `--disallowed-tools` accumulate across occurrences rather than overriding, so your rules apply on top of any rules the control plane sends. To narrow, append `--disallowed-tools`, which denies tools even if another rule allows them. ###
modified All settings View current →
--- a/settings-reference.md +++ b/settings-reference.md @@ -462,7 +462,7 @@ `fastMode` -Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available, for interactive work like rapid iteration or live debugging where you want speed at a higher cost per token. You don’t usually edit this key by hand: running `/fast` writes `fastMode: true` to `~/.claude/settings.json`, and running it again to turn fast mode off removes the key. Fast mode runs only on Opus 5.5, Opus 5, and Opus 4.8: turning it on from another model switches you to Opus, and switching to an unsupported model turns it 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. Only 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>). * **Scope** : `Any file` * **Type** : Boolean @@ -483,12 +483,12 @@ `fastModePerSessionOptIn` -Normally, running `/fast` saves `fastMode` to a person’s user settings, so fast mode is on at the start of every later session. Set this key to `true` to stop that: a saved `fastMode: true` no longer turns fast mode on at session start, and each person has to run `/fast` in each session they want it. Claude Code leaves the `fastMode` key in their file, so turning this key off restores the old behavior. Owners on Team or Enterprise plans can deploy it organization-wide through [server-managed settings](</docs/en/server-managed-settings>). When managed settings set the key, `/fast on` is refused outside interactive terminal sessions and reports that your organization has disabled fast mode. That covers [non-interactive mode](</docs/en/headless>), the [VS Code extension](</docs/en/vs-code>), and [cloud sessions](</docs/en/claude-code-on-the-web>). +Normally, running `/fast` saves `fastMode` to a person’s user settings, so new sessions on a supported model start with fast mode on. Set this key to `true` to stop that: a saved `fastMode: true` no longer turns fast mode on at session start, and each person runs `/fast` in each session they want it. Claude Code leaves `fastMode` in their file, so turning this key off restores the old behavior. Owners on Team or Enterprise plans can deploy it organization-wide through [server-managed settings](</docs/en/server-managed-settings>). When managed settings set the key, `/fast on` is refused outside interactive terminal sessions and reports that your organization has disabled fast mode. That covers [non-interactive mode](</docs/en/headless>), the [VS Code extension](</docs/en/vs-code>), and [cloud sessions](</docs/en/claude-code-on-the-web>). * **Scope** : `Any file` * **Type** : Boolean * `true`: a saved `fastMode: true` no longer turns fast mode on at session start, so each person runs `/fast` in each session they want it; a `fastMode: true` passed with `--settings` still counts for that session unless managed settings set this key - * `false`: a saved `fastMode: true` turns fast mode on at the start of every later session + * `false`: a saved `fastMode: true` turns fast mode on at the start of each new session on a supported model * **Default** : `false` settings.json @@ -5714,7 +5714,7 @@ * **Scope** : `Any file`. Claude Code also reads a value left in `~/.claude.json` by older versions. * **Type** : string, one of: - * `"auto"`: Claude Code sends a desktop notification in iTerm2, Ghostty, and Kitty, rings the bell in Terminal.app only when its audible bell is off, and does nothing elsewhere + * `"auto"`: Claude Code sends a desktop notification when it detects iTerm2, Ghostty, or Kitty, rings the bell in Terminal.app only when its audible bell is off, and does nothing elsewhere * `"terminal_bell"`: Claude Code rings the bell character in any terminal * `"iterm2"`: Claude Code sends an iTerm2 desktop notification * `"iterm2_with_bell"`: Claude Code sends an iTerm2 desktop notification and rings the bell @@ -5729,7 +5729,7 @@ "preferredNotifChannel": "terminal_bell" } -With `"auto"`, Claude Code sends a desktop notification in iTerm2, Ghostty, and Kitty. In Terminal.app it rings the bell character only when you have turned Terminal’s audible bell off, and in other terminals it does nothing. Set `"terminal_bell"` to ring the bell character in any terminal. See [Get a terminal bell or notification](</docs/en/terminal-config#get-a-terminal-bell-or-notification>). +With `"auto"`, Claude Code sends a desktop notification when it detects iTerm2, Ghostty, or Kitty. In Terminal.app it rings the bell character only when you have turned Terminal’s audible bell off, and in other terminals it does nothing. Set `"terminal_bell"` to ring the bell character in any terminal. See [Get a terminal bell or notification](</docs/en/terminal-config#get-a-terminal-bell-or-notification>). ### @@ -6681,7 +6681,7 @@ `autoInstallIdeExtension` -Let [`/ide`](</docs/en/commands>) install the Claude Code IDE extension in a running VS Code, Cursor, or Devin Desktop when you run the command from an external terminal. Claude Code doesn’t install the extension when you start it. Appears in `/config` as **Auto-install IDE extension** when you run Claude Code inside a VS Code or JetBrains terminal. +Let [`/ide`](</docs/en/commands>) install the Claude Code IDE extension in a running VS Code, Cursor, or Devin Desktop when you run the command from an external terminal. Claude Code doesn’t install or update the extension when you start `claude`. Before v2.1.318, Claude Code installs or updates the extension when you start `claude` in one of those editors’ terminals, unless this key is `false`. Appears in `/config` as **Auto-install IDE extension** when you run Claude Code inside a VS Code or JetBrains terminal. * **Scope** : `Global config` * **Type** : Boolean
modified Claude Code in Slack View current →
--- a/slack.md +++ b/slack.md @@ -12,9 +12,8 @@ Use cases - * **Bug investigation and fixes** : Ask Claude to investigate and fix bugs as soon as they’re reported in Slack channels. - * **Quick code reviews and modifications** : Have Claude implement small features or refactor code based on team feedback. - * **Collaborative debugging** : When team discussions provide crucial context (for example, error reproductions or user reports), Claude can use that information to inform its debugging approach. + * **Bug investigation and fixes** : Describe a bug and ask Claude to investigate and fix it. + * **Quick code reviews and modifications** : Have Claude implement small features or refactor code. * **Parallel task execution** : Kick off coding tasks in Slack while you continue other work, receiving notifications when complete. ## @@ -107,7 +106,10 @@ Context gathering -**From threads** : When you @mention Claude in a thread, it gathers context from all messages in that thread to understand the full conversation. **From channels** : When mentioned directly in a channel, Claude looks at recent channel messages for relevant context. This context helps Claude understand the problem, select the appropriate repository, and inform its approach to the task. + * **From threads** : when you first @mention Claude in a thread, it gathers context from your messages and its own in that thread. + * **From channels** : when you @mention Claude directly in a channel, it looks at your recent messages and its own in that channel, and at the channel’s name, topic, and description. + +This context helps Claude understand the problem, select the appropriate repository, and inform its approach to the task. To give Claude something a teammate wrote, such as an error report, paste its text into the message where you @mention Claude. When @Claude is invoked in Slack, Claude is given access to the conversation context to better understand your request. Claude may follow directions from other messages in the context, so users should make sure to only use Claude in trusted Slack conversations. @@ -210,9 +212,8 @@ Writing effective requests * **Be specific** : Include file names, function names, or error messages when relevant. - * **Provide context** : Mention the repository or project if it’s not clear from the conversation. + * **Provide context** : Mention the repository or project. * **Define success** : Explain what “done” looks like. Should Claude write tests? Update documentation? Create a PR? - * **Use threads** : Reply in threads when discussing bugs or features so Claude can gather the full context. ### @@ -220,7 +221,7 @@ When to use Slack vs. web -**Use Slack when** : Context already exists in a Slack discussion, you want to start a task asynchronously, or you’re collaborating with teammates who need visibility. **Use the web directly when** : You need to upload files, want real-time interaction during development, or are working on longer, more complex tasks. +**Use Slack when** : You want to start a task asynchronously, or you’re collaborating with teammates who need visibility. **Use the web directly when** : You need to upload files, want real-time interaction during development, or are working on longer, more complex tasks. ##
modified Configure your terminal for Claude Code View current →
--- a/terminal-config.md +++ b/terminal-config.md @@ -62,7 +62,7 @@ When Claude finishes a task or pauses for a permission prompt, and you appear to be away from the terminal, it fires a notification event. See [when each notification type fires](</docs/en/hooks#notification>) for the exact timing. Surfacing this as a terminal bell or desktop notification lets you switch to other work while a long task runs. By default, Claude Code sends a desktop notification in some terminals, and a bell character or nothing in others: - * **Ghostty, Kitty, and iTerm2** : a desktop notification, which iTerm2 shows only after you turn on its alert settings. + * **Ghostty, Kitty, and iTerm2, when Claude Code detects them** : a desktop notification, which iTerm2 shows only after you turn on its alert settings. * **Apple Terminal** : no sound; a silent bell character when Claude Code finds “Audible bell” off in the front Terminal window’s profile, otherwise nothing. That bell character shows as a window flash, or a Dock bounce while Terminal is in the background, if that profile’s “Visual bell” or Dock bounce option is on. * **Other terminals** : nothing. @@ -74,7 +74,7 @@ "preferredNotifChannel": "terminal_bell" } -The desktop notification reaches your local machine over SSH, so a remote session can still alert you. Ghostty and Kitty forward it to your OS notification center without further setup. iTerm2 requires you to enable forwarding: +Over SSH from a terminal running outside tmux, set [`preferredNotifChannel`](</docs/en/settings-reference#preferrednotifchannel>) to your local terminal’s value, `"iterm2"`, `"kitty"`, or `"ghostty"`, on the machine running Claude Code. The desktop notification then reaches your local machine. Ghostty and Kitty forward it to your OS notification center without further setup. iTerm2 requires you to enable forwarding: 1 @@ -131,7 +131,7 @@ Configure tmux -When Claude Code runs inside tmux, by default Shift+Enter submits instead of inserting a newline, and desktop notifications and the [progress bar](</docs/en/settings-reference#terminalprogressbarenabled>) never reach the outer terminal. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to apply them to the running server: +When Claude Code runs inside tmux, by default Shift+Enter submits instead of inserting a newline, and desktop notifications don’t reach the outer terminal. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to apply them to the running server: ~/.tmux.conf @@ -140,7 +140,7 @@ set -s extended-keys on set -as terminal-features 'xterm*:extkeys' -The `allow-passthrough` line lets notifications and progress updates reach the outer terminal instead of being swallowed by tmux. The `extended-keys` lines let tmux distinguish Shift+Enter from plain Enter so the newline shortcut works. A [mod’s `Image`](</docs/en/plugins/mods/reference#elements>) needs the `allow-passthrough` and `focus-events` lines, along with the other [requirements for drawing inside tmux](</docs/en/plugins/mods/gallery#draw-an-image-inside-tmux>). After you add the lines, also detach from tmux, attach again, and restart Claude Code. +To send notifications from a visible pane to the outer terminal, keep the `allow-passthrough` line and set [`preferredNotifChannel`](</docs/en/settings-reference#preferrednotifchannel>) to `"iterm2"`, `"kitty"`, or `"ghostty"`. With this sample, a pane in a window you aren’t viewing sends none. The `extended-keys` lines let tmux distinguish Shift+Enter from plain Enter so the newline shortcut works. A [mod’s `Image`](</docs/en/plugins/mods/reference#elements>) needs the `allow-passthrough` and `focus-events` lines, along with the other [requirements for drawing inside tmux](</docs/en/plugins/mods/gallery#draw-an-image-inside-tmux>). After you add the lines, also detach from tmux, attach again, and restart Claude Code. ##
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -2029,12 +2029,17 @@ `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 -The same pair of fields appears on `SDKSystemMessage` and on the `SDKControlInitializeResponse`, so you can read the fast mode state before the first turn. The `origin` field forwards the `SDKMessageOrigin` of the user message that triggered this result. Results that carry `origin: { kind: "task-notification" }` include: +The same pair of fields appears on `SDKSystemMessage` and on the `SDKControlInitializeResponse`, so you can read the fast mode state before the first turn. The `origin` field holds the `SDKMessageOrigin` that Claude Code assigned to the user message that triggered this result, not a copy of the `origin` you sent. Results that carry `origin: { kind: "task-notification" }` include: * **Synthetic follow-up turns** : when the SDK injects a synthetic follow-up turn, such as for a finished background task, the resulting `SDKResultMessage` carries this kind * **Fired scheduled tasks and messages from other sessions** : cloud scheduled tasks whose trigger fired and server-verified messages from your other sessions arrive with this kind too, each with the `subkind` described in Task-notification subkinds -Check `kind` to distinguish results that answer your prompt from injected follow-ups before routing or suppressing them. If your application declares scheduled runs, their results carry `kind: "task-notification"` too, so don’t suppress on `kind` alone. When several background-task completions are queued together, Claude Code can answer them in one turn rather than one turn each. Each completion still produces its own result with this origin. All but the last of the completions Claude Code answers together produce empty results with `num_turns: 0`, in order, and the last one’s result carries the turn that answers them all. The field is absent for results emitted before any user turn, such as startup errors. When a `PreToolUse` hook returns `permissionDecision: "defer"`, the result has `stop_reason: "tool_deferred"` and `deferred_tool_use` carries the pending tool’s `id`, `name`, and `input`. Read this field to surface the request in your own UI, then resume with the same `session_id` to continue. See [Defer a tool call for later](</docs/en/hooks#defer-a-tool-call-for-later>) for the full round trip. +Check `kind` to distinguish results that answer your prompt from injected follow-ups before routing or suppressing them. If your application declares scheduled runs, their results carry `kind: "task-notification"` too, so don’t suppress on `kind` alone. When several background-task completions are queued together, Claude Code can answer them in one turn rather than one turn each. Each completion still produces its own result with this origin. All but the last of the completions Claude Code answers together produce empty results with `num_turns: 0`, in order, and the last one’s result carries the turn that answers them all. `origin` is absent when Claude Code assigned none, such as: + + * On a turn you start with a message that has neither `origin` nor `isSynthetic` + * On results emitted before any user turn, such as startup errors + +When a `PreToolUse` hook returns `permissionDecision: "defer"`, the result has `stop_reason: "tool_deferred"` and `deferred_tool_use` carries the pending tool’s `id`, `name`, and `input`. Read this field to surface the request in your own UI, then resume with the same `session_id` to continue. See [Defer a tool call for later](</docs/en/hooks#defer-a-tool-call-for-later>) for the full round trip. #### @@ -2539,7 +2544,7 @@ `SDKMessageOrigin` -Provenance of a user-role message. This appears as `origin` on `SDKUserMessage` and is forwarded onto the corresponding `SDKResultMessage` so you can tell what triggered a given turn. +Provenance of a user-role message. This appears as `origin` on `SDKUserMessage`. The `SDKResultMessage` for a turn carries the `origin` that Claude Code assigned, so you can tell what triggered that turn. type SDKMessageOrigin = | { kind: "human" } @@ -2564,15 +2569,22 @@ | { kind: "auto-continuation" } | { kind: "unclassified" }; +Your application can set these kinds of `origin` on a message it sends: + + * `{ kind: "human" }`: what the user typed + * `{ kind: "task-notification", subkind: "scheduled-trigger" }`: a scheduled run you declare + +Leave the other kinds to Claude Code and Anthropic servers. If you set one of those kinds, Claude reads the message as the user’s by default. To send text the user didn’t write, such as a fetched page or another agent’s output, send it as its own message with `isSynthetic` set to `true` and `origin` unset. Also set `client_composed` to `true`, so that text starting with `/` doesn’t run as a command. + `kind`| Meaning ---|--- -`human`| Direct input from the end user. If your application forwards what the user typed as a user message, set its `origin` to `{ kind: "human" }` explicitly: Claude Code treats a user message with no `origin` as unattributed, and checks that require a human-typed prompt, such as the [`ultracode` workflow keyword](</docs/en/workflows#ask-for-a-workflow-in-your-prompt>), don’t accept it. Before v2.1.210, Claude Code treated an absent `origin` on a user message as human input. +`human`| Direct input from the end user. If your application forwards what the user typed as a user message, set its `origin` to `{ kind: "human" }`. Without that `origin`, Claude still reads the message as the user’s, but checks that require a human-typed prompt, such as the [`ultracode` workflow keyword](</docs/en/workflows#ask-for-a-workflow-in-your-prompt>), don’t accept the message. `channel`| Message arriving on a [channel](</docs/en/channels>). `server` is the source MCP server name. -`peer`| Message from another agent: an in-process [teammate](</docs/en/agent-teams>) or a [cross-session peer](</docs/en/cross-session-messaging>), another of your Claude Code sessions. See Peer origin fields for the per-field semantics and the trust model. +`peer`| Message from another Claude Code agent: an in-process [teammate](</docs/en/agent-teams>) or a [cross-session peer](</docs/en/cross-session-messaging>), another of your Claude Code sessions. The [desktop app](</docs/en/desktop#work-across-sessions>), which relays such messages between your sessions, declares this kind with `fromMode`. To relay another agent’s output from your own application, set `isSynthetic` and `client_composed` instead. See Peer origin fields for the per-field semantics and the trust model. `task-notification`| Synthetic turn injected for a delivery that arrives without a fresh user prompt, such as a finished background task; see `SDKTaskNotificationMessage` for that arm. A prompt your application declares as a scheduled run carries this kind too. The optional `subkind` marks what raised the notification. See Task-notification subkinds. `coordinator`| Message from a team coordinator in an [agent team](</docs/en/agent-teams>). `auto-continuation`| Synthetic turn injected when the session continues without fresh user input, such as a command result that triggers a follow-up prompt. -`unclassified`| Injected turn whose origin couldn’t be determined. Requires Claude Code v2.1.223 or later. When Claude Code receives an `SDKUserMessage` with `isSynthetic: true` and can’t classify it as any other `kind`, it sets this kind as the message arrives and frames the turn to the model as a non-user source rather than treating it as human input. Your application shouldn’t set this value. +`unclassified`| Message marked as not coming from the user, such as an `SDKUserMessage` you send with `isSynthetic: true`. Requires Claude Code v2.1.223 or later. ### @@ -2604,7 +2616,7 @@ A `peer` origin identifies which agent sent the message: an in-process [teammate](</docs/en/agent-teams>) sending to `main` with `SendMessage`, or a [cross-session peer](</docs/en/cross-session-messaging>), another of your Claude Code sessions. Cross-session peers require Claude Code v2.1.224 or later on macOS and Linux; see [cross-session messaging availability](</docs/en/cross-session-messaging#availability>) for the native Windows requirement. A cross-session peer can run on the same machine, or on [another of your machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>) when its message arrives through [Remote Control](</docs/en/remote-control>). * `from`: the teammate’s name, or the sender address for a cross-session peer. For a [one-way cross-machine message](</docs/en/cross-session-messaging#message-sessions-on-other-machines>), the sender has no reply address and `from` is `"unknown"`. The value is sender-authored; `verifiedPeerPid` is the verified identity. - * `fromMode`: the sending session’s permission class, `bypass` or `prompting`, declared by a host that relays a peer message between your sessions, such as the [desktop app](</docs/en/desktop#work-across-sessions>). Claude Code reads it in the receiving session when it applies the [inbound controls](</docs/en/cross-session-messaging#control-inbound-messages>). Requires Agent SDK v0.3.234 or later. + * `fromMode`: the sending session’s permission class, `bypass` or `prompting`. Claude Code reads it in the receiving session when it applies the [inbound controls](</docs/en/cross-session-messaging#control-inbound-messages>). Requires Agent SDK v0.3.234 or later. * `senderTaskId`: the teammate’s task ID. Absent for a cross-session peer. * `name`: the sender’s display name, normalized by Claude Code: it strips Unicode control, format, surrogate, and line or paragraph separator code points, then trims the result and caps it at 64 code points with an ellipsis. Requires Claude Code v2.1.205 or later. * `body`: the decoded message body with the peer envelope stripped, byte-exact with what the model sees. Present for a single teammate message, absent when several are merged; for a cross-session peer, present only when the turn is exactly one peer envelope formed by Claude Code. Render `name` and `body` instead of re-parsing the message text. Before v2.1.299, merged messages kept the first message’s `body`. Requires Claude Code v2.1.205 or later. @@ -6384,7 +6396,7 @@ `allowUnsandboxedCommands`| `boolean`| `true`| Allow the model to request running commands outside the sandbox. When `true`, the model can set `dangerouslyDisableSandbox` in tool input, which falls back to the permissions system `network`| `SandboxNetworkConfig`| `undefined`| Network-specific sandbox configuration `filesystem`| `SandboxFilesystemConfig`| `undefined`| Filesystem-specific sandbox configuration for read/write restrictions -`ignoreViolations`| `Record<string, string[]>`| `undefined`| Map of command substrings, or `*` for every command, to substrings of the violation text to ignore, such as `{ "*": ['/etc/hosts'] }`; see [`sandbox.ignoreViolations`](</docs/en/settings-reference#sandbox-ignoreviolations>) +`ignoreViolations`| `Record<string, string[]>`| `undefined`| Violations to leave out of the sandbox’s violation report. Each key matches part of a command, or `*` for every command, and each value lists text to match in a violation line: `{ "*": ['/etc/hosts'] }` hides violations that mention `/etc/hosts`. See [`sandbox.ignoreViolations`](</docs/en/settings-reference#sandbox-ignoreviolations>) `enableWeakerNestedSandbox`| `boolean`| `false`| Enable a weaker nested sandbox for compatibility `allowNestedUserNamespaces`| `boolean`| `false`| Let sandboxed commands on Linux and WSL2 create user namespaces. Before you set it to `true`, read [`sandbox.allowNestedUserNamespaces`](</docs/en/settings-reference#sandbox-allownestedusernamespaces>), which covers the tools that need it and the security boundary you turn off. Requires Claude Code v2.1.305 or later `ripgrep`| `{ command: string; args?: string[] }`| `undefined`| Custom ripgrep binary configuration for sandbox environments
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -854,9 +854,9 @@ Run CLI in VS Code -To use the CLI while staying in VS Code, press `Ctrl+`` on Windows/Linux or `Cmd+`` on Mac to open the integrated terminal, then run `claude`. Starting `claude` doesn’t install the extension. Without it, `/ide` in the integrated terminal reports “No available IDEs detected” and `/status` shows the IDE as “Not connected”. To get features like diff viewing and diagnostic sharing, connect the CLI to the extension from the integrated terminal or an external terminal: - - * **Integrated terminal** : install the extension, then start `claude`. The CLI connects automatically. +To use the CLI while staying in VS Code, press `Ctrl+`` on Windows/Linux or `Cmd+`` on Mac to open the integrated terminal, then run `claude`. To get features like diff viewing and diagnostic sharing, connect the CLI to the extension from the integrated terminal or an external terminal: + + * **Integrated terminal** : install the extension, then start `claude`. The CLI connects automatically. Claude Code v2.1.318 or later doesn’t install the extension for you, so until you install it, `/ide` reports “No available IDEs detected” and `/status` shows the IDE as “Not connected”. * **External terminal** : run `/ide` inside Claude Code to connect to VS Code. If VS Code is running without the extension, `/ide` installs it, unless you turned off [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>). Installing the extension does not put `claude` on your shell PATH. The extension bundles a private copy of the CLI for its chat panel, but typing `claude` in a terminal requires the [standalone CLI install](</docs/en/setup>). Run the install once and the commands on this page, including `claude mcp add` and `claude --resume`, work in any terminal. If `claude` is still not found after installing, [verify your PATH](</docs/en/troubleshoot-install#verify-your-path>). @@ -1149,7 +1149,18 @@ 2. Search for “Claude Code” 3. Click **Uninstall** -The extension stays uninstalled when you start `claude`. If you run `/ide` from an external terminal while VS Code is running, Claude Code reinstalls it. To stop that, set [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false` in `~/.claude.json`, or turn off **Auto-install IDE extension** in `/config` from the integrated terminal. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) environment variable to `1`. To also remove extension data and reset all settings, delete the extension’s storage directory for your platform. On macOS: +If you do either of these after uninstalling, the extension comes back: + + * Run `/ide` from an external terminal while VS Code is running + * Start `claude` in the integrated terminal on a Claude Code version before v2.1.318 + +To keep the extension from coming back, do one of these, then uninstall it again if it already came back: + + * Set [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false` in `~/.claude.json` + * Set [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars#variables>) to `1` under `env` in a [settings file](</docs/en/env-vars#in-settings-files>) + * In the integrated terminal, turn off **Auto-install IDE extension** in `/config` + +To also remove extension data and reset all settings, delete the extension’s storage directory for your platform. On macOS: rm -rf ~/Library/"Application Support"/Code/User/globalStorage/anthropic.claude-code
modified Get started with Claude Code in the cloud View current →
--- a/web-quickstart.md +++ b/web-quickstart.md @@ -140,7 +140,7 @@ The [permission mode control](</docs/en/permission-modes#switch-permission-modes>) shows the permission mode the session will run in: - * **Auto** : a classifier reviews Claude’s actions instead of asking you. Appears when your organization allows auto mode and the selected model supports it + * **Auto** : a classifier reviews Claude’s actions instead of asking you. Appears unless your organization turns off [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>). On claude.ai/code, if it’s grayed out, select a model that supports auto mode * **Accept edits** : Claude makes changes and pushes a branch without stopping for approval * **Plan** : Claude proposes an approach and waits for you to approve it before editing files @@ -288,13 +288,13 @@ Setup script failed -The setup script exited with a non-zero status, which blocks the session from starting. Common causes: +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. * 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. -To debug, add `set -x` at the top of the script to see which command failed. For non-critical commands, append `|| true` so they don’t block session start. +To debug, add `set -x` at the top of the script to see which command failed. For non-critical commands, append `|| true` so they don’t fail the script. After you fix the cause, start a new session so the script runs again. If what failed to start was a run of a [cloud scheduled task](</docs/en/routines>), click **Run now** on the task’s detail page instead of starting a new session. ###