modified Set up Claude Code for your organization View current →
--- a/admin-setup.md +++ b/admin-setup.md @@ -188,6 +188,7 @@ * [Server-managed settings](</docs/en/server-managed-settings>): deliver managed policy from the Claude admin console * [All settings](</docs/en/settings-reference>): every setting key, with where it goes and an example * [Which value Claude Code uses](</docs/en/settings#which-value-claude-code-uses>): the precedence rules across managed, project, local, and user settings + * [Manage plugins for your organization](</docs/en/plugins/org>): install shared plugins on every machine through managed settings * [Monorepos and large repos](</docs/en/large-codebases>): per-directory configuration patterns for organizations deploying into a monorepo * [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>): provider-specific deployment * [Claude Enterprise Administrator Guide](<https://claude.com/resources/tutorials/claude-enterprise-administrator-guide>): SSO, SCIM, seat management, and rollout playbook
modified How the agent loop works View current →
--- a/agent-loop.md +++ b/agent-loop.md @@ -29,7 +29,7 @@ 3. **Turn 3:** Claude calls `Edit` to fix `auth.ts`, then calls `Bash` to re-run `npm test`. All three tests pass. The SDK yields an `AssistantMessage` for each call. 4. **Final turn:** Claude produces a text-only response with no tool calls: “Fixed the auth bug, all three tests pass now.” The SDK yields a final `AssistantMessage` with this text, then a `ResultMessage` with the same text plus cost and usage. -That was four turns: three with tool calls, one final text-only response. You can cap the loop with `max_turns` / `maxTurns`, which counts tool-use turns only. For example, `max_turns=2` in the loop above would have stopped before the edit step. You can also use `max_budget_usd` / `maxBudgetUsd` to cap turns based on a spend threshold. Without limits, the loop runs until Claude finishes on its own, which is fine for well-scoped tasks but can run long on open-ended prompts (“improve this codebase”). Setting a budget is a good default for production agents. See Turns and budget below for the option reference. +That was four turns: three with tool calls, one final text-only response. You can cap the loop with `max_turns` / `maxTurns`. Count each turn with tool calls, plus one for the final text-only response. Without that extra turn, the run ends with a `ResultMessage` of subtype `error_max_turns` and no final response. For example, `max_turns=2` in the loop above would have stopped before the edit step. You can also use `max_budget_usd` / `maxBudgetUsd` to cap turns based on a spend threshold. Without limits, the loop runs until Claude finishes on its own, which is fine for well-scoped tasks but can run long on open-ended prompts (“improve this codebase”). Setting a budget is a good default for production agents. See Turns and budget below for the option reference. ## @@ -199,7 +199,7 @@ Option| What it controls| Default ---|---|--- -Max turns (`max_turns` / `maxTurns`)| Maximum tool-use round trips| No limit +Max turns (`max_turns` / `maxTurns`)| Maximum number of turns| No limit Max budget (`max_budget_usd` / `maxBudgetUsd`)| Estimated spend at which the loop stops| No limit When either limit is hit, the SDK returns a `ResultMessage` with a corresponding error subtype (`error_max_turns` or `error_max_budget_usd`). See Handle the result for how to check these subtypes and [`ClaudeAgentOptions`](</docs/en/agent-sdk/python#claudeagentoptions>) / [`Options`](</docs/en/agent-sdk/typescript#options>) for syntax. The budget cap covers [subagents](</docs/en/agent-sdk/subagents>): their spend counts toward the total. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops any background subagents still running. The cap-enforcement behaviors require Claude Code v2.1.217 or later. With [streaming input](</docs/en/agent-sdk/streaming-vs-single-mode>), a message that is still queued when a turn ends at the max-turns limit stays queued. Claude Code doesn’t add it to that turn’s last model call. It starts a new turn for the message, and the max-turns count starts over for that turn. The budget total keeps accumulating across messages, and once spend reaches `maxBudgetUsd`, later messages in the same conversation end with the `error_max_budget_usd` result. A [`/clear`](</docs/en/agent-sdk/cost-tracking>) starts the budget over.
modified Manage multiple agents with agent view View current →
--- a/agent-view.md +++ b/agent-view.md @@ -266,7 +266,7 @@ Bring back a past session -To bring a session back on Claude Code v2.1.212 or later, type `/resume` in the dispatch input. A picker opens with past sessions of the repository you opened agent view from, newest first, including sessions you deleted from the list. Sessions that already have a row aren’t listed. Press `Enter` to resume the selected session as a background session, so it rejoins the list as a row. `/resume` fails with `isn't available in agent view` when: +To bring a session back, type `/resume` in the dispatch input. A picker opens with past sessions of the repository you opened agent view from, newest first, including sessions you deleted from the list. Sessions that already have a row aren’t listed. Press `Enter` to resume the selected session as a background session, so it rejoins the list as a row. `/resume` fails with `isn't available in agent view` when: * `/resume` names an id or a search term * the view is scoped with `--cwd` @@ -360,7 +360,7 @@ * `/logout` signs you out * `/model`, `/effort`, and `/fast` set what the sessions you dispatch next start with. `/effort` and `/fast` require Claude Code v2.1.299 or later. * `/login` opens the sign-in dialog so you can sign in again without attaching to a session - * A bare `/resume`, or its `/continue` alias, opens a picker of the repository’s past sessions to bring one back as a background session. Requires Claude Code v2.1.212 or later + * A bare `/resume`, or its `/continue` alias, opens a picker of the repository’s past sessions to bring one back as a background session Skills, your own commands, and prompt-expanding built-ins such as `/init` are sent to a new background session as its first prompt. The hint `isn't available in agent view` means the built-in command you entered didn’t run. To run it, attach to a session and enter it there. Everything you typed stays in the input next to the hint so you can edit it. Packaging a recurring task as a [skill](</docs/en/skills>) lets you start the same workflow from agent view repeatedly without retyping the prompt. When the same `@name` matches both a subagent and a sibling repository, the subagent takes precedence. The bare first-word match also applies, so a prompt that happens to begin with one of your subagent names dispatches that subagent rather than treating the word as plain text. Use the `@` form when you want to be explicit, or start the prompt with a different word to avoid the match. @@ -404,12 +404,22 @@ Copy the session with /fork -Run `/fork` to copy the current conversation into a new background session while the original keeps running. The copy starts with everything in the conversation up to that point; see the bullets below for where the copy runs. It also carries over the model, permission mode, effort level, and any directories or “don’t ask again” permission grants you added during the session. The copy appears as its own row in agent view. After the fork, the two conversations are independent: nothing the copy does enters the original conversation on its own, though in sessions where [cross-session messaging](</docs/en/cross-session-messaging>) is enabled, either session’s Claude can explicitly message the other. When agent view is turned off, `/fork` starts a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) instead of copying the session. Pass a prompt such as `/fork open a draft pull request with the work so far` and the copy starts working on it immediately. Without a prompt the copy waits for its first instruction: select its row in `claude agents` and press `Space` to send one, or run `claude attach <id>`. The selected row shows `space to send it a prompt` while it waits. The `/fork` confirmation is one line showing the copy’s state, such as `session running`, the name of its agent-view row, and its session ID for `claude attach`. Click the name to switch into the copy: this session moves to the background, the same as pressing `←`, and agent view opens the copy’s session. Except when the copy edits in place, Claude Code instructs it to create a worktree of its own before making code changes. Outside a git repository, only a copy moved out of a hook-created worktree gets the instruction; with no [`WorktreeCreate` hook](</docs/en/hooks#worktreecreate>), the copy edits in place. A copy moved out of your worktree is also told never to edit, run commands in, or enter that worktree, whatever the isolation setting. Where the copy starts depends on where the current session is running: +Run `/fork` to copy the current conversation into a new background session while the original keeps running. The copy starts with everything in the conversation up to that point; see the bullets below for where the copy runs. It also carries over the model, permission mode, effort level, and any directories or “don’t ask again” permission grants you added during the session. The copy appears as its own row in agent view. After the fork, the two conversations are independent: nothing the copy does enters the original conversation on its own, though in sessions where [cross-session messaging](</docs/en/cross-session-messaging>) is enabled, either session’s Claude can explicitly message the other. When agent view is turned off, `/fork` starts a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) instead of copying the session. + +##### Prompt the copy and open its session + +Pass a prompt such as `/fork open a draft pull request with the work so far` and the copy starts working on it immediately. Without a prompt the copy waits for its first instruction: select its row in `claude agents` and press `Space` to send one, or run `claude attach <id>`. The selected row shows `space to send it a prompt` while it waits. The `/fork` confirmation is one line showing the copy’s state, such as `session running`, the name of its agent-view row, and its session ID for `claude attach`. Click the name to switch into the copy: this session moves to the background, the same as pressing `←`, and agent view opens the copy’s session. + +##### Where the copy runs + +Except when the copy edits in place, Claude Code instructs it to create a worktree of its own before making code changes. Outside a git repository, only a copy moved out of a hook-created worktree gets the instruction; with no [`WorktreeCreate` hook](</docs/en/hooks#worktreecreate>), the copy edits in place. A copy moved out of your worktree is also told never to edit, run commands in, or enter that worktree, whatever the isolation setting. Where the copy starts depends on where the current session is running: * Like any dispatched session, the copy moves into its own worktree before editing files. In that case the confirmation doesn’t mention where the copy runs. * When your session moved into its linked [worktree](</docs/en/worktrees>) after it started, the copy starts back where the session was before the move and, unless it edits in place, makes its code changes in a worktree of its own there. When your worktree is checked out on a branch, that instruction also tells a copy whose task builds on your work to base its new branch on yours, since your branch stays checked out in your worktree. The confirmation ends with `runs in the origin tree`. * When you launched the session inside a linked worktree of a repository that has a main working tree, the copy starts in that main working tree, with the same worktree-of-its-own rule but no branch instruction. The confirmation ends with `runs in the origin tree` here too. * A session launched inside a worktree of a bare-repository layout has no main working tree to return to, so the copy stays where it is, and the confirmation ends with `edits this checkout`. The same note appears when worktree isolation is turned off in a session that isn’t inside a linked worktree, because the copy then edits the files you have open. + +##### Sessions that can’t be forked Sessions started with launch flags the copy wouldn’t inherit, such as a replaced system prompt or a `--tools` allowlist, can’t be forked; Claude Code says so instead of making a partial copy. A session dispatched from agent view forks normally: the copy is launched with the same [agent definition](</docs/en/sub-agents>) and appended instructions as the session it came from.
modified Run agents in parallel View current →
--- a/agents.md +++ b/agents.md @@ -20,7 +20,7 @@ * A [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) is a subagent that inherits your full conversation context instead of starting fresh. It’s a way to spawn a subagent, not a separate surface. Start one with `/subtask`. Claude also spawns one itself where [fork mode](</docs/en/sub-agents#turn-fork-mode-on-or-off>) is on. To copy the whole session into a new [background session](</docs/en/agent-view#from-inside-a-session>) that runs alongside it, use `/fork`. With [agent view turned off](</docs/en/agent-view#turn-off-agent-view>), the forked-subagent command is `/fork` instead and `/subtask` isn’t available. * A [cloud scheduled task](</docs/en/routines>) runs a session on a schedule in the cloud, not in parallel on your machine. -Running several sessions or subagents at once multiplies token usage. See [Costs](</docs/en/costs>) for usage and rate-limit details. +Running several sessions or subagents at once multiplies token usage. See [Costs](</docs/en/costs>) for usage and rate limit details. ##
modified Claude Code on Amazon Bedrock View current →
--- a/amazon-bedrock.md +++ b/amazon-bedrock.md @@ -250,14 +250,14 @@ Primary model| Opus 5.5, for example `us.anthropic.claude-opus-5-5` in a `us-*` region Small/fast model| Sonnet 4.5, for example `us.anthropic.claude-sonnet-4-5-20250929-v1:0` in a `us-*` region -Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Amazon Bedrock, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every account or region. Two selections change which model carries them: +Before v2.1.280, the primary model on Amazon Bedrock defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219. Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Amazon Bedrock, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every account or region. Two selections change which model carries them: * When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. When Claude Code starts the session on the model you set with [`ANTHROPIC_DEFAULT_MODEL`](</docs/en/model-config#set-a-default-model-for-new-sessions>), background tasks use that model too. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` also counts as a selection, because the built-in Sonnet model may not be enabled in an account that steers its own Opus. * To use Haiku for background tasks, set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to a model ID that is available in your account. Opus models have a higher per-token price than Sonnet models, so if you don’t pin a primary model, you’re billed at the Opus rate. To use Sonnet 4.5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. A deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn’t set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default. -Before v2.1.280, the primary model on Amazon Bedrock defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219. On v2.1.207 through v2.1.218, the primary model on Amazon Bedrock defaulted to Opus 4.8 and the `opus` alias resolved to Opus 4.8. To customize models further, use one of these methods: +To customize models further, use one of these methods: # Using inference profile ID export ANTHROPIC_MODEL='us.anthropic.claude-sonnet-4-6'
modified Share session output as artifacts View current →
--- a/artifacts.md +++ b/artifacts.md @@ -89,7 +89,7 @@ Run `/artifacts` in Claude Code to list the artifacts you own and the ones shared with you. The current session’s artifacts come first, under **This session**. Select an artifact, then press one of these keys: - * **`Enter`** : opens it in your browser when it’s already attached to the current session, and attaches it when it isn’t. Before v2.1.216, `Enter` opened it in your browser + * **`Enter`** : opens it in your browser when it’s already attached to the current session, and attaches it when it isn’t * **`o`** : opens it in your browser * **`c`** : copies its link * **`d`** : outside a [cloud session](</docs/en/claude-code-on-the-web>), permanently deletes an artifact you own after you confirm. Its link stops working for everyone, including you @@ -217,7 +217,7 @@ When a connector-backed page renders but its live sections stay empty for a viewer in your organization, work through these causes: - * **The viewer hasn’t connected the connector** : connectors are per-account, so each viewer needs their own connection to every connector the page calls. They can add one under **Settings > Connectors** on claude.ai, then reload the page. + * **The viewer hasn’t connected the connector** : connectors are per-account, so each viewer needs their own connection to every connector the page calls. They can add one under [**Customize > Connectors**](<https://claude.ai/customize/connectors>) on claude.ai, then reload the page. * **The viewer declined the permission ask** : a denial lasts for the rest of that page load. Reloading the page brings the permission ask back. * **Connector calls are turned off for the organization** : an Owner controls the **Enable artifact connectors** toggle in admin settings. * **The page calls tool names the connector doesn’t expose** : the affected sections stay empty for everyone, including you. This can happen when a page names the individual tools behind a gateway-style connector that exposes only a few tools of its own. Ask Claude to fix the tool names the page calls and publish it again. When Claude publishes the page and that connector’s tools are available in your session, Claude Code checks the tool names the page declares against them, warns Claude about names that don’t match, and refuses the publish when none do. Before v2.1.265, it published the page without checking them.
modified Claude Code changelog View current →
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,61 @@ This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Longer releases are grouped by type of change, with long lists of improvements and bug fixes collapsed. Run `claude --version` to check your installed version. + +​ + +2.1.312 + +October 27, 2026 + +**Added** + + * Added `oidc.user_id_claim` to the Claude apps gateway, to identify people by an id_token claim other than `sub`, such as Microsoft Entra ID’s `oid` + * Added click to send: in fullscreen, clicking the “to send now” hint under a queued message sends it right away, as its key does + * [Cloud sessions] Added an effort level to the model picker when you create or edit a routine that runs in the cloud + * [Cloud sessions] Added a Bash editor with colors, line numbers and a Copy button to the setup script box in cloud environment settings + +**Changed** + + * Changed Bedrock, Vertex, Foundry and Mantle to use the shorter system prompt for model names Claude Code doesn’t recognize, such as custom deployment names and inference profile ARNs, even when they front Sonnet or Haiku; set `CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT=0` to keep the full prompt + * Changed automatic model switches after a flagged message to also cover model names Claude Code doesn’t recognize, such as custom deployment names; set `CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK=1` to turn them off + * Changed usage limit messages to call the 5-hour window the “5-hour limit” instead of the “session limit” + * Changed cloud sessions started from the CLI to get their names and branch names from the server + * Changed prompt and agent hooks to run at most 24 at a time per session, sub-agents included, plus at most 12 that have waited longer than their event’s timeout; a `timeout` under 1 second now counts as 1 second + * Changed a subagent’s `autoCompactWindow` to lower the window set by `CLAUDE_CODE_AUTO_COMPACT_WINDOW`, where it had no effect before; it still never raises that window + * Changed OpenTelemetry `mcp_server.name` to report the real name of fixed-URL remote MCP servers declared by plugins from the official Anthropic marketplace, instead of `custom` + * Changed Claude Code to stop sending the `claude_code.safety_event` OpenTelemetry event + * [VSCode] Changed usage limit resets to show a clock time (“Resets at 3:10 PM”) and to say “5-hour limit” + +**Improved** + + * Improved the prompt’s effort indicator: a change made mid-task now says it may wait for your next message, and the note clears when it no longer applies + * Improved WebFetch errors in cloud sessions: a host that does not resolve is now explained as possibly outside the allowed network domains, so Claude names the host to allow + * [Cloud sessions] Improved the step shown when Claude adds a repository to a cloud session: opening it now shows a short table of what happened instead of raw JSON + * [Claude Tag] Improved Claude Tag’s retry notice in Slack to name the model in use, or say rate limits were hit, instead of a generic API error + +Show 22 bug fixes + + * Fixed managed settings and organization policy not being fetched for the rest of the session after signing in from the VS Code extension + * Fixed Claude overwriting a very large CLAUDE.md, rules file or @-included file in a subdirectory after seeing only its start; Write now asks Claude to read it all or edit in place + * Fixed per-directory and `paths:` skills not being found after a Bash `cd` deeper into a git repository + * Fixed a rare case where the first reply after resuming a session in the terminal could be missing the next time the session was resumed + * Fixed a command with an invalid name stopping all commands from loading, which could leave `claude -p` with no output + * Fixed the Read tool sometimes failing on PDF pages with “pdftoppm failed: Could not write image” when the clean-up of old session files ran at the same time + * Fixed the spinner, OpenTelemetry `effort` values and transcripts naming a newly picked effort level during a task before the model applied it; they now show the level in force + * Fixed the `/model` and `/effort` cache warning saying the re-read waits for your next message; a change made while Claude is working can trigger it sooner + * Fixed some sessions showing as waiting on you when the last message only mentioned items waiting on you mid-sentence + * Fixed agent view restoring input text on the next launch after it was cleared with Ctrl+C just before exiting + * Fixed agent view reopening in shell mode after exiting with Ctrl+D from an empty `!` input + * Fixed vim mode `d`, `c` and `y` with a `gj` or `gk` count larger than the lines left deleting or copying text; like Vim, they now only move the cursor + * Fixed `/verify` showing a long description meant for Claude in `/help` and the `/` command menu instead of a short one + * [VSCode] Fixed sessions ending on a bare exit code when your organization’s settings couldn’t be loaded or were refused at startup; the tab now says why and offers Retry or Sign in again + * [Cloud sessions] Fixed resending an unchanged message after a failed send in a cloud session sometimes running it twice + * [Cloud sessions] Fixed a failed cloud environment creation showing its error only as a toast outside the open dialog; it now appears inside the dialog + * [Cloud sessions] Fixed Edit in a routine’s menu on the Routines page going to the routine’s page without opening its edit dialog + * [Remote Control] Fixed an unarchived Remote Control session showing as working until a computer reconnected; it now shows as idle + * [Claude Tag] Fixed a Claude Tag channel’s on/off switch and agent settings falling back to workspace defaults when an older private Slack channel goes public and gets a new ID + * [Claude Tag] Fixed Claude in Slack not replying in channels whose environment has network access set to None + * [Claude Tag] Fixed Claude in Slack sometimes posting a file in the wrong thread when it was answering in another thread of the same channel + * [Code Review] Fixed Code Review reviewing an outdated commit, or none at all, when GitHub delivered a push event late; it now reviews the pull request’s current commit ​
modified Use Claude Code with Chrome View current →
--- a/chrome.md +++ b/chrome.md @@ -35,7 +35,7 @@ * [Claude Code](</docs/en/quickstart#step-1-install-claude-code>) * A direct Anthropic plan (Pro, Max, Team, or Enterprise) -In Enterprise organizations that have HIPAA enabled, Claude in Chrome is off by default, and an [Owner](</docs/en/server-managed-settings#access-control>) can turn it on in [**Organization settings > Claude in Chrome**](<https://claude.ai/admin-settings/browser-extension>). Your Business Associate Agreement (BAA) with Anthropic doesn’t cover data sent to third-party sites through Claude in Chrome. See the [Implementation Guide](<https://trust.anthropic.com/resources?s=l1wrssd9hsbi4gak0tp5a6&name=%5Banthropic%5D-hipaa-ready-offering-implementation-guide>) for a list of Eligible Services. Chrome integration also requires signing in with `/login`. If you authenticate with an API key or a long-lived token from [`claude setup-token`](</docs/en/authentication#generate-a-long-lived-token>), Claude Code keeps Chrome integration off, even when you pass `--chrome`, because the browser extension can’t authenticate with those credentials. Before v2.1.216, these sessions could enable Chrome integration, but every attempt to connect to the browser extension failed with a 403 error. +In Enterprise organizations that have HIPAA enabled, Claude in Chrome is off by default, and an [Owner](</docs/en/server-managed-settings#access-control>) can turn it on in [**Organization settings > Claude in Chrome**](<https://claude.ai/admin-settings/browser-extension>). Your Business Associate Agreement (BAA) with Anthropic doesn’t cover data sent to third-party sites through Claude in Chrome. See the [Implementation Guide](<https://trust.anthropic.com/resources?s=l1wrssd9hsbi4gak0tp5a6&name=%5Banthropic%5D-hipaa-ready-offering-implementation-guide>) for a list of Eligible Services. Chrome integration also requires signing in with `/login`. If you authenticate with an API key or a long-lived token from [`claude setup-token`](</docs/en/authentication#generate-a-long-lived-token>), Claude Code keeps Chrome integration off, even when you pass `--chrome`. The browser extension can’t authenticate with those credentials. Chrome integration is not available through third-party providers like Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. If you access Claude exclusively through a third-party provider, you need a separate claude.ai account to use this feature.
modified Claude apps gateway configuration View current →
--- a/claude-apps-gateway-config.md +++ b/claude-apps-gateway-config.md @@ -936,7 +936,7 @@ * the sandbox binary settings `sandbox.bwrapPath`, `sandbox.socatPath`, and `sandbox.ripgrep` * Sandbox settings that intercept traffic, inject credentials, or weaken isolation, such as `sandbox.network.tlsTerminate` and the proxy port settings. [Security approval dialogs](</docs/en/server-managed-settings#security-approval-dialogs>) lists them all. -[Approval memory](</docs/en/server-managed-settings#approval-memory>) covers how long an approval lasts and when the dialog appears again. Claude Code applies some delivered `env` variables without showing the developer the approval dialog, such as model selection settings and numeric limits. Other delivered variables can require the developer’s approval before they take effect; a non-empty proxy, base-URL, or `OTEL_EXPORTER_OTLP_ENDPOINT` value always does. When a delivered variable needs approval, the dialog names it. [Environment variables and the approval dialog](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>) has the details, including four privacy toggles whose delivered value decides whether they need approval. Before v2.1.218, Claude Code applied fewer variables without asking the developer, so more delivered variables triggered the dialog. The gateway’s telemetry configuration pushes `OTEL_EXPORTER_OTLP_ENDPOINT`, so setting `telemetry.forward_to` triggers the dialog on each interactive client. The dialog protects the developer’s machine from a compromised or hostile gateway, not the organization from the developer. A [non-interactive run](</docs/en/server-managed-settings#security-approval-dialogs>), such as `claude -p`, an Agent SDK session, or a session in Claude Desktop’s Code tab, can’t show the dialog. It applies the pushed settings for that run only and doesn’t record them as approved, so the developer’s next interactive session still shows the dialog. If a developer declines, Claude Code exits that session rather than applying the policy. When you push a new hook, or any env var that triggers the dialog, to a broad policy, every matching developer therefore sees the dialog in their interactive sessions. A running interactive session shows it on the next hourly poll, and otherwise it appears at the developer’s next interactive startup. The `cli` key was named `settings` in earlier releases, and the gateway still accepts that spelling as an alias. For new deployments, use `code`. +[Approval memory](</docs/en/server-managed-settings#approval-memory>) covers how long an approval lasts and when the dialog appears again. Claude Code applies some delivered `env` variables without showing the developer the approval dialog, such as model selection settings and numeric limits. Other delivered variables can require the developer’s approval; a non-empty proxy, base-URL, or `OTEL_EXPORTER_OTLP_ENDPOINT` value always does. When a delivered variable needs approval, the dialog names it. [Environment variables and the approval dialog](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>) has the details, including four privacy toggles whose delivered value decides whether they need approval. The gateway’s telemetry configuration pushes `OTEL_EXPORTER_OTLP_ENDPOINT`, so setting `telemetry.forward_to` triggers the dialog on each interactive client. The dialog protects the developer’s machine from a compromised or hostile gateway, not the organization from the developer. A [non-interactive run](</docs/en/server-managed-settings#security-approval-dialogs>), such as `claude -p`, an Agent SDK session, or a session in Claude Desktop’s Code tab, can’t show the dialog. It applies the pushed settings for that run only and doesn’t record them as approved, so the developer’s next interactive session still shows the dialog. If a developer declines, Claude Code exits that session rather than applying the policy. When you push a new hook, or any env var that triggers the dialog, to a broad policy, every matching developer therefore sees the dialog in their interactive sessions. A running interactive session shows it on the next hourly poll, and otherwise it appears at the developer’s next interactive startup. The `cli` key was named `settings` in earlier releases, and the gateway still accepts that spelling as an alias. For new deployments, use `code`. ####
modified Use Claude Code in the cloud View current →
--- a/claude-code-on-the-web.md +++ b/claude-code-on-the-web.md @@ -258,6 +258,19 @@ * **The full walkthrough, including PR creation** : see [Review and iterate](</docs/en/web-quickstart#review-and-iterate>) * **Having Claude monitor the PR for CI failures and review comments automatically** : see Auto-fix pull requests +#### + +​ + +Troubleshoot a missing file in the diff view + +A file you expected can be missing from the diff view’s file list when it compares against the base branch, whether or not the session has pushed changes: + + * **No changes pushed yet** : the list has Claude’s own edits, but not changes made by commands Claude ran, such as a formatter + * **Changes pushed** : the list has pushed commits, but not changes made after the last push + +To add a missing change to the list, ask Claude to commit and push. + ### ​ @@ -268,7 +281,7 @@ * **`/model`, `/effort`, `/color`, and `/rename`**: pass the value as an argument, for example `/model sonnet`, instead of opening the terminal picker or slider. The argument forms follow each command’s [availability notes](</docs/en/commands#all-commands>). * **`/fast`** : toggles [fast mode](</docs/en/fast-mode#use-fast-mode-in-cloud-sessions>) for the session when fast mode is [available on your account](</docs/en/fast-mode#requirements>). Requires Claude Code v2.1.271 or later in the session’s environment. - * **`/config`** : in your browser at claude.ai/code, opens the Claude Code section of your settings instead of setting a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a [project](</docs/en/claude-projects>)’s threads, commit the key to that repository’s `.claude/settings.json` instead. [Settings in cloud sessions](</docs/en/settings#settings-in-cloud-sessions>) lists what each session reads. + * **`/config`** : in your browser at claude.ai/code, opens **Settings > Code** or **Settings > Claude Code** instead of setting a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a [project](</docs/en/claude-projects>)’s threads, commit the key to that repository’s `.claude/settings.json` instead. [Settings in cloud sessions](</docs/en/settings#settings-in-cloud-sessions>) lists what each session reads. For context management in a cloud session outside a [project’s threads](</docs/en/claude-projects#choose-models-and-let-claude-manage-context>): @@ -353,7 +366,10 @@ * **Repository access** : verification isn’t enabled by default * **Sensitive content** : check your session before sharing. Sessions may contain code and credentials from private GitHub repositories -To require recipients to have repository access, or to hide your name from shared sessions, go to [**Settings > Claude Code > Sharing settings**](<https://claude.ai/settings/claude-code>). +To require recipients to have repository access, or to hide your name from shared sessions, open Settings on claude.ai, then: + + * **If the Settings menu shows Code instead of Claude Code** : go to [**Privacy**](<https://claude.ai/settings/data-privacy-controls>), which has these settings + * **Otherwise** : go to [**Claude Code > Sharing settings**](<https://claude.ai/settings/claude-code>) ###
modified Claude Code on Claude Platform on AWS View current →
--- a/claude-platform-on-aws.md +++ b/claude-platform-on-aws.md @@ -85,7 +85,7 @@ 3\. Pin model versions -Claude Platform on AWS uses the same model IDs as the direct Claude API. The default aliases `fable`, `opus`, `sonnet`, and `haiku` resolve to Claude Code’s built-in defaults for Claude Platform on AWS, which can lag the newest release. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias resolves to Opus 5.5. Before v2.1.280, it resolved to Opus 5 from v2.1.219, and to Opus 4.8 from v2.1.207. If you deploy Claude Code to a team, pin the model IDs explicitly so a new release doesn’t move everyone at once: +Claude Platform on AWS uses the same model IDs as the direct Claude API. The default aliases `fable`, `opus`, `sonnet`, and `haiku` resolve to Claude Code’s built-in defaults for Claude Platform on AWS, which can lag the newest release. Without `ANTHROPIC_DEFAULT_OPUS_MODEL`, the `opus` alias resolves to Opus 5.5. Before v2.1.280, it resolved to Opus 5 from v2.1.219. If you deploy Claude Code to a team, pin the model IDs explicitly so a new release doesn’t move everyone at once: export ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5 export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-8
modified Let Claude coordinate ongoing work with Projects View current →
--- a/claude-projects.md +++ b/claude-projects.md @@ -66,7 +66,7 @@ You create and use projects at [claude.ai/code](<https://claude.ai/code>), in the Code tab of the desktop app, or in the Claude mobile app for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) and [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>). In the browser and the desktop app there are two ways to start a project: * **From scratch** , when you know the stream of work you want Claude to run: open the **New project** dialog and name it. Start a new project from scratch walks through the dialog. - * **From a cloud session that’s already doing the work** : in that session’s sidebar menu, choose **Move to project** , then **Continue as new project**. Claude proposes the project’s setup from what the session was doing. See Start from an existing cloud session. + * **From a cloud session that’s already doing the work** : in that session’s sidebar menu, choose **Continue in project** , then **Continue as new project**. Claude proposes the project’s setup from what the session was doing. See Start from an existing cloud session. Either way, check the prerequisites first. @@ -125,7 +125,7 @@ Start from an existing session -If a cloud session you started yourself is doing work that belongs in a project, open its sidebar menu and choose **Move to project** , then pick from the submenu: +If a cloud session you started yourself is doing work that belongs in a project, open its sidebar menu and choose **Continue in project** , then pick from the submenu: * Choose **Continue as new project** to create a new project from the session. The project opens, and Claude reads the session and posts **Setup recommendations** in the project conversation for you to confirm. The original session stays in your session list. If it was in the middle of a turn it keeps running, so stop it yourself if you don’t want both working at once. * Choose one of your existing projects to bring the session’s work into that project. That project opens, and a message sent on your behalf asks Claude to read the session and pick up where it left off. The original session stays in your session list, unchanged. @@ -314,7 +314,7 @@ On the computer that has the folder the task needs, make it available through Remote Control in one of two ways. Both need Claude Code v2.1.280 or later on that computer. - * **In the Claude desktop app** : open **Settings > Claude Code**, turn on **Use this computer from your phone and claude.ai** , and add the folder to the list under that switch. Threads can run on this computer while the app is open. + * **In the Claude desktop app** : open **Settings > Code** or **Settings > Claude Code** and turn on **Use this computer from your phone and claude.ai**. Add the folder to the list under that switch. Threads can run on this computer while the app is open. * **In a terminal** : run `claude remote-control` in the folder and leave it running. In a git repository, add `--spawn worktree` to give each thread there its own [worktree](</docs/en/worktrees>) instead of the folder itself. 2 @@ -329,7 +329,12 @@ Claude answers with an **Allow Claude to work in a folder on your device** card. Pick the folder if you connected several. Two threads working in one folder at the same time can overwrite each other’s changes, so if the folder is a git repository, you can turn on **Worktree** in the folder’s options to give this thread its own worktree instead. Then click **Allow once**. -The thread runs in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so Claude runs commands and edits files in that folder without asking you each time. If auto mode is unavailable or turned off in that computer’s Claude Code, the thread runs without it, and any permission prompt it raises waits for your answer in the thread, as Unblock a thread waiting on approval describes. While the thread runs, a laptop icon in its header shows whether your computer is connected. Click it to see which folder the thread is using or to turn the connection off. The thread pauses while that computer is asleep, and stops if the desktop app or `claude remote-control` quits. Lost contact with your folder covers getting it going again. In the desktop app, turn on **Keep this computer awake for Remote Control** under **Settings > Claude Code** to stop the computer from sleeping on its own. A project can’t run a thread on your computer while [**Require trusted devices**](</docs/en/remote-control#trusted-devices>) is on for your account. +The thread runs in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), so Claude runs commands and edits files in that folder without asking you each time. If auto mode is unavailable or turned off in that computer’s Claude Code, the thread runs without it, and any permission prompt it raises waits for your answer in the thread, as Unblock a thread waiting on approval describes. While the thread runs, a laptop icon in its header shows whether your computer is connected. Click it to see which folder the thread is using or to turn the connection off. The thread pauses while that computer is asleep, and stops if the desktop app or `claude remote-control` quits. + + * **To get the thread going again** : see Lost contact with your folder + * **To keep the computer from sleeping on its own** : in the desktop app, turn on **Keep this computer awake for Remote Control** in **Settings > Code** or **Settings > Claude Code** + +A project can’t run a thread on your computer while [**Require trusted devices**](</docs/en/remote-control#trusted-devices>) is on for your account. ## @@ -517,7 +522,7 @@ Several Claude Code features let more than one session work at the same time, so running work in parallel is not by itself what a project is for. In a project, Claude starts and tracks the sessions instead of you, and each one starts from the same instructions. This is how each neighboring feature connects to a project: * **Claude Tag** : [Claude Tag](<https://claude.com/docs/claude-tag/overview>) is Claude in your team’s Slack channels, on Team and Enterprise plans. Anyone in a channel can give it work, everyone in the channel sees and steers it, and it uses connections an admin set up for that channel. A project is yours alone: you’re the only one who sends it work or sees its threads, it uses your own GitHub access and connectors, and it’s on Pro and Max. [How Claude Tag differs from Cowork and Claude Code](<https://claude.com/docs/claude-tag/concepts/how-it-works#how-claude-tag-differs-from-cowork-and-claude-code>) has the side-by-side. - * **Cloud sessions** : every thread is a [cloud session](</docs/en/claude-code-on-the-web>) unless you ask Claude to run it on your machine. Either way, Claude starts and tracks it instead of you. You can also bring the work of a cloud session you started yourself into a project: choose **Move to project** in that session’s sidebar menu. + * **Cloud sessions** : every thread is a [cloud session](</docs/en/claude-code-on-the-web>) unless you ask Claude to run it on your machine. Either way, Claude starts and tracks it instead of you. You can also bring the work of a cloud session you started yourself into a project: choose **Continue in project** in that session’s sidebar menu. * **Scheduled tasks** : when you ask for scheduled work in a project, Claude creates a [cloud scheduled task](</docs/en/routines>) that runs as threads in that project and appears on its **Scheduled tasks** tab. Scheduled tasks you create outside a project keep working on their own. * **Remote Control** : [Remote Control](</docs/en/remote-control>) connects claude.ai to a Claude Code session running on your machine. When you ask Claude in a project to run a thread on your computer, the project uses Remote Control to do it. * **Local sessions and agent view** : a session you start yourself in your terminal, IDE, or the desktop app’s local environment stays outside your projects, though you can bring its work into one. [Agent view](</docs/en/agent-view>) is a screen for tracking several local sessions side by side, and you still start each one and give it its task yourself. @@ -539,7 +544,7 @@ * You can’t add a session you started yourself on your machine to a project, though you can bring its work into one. A project reaches your machine by running a thread there through Remote Control, and that section lists what it needs. * A cloud thread’s sandbox pauses between turns and resumes when the thread continues. If the sandbox can’t be resumed, the thread continues from a fresh clone, so uncommitted changes can be lost. On long tasks, ask Claude to commit and push work in progress. * A project belongs to one user. You can’t share a project or its threads with another user, and thread transcripts don’t have the share option other cloud sessions have. There are no organization-level controls for projects during the beta. - * A thread belongs to the one project that started it. You can’t move or copy a thread to another project, or move it out to stand alone. **Move to project** goes the other way only: it brings a cloud session’s work into a project. You can’t merge two projects into one. + * A thread belongs to the one project that started it. You can’t move or copy a thread to another project, or move it out to stand alone. **Continue in project** goes the other way only: it brings a cloud session’s work into a project. You can’t merge two projects into one. ## @@ -613,7 +618,10 @@ Lost contact with your folder -A thread running on your computer shows this when the Claude Code session there stopped responding, usually because the computer went to sleep or the desktop app or `claude remote-control` quit. Wake the computer, and if the desktop app or `claude remote-control` is no longer running there, start it again: reopen the app and confirm **Use this computer from your phone and claude.ai** is still on under **Settings > Claude Code**, or run `claude remote-control` again in the same folder. +A thread running on your computer shows this when the Claude Code session there stopped responding, usually because the computer went to sleep or the desktop app or `claude remote-control` quit. Wake the computer. If the desktop app or `claude remote-control` is no longer running there, start it again: + + * **Desktop app** : reopen the app and confirm **Use this computer from your phone and claude.ai** is still on under **Settings > Code** or **Settings > Claude Code** + * **Terminal** : run `claude remote-control` again in the same folder ###
modified Review locally with /code-review View current →
--- a/code-review-local.md +++ b/code-review-local.md @@ -71,7 +71,7 @@ * In a terminal session, where `/code-review` runs the review as a [forked subagent](</docs/en/skills#run-skills-in-a-subagent>) * In a `-p` run with text or JSON output -In a host application that requests the findings list, such as the [desktop app](</docs/en/desktop#review-your-code>), Claude reports the review’s findings through the [`ReportFindings` tool](</docs/en/tools-reference>) instead. The report appears as a findings list, and each entry shows the file location, a one-sentence summary, and a category tag such as `correctness` when the finding carries one. A host request applies at every effort level and requires Claude Code v2.1.218 or later. When Claude fixes reported findings later in the session, it reports them again. Claude Code then marks each finding in the updated findings list as fixed, skipped, or no change needed. +In a host application that requests the findings list, such as the [desktop app](</docs/en/desktop#review-your-code>), Claude reports the review’s findings through the [`ReportFindings` tool](</docs/en/tools-reference>) instead. The report appears as a findings list, and each entry shows the file location, a one-sentence summary, and a category tag such as `correctness` when the finding carries one. A host request applies at every effort level. When Claude fixes reported findings later in the session, it reports them again. Claude Code then marks each finding in the updated findings list as fixed, skipped, or no change needed. ## @@ -110,7 +110,7 @@ After the effort level and flags, Claude Code reads the rest of the line as the review target. The `ultra` argument changes that reading: * **With`ultra`**: Claude Code reads a single word as a base branch or PR number. Longer text that doesn’t name a branch or PR becomes [a note attached to the review](</docs/en/ultrareview#pass-a-request-in-plain-words>). `/code-review ultra check my auth changes` reviews your current branch, and Claude relates the findings to your note. - * **Without`ultra`**: everything left is the review target, even when it starts with another command name. `/code-review /fix-issue 123` reviews with `/fix-issue 123` as target text instead of loading `/fix-issue` as a second [stacked skill](</docs/en/skills#stack-several-skills-in-one-message>). Before v2.1.218, a command stacked after `/code-review` expanded as its own skill. + * **Without`ultra`**: everything left is the review target, even when it starts with another command name. `/code-review /fix-issue 123` reviews with `/fix-issue 123` as target text instead of loading `/fix-issue` as a second [stacked skill](</docs/en/skills#stack-several-skills-in-one-message>). ## @@ -123,8 +123,6 @@ * Run it in non-interactive mode, with the `-p` flag or the Agent SDK. Claude Code waits for the review and includes the findings in the response, except for `ultra`, which [doesn’t wait for the cloud review](</docs/en/ultrareview#run-ultrareview-non-interactively>). * Set [`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`](</docs/en/env-vars>) to `1`, which also turns off other background task features * Run `/code-review` again while an earlier review is still in progress - -Before v2.1.218, the review ran inside your conversation. ##
modified Commands View current →
--- a/commands.md +++ b/commands.md @@ -19,7 +19,7 @@ * **[Skill](</docs/en/skills#bundled-skills>)** : a bundled skill. It works like skills you write yourself: a prompt handed to Claude. * `/verify` runs only when you invoke it. Before v2.1.215, Claude could also run `/verify` on its own. * **[Workflow](</docs/en/workflows#bundled-workflows>)** : a bundled [dynamic workflow](</docs/en/workflows>) that fans work out across many subagents and runs in the background. - * `/deep-research` runs only when you invoke it. Before v2.1.218, Claude could also start it on its own. + * `/deep-research` runs only when you invoke it. To add your own commands, see [skills](</docs/en/skills>). In the table below, `<arg>` indicates a required argument and `[arg]` indicates an optional one. @@ -32,7 +32,7 @@ `/agents`| Print a reminder to ask Claude to create or manage [subagents](</docs/en/sub-agents>), or to edit `.claude/agents/` or `~/.claude/agents/` directly. On v2.1.197 and earlier, opens an interactive interface for creating and managing subagent configurations `/artifact-capabilities`| **[Skill](</docs/en/skills#bundled-skills>).** Load the reference for the runtime capabilities a published [artifact](</docs/en/artifacts>) can use, such as [calling your connectors](</docs/en/artifacts#pull-live-data-with-mcp-connectors>) or [offering a file download](</docs/en/artifacts#offer-a-file-download>), including which ones your account has. Claude normally loads it on its own before building a page that uses one. Available where [artifacts](</docs/en/artifacts#availability>) are `/artifact-diagramming`| **[Skill](</docs/en/skills#bundled-skills>).** Load diagramming guidance for Claude to follow in [artifacts](</docs/en/artifacts>): when a diagram helps, what to draw, and how to write inline SVG that stays legible in light and dark themes. Requires Claude Code v2.1.221 or later -`/artifacts`| List the [artifacts](</docs/en/artifacts#find-an-artifact-again>) you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where [artifacts](</docs/en/artifacts#availability>) are. Requires Claude Code v2.1.208 or later; attaching with `Enter` requires v2.1.216 +`/artifacts`| List the [artifacts](</docs/en/artifacts#find-an-artifact-again>) you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where [artifacts](</docs/en/artifacts#availability>) are `/auto-mode-setup`| [Draft `autoMode.environment` entries](</docs/en/auto-mode-config#generate-environment-entries>) from your project and recent sessions, then review the draft and save it to your user settings. On a Pro, Max, or Team plan, requires Claude Code v2.1.228 or later, or v2.1.233 or later on native Windows. On an Enterprise plan or with a Claude Console API key, requires v2.1.283 or later. If the command is missing, see [`/auto-mode-setup` returns “Unknown command”](</docs/en/auto-mode-config#auto-mode-setup-returns-unknown-command>) `/autocompact [auto|<tokens>]`| Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as `500k`, or `auto` to return to the window tuned for your model. Claude Code saves the value to user settings and applies it to the current session. See [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) for accepted values and what overrides it. Without an argument, opens a dialog that shows the current window. Requires Claude Code v2.1.221 or later `/autofix-pr [prompt]`| Spawn a [cloud session](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) that watches the current branch’s PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with `gh pr view`; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example `/autofix-pr only fix lint and type errors`. Requires the `gh` CLI and access to [cloud sessions](</docs/en/claude-code-on-the-web>)
modified Let Claude use your computer from the CLI View current →
--- a/computer-use.md +++ b/computer-use.md @@ -208,7 +208,7 @@ Feature| Desktop| CLI ---|---|--- Platforms| macOS and Windows| macOS only -Enable| Toggle in **Settings > This computer > System**| Enable `computer-use` in `/mcp` +Enable| Toggle in [Settings](</docs/en/desktop#enable-computer-use>)| Enable `computer-use` in `/mcp` Denied apps list| Configurable in Settings| Not yet available Auto-unhide toggle| Optional| Always on Dispatch integration| Dispatch-spawned sessions can use computer use| Not applicable
modified Configure your agent View current →
--- a/configuration.md +++ b/configuration.md @@ -165,7 +165,7 @@ Both languages have the same setters: - * **`setModel()` / `set_model()`**: switches the model. Call it with no model to switch to [Claude Code’s default model](</docs/en/model-config#default-model-setting>) rather than the `model` you passed in options. + * **`setModel()` / `set_model()`**: switches the model. Call it with no model to switch to [Claude Code’s default model](</docs/en/model-config#default-model-setting>) rather than the `model` you passed in options. If the session is in auto mode and you switch to a model that auto mode doesn’t support, the session changes to `default` mode. To return to auto mode, see [Auto mode (`auto`)](</docs/en/agent-sdk/permissions#auto-mode-auto>). * **`setPermissionMode()` / `set_permission_mode()`**: switches the permission mode TypeScript also has `applyFlagSettings()` and `updateSettings()`:
modified Message your other Claude Code sessions View current →
--- a/cross-session-messaging.md +++ b/cross-session-messaging.md @@ -177,7 +177,7 @@ When a message arrives, Claude Code shows it in the conversation as a dim one-line preview, and the preview line stays in the conversation afterward. The preview carries the sender’s name and the first line of the message, cut with `…` when it’s long, such as `› Message from @api-worker: Schema migration finished (ctrl+o to expand)`. Any of these shows you the full text: - * Press `Ctrl+O` to open the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>) and read the full text under the sender’s session name. + * Press `Ctrl+O` to open the [transcript viewer](</docs/en/interactive-mode#transcript-viewer>) and read the full text under the sender’s session name. If Claude is busy and hasn’t received the message yet, scroll to the end of the transcript, where the message is listed under `Waiting to be delivered`. Requires Claude Code v2.1.309 or later. * In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), click a preview line that leaves part of the message out to expand it in place. * In a session started with [`--verbose`](</docs/en/cli-reference#cli-flags>), Claude Code shows the full text instead of the preview.
modified Desktop application View current →
Show diff (139 lines)
--- a/desktop.md +++ b/desktop.md @@ -71,7 +71,7 @@ * **Use the suggestion** : press **Tab** or **Right arrow** to place it in the prompt box, edit it if you want, then press **Enter** to send it. Pressing **Enter** before you accept the suggestion doesn’t send it. * **Write your own prompt** : start typing. The suggestion shows only while the prompt box is empty and has no attached files. -Go to **Settings > Claude Code** and turn off **Prompt suggestions** under **Sessions** to stop suggestions in each session from the next time it starts or resumes. +Turn off **Prompt suggestions** in **Settings > Code** or **Settings > Claude Code** to stop suggestions. Each session stops showing them the next time it starts or resumes. ### @@ -100,7 +100,7 @@ **Accept edits**| `acceptEdits`| Claude auto-accepts file edits and common filesystem commands like `mkdir`, `touch`, and `mv`, but still asks before running other terminal commands. Use this when you trust file changes and want faster iteration. **Plan**| `plan`| Claude reads files and runs commands to explore, then proposes a plan without editing your source code. Good for complex tasks where you want to review the approach first. **Auto**| `auto`| Claude runs without routine prompts; before actions such as shell commands and network requests run, a background classifier checks that they align with your request. Appears when auto mode is available; there is no separate Settings toggle for it. -**Bypass permissions**| `bypassPermissions`| Claude runs without permission prompts, except for the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>), safety classifiers when Claude acts on external sites, or desktop actions such as deleting a session, though not archiving one. Equivalent to `--dangerously-skip-permissions` in the CLI. On Pro and Max plans, enable it in your Settings → Claude Code under “Allow bypass permissions mode”; on Team and Enterprise plans there is no Settings toggle, and organization policy controls it instead. Only use this in sandboxed containers or VMs. +**Bypass permissions**| `bypassPermissions`| Claude runs without permission prompts, except for the [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>), safety classifiers when Claude acts on external sites, or desktop actions such as deleting a session, though not archiving one. Equivalent to `--dangerously-skip-permissions` in the CLI. On Pro and Max plans, enable “Allow bypass permissions mode” in **Settings > Code** or **Settings > Claude Code**. On Team and Enterprise plans there is no Settings toggle, and organization policy controls it instead. Only use this in sandboxed containers or VMs. Earlier versions of the Code tab labeled these modes Ask permissions, Auto accept edits, and Plan mode. The `dontAsk` permission mode is available only in the [CLI](</docs/en/permission-modes#allow-only-pre-approved-tools-with-dontask-mode>). @@ -133,7 +133,7 @@ * Start or stop servers, or stop them all at once, from the **Dev servers** menu in the Browser pane’s header * Choose whether the Browser keeps cookies after you quit the app with **Keep cookies** in the Browser pane’s **⋮** menu, so you don’t have to sign in again during development -Claude creates the initial server configuration based on your project. If your app uses a custom dev command, edit `.claude/launch.json` to match your setup. See Configure preview servers for the full reference. To clear the Browser’s saved data, select **Clear browsing data** in the Browser pane’s **⋮** menu. To turn the Browser off entirely, turn off **Browser tools** in **Settings > Claude Code**. +Claude creates the initial server configuration based on your project. If your app uses a custom dev command, edit `.claude/launch.json` to match your setup. See Configure preview servers for the full reference. To clear the Browser’s saved data, select **Clear browsing data** in the Browser pane’s **⋮** menu. To turn the Browser off entirely, turn off **Browser tools** in **Settings > Code** or **Settings > Claude Code**. ### @@ -176,7 +176,7 @@ Review changes with diff view -After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request. To open the diff view, click the line counts, such as `+12 -1`, in the **Changes** card of the session details panel. You can also click **Changes** in the session’s title bar. To comment on specific lines, hover over a line and click the **+** that appears beside its line number to open a comment box. Type your feedback and press **Enter** to add the comment. After adding comments to multiple lines, submit all comments at once: +After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request. To open the diff view, click the line counts, such as `+12 -1`, in the **Changes** card of the session details panel. You can also click **Changes** in the session’s title bar. A cloud session’s diff against the base branch can [leave out changes that aren’t pushed yet](</docs/en/claude-code-on-the-web#troubleshoot-a-missing-file-in-the-diff-view>). To comment on specific lines, hover over a line and click the **+** that appears beside its line number to open a comment box. Type your feedback and press **Enter** to add the comment. After adding comments to multiple lines, submit all comments at once: * **macOS** : press **Cmd+Enter** * **Windows** : press **Ctrl+Enter** @@ -210,7 +210,7 @@ * **If the repository doesn’t allow auto-merge** : **Merge when ready** doesn’t turn on, so enable auto-merge in your [GitHub repository settings](<https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository>) first * **Earlier layout** : once the session has a pull request, click **CI** on its status bar. -To archive the session automatically once the PR merges or closes, turn on auto-archive in **Settings > Claude Code**. +To archive the session automatically once the PR merges or closes, turn on auto-archive in **Settings > Code** or **Settings > Claude Code**. PR monitoring requires the [GitHub CLI (`gh`)](<https://cli.github.com/>) to be installed and authenticated on your machine. If `gh` is not installed, Desktop prompts you to install it the first time you try to create a PR.In an SSH session, set up `git` and `gh` on the remote machine before you click **Create PR** , because Claude pushes the branch and runs `gh pr create` there. Install `gh` there yourself, because Desktop doesn’t prompt you to in an SSH session. Then check there that `git push` works and that `gh auth status` reports that you are logged in. @@ -402,7 +402,17 @@ Turn on the toggle -In the desktop app, go to **Settings > This computer > System**. Under **Computer use** , turn on **Enable computer use**. On Windows, the toggle takes effect immediately and setup is complete. On macOS, continue to the next step.If you don’t see the toggle, confirm you’re on macOS or Windows with a Pro or Max plan, then update and restart the app. +In the desktop app, open **Settings** , then: + + * **If the Settings menu lists This computer** : go to **This computer > System** + * **Otherwise** : go to **Capabilities** + +Under **Computer use** , turn on **Enable computer use** : + + * **Windows** : the toggle takes effect immediately and setup is complete + * **macOS** : continue to the next step + +If you don’t see the toggle, confirm you’re on macOS or Windows with a Pro or Max plan, then update and restart the app. 3 @@ -429,7 +439,7 @@ Click only| Click and scroll, but not type or use keyboard shortcuts| Terminals, IDEs Full control| Click, type, drag, and use keyboard shortcuts| Everything else -Apps with broad reach, like terminals, Finder or File Explorer, and System Settings or Settings, show an extra warning in the prompt so you know what approving them grants. The **Computer use** section in **Settings > This computer > System** includes these options: +Apps with broad reach, like terminals, Finder or File Explorer, and System Settings or Settings, show an extra warning in the prompt so you know what approving them grants. In Settings, the **Computer use** section where you turned computer use on includes these options: * **Denied apps** : add apps here to reject them without prompting. Claude may still affect a denied app indirectly through actions in an allowed app, but it can’t interact with the denied app directly. * **Unhide apps when Claude finishes** : when computer use isn’t running in the background, Claude hides your other windows while it works so it interacts with only the approved app. When Claude finishes, hidden windows are restored unless you turn this setting off. @@ -469,10 +479,10 @@ Worktrees are stored in `<project-root>/.claude/worktrees/` by default. To store them in a custom directory instead: - * **Local sessions** : set **Worktree location** in **Settings > Claude Code** + * **Local sessions** : set **Worktree location** in **Settings > Code** or **Settings > Claude Code** * **SSH sessions** : set **Worktree folder** on the SSH connection -You can also set a **Branch prefix** in **Settings > Claude Code**. Desktop prepends it to every worktree branch name, which is useful for keeping Claude-created branches organized. To include gitignored files like `.env` in new worktrees, create a [`.worktreeinclude` file](</docs/en/worktrees#copy-gitignored-files-into-worktrees>) in your project root. See [What worktrees share with the main checkout](</docs/en/worktrees#what-worktrees-share-with-the-main-checkout>) for where a worktree session reads project settings, hooks, and skills. +You can also set a **Branch prefix** in **Settings > Code** or **Settings > Claude Code**. Desktop prepends it to every worktree branch name, which is useful for keeping Claude-created branches organized. To include gitignored files like `.env` in new worktrees, create a [`.worktreeinclude` file](</docs/en/worktrees#copy-gitignored-files-into-worktrees>) in your project root. See [What worktrees share with the main checkout](</docs/en/worktrees#what-worktrees-share-with-the-main-checkout>) for where a worktree session reads project settings, hooks, and skills. Session isolation requires [Git](<https://git-scm.com/downloads>). Most Macs include Git by default. Run `git --version` in Terminal to check; if it prints a version number, Git is installed. If you run into Git errors, ask Claude in [Cowork](<https://claude.com/product/cowork>) to help troubleshoot your setup. @@ -493,7 +503,7 @@ Archive a session -Before you archive a session whose worktree has uncommitted changes, see Keep uncommitted changes when a session is archived. To archive a session, hover over it in the sidebar, open its menu, and select **Archive**. The session moves to your archived sessions. To have sessions archive themselves when their pull request merges or closes, turn on **Auto-archive after PR merge or close** in **Settings > Claude Code**. Cloud sessions and sessions that are still running don’t archive themselves. +Before you archive a session whose worktree has uncommitted changes, see Keep uncommitted changes when a session is archived. To archive a session, hover over it in the sidebar, open its menu, and select **Archive**. The session moves to your archived sessions. To have sessions archive themselves when their pull request merges or closes, turn on **Auto-archive after PR merge or close** in **Settings > Code** or **Settings > Claude Code**. Cloud sessions and sessions that are still running don’t archive themselves. #### @@ -614,12 +624,12 @@ A local session shows up on your other devices once [Remote Control](</docs/en/remote-control>) connects it. A connected session appears in the session list at [claude.ai/code](<https://claude.ai/code>) and in the Claude apps on devices signed in to your claude.ai account. A local session connects when you turn Remote Control on for it, or when it connects automatically as it starts: * **You turn it on for that session** : with the session’s **Remote Control** switch, or by typing `/remote-control` in its prompt box. - * **It connects when it starts** : new sessions connect automatically while **Connect new sessions to Remote Control** is on in **Settings > Claude Code**. If you’ve never changed that setting, Desktop follows [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) in your user or managed settings, then your organization’s default. + * **It connects when it starts** : new sessions connect automatically while **Connect new sessions to Remote Control** is on in **Settings > Code** or **Settings > Claude Code**. If you’ve never changed that setting, Desktop follows [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) in your user or managed settings, then your organization’s default. To see whether a session is connected, check the **Remote Control** switch in the **Environment** card of its session details panel. To keep sessions off your other devices, turn Remote Control off at the level you need: * **One session** : turn off its **Remote Control** switch. In a session that connected when it started, typing `/remote-control` leaves Remote Control on and shows `Remote Control is already on. This session connected automatically when it started.` Click **Turn off** on that line to disconnect. - * **New Desktop sessions on this computer** : turn off **Connect new sessions to Remote Control** in **Settings > Claude Code**. If it already shows off, turn it on and then off so Desktop saves your choice. Once saved, it takes precedence over `remoteControlAtStartup` and the defaults. + * **New Desktop sessions on this computer** : turn off **Connect new sessions to Remote Control** in **Settings > Code** or **Settings > Claude Code**. If it already shows off, turn it on and then off so Desktop saves your choice. Once saved, it takes precedence over `remoteControlAtStartup` and the defaults. * **Any session on this computer, including the CLI** : set [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>) to `true` in `~/.claude/settings.json` to stop sessions from connecting. A session that was already connected when you saved the file stays connected until you turn Remote Control off for it. To hide a session that already appears on your other devices, archive it in Desktop. Desktop archives the session’s Remote Control copy too, so it leaves the default session list on those devices. To view or delete it there, see [Archive sessions](</docs/en/claude-code-on-the-web#archive-sessions>). @@ -669,7 +679,7 @@ * **Connectors is grayed out in a WSL session** : see [If the terminal or connectors are unavailable](</docs/en/desktop-wsl#check-for-the-terminal-and-connectors>) * **Cloud sessions** : see [How connectors reach Claude Code](</docs/en/mcp#how-connectors-reach-claude-code>) -Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session. To manage or disconnect connectors, go to **Settings > Connectors** in the desktop app. For integrations not listed in Connectors, add MCP servers manually via [settings files](</docs/en/mcp#installing-mcp-servers>). You can also [create custom connectors](<https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp>). +Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session. To manage or disconnect connectors, click **Customize** in the sidebar and open **Connectors**. For integrations not listed in Connectors, add MCP servers manually via [settings files](</docs/en/mcp#installing-mcp-servers>). You can also [create custom connectors](<https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp>). ### @@ -2161,7 +2171,7 @@ `--model sonnet`| Model picker in the row under the prompt box `--resume`, `--continue`| Click a session in the sidebar, or type `/resume` in the prompt box to pick up a session you started from the CLI `--permission-mode`| Mode selector in the row under the prompt box -`--dangerously-skip-permissions`| Bypass permissions mode. On Pro and Max plans, enable it in Settings → Claude Code → “Allow bypass permissions mode”; on Team and Enterprise plans, organization policy controls it +`--dangerously-skip-permissions`| Bypass permissions mode. On Pro and Max plans, enable “Allow bypass permissions mode” in **Settings > Code** or **Settings > Claude Code**; on Team and Enterprise plans, organization policy controls it `--add-dir`| Add folders to a session in local and SSH sessions, or select several repositories in a cloud session `--allowedTools`, `--disallowedTools`| No per-session equivalent. Permission rules in [settings files](</docs/en/settings>) still apply. `--verbose`| Verbose view mode @@ -2231,7 +2241,7 @@ * **Agent teams** : coordinated teams, where Claude as the team lead assigns tasks to teammates from a shared task list, are available in the [CLI](</docs/en/agent-teams>), not in Desktop. For multi-agent work inside one session, use [dynamic workflows](</docs/en/workflows>), which run in Desktop; Claude can also message and manage your other sessions directly. * **Terminal-dialog commands** : built-in commands that open an interactive panel in the terminal behave differently in the Code tab. Edit [settings files](</docs/en/settings>) directly to manage permission rules and configuration, or run the commands from the standalone CLI. * Commands with no argument form, such as `/permissions`, reply with `isn't available in this environment`. - * `/config` opens **Settings > Claude Code**. + * `/config` opens **Settings > Code** or **Settings > Claude Code**. ##
modified Schedule recurring tasks in Claude Code Desktop View current →
--- a/desktop-scheduled-tasks.md +++ b/desktop-scheduled-tasks.md @@ -153,7 +153,7 @@ How scheduled tasks run -Local scheduled tasks run on your machine. Desktop checks the schedule every minute while the app is open and starts a fresh session when a task is due, independent of any manual sessions you have open. Each task gets a small delay of a few minutes after the scheduled time to stagger API traffic. The delay is deterministic: the same task always starts at the same offset. Tasks only run while the desktop app is running and your computer is awake. If your computer sleeps through a scheduled time, the run is skipped. To prevent idle-sleep, turn on **Keep computer awake** in **Settings > This computer > System**. Closing the laptop lid still puts it to sleep. +Local scheduled tasks run on your machine. Desktop checks the schedule every minute while the app is open and starts a fresh session when a task is due, independent of any manual sessions you have open. Each task gets a small delay of a few minutes after the scheduled time to stagger API traffic. The delay is deterministic: the same task always starts at the same offset. Tasks only run while the desktop app is running and your computer is awake. If your computer sleeps through a scheduled time, the run is skipped. To prevent idle-sleep, turn on **Keep computer awake** in **Settings > Desktop app** or **Settings > This computer > System**. Closing the laptop lid still puts it to sleep. For tasks that need to run even when your computer is off, or that should trigger on an API call or GitHub event, create a [cloud scheduled task](</docs/en/routines>) instead.
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -273,6 +273,7 @@ `CLAUDE_CODE_ENABLE_TASKS`| Selects which task-tracking tools Claude Code provides in [sessions that have them](</docs/en/tools-reference#task-tool-availability>). By default, Claude Code provides the Task tools `TaskCreate`, `TaskUpdate`, `TaskGet`, and `TaskList`. Set to `0` to get the legacy `TodoWrite` tool instead. See [Task list](</docs/en/interactive-mode#task-list>) `CLAUDE_CODE_ENABLE_TELEMETRY`| Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). See [Monitoring](</docs/en/monitoring-usage>) `CLAUDE_CODE_ENABLE_TODO_TOOLS`| Set to `1` to get the task-tracking tools on every model. Without it, Claude Code provides them by default only on the models listed under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). `CLAUDE_CODE_ENABLE_TASKS` still selects the Task tools or `TodoWrite`. Requires Claude Code v2.1.233 or later +`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 @@ -350,6 +351,7 @@ `CLAUDE_CODE_RESUME_INTERRUPTED_TURN`| Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt. To turn this off, unset the variable or set it to `0`. For the VS Code chat panel, see [Continue conversations after a reload](</docs/en/vs-code#continue-conversations-after-a-reload>) `CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS`| Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume. When the last message is older than this bound, Claude Code skips the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` automatic resume and its `CLAUDE_CODE_RESUME_PROMPT` continuation message, and the session starts idle so you continue explicitly. Unset or `0` sets no bound, except that some turns resume only within six hours of their last message, such as one that ended with an API error. A positive value bounds every turn, including those; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript doesn’t re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed [agent view](</docs/en/agent-view>) session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later `CLAUDE_CODE_RESUME_PROMPT`| Override the continuation message Claude Code sends to Claude when `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` continues an interrupted turn instead of resending its prompt, or when you resume a [deferred tool call](</docs/en/hooks#defer-a-tool-call-for-later>) with `-p`. Defaults to `Continue from where you left off.`. An empty string uses the default +`CLAUDE_CODE_RESUME_SHOWS_CUT_OFF_CALLS`| Set to `1` to keep [interrupted tool calls](</docs/en/sessions#what-a-resumed-session-restores>), marked as cut off, in a turn that `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` continues. When unset, those calls are dropped before the turn continues. Some calls stay dropped, such as calls to subagents, skills, workflows, and tools that wait on a person. For the VS Code chat panel, see [Continue conversations after a reload](</docs/en/vs-code#continue-conversations-after-a-reload>). Requires Claude Code v2.1.309 or later `CLAUDE_CODE_RETRY_WATCHDOG`| Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once when a standard-speed request gets a `429` that reports a spend limit or exhausted usage credits, even one from a [gateway spend cap](</docs/en/errors#spend-limit-reached>) that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. For fast mode requests, see [Handle rate limits](</docs/en/fast-mode#handle-rate-limits>). The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later `CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`| Maximum time in milliseconds that each API request spends waiting out `429` and `529` errors when `CLAUDE_CODE_RETRY_WATCHDOG` is set. Once that time is spent, the next such error ends the request. Give a positive whole number in plain digits, such as `1800000` for 30 minutes. When unset, the wait has no limit. Requires Claude Code v2.1.295 or later `CLAUDE_CODE_RETRY_WATCHDOG_USAGE_LIMIT_RECHECK_MS`| Minimum interval in milliseconds between checks of whether a [usage limit](</docs/en/errors#youve-hit-your-session-limit>) was already lifted, while a request waits for that limit to reset with `CLAUDE_CODE_RETRY_WATCHDOG` set. When a check finds the limit lifted, the request goes out at once. Give a whole number in plain digits from `60000`, one minute, to `10800000`, three hours. Checks are made only for a claude.ai subscription’s session or weekly limit while usage credits aren’t in use, and not while `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. When this variable is unset or its value is outside that range, no checks are made. Requires Claude Code v2.1.305 or later
modified Error reference View current →
--- a/errors.md +++ b/errors.md @@ -138,6 +138,7 @@ `N sessions ended while this machine was offline — the environment was cleaned up on the server and can't be resumed.`| Network `Couldn't share the transcript.`| Network `Couldn't send feedback`| Network +`Feedback payload too large. Try again without the transcript, or shorten the details.`| Network `MCP server "<name>" connection timed out. Your computer went to sleep or its clock changed while connecting.`| Network `Prompt is too long` / `Input is too long for requested model`| Request errors `Prompt is too long · automatic compaction failed:`| Request errors @@ -327,6 +328,7 @@ `Failed to write the plan approval request to the lead's inbox — plan not submitted`| Tool errors `Its agent definition was not restored: the folder its definition file came from is not trusted`| Tool errors `Only a teammate can approve a shutdown request`| Tool errors +`A command-line deny rule cannot be handed to a teammate intact`| Tool errors `Message too large for cross-session delivery`| Tool errors `Too many messages to this session just now`| Tool errors `Cross-session message was dropped at the recipient session's inbox`| Tool errors @@ -2061,7 +2063,7 @@ Couldn’t send feedback -A message starting `Couldn't send feedback` means the report you submitted from the [`/feedback`, `/bug`, or `/share` dialog](</docs/en/commands#all-commands>), or a queued [feedback draft](</docs/en/tools-reference#sendfeedback-tool-behavior>), wasn’t sent. When a sentence about your organization follows the colon, your organization refuses feedback and the same report gets the same answer. The first of these two examples is a network failure and the second is an organization’s refusal: +A message starting `Couldn't send feedback` means the feedback service didn’t confirm the report you submitted from the [`/feedback`, `/bug`, or `/share` dialog](</docs/en/commands#all-commands>), or a queued [feedback draft](</docs/en/tools-reference#sendfeedback-tool-behavior>). Treat it as not received. When a sentence about your organization follows the colon, your organization refuses feedback and the same report gets the same answer. The second of these two examples is an organization’s refusal: Couldn't send feedback (couldn't reach the service). If it keeps failing, you can file at https://github.com/anthropics/claude-code/issues instead. @@ -2072,10 +2074,24 @@ * **Not signed in** : the message continues `: not signed in. Run /login, then retry.` Run `/login`, then send again * **Your organization’s refusal** : for example `: Feedback has not been enabled for your organization.` or `: Feedback collection is not available for organizations with custom data retention policies.` If the message adds `To report a bug, open an issue`, do so at [github.com/anthropics/claude-code/issues](<https://github.com/anthropics/claude-code/issues>). A queued draft stays queued, and you can [discard it](</docs/en/tools-reference#discard-or-keep-a-draft>) * **Refused credentials** : the message continues `: the sign-in this session uses is not allowed to send feedback` or `: the server did not accept the credentials this session uses`. Run `/status` at the Claude Code prompt to see which login, token, or API key this session sends - * **`(request timed out)` or `(couldn't reach the service)` straight after `Couldn't send feedback`**: these are network failures. Send the report or the queued draft again. The dialog keeps your text, and a queued draft’s message says `The draft is still queued.` If other requests are failing too, check your network connection and see Unable to connect to API. If it keeps failing, file the report at [github.com/anthropics/claude-code/issues](<https://github.com/anthropics/claude-code/issues>) + * **`(request timed out)` or `(couldn't reach the service)` straight after `Couldn't send feedback`**: send the report or the queued draft again. The dialog keeps your text, and a queued draft’s message says `The draft is still queued.` If other requests are failing too, check your network connection and see Unable to connect to API. If it keeps failing, file the report at [github.com/anthropics/claude-code/issues](<https://github.com/anthropics/claude-code/issues>) * **`(server returned<status>)`, or no reason, straight after `Couldn't send feedback`**: the status is the service’s response code. The service’s own message follows it when one was sent, as in `(server returned 403: Access Forbidden)`. If it keeps failing, file the report at [github.com/anthropics/claude-code/issues](<https://github.com/anthropics/claude-code/issues>) Issues at github.com/anthropics/claude-code are public, so leave out code, transcripts, and anything else confidential when you open one. Before v2.1.281, every send failed with this message once a Remote Control **Stop** or an urgent cross-session message had arrived while the dialog was open. On those versions, close the dialog, reopen it, and send again. + +### + +​ + +Feedback payload too large + +This message in the [review screen](</docs/en/tools-reference#review-and-edit-a-draft>) for a [feedback draft](</docs/en/tools-reference#sendfeedback-tool-behavior>) means Claude Code has no confirmation that the service accepted the draft. Treat it as not received. The draft stays in your `/feedback` queue, so you can send it again. + + Feedback payload too large. Try again without the transcript, or shorten the details. + +**What to do:** + + * In the review screen, set **Send transcript** to `no`, then send the draft again. Shortening the details removes at most 10 KB of text, which is all a draft’s details can hold. ### @@ -3297,7 +3313,7 @@ MCP server rejected the elicitation capability -An MCP server built on Java MCP SDK 0.11.0 through 0.17.0 refused the connection. Those SDK versions can’t parse the `form` and `url` [elicitation modes](</docs/en/mcp#elicitation-modes-claude-code-declares>) that Claude Code declares in its handshake. `claude mcp list` shows the server as failed with this message in place of the server’s own error: +An MCP server built on Java MCP SDK 0.11.0 through 0.17.0 refused the connection. Those SDK versions can’t parse the `form` and `url` [elicitation modes](</docs/en/mcp#elicitation-modes-claude-code-declares>) that Claude Code declares in its handshake. The message reads: This server (Java MCP SDK 0.17.0 or older) rejected Claude Code's elicitation capability. Set "bareElicitationCapability": true for it, or upgrade to Java MCP SDK 0.17.1+ (Spring AI 1.0.7+ or 1.1.6+). @@ -4478,6 +4494,21 @@ * If the refusal appeared in your lead session, first check whether the teammate has since shut down. The refusal goes back to Claude with the instruction to send a `shutdown_request` instead, and the turn continues. In an interactive lead session, `<name> has shut down.` appears when the teammate approves a shutdown request. * If the teammate is still running, ask the lead at its prompt to shut the teammate down, for example `Ask the researcher teammate to shut down`. See [Shut down teammates](</docs/en/agent-teams#shut-down-teammates>). * If a former teammate you resumed yourself with `claude --resume` got this refusal, nothing was sent. To end that session, run `/exit` at its prompt. + +### + +​ + +A command-line deny rule cannot be handed to a teammate intact + +This message means Claude Code didn’t start a [split-pane](</docs/en/agent-teams#choose-a-display-mode>) teammate in your [agent team](</docs/en/agent-teams>). Claude Code passes the lead’s command-line deny rules to a split-pane teammate on the teammate’s own command line, and stops when the teammate would read one of them differently: + + A command-line deny rule cannot be handed to a teammate intact, so the teammate would not enforce it — spawn aborted + +**What to do:** + + * Run `/config` in the lead session and set **Teammate mode** to `in-process`, then ask Claude to start the teammate again. You don’t need to find the rule or restart the lead. An in-process teammate [runs under the lead’s live deny rules](</docs/en/agent-teams#permissions>). + * Later sessions that take [`teammateMode`](</docs/en/settings-reference#teammatemode>) from your user settings start teammates in-process too, because `/config` saves the choice there. To go back to split panes in a later session, set **Teammate mode** to `auto`, `tmux`, or `iterm2`, whichever you used before. ###
modified React to events with a mod View current →
--- a/events.md +++ b/events.md @@ -297,18 +297,26 @@ Claude’s response streams to the screen as it does without the mod. After each request finishes, a dim line in the transcript gives the number of tokens read from the cache and the number written to it. A turn with tool calls has several requests, so it adds several lines. `result.usage` holds the token counts the Claude API reports for a request, plus the `model` that answered: `input_tokens`, `output_tokens`, `cache_read_input_tokens`, and `cache_creation_input_tokens`. The hook runs for subagents’ requests too, so check `e.agentId` when you want only the main conversation. To see the tool calls that the API ran itself during the request, such as calls to the [advisor tool](</docs/en/advisor>), read `result.serverToolUses`. Claude Code doesn’t run these calls, so no `tool.call` or `tool.check` hook fires for them. The field is absent when the response has no such calls, and it requires Claude Code v2.1.290 or later. +#### + +​ + +Send a request to a different model + +If a `turn.step` request fails with a model error when `model` is an alias such as `haiku`, update to Claude Code v2.1.309 or later, or use a full model id. Before v2.1.309, an alias went out as written. To send a request to a different model, pass `next` the event with `model` changed, as in `yield* next({ ...e, model: 'haiku' })`. + ### ​ Change or refuse a settings read -A `settings.read` hook runs on a mod’s read and on Claude Code’s own read: +Use a `settings.read` hook to change or refuse a settings read, either a mod’s or Claude Code’s own: * **A mod’s read** : a mod calls [`$.settings.read`](</docs/en/plugins/mods/api#read-one-source-or-one-key>). - * **Claude Code’s own read** : Claude Code builds the session’s merged settings. This read repeats when settings or the loaded plugins change. - -Before you rely on either read, check the guard and your version: + * **Claude Code’s own read** : your hook first runs when Claude Code merges the session’s settings, after the session’s mods have loaded. Your hook runs again when settings or loaded plugins change. + +Check which mods get this event and your Claude Code version: * **The built-in guard** : with managed settings, or with a Team or Enterprise [`/login`](</docs/en/authentication#authentication-precedence>) as the session’s credential, the [built-in guard](</docs/en/plugins/mods/admin#know-what-happens-by-default>) can skip this hook in a mod you install or load with `--plugin-dir`. To check, search the [debug log](</docs/en/plugins/mods/troubleshoot#read-the-debug-log>) for `settings.read bypassed by cc-plugin-sec-default`. If a line with that text names your mod, ask your organization’s administrator to [install the mod as one of the organization’s mods](</docs/en/plugins/mods/admin#install-your-organizations-mods>). * **The version** : the event firing on Claude Code’s own read, and the `e.layers` field, require Claude Code v2.1.304 or later. @@ -332,7 +340,10 @@ Tell Claude Code’s own read from a mod’s read -On Claude Code’s own read, [`next.origin`](</docs/en/plugins/mods/reference#the-hook-function>) is `{ plugin: 'engine', tier: 'core' }`, and on a mod’s read `next.origin.plugin` is the calling mod’s name. +Check [`next.origin`](</docs/en/plugins/mods/reference#the-hook-function>): + + * **Claude Code’s own read** : `{ plugin: 'engine', tier: 'core' }` + * **A mod’s read** : `plugin` is the calling mod’s name #### @@ -340,11 +351,11 @@ What a `settings.read` hook can return -Your hook can return [`next(e)`](</docs/en/plugins/mods/reference#the-hook-function>)’s result unchanged, a `{ value }` of its own, or `{ deny: reason }`. On Claude Code’s own read and a mod’s read, a `{ value }` replaces what the read gives and `{ deny: reason }` refuses the read: +Return `next(e)`’s result unchanged to leave the read as it is, or return one of these: Return| On Claude Code’s own read| On a mod’s read ---|---|--- -`{ value }`| For each key you change, what you return replaces that key’s whole value in the session’s merged settings, if it [fits the key’s schema](</docs/en/plugins/mods/troubleshoot#settings-read-key-refused>)| That mod’s call resolves to your `value`, or to the `key` it asked for taken from your `value`, so return a whole object and not an array +`{ value }`| For each key changed, you replace its whole value in the session’s merged settings, if yours [fits the key’s schema](</docs/en/plugins/mods/troubleshoot#settings-read-key-refused>)| That mod’s call resolves to your `value`, or to the `key` it asked for taken from your `value`, so return a whole object and not an array `{ deny: reason }`| The session keeps the settings as they were merged before any hook answered, and the [debug log records your `reason`](</docs/en/plugins/mods/troubleshoot#settings-read-refused>)| That mod’s call rejects with `<calling mod>: $.settings.read: <reason>` On Claude Code’s own read, build your `{ value }` from `next(e)`’s `value`, since a key you leave out is unset. Where Claude Code reads a key such as `env` from each source separately, changing it in your `value` [has no effect](</docs/en/plugins/mods/troubleshoot#settings-read-key-no-effect>). @@ -377,7 +388,7 @@ return { value: { ...read.value, spinnerTipsEnabled: false } } }) -On Claude Code’s own read, if your hook returns a value outside the key’s schema, such as a string, that key alone keeps the value merged before any hook answered. The debug log then says [`the answer for <key> is no value the key can hold`](</docs/en/plugins/mods/troubleshoot#settings-read-key-refused>). If your value fits and the key still doesn’t change, see [why a returned key has no effect](</docs/en/plugins/mods/troubleshoot#settings-read-key-no-effect>). +On Claude Code’s own read, if your hook returns a value outside the key’s schema, such as a string, that key alone keeps the value merged before any hook answered. The debug log then says [`the answer for <key> is no value the key can hold`](</docs/en/plugins/mods/troubleshoot#settings-read-key-refused>). If your value fits and the key still doesn’t change, see [why a key doesn’t take effect](</docs/en/plugins/mods/troubleshoot#settings-read-key-no-effect>). ###
modified Speed up responses with fast mode View current →
--- a/fast-mode.md +++ b/fast-mode.md @@ -25,7 +25,7 @@ * A small `↯` icon appears next to the prompt while fast mode is active * Run `/fast` again at any time to check whether fast mode is on or off -Opus 5.5 is the fast mode default in Claude Code v2.1.280 and later. Before v2.1.280, fast mode defaulted to Opus 5 from v2.1.219, and to Opus 4.8 on v2.1.154 through v2.1.218. When you disable fast mode with `/fast` again, you remain on Opus. To switch to a different model, use `/model`. +Opus 5.5 is the fast mode default in Claude Code v2.1.280 and later. Before v2.1.280, fast mode defaulted to Opus 5 from v2.1.219. When you disable fast mode with `/fast` again, you remain on Opus. To switch to a different model, use `/model`. ###
modified Interface gallery for mods View current →
--- a/gallery.md +++ b/gallery.md @@ -260,7 +260,7 @@ `Input` -An `Input` is a text field that runs `onSubmit` when the user presses Enter. It holds one line unless you give it `rows`: +An `Input` is a text field that holds one line by default and runs `onSubmit` when the user presses Enter: Input({ key: 'title', @@ -271,7 +271,7 @@ onSubmit: noop, }) -Without the focus, the field shows its label and its placeholder: With the focus, the label turns bold, a cursor appears, and the `submitLabel` shows after `⏎`: Typing replaces the placeholder: Add `rows` for a field that holds several lines, such as a note or a commit message: +Without the focus, the field shows its label and its placeholder: With the focus, the label turns bold, a cursor appears, and the `submitLabel` shows after `⏎`: Typing replaces the placeholder: Set `rows` to 2 or more for a field that holds several lines, such as a note or a commit message: Input({ key: 'note', @@ -281,13 +281,11 @@ onSubmit: noop, }) -Whatever the field holds, it takes that many rows, up to the height of the pane or band it’s drawn in. Longer text scrolls inside it. - - * Enter still submits. In the terminal, the user starts a new line by typing a backslash and then pressing Enter, or by pressing Shift+Enter where [the terminal emulator supports it](</docs/en/terminal-config#enter-multiline-prompts>). Those are the same keys as in the prompt. - * Up and Down move between the field’s rows. From its first and last row they move to the control before or after. +The terminal and the Desktop app draw the rows. In the VS Code extension, the field holds one line. `rows` requires Claude Code v2.1.301 or later. On earlier versions the field holds one line. The field takes up the number of rows you set, even when it’s empty, up to the height of the pane or band it’s drawn in. While the field has focus, longer text scrolls inside it. + + * In the terminal, Enter still submits. There, the user starts a new line by typing a backslash and then pressing Enter, or by pressing Shift+Enter where [the terminal emulator supports it](</docs/en/terminal-config#enter-multiline-prompts>). Those are the same keys as in the prompt. + * In the terminal, Up and Down move between the field’s rows. From its first and last row they move to the control before or after. * `onSubmit` and `onInput` receive the whole text with its lines joined by `\n`. - -The terminal and the Desktop app draw the rows. In the VS Code extension, the field holds one line. ###
modified Claude Code on Google Cloud's Agent Platform View current →
--- a/google-vertex-ai.md +++ b/google-vertex-ai.md @@ -167,14 +167,14 @@ Primary model| `claude-opus-5-5` Small/fast model| `claude-sonnet-4-5@20250929` -Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Google Cloud’s Agent Platform, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every project or region. Two selections change which model carries them: +Before v2.1.280, the primary model on Google Cloud’s Agent Platform defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219. Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Google Cloud’s Agent Platform, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every project or region. Two selections change which model carries them: * When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. When Claude Code starts the session on the model you set with [`ANTHROPIC_DEFAULT_MODEL`](</docs/en/model-config#set-a-default-model-for-new-sessions>), background tasks use that model too. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` also counts as a selection, because the built-in Sonnet model may not be enabled in a project that steers its own Opus. * To use Haiku for background tasks, set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to a model ID that is available in your project. Opus models have a higher per-token price than Sonnet models, so if you don’t pin a primary model, you’re billed at the Opus rate. To use Sonnet 4.5 as the primary model, set `ANTHROPIC_MODEL` to its full model ID. A deployment that steers the default with `ANTHROPIC_DEFAULT_SONNET_MODEL` and doesn’t set `ANTHROPIC_DEFAULT_OPUS_MODEL` keeps its steered Sonnet model as the default. -Before v2.1.280, the primary model on Google Cloud’s Agent Platform defaulted to Opus 5 and the `opus` alias resolved to Opus 5 from v2.1.219. On v2.1.207 through v2.1.218, the primary model on Google Cloud’s Agent Platform defaulted to Opus 4.8 and the `opus` alias resolved to Opus 4.8. To customize models further: +To customize models further: export ANTHROPIC_MODEL='claude-opus-4-8' export ANTHROPIC_DEFAULT_HAIKU_MODEL='claude-haiku-4-5@20251001'
modified Run Claude Code programmatically View current →
--- a/headless.md +++ b/headless.md @@ -212,7 +212,6 @@ For a forked skill started from the prompt, match `parent_tool_use_id` on the `forked-command-` prefix, because the name after it can differ from the one you typed. If some of these messages are missing from your stream, check your Claude Code version against these minimums: - * **Forwarding at every nesting depth** : v2.1.219 or later * **A forked skill that Claude starts with the Skill tool from the main conversation** : v2.1.86 or later for its `tool_use` and `tool_result` blocks, and v2.1.265 or later for its first `user` message and its text and thinking blocks * **Messages of subagents that a forked skill spawns, and of forked skills started inside a subagent or another forked skill** : v2.1.275 or later * **Messages of a forked skill you start by passing`/<skill-name>` as the prompt**: v2.1.287 or later @@ -269,9 +268,9 @@ Field| Type| Description ---|---|--- `mcp_servers`| array| MCP servers in the session, each with `name` and `status` -`mcp_server_errors`| array| `--mcp-config` entries skipped by config validation, each with `name`, `type`, and `message`. `type` is a skip category such as `unknown_type`, `url_missing_type`, `invalid_config`, or `reserved_name`; treat values you don’t recognize as a generic skip. Affected servers are absent from `mcp_servers`. The key is omitted when there are no errors, so a CI gate can fail on a non-empty array. Requires Claude Code v2.1.219 or later - -When you run the command by hand in a terminal, Claude Code also prints a startup warning to stderr, such as `Warning: 1 MCP server skipped due to invalid config:`, followed by the reason for each skipped entry. When you redirect stderr, or when a program such as a CI runner or an SDK host captures it, Claude Code prints no warning and reports the skipped entries only in the `mcp_server_errors` field. The warning requires Claude Code v2.1.219 or later. +`mcp_server_errors`| array| `--mcp-config` entries skipped by config validation, each with `name`, `type`, and `message`. `type` is a skip category such as `unknown_type`, `url_missing_type`, `invalid_config`, or `reserved_name`; treat values you don’t recognize as a generic skip. Affected servers are absent from `mcp_servers`. The key is omitted when there are no errors, so a CI gate can fail on a non-empty array + +When you run the command yourself in a terminal, Claude Code also prints a startup warning to stderr, such as `Warning: 1 MCP server skipped due to invalid config:`, followed by the reason for each skipped entry. When you redirect stderr, or when a program such as a CI runner or an SDK host captures it, Claude Code prints no warning. It reports the skipped entries only in the `mcp_server_errors` field. ####
modified Hosting the Agent SDK View current →
--- a/hosting.md +++ b/hosting.md @@ -190,7 +190,7 @@ The container needs your SDK’s language runtime: - * Python 3.10+ for the Python SDK, or Node.js 18+ for the TypeScript SDK + * Python 3.10+ for the Python SDK, or Node.js 18.14+ for the TypeScript SDK * Both the TypeScript and Python SDKs bundle a native Claude Code binary for most installs, and the spawned CLI needs no separate Node.js install. See the [quickstart’s install note](</docs/en/agent-sdk/quickstart>) for the installs that need a separate native Claude Code install. The bundled binary is pinned to the SDK package version, so updating the SDK is how you update the CLI. The SDK follows semver: take patch releases continuously and review the [TypeScript](<https://github.com/anthropics/claude-agent-sdk-typescript/blob/main/CHANGELOG.md>) or [Python](<https://github.com/anthropics/claude-agent-sdk-python/blob/main/CHANGELOG.md>) changelog before taking a minor. @@ -357,7 +357,7 @@ Limitation| What to do ---|--- -No top-level session timeout| A session does not time out on its own. Set `maxTurns` in TypeScript or `max_turns` in Python to bound how many tool-use round trips the agent takes before stopping. +No top-level session timeout| A session doesn’t time out on its own. Set `maxTurns` in TypeScript or `max_turns` in Python to bound how many [turns](</docs/en/agent-sdk/agent-loop#turns-and-messages>) the agent takes before stopping. Memory growth over long sessions| Cap session length or recycle subprocesses periodically. See Scaling and concurrency. Large parallel-subagent fanouts can hit rate limits| Break work into smaller batches rather than issuing one wide dispatch. No per-subagent wall-clock deadline| Cap each [subagent](</docs/en/agent-sdk/subagents>) with `maxTurns` in its `AgentDefinition`. `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS` sets a stall watchdog that fires when a subagent stops producing output; it isn’t a total-runtime deadline.
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -100,7 +100,7 @@ `/` at start| Command or skill| See commands and [skills](</docs/en/skills>) `!` at start| Shell mode| Run a command directly, add its output to the session, and have Claude respond to it `@`| File path mention| Trigger file path autocomplete. In sessions with [cross-session messaging](</docs/en/cross-session-messaging#message-another-session>), when you type at least one letter after the `@`, Claude Code also suggests your other live sessions on this machine, so you can tell Claude to message the one you pick. Requires Claude Code v2.1.232 or later -`:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes. Requires Claude Code v2.1.217 or later +`:`| Emoji shortcode| Type a full `:name:` to insert the emoji, or two or more characters for suggestions. See Emoji shortcodes `?` on empty input| Toggle the shortcut help panel| Typing `?` when the input already contains text inserts the character ### @@ -219,7 +219,7 @@ `%`| Jump to the matching `()`, `[]`, or `{}` bracket, starting from the next bracket on the current line when the cursor isn’t on a bracket. Requires Claude Code v2.1.301 or later `/`| Open reverse history search, same as `Ctrl+R`. The empty search prompt shows a hint: press `Esc` then `i` then `/` to open the command menu instead -In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT; before v2.1.219, `←` on an empty prompt did nothing in NORMAL mode. +In vim NORMAL mode, if the cursor is at the beginning or end of input and can’t move further, `j`/`k` and `↑`/`↓` navigate command history instead. `←` on an empty prompt opens [agent view](</docs/en/agent-view>) from NORMAL mode as well as INSERT. ### @@ -574,7 +574,7 @@ Emoji shortcodes -Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. Requires Claude Code v2.1.217 or later. +Type a `:` followed by an emoji shortcode in the prompt input to insert the emoji. * Type a complete shortcode such as `:heart:` and Claude Code replaces it with ❤️ as soon as you type the closing `:` * Type `:` plus at least two characters of a name, such as `:hea`, to open a suggestion popup, then press `Tab` or `Enter` to insert the highlighted emoji @@ -798,11 +798,11 @@ When a claude.ai [usage limit](</docs/en/errors#youve-hit-your-session-limit>) stops Claude mid-task, Claude Code waits in the open session and continues the task on its own after the limit resets. Automatic continue is on by default in interactive sessions signed in with a claude.ai subscription. Requires Claude Code v2.1.234 or later. While Claude Code waits, the lines at the bottom of the session show when your limit resets and when Claude will continue: Usage limit reached · limit resets 3:45pm - Continuing automatically at 3:45pm · esc to cancel + Continuing automatically at 3:45pm · Esc to cancel Either line can carry more after these words, such as a help link on the first or `/usage-credits to continue now` on the second. When the wait starts on its own, the conversation also records it with a line that reads `Usage limit reached · continuing automatically at 3:45pm · esc to cancel`. Keep the session open. What happens next depends on how the wait ends: - * **At the reset** : the second line changes to `Continuing shortly · esc to cancel`. Then `Usage limit reset · continuing automatically` appears in the conversation, and Claude Code prompts Claude to pick the task up where it stopped. It doesn’t resend your last message. + * **At the reset** : the second line changes to `Continuing shortly · Esc to cancel`. Then `Usage limit reset · Continuing automatically` appears in the conversation, and Claude Code prompts Claude to pick the task up where it stopped. It doesn’t resend your last message. * **After your computer slept** : if it slept for more than about 30 minutes and the limit reset while it slept, the first line reads `Your usage limit has reset` and the second reads `Press enter to continue`. Press `Enter` to continue. After a shorter sleep, or one that ended before the reset, Claude Code continues on its own. * **Early** : when you finish adding [usage credits](</docs/en/costs#add-usage-credits-to-your-subscription>) with `/usage-credits`, sign back in after `/upgrade`, or switch models with `/model` during the wait, Claude Code checks whether usage is available again and continues right away if it is. It doesn’t check after an upgrade or purchase you make in a browser on your own. Under [`opusplan`](</docs/en/model-config#opusplan-model-setting>) and other model settings that run plan mode on a different model, Claude Code waits for the reset instead.
modified Draw in the interface with a mod View current →
--- a/interface.md +++ b/interface.md @@ -371,7 +371,7 @@ Note: Type a note and press Enter -Add `rows` to let the field hold several lines. Enter still submits, and a backslash before Enter starts a new line, as does Shift+Enter where [the terminal supports it](</docs/en/terminal-config#enter-multiline-prompts>). The gallery shows [a field with `rows`](</docs/en/plugins/mods/gallery#input>). +Set `rows` to 2 or more for [a field that holds several lines](</docs/en/plugins/mods/gallery#input>). The [interface gallery](</docs/en/plugins/mods/gallery>) has samples and screenshots of most elements. This table lists every element: @@ -508,7 +508,7 @@ Key| What it does ---|--- Tab| Moves to the next control -Up and Down| Move between controls while your drawing fits. When the pane or band has more rows than it can show, they scroll it. In an `Input`, they [move between the field’s rows](</docs/en/plugins/mods/gallery#input>) first. +Up and Down| Move between controls while your drawing fits. When the pane or band has more rows than it can show, they scroll it. In an `Input` in the terminal, they [move between the field’s rows](</docs/en/plugins/mods/gallery#input>), and from its first or last row they move to the control before or after it. Enter| Presses the focused `Button`, submits the focused `Input`, or picks in a `Select` A button’s hotkey| Presses that button. While an `Input` has the focus, every printable key goes to the field. Page Up, Page Down, Home, and End| Scroll your pane or band when it has more rows than it can show
modified Set up Claude Code in a monorepo or large codebase View current →
--- a/large-codebases.md +++ b/large-codebases.md @@ -158,7 +158,7 @@ Claude’s content searches respect `.gitignore` by default, so paths already listed there, such as `node_modules/`, `dist/`, and `build/`, stay out of search results without additional configuration. For paths that are checked in, such as a vendored SDK or committed generated code, add `Read` deny rules in `permissions.deny` to block Claude from opening those files. The deny rules can cover everyone working in the repository, only you, or every session on the machine, depending on which settings file you put them in: * **Everyone working in the repository** : commit the rules to `.claude/settings.json`, at the repository root if you start Claude there, or in each package’s `.claude/` if you start from subdirectories. Like other project settings on this page, that file isn’t inherited from parent directories. - * **Yourself only** : use `.claude/settings.local.json` at the repository root, which loads in every CLI session inside the repository regardless of starting directory, except in the cases where Claude Code [doesn’t use the repository root](</docs/en/settings#where-claude-code-looks-for-each-file>), such as on Windows. Relative patterns like the example’s `Read(./**/vendor/**/*)` still [anchor at the session’s current working directory](</docs/en/permissions#read-and-edit>) rather than the repository root, so if you start sessions from subdirectories, write the rules in this file as `//`-absolute paths, such as `Read(//absolute/path/to/repo/**/vendor/**/*)`. Before v2.1.211, `.claude/settings.local.json` also loaded only from the starting directory. + * **Yourself only** : use `.claude/settings.local.json` at the repository root. It loads in every CLI session inside the repository regardless of starting directory, except in the cases where Claude Code [doesn’t use the repository root](</docs/en/settings#where-claude-code-looks-for-each-file>), such as on Windows. Relative patterns like the example’s `Read(./**/vendor/**/*)` still [anchor at the session’s current working directory](</docs/en/permissions#read-and-edit>) rather than the repository root. If you start sessions from subdirectories, write the rules in this file as `//`-absolute paths, such as `Read(//absolute/path/to/repo/**/vendor/**/*)`. * **Everyone, enforced in every session** : set the rules in [managed settings](</docs/en/managed-settings>), which user and project settings cannot override. The example below blocks build artifacts and a vendored SDK. Its directory patterns end with `/**/*` rather than `/**` so that each rule covers everything inside the directory but not the directory itself. Claude can then still list those directories or change into them, for example with `ls dist` or `cd build`. @@ -348,7 +348,7 @@ Per-directory CLAUDE.md files can become hard to govern as the codebase grows. Conventions drift, files go stale, and no one owns the root. Solving that typically falls to the team that maintains the repository’s Claude Code setup rather than to each developer working in their own area. Move conventions and reference content out of always-loaded CLAUDE.md and into mechanisms that load on demand: * [Skills](</docs/en/skills>): reference material Claude loads only when relevant to the task - * [Plugins](</docs/en/plugins/overview>): versioned bundles of skills, hooks, and commands that a platform team owns centrally + * [Plugins](</docs/en/plugins/overview>): versioned bundles of skills, hooks, and commands that a platform team owns centrally and can [install for everyone through managed settings](</docs/en/plugins/org#pre-install-and-require-plugins>) * [MCP servers](</docs/en/mcp>): if your organization already runs a code search or RAG index over the repository, expose it as an MCP tool so Claude queries it instead of reading files directly See [server-managed or endpoint-managed settings](</docs/en/server-managed-settings#choose-between-server-managed-and-endpoint-managed-settings>) for how platform teams can enforce these centrally.
modified Connect Claude Code to an LLM gateway View current →
--- a/llm-gateway-connect.md +++ b/llm-gateway-connect.md @@ -367,7 +367,7 @@ Turn off traffic outside the gateway path -The gateway carries model requests, but Claude Code also sends nonessential background traffic outside the gateway path, to Anthropic and to third-party services such as GitHub: version checks, telemetry, release notes, and similar requests. On a network that only allows egress to the gateway, these requests fail and can appear as blocked connections in your egress monitoring. Claude Code attaches a credential to a telemetry or usage-metrics request only when the request goes to the host the credential belongs to. While `ANTHROPIC_BASE_URL` points at the gateway, Claude Code sends its telemetry events to Anthropic without your gateway credential. With a credential variable or `apiKeyHelper` also active, Claude Code doesn’t report usage metrics to the Console [analytics dashboard](</docs/en/analytics#access-analytics-for-api-customers>). Before v2.1.246, Claude Code could attach the gateway credential to telemetry and usage-metrics requests bound for Anthropic hosts; model requests always went to the gateway with the credential the gateway expects. To turn that traffic off, set `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` alongside the gateway variables, in the same shell exports or settings-file `env` block: +The gateway carries model requests, but Claude Code also sends nonessential background traffic outside the gateway path, to Anthropic and to third-party services such as GitHub: version checks, telemetry, release notes, and similar requests. On a network that only allows egress to the gateway, these requests fail and can appear as blocked connections in your egress monitoring. To turn that traffic off, set `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1` alongside the gateway variables, in the same shell exports or settings-file `env` block: * Bash or Zsh
modified How Claude remembers your project View current →
--- a/memory.md +++ b/memory.md @@ -221,7 +221,7 @@ - "tests/**/*.test.ts" --- -Each brace group multiplies the number of expanded patterns: `src/*.{ts,tsx}` expands to two patterns, and `{a,b}/{c,d}/*.{ts,tsx}` to eight. To keep expansion bounded, a rule’s whole `paths` list shares one budget of 1,000 expanded patterns and 4 MiB, and patterns without braces don’t count against it. Claude Code uses any pattern that would exceed the budget unexpanded, and its literal braces match no files. Before v2.1.217, a `paths` value with many brace groups stalled or crashed the CLI at startup. Glob syntax treats `[` as the start of a bracket expression such as `[abc]`. A pattern with a `[` that can’t be read as a bracket expression, such as `photos [2024/**`, is invalid: it matches nothing, and the rule’s other patterns keep working. To match a literal `[` in a file name, escape it as `photos \[2024/**`. +Each brace group multiplies the number of expanded patterns: `src/*.{ts,tsx}` expands to two patterns, and `{a,b}/{c,d}/*.{ts,tsx}` to eight. To keep expansion bounded, a rule’s whole `paths` list shares one budget of 1,000 expanded patterns and 4 MiB, and patterns without braces don’t count against it. Claude Code uses any pattern that would exceed the budget unexpanded, and its literal braces match no files. Glob syntax treats `[` as the start of a bracket expression such as `[abc]`. A pattern with a `[` that can’t be read as a bracket expression, such as `photos [2024/**`, is invalid: it matches nothing, and the rule’s other patterns keep working. To match a literal `[` in a file name, escape it as `photos \[2024/**`. #### @@ -562,7 +562,7 @@ View and edit with `/memory` -The `/memory` command lists your CLAUDE.md, CLAUDE.local.md, and other memory file locations across user and project scopes, including user and project CLAUDE.md entries for files that don’t exist yet. It also lets you toggle auto memory on or off and provides an option to open the auto memory folder. Select any file to open it in your editor; selecting one that doesn’t exist yet creates it first. To check which `CLAUDE.md` and rules files loaded at launch, run `/context`. GUI editors such as VS Code open the file in a separate window, and you can keep using the session while it’s open. Before v2.1.216, `/memory` waited for you to close the file before responding. Terminal editors such as Vim take over the terminal until you exit. When you ask Claude to remember something, like “always use pnpm, not npm” or “remember that the API tests require a local Redis instance,” Claude saves it to auto memory. To add instructions to CLAUDE.md instead, ask Claude directly, like “add this to CLAUDE.md,” or edit the file yourself via `/memory`. +The `/memory` command lists your CLAUDE.md, CLAUDE.local.md, and other memory file locations across user and project scopes, including user and project CLAUDE.md entries for files that don’t exist yet. It also lets you toggle auto memory on or off and provides an option to open the auto memory folder. Select any file to open it in your editor; selecting one that doesn’t exist yet creates it first. To check which `CLAUDE.md` and rules files loaded at launch, run `/context`. GUI editors such as VS Code open the file in a separate window, and you can keep using the session while it’s open. Terminal editors such as Vim take over the terminal until you exit. When you ask Claude to remember something, like “always use pnpm, not npm” or “remember that the API tests require a local Redis instance,” Claude saves it to auto memory. To add instructions to CLAUDE.md instead, ask Claude directly, like “add this to CLAUDE.md,” or edit the file yourself via `/memory`. ##
modified Modifying system prompts View current →
--- a/modifying-system-prompts.md +++ b/modifying-system-prompts.md @@ -439,7 +439,12 @@ Every CLAUDE.md file| Set `CLAUDE_CODE_DISABLE_CLAUDE_MDS=1` Task list nudges, file-changed notes, and the skill list| Set `CLAUDE_CODE_DISABLE_ATTACHMENTS=1` -Set `includeGitInstructions` to `false` to keep out the built-in commit and pull request instructions, which are part of the Bash tool’s description and reach Claude even with a custom `systemPrompt`. With the minimal default, a custom `systemPrompt`, or a custom main-thread agent that has its own prompt, though, the session starts without the git status snapshot. If you set `CLAUDE_CODE_DISABLE_ATTACHMENTS`, Claude Code also sends `@` file mentions as plain text instead of expanding them into file content. The list of available subagents and background task notifications still arrive. To stop only `@` file mentions from expanding, set [`CLAUDE_CODE_DISABLE_FILE_MENTIONS=1`](</docs/en/env-vars#variables>) instead, on Claude Code v2.1.299 or later. Claude then gets the mentioned paths plus a note to read them with its file tools. The following example is for an agent that carries its own commit rules in `append`. It sets both `attribution` keys to empty strings to remove the trailer and footer, and turns off `includeGitInstructions` so Claude Code’s own commit workflow instructions don’t compete with yours: +Set `includeGitInstructions` to `false` to keep out the built-in commit and pull request instructions, which are part of the Bash tool’s description and reach Claude even with a custom `systemPrompt`. With the minimal default, a custom `systemPrompt`, or a custom main-thread agent that has its own prompt, though, the session starts without the git status snapshot. + + * If you set `CLAUDE_CODE_DISABLE_ATTACHMENTS`, Claude Code also sends `@` file mentions as plain text instead of expanding them into file content. The list of available subagents and background task notifications still arrive. + * To stop only `@` file mentions from expanding, set [`CLAUDE_CODE_DISABLE_FILE_MENTIONS=1`](</docs/en/env-vars#variables>) instead, on Claude Code v2.1.299 or later. Claude then gets the mentioned paths plus a note to read them with its file tools, and your `PreToolUse` hooks see each file read as a tool call. + +The following example is for an agent that carries its own commit rules in `append`. It sets both `attribution` keys to empty strings to remove the trailer and footer, and turns off `includeGitInstructions` so Claude Code’s own commit workflow instructions don’t compete with yours: TypeScript
modified Monitoring View current →
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -604,7 +604,7 @@ `claude_code.code_edit_tool.decision`| Count of code editing tool permission decisions| none `claude_code.active_time.total`| Total active time| s -When `prometheus` is the only exporter listed in `OTEL_METRICS_EXPORTER`, Claude Code omits the `USD`, `tokens`, and `s` units from the exported metrics so the scrape stays valid Prometheus text format. Metric names don’t change, and configurations that combine exporters, such as `otlp,prometheus`, keep the units. Before v2.1.216, the Prometheus scrape included OpenMetrics-only `# UNIT` lines that some scrapers rejected. +When `prometheus` is the only exporter listed in `OTEL_METRICS_EXPORTER`, Claude Code omits the `USD`, `tokens`, and `s` units from the exported metrics so the scrape stays valid Prometheus text format. Metric names don’t change, and configurations that combine exporters, such as `otlp,prometheus`, keep the units. ### @@ -967,11 +967,11 @@ * The auto mode classifier, whose verdict the same event records in `classifier_verdict` * A grant for the rest of the session, given at an earlier permission prompt in the same interactive CLI session * The tool being inherently safe -The `source` value doesn’t indicate which of these sources matched. To find which one refused a call, look for the Safety event with the same `tool_use_id` and read its `category` and `rule_source` attributes. Some refused calls have no safety event. Claude Code also reports `"config"` when the permission prompt request itself fails. For example, that request fails when the Agent SDK’s [`canUseTool`](</docs/en/agent-sdk/typescript#canusetool>) callback or the [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) tool returns an invalid result, or when the input stream closes while the request is pending. Before v2.1.216, Claude Code reported these failures as `"user_reject"`. +The `source` value doesn’t indicate which of these sources matched. To find which one refused a call, look for the Safety event with the same `tool_use_id` and read its `category` and `rule_source` attributes. Some refused calls have no safety event. Claude Code also reports `"config"` when the permission prompt request itself fails. For example, that request fails when the Agent SDK’s [`canUseTool`](</docs/en/agent-sdk/typescript#canusetool>) callback or the [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) tool returns an invalid result, or when the input stream closes while the request is pending. * `"hook"`: A `PreToolUse` or `PermissionRequest` hook returned the decision. * `"user_permanent"`: Emitted when the user chose “Yes, and don’t ask again for …” at a permission prompt, which saves an allow rule to their personal settings. In the interactive CLI this is emitted only for that choice itself; later calls that match the saved rule emit `"config"` instead. In Agent SDK or non-interactive `-p` sessions, both the initial choice and later rule matches emit `"user_permanent"`. Treated as an accept. * `"user_temporary"`: Emitted when the user chose “Yes” at a permission prompt for a one-time approval, or chose an option that grants access for the rest of the session on a file edit or read prompt. In the interactive CLI this is emitted only for the choice itself; later calls allowed by that session-scoped grant emit `"config"` instead. In Agent SDK or non-interactive `-p` sessions, both the choice and later matches emit `"user_temporary"`. Treated as an accept. - * `"user_abort"`: Emitted when the user dismissed the permission prompt without answering. In Agent SDK and non-interactive `-p` sessions, this includes interrupting the turn while a `canUseTool` or `--permission-prompt-tool` permission request is pending; before v2.1.216, Claude Code reported that interrupt as `"user_reject"`. Treated as a reject. + * `"user_abort"`: Emitted when the user dismissed the permission prompt without answering. In Agent SDK and non-interactive `-p` sessions, this includes interrupting the turn while a `canUseTool` or `--permission-prompt-tool` permission request is pending. Treated as a reject. * `"user_reject"`: Emitted when the user chose “No” when prompted. In the interactive CLI this is emitted only for that choice itself; calls that match a deny rule in the user’s personal settings emit `"config"` instead. In Agent SDK or non-interactive `-p` sessions, calls that match a deny rule in personal settings emit `"user_reject"`. Treated as a reject. * `classifier_verdict`: The auto mode [classifier](</docs/en/permission-modes#how-the-classifier-evaluates-actions>) verdict for the call, or why Claude Code denied the call when none came. Requires Claude Code v2.1.301 or later * `"allow"`: the classifier approved the call
modified Output styles View current →
--- a/output-styles.md +++ b/output-styles.md @@ -93,7 +93,7 @@ * **`/output-style` command**: run `/output-style <style>` to switch, for example `/output-style concise`. With no argument, the command lists the styles you can pick and marks the current one. The command also works in [non-interactive mode](</docs/en/headless>) and Agent SDK sessions, and from the mobile app or web via [Remote Control](</docs/en/remote-control#limitations>), where you can list and select only built-in styles. Requires Claude Code v2.1.269 or later. * **Terminal menu** : run `/config` and select **Output style** to pick a style from a menu. * **VS Code extension** : open the [command menu](</docs/en/vs-code#use-the-prompt-box>) with `/` and select **Output styles** to pick a style, including your custom styles. Requires Claude Code v2.1.257 or later. - * **Desktop app** : set the `outputStyle` field in a settings file, for example `.claude/settings.local.json`, the file the terminal menu writes. When you run `/config` there, Claude Code [opens **Settings > Claude Code**](</docs/en/desktop#what%E2%80%99s-not-available-in-desktop>) rather than a menu. + * **Desktop app** : set the `outputStyle` field in a settings file, for example `.claude/settings.local.json`, the file the terminal menu writes. When you run `/config` there, Claude Code [opens **Settings > Code** or **Settings > Claude Code**](</docs/en/desktop#what%E2%80%99s-not-available-in-desktop>) rather than a menu. To set a style without the menu, edit the `outputStyle` field directly in a settings file:
modified Choose a permission mode View current →
Show diff (122 lines)
--- a/permission-modes.md +++ b/permission-modes.md @@ -25,7 +25,7 @@ Actions no mode auto-approves -Claude Code doesn’t auto-approve the following in any mode, including `bypassPermissions`. Each bullet links to the section that says what happens instead in each mode: +Claude Code doesn’t auto-approve the following in any mode, including `bypassPermissions`, though you can turn off the prompt for dangerous `rm` commands in `bypassPermissions` mode. Each bullet links to the section that says what happens instead in each mode: * Tools matched by an explicit [ask rule](</docs/en/permissions#manage-permissions>) * Connector tools your organization [set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), in sessions where that setting reaches Claude Code @@ -462,7 +462,7 @@ * Installing dependencies declared in your lock files or manifests * Reading `.env` and sending credentials to their matching API * Read-only HTTP requests - * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. A push’s content is still checked against the classifier’s other rules, and [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode. The remote’s own branch protection still applies. From v2.1.203 until v2.1.211, only routine default-branch pushes and pushes to the branch you started on or to branches Claude created were allowed by default. + * Pushing to any branch of the repository you’re working in, including the default branch. A non-default branch whose name marks it as a deploy or publication target, such as `production` or `gh-pages`, isn’t covered: the classifier judges a push there on its own terms. A push’s content is still checked against the classifier’s other rules, and [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode. The remote’s own branch protection still applies. * Deleting the exact jobs Claude created earlier in the same session * Reading, reviewing, or writing security-related code, configs, and threat models as part of your task * Messages between agents working together in the same multi-agent session @@ -597,7 +597,7 @@ Skip all checks with bypassPermissions mode -`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial instead of running on its own. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available: +`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. Even in `bypassPermissions` mode, each of the actions no mode auto-approves gets a prompt or a denial, though you can turn off the prompt for dangerous `rm` commands. Reading [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) needs your approval, and this mode doesn’t ask for it, so Claude can’t read one. The Remove-Item in PowerShell denies also apply in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in interactive terminal plan-mode sessions where bypass permissions are available: * The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears. * When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept. @@ -807,7 +807,7 @@ This command could not be checked for dangerous rm operations: the shell may read it differently than it was parsed. -You get the prompt or denial a critical-path removal gets in your permission mode, `bypassPermissions` included. You can’t approve the command with a `Bash` or `Bash(*)` allow rule, sandbox [auto-allow mode](</docs/en/sandboxing#auto-allow-mode>), or a `PreToolUse` hook returning `"allow"`. Read the command, then approve the prompt or, after a denial, run it in your shell. +You get the prompt or denial a critical-path removal gets in your permission mode, `bypassPermissions` included, though you can turn off that prompt in `bypassPermissions` mode. You can’t approve the command with a `Bash` or `Bash(*)` allow rule, sandbox [auto-allow mode](</docs/en/sandboxing#auto-allow-mode>), or a `PreToolUse` hook returning `"allow"`. Read the command, then approve the prompt or, after a denial, run it in your shell. ### @@ -879,7 +879,7 @@ `dontAsk`| Denies it `bypassPermissions`| In the terminal, asks you to approve it before a time limit runs out. Elsewhere, see what happens in each place -If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt. +If an explicit [ask rule](</docs/en/permissions#manage-permissions>) matches the command, Claude Code asks you instead, even in `auto` mode and without a time limit. In modes that ask, a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) can answer the prompt. To run these removals with no prompt in `bypassPermissions` mode, see Turn off the critical-path removal prompt. ### @@ -899,7 +899,7 @@ ---|---|--- [VS Code extension](</docs/en/vs-code>)’s chat panel| Denies it| Denies it unless a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) allows it [Desktop app](</docs/en/desktop>)| Denies it| Denies it unless a `PermissionRequest` hook allows it -[`-p` run](</docs/en/headless>) or [Agent SDK session](</docs/en/agent-sdk/permissions>)| Denies it| Your [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) or [`canUseTool` callback](</docs/en/agent-sdk/user-input#handle-tool-approval-requests>) decides. With neither, or under [`--permission-prompts none`](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>), denies it unless a `PermissionRequest` hook allows it +[`-p` run](</docs/en/headless>) or [Agent SDK session](</docs/en/agent-sdk/permissions>)| Denies it| Your [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) or [`canUseTool` callback](</docs/en/agent-sdk/user-input#handle-tool-approval-requests>) decides. With neither, or under [`--permission-prompts none`](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>), denies it unless a `PermissionRequest` hook allows it. To run these removals with no prompt instead, see Turn off the critical-path removal prompt Wherever the removal is denied, you can read the whole command and run it in your shell. To change what you get in each mode, set [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`](</docs/en/env-vars#variables>) to `1`: @@ -913,6 +913,65 @@ { "name": "CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT", "value": "1" } ] } + +### + +​ + +Turn off the critical-path removal prompt in bypassPermissions mode + +To run Bash `rm` and `rmdir` commands that target critical paths with no prompt in `bypassPermissions` mode, start Claude Code with [`CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1`](</docs/en/env-vars#variables>) in its environment. This requires Claude Code v2.1.311 or later. Claude Code reads the variable from the launch environment only and [ignores it in a settings file’s `env` block](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). For example, set it in [your shell](</docs/en/env-vars#set-variables-in-your-shell>) and start `claude` from there: + + * macOS, Linux, WSL + + * Windows PowerShell + + * Windows CMD + + export CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1 + claude --permission-mode bypassPermissions + + $env:CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS = "1" + claude --permission-mode bypassPermissions + + set CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS=1 + claude --permission-mode bypassPermissions + +With this variable set, you lose a safety prompt for destructive deletes: a command such as `rm -rf ~` can run without asking you. Set it only in an isolated environment whose contents you can afford to lose. + +Removals run with no prompt only in `bypassPermissions` mode itself, not in plan mode, and only for what the critical-path check flags in the Bash and [Monitor](</docs/en/tools-reference#monitor-tool>) tools. That includes commands Claude Code can’t fully parse, which also run with no prompt. + +#### + +​ + +Startup notices about the critical-path removal prompt + +To check whether `CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS` is working, read the line Claude Code prints at startup. In a `-p` run, it’s on stderr. In an Agent SDK app, pass the [`stderr` option](</docs/en/agent-sdk/typescript#options>) to read it. The line says one of these: + + * **`is set, so dangerous rm commands can run without a prompt`** : removals can run with no prompt once managed settings and plugin hooks have loaded. If removals keep getting a prompt or denial, see Why the critical-path removal prompt stays on + * **`has no effect in this session`** : removals keep their usual prompt or denial for the whole session. To change that, find your case under Why the critical-path removal prompt stays on + * **`has no effect while the Windows registry cannot be read for managed settings`** : removals keep their usual prompt or denial, and the variable takes effect with no restart if a later read of the registry succeeds. If removals keep getting a prompt or denial, see Why the critical-path removal prompt stays on + +A missing line doesn’t mean the prompt is on: an Agent SDK app with no `stderr` option sees no line, and removals can still run with no prompt. Otherwise, check that you set the variable in the launch environment, that the session can enter `bypassPermissions` mode, and that `claude` isn’t inside another session. Some sessions start without the variable. If you see one of these lines and didn’t set the variable, find where it’s set, such as your shell profile, and remove it. + +#### + +​ + +Why the critical-path removal prompt stays on + +If `CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS` has no effect and removals keep their usual prompt or denial, check for causes such as these: + + * **Something else handles permission prompts** : a [`--permission-prompt-tool`](</docs/en/cli-reference#cli-flags>) or an Agent SDK [`canUseTool` callback](</docs/en/agent-sdk/user-input>) without [`--permission-prompts none`](</docs/en/headless#turn-off-permission-prompts-in-unattended-runs>), a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) with any matcher, or a [mod](</docs/en/plugins/mods/events#hook-the-settings-hook-events>) that handles that event. Remove the hook, mod, tool, or callback and restart `claude` + * **The[VS Code extension](</docs/en/vs-code>)’s chat panel or the [Desktop app](</docs/en/desktop>) runs the session**: start `claude` in a terminal instead, such as an IDE’s integrated terminal + * **A rule covers Bash, Edit, or Read** : a [deny or ask rule](</docs/en/permissions#manage-permissions>) that targets one of these tools, at launch or once Claude Code reads it during the session, even if you remove it later. Remove the rule and restart `claude`. To leave a tool out, use [`--tools`](</docs/en/cli-reference#cli-flags>) instead of a deny rule + * **[`permissions.blockReadsOutsideWorkingDirectories`](</docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories>) is on**: remove the setting from every settings file that sets it to `true`, then restart `claude` + * **`claude` runs inside another session**: a `claude` started from a session’s Bash tool or a hook, even with the variable on its command line. Start `claude` from your own shell. Don’t rely on this nested-session limit as a security boundary + * **A`PreToolUse` hook answers `ask` for a removal**: change what the hook returns + * **Claude Code starts the session for you** : [background sessions](</docs/en/agent-view>), [agent team](</docs/en/agent-teams>) teammates in split panes, and sessions a [Remote Control](</docs/en/remote-control>) server creates start without the variable. Start `claude` from your own shell + * **Managed settings can’t be read** : Claude Code hasn’t successfully read your [managed settings](</docs/en/managed-settings>) sources. If server-managed settings keep failing to load, see [Remote managed settings failed to load](</docs/en/errors#remote-managed-settings-failed-to-load>). For any other failure that isn’t a registry query, ask whoever manages that source to fix it + * **The Windows registry can’t be queried** : on Windows and in WSL, the variable needs an answer from the registry, even when [WSL doesn’t use it for settings](</docs/en/settings-reference#wslinheritswindowssettings>). The query can fail all session on a non-English Windows, in WSL with interop off, or in a container on a WSL2 kernel. If interop is off, turn it on. Otherwise, run those removals yourself ###
modified Configure permissions View current →
--- a/permissions.md +++ b/permissions.md @@ -35,6 +35,7 @@ Apply the active permission mode: * In `bypassPermissions` mode, Claude Code approves everything that reaches this step except recognized [critical-path removals](</docs/en/permission-modes#critical-paths>) and Bash commands flagged [`Dangerous rm operation not ruled out`](</docs/en/permission-modes#dangerous-rm-operation-not-ruled-out>), which fall through instead. + * To run those removals with no prompt, see [Turn off the critical-path removal prompt](</docs/en/permission-modes#turn-off-the-critical-path-removal-prompt-in-bypasspermissions-mode>). * In `acceptEdits` mode, Claude Code approves the file operations listed under Accept edits mode. * In `plan` mode, Claude Code sends file-edit tools to your `canUseTool` callback regardless of allow rules. * In other modes, the request falls through. @@ -281,7 +282,7 @@ Use with extreme caution. Claude has full system access in this mode. Only use in controlled environments where you trust all possible operations.`allowed_tools` does not constrain this mode. Every tool is approved, not just the ones you listed. These controls still apply: * Deny rules, explicit `ask` rules, and hooks are evaluated before the mode check and can still block a tool. - * Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), tools that require user interaction, and recognized [critical-path removals](</docs/en/permission-modes#critical-paths>) still fall through to your `canUseTool` callback. The check that recognizes these removals [can miss some commands](</docs/en/permission-modes#critical-paths>). Outside a [cloud session](</docs/en/claude-code-on-the-web>), calls to custom tools your application [marks `always_ask`](</docs/en/agent-sdk/custom-tools#require-approval-for-specific-tools>) fall through to the callback too. + * Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), tools that require user interaction, and recognized [critical-path removals](</docs/en/permission-modes#critical-paths>) still fall through to your `canUseTool` callback. The check that recognizes these removals [can miss some commands](</docs/en/permission-modes#critical-paths>), and you can [turn off the critical-path removal prompt](</docs/en/permission-modes#turn-off-the-critical-path-removal-prompt-in-bypasspermissions-mode>). Outside a [cloud session](</docs/en/claude-code-on-the-web>), calls to custom tools your application [marks `always_ask`](</docs/en/agent-sdk/custom-tools#require-approval-for-specific-tools>) fall through to the callback too. * The [cross-session messaging safeguards](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) still apply. ####
modified Agent SDK reference - Python View current →
--- a/python.md +++ b/python.md @@ -968,7 +968,7 @@ `continue_conversation`| `bool`| `False`| Continue the most recent conversation `resume`| `str | None`| `None`| Session ID to resume `session_id`| `str | None`| `None`| Use a specific session ID instead of an auto-generated one. Must be a valid UUID. Can’t be combined with `continue_conversation` or `resume` unless `fork_session` is also set -`max_turns`| `int | None`| `None`| Maximum agentic turns (tool-use round trips) +`max_turns`| `int | None`| `None`| Maximum agentic [turns](</docs/en/agent-sdk/agent-loop#turns-and-messages>) `max_budget_usd`| `float | None`| `None`| Stop the query when the client-side cost estimate reaches this USD value. The estimate can pass this value, so [leave headroom](</docs/en/agent-sdk/agent-loop#budget-headroom>). Counts only the call’s own spend; totals restored from a resumed session don’t count. For accuracy caveats and reset behavior, see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) `disallowed_tools`| `list[str]`| `[]`| Tools to deny. A bare name such as `"Bash"` removes the tool from Claude’s context. A scoped rule such as `"Bash(rm *)"` leaves the tool available and denies matching calls in every permission mode, including `bypassPermissions`, for the command [as written](</docs/en/permissions#bash-rule-limits>). See [Permissions](</docs/en/agent-sdk/permissions#allow-and-deny-rules>) `enable_file_checkpointing`| `bool`| `False`| Enable file change tracking for rewinding. See [File checkpointing](</docs/en/agent-sdk/file-checkpointing>) @@ -2772,7 +2772,7 @@ Agent -**Tool name:** `Agent`. The previous name `Task` is still accepted as an alias, and the `tools` list in the init `SystemMessage` reports this tool as `Task` for backward compatibility. **Input:** +**Tool name:** `Agent`. The previous name `Task` is still accepted as an alias when this tool is available to the session. The `tools` list in the init `SystemMessage` reports this tool as `Task` for backward compatibility. **Input:** { "description": str, # A short (3-5 word) description of the task @@ -3761,7 +3761,7 @@ `deniedDomains`| `list[str]`| `[]`| Domain names that sandboxed processes cannot access. Takes precedence over `allowedDomains` `allowManagedDomainsOnly`| `bool`| `False`| Managed-settings only: when set in managed settings, ignore `allowedDomains` and `WebFetch(domain:...)` allow rules from non-managed settings sources. Has no effect when set via SDK options `allowUnixSockets`| `list[str]`| `[]`| macOS only: Unix socket paths that processes can access, such as the Docker socket. Ignored on Linux -`allowAllUnixSockets`| `bool`| `False`| Allow access to all Unix sockets +`allowAllUnixSockets`| `bool`| `False`| Allow access to all Unix sockets, and on Linux to VM sockets (`AF_VSOCK`) `allowLocalBinding`| `bool`| `False`| Allow processes to bind to local ports (for example, for dev servers) `allowMachLookup`| `list[str]`| `[]`| macOS only: XPC/Mach service names to allow. Supports a trailing wildcard `httpProxyPort`| `int`| `None`| HTTP proxy port for network requests
modified Quickstart View current →
--- a/quickstart.md +++ b/quickstart.md @@ -10,7 +10,7 @@ Prerequisites - * **Node.js 18+** or **Python 3.10+** + * **Node.js 18.14+** or **Python 3.10+** * An **Anthropic account**. If you don’t have one, [sign up here](<https://platform.claude.com/>). ##
modified Mods reference View current →
--- a/reference.md +++ b/reference.md @@ -130,15 +130,13 @@ Commands and configuration -Command and configuration events fire when a command runs or is listed, when a `/config` row is shown or changed, and on a settings read: - Event| Fires when| A hook can return ---|---|--- [`command.run`](</docs/en/plugins/mods/api#add-a-command>)| A command is about to run| `{ text }`, `{}`, or `next(e)` `command.describe`| Once for each command, for the command list| `{ description, argumentHint, isHidden }` `config.set`| A `/config` row is about to change| `next({ ...e, value })` or `{ deny: reason }` `config.describe`| Once for each `/config` row| `{ label, description, isHidden }` -[`settings.read`](</docs/en/plugins/mods/events#settings-read-hook>)| A mod calls [`$.settings.read`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>), or Claude Code builds the session’s merged settings| `next(e)`, `{ value }`, or `{ deny: reason }` +[`settings.read`](</docs/en/plugins/mods/events#settings-read-hook>)| A mod calls [`$.settings.read`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>), or Claude Code builds the session’s merged settings. Requires Claude Code v2.1.304 or later on Claude Code’s own read and for `e.layers`| `next(e)`, `{ value }`, or `{ deny: reason }` #### @@ -147,9 +145,7 @@ `e.layers` and `e.source` on `settings.read` * **`e.layers`** : one `{ source, settings }` object for each source in use that holds settings, lowest [precedence](</docs/en/settings#settings-precedence>) first. See [What a `settings.read` hook receives](</docs/en/plugins/mods/events#settings-read-receives>). - * **`e.source`** : the one source a mod asked for, as in `$.settings.read({ source: 'policy' })`. Absent on Claude Code’s own read and on any other read of the merged settings - -On `settings.read`, the event firing on Claude Code’s own read and the `e.layers` field require Claude Code v2.1.304 or later. For when the hook runs and what the hook can return, with an example, see [Change or refuse a settings read](</docs/en/plugins/mods/events#settings-read-hook>). + * **`e.source`** : the one source a mod asked for, as in `$.settings.read({ source: 'policy' })`. Absent on Claude Code’s own read and on a read of the merged settings ### @@ -335,7 +331,7 @@ ---|---|---|---|--- [`Box`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `key`, flex layout, `gap`, `padding`, `margin`, `width`, `height`, `minWidth`, `minHeight`, `borderStyle`, `borderColor`, `borderDimColor`, `backgroundColor`, `position`, `top`, `left`, `right`, `bottom`, `overflow`, `display`, `hover`| ✓| ✓| ✓ [`Text`](</docs/en/plugins/mods/interface#build-a-tree-from-elements>)| `color`, `backgroundColor`, `bold`, `italic`, `underline`, `strikethrough`, `dimColor`, `inverse`, `wrap`, `size`, `weight`, `mono`, `tabular`, `hover`| ✓| ✓| ✓ -[`Button`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>)| `key`, `label`, `onPress`, `hotkey`, `plain`, `dimColor`, `autoFocus`, `action`, `hover`| ✓| ✓| ✓ +[`Button`](</docs/en/plugins/mods/interface#respond-to-presses-and-typing>)| `key`, `label`, `children`, `onPress`, `hotkey`, `plain`, `dimColor`, `autoFocus`, `action`, `variant`, `role`, `hover`| ✓| ✓| ✓ [`Link`](</docs/en/plugins/mods/interface#link-in-the-desktop-app>)| `href`, `label`. See Limits.| ✓| ✓| ✓ [`Code`](</docs/en/plugins/mods/gallery#show-code-and-changes>)| `source`, `language`, `path`, `startLine`, `format`, `wrap`| ✓| ✓| ✓ `Markdown`| `text`, `key`, `dimColor`, `onLinkPress`, `pressableLinks`| ✓| ✓| ✓ @@ -352,14 +348,25 @@ * **Digit hotkeys on the band** : a digit `hotkey` on a button in the band also fires when the user types that digit alone into an empty prompt and pauses * **A collapsed band** : while the band is [collapsed](</docs/en/plugins/mods/interface#when-the-user-collapses-the-band>), neither an `action` binding nor a hotkey presses a button in it * **Two buttons on one hotkey** : when two buttons in one drawing name the same `hotkey`, the later one gets it + * **`variant`** : `primary` or `secondary`, and any other value throws. In the terminal, a `primary` button draws in the accent color unless it’s `plain`. + * **`role`** : `dismiss` marks a close button, and any other value throws. Do the closing in your `onPress`. In a band that holds text and a row of buttons, the Desktop app can draw the row’s first `dismiss` button as its own close control. The terminal draws the button as it would without `role`. + +A `Button` can hold `children` in place of a `label`: + + * **What children can be** : strings and `Text` elements, such as a name followed by a dim detail or a colored chip. Claude Code refuses any other element inside a `Button`. + * **Naming the button** : the `label` names the button and defaults to the text of its children. Give a button with children other than one string a `key` or a `label`. + * **In the terminal** : the children draw where the label would be, and a press anywhere on them counts as one press, so you can make each row of a list a single button + * **In the Desktop app and the VS Code extension** : the button draws its `label` + +A `Button` with children other than a single string requires Claude Code v2.1.295 or later. `autoFocus` accepts only `true` on any control, so omit the prop to leave it off. The VS Code extension ignores some element props and draws the element as if you had left them out: * **`Box`** : `position` with its `top`, `left`, `right`, and `bottom`, `alignSelf`, `borderDimColor`, and `hover` * **`Text`** : `size`, `mono`, `tabular`, and `hover` - * **`Button`** : `hotkey`, `plain`, `autoFocus`, `action`, and `hover`, so the user presses a button there with a click, or with Enter once it has focus + * **`Button`** : `hotkey`, `plain`, `autoFocus`, `action`, and `hover`, so the user presses a button there with a click, or with Enter once it has focus. The extension also ignores `variant` and `role`. * **`Code`** : `language`, `path`, `startLine`, `format`, and `wrap`, so code draws without colors or line numbers, and a `format: 'diff'` block shows the diff’s raw text - * **`Input` and `Select`**: `autoFocus` + * **`Input` and `Select`**: `autoFocus`, and `rows` on an `Input` * **`Svg`** : `isInteractive` ### @@ -442,6 +449,7 @@ A `.catch` handler’s execution time| 1 second All `session.end` hooks together| As long as the [SessionEnd hook budget](</docs/en/hooks#sessionend-input>), 1.5 seconds unless you change it, counted from when your settings `SessionEnd` hooks finish `$.process.run` timeout| 30 seconds by default, 10 minutes at most +`$.process.run` `stdout` and `stderr`| 4 MiB each. `isStdoutTruncated` or `isStderrTruncated` is `true` when one was cut. `$.model.complete` `maxTokens`| 1024 by default, up to 64,000 or the model’s output limit `$.fs.read` and `$.fs.write`| 4 MiB for one file A `$.http.fetch` request body| 4 MiB, counted in characters. A call with a larger body rejects. @@ -459,8 +467,11 @@ `$.store`| 4 MiB of JSON in total `$.session.messages()`| The newest 4,096 entries `$.ui.invalidate('ui.render')` redraws| Throttled to 10 a second, or 30 in the terminal for the visible pane, the expanded band, and the hint line under the prompt. Calls that come sooner are coalesced. -`$.ui.toast`| Shown for 4 seconds unless you pass `{ timeoutMs }` +`$.ui.toast`| Shown for 4 seconds unless you pass `{ timeoutMs }`. In the [classic renderer](</docs/en/fullscreen#enable-fullscreen-rendering>), a mod’s newer toast can [take the place of its older one](</docs/en/plugins/mods/troubleshoot#a-toast-doesn%E2%80%99t-appear>) that’s showing or waiting to show. A pane opened without the user asking| Placed from 144 terminal columns, 110 after they’ve opened it once +Nesting depth of a mods API call’s arguments| 28,000 levels. Past that, the call rejects with a message ending `nesting deeper than 28000 levels is not supported`. Requires Claude Code v2.1.299 or later. +Nesting depth of a changed event passed to `next`, outside async generator hooks such as one on `turn.step`| 28,000 levels. Past that, `next` rejects with a message ending `nesting deeper than 28000 levels is not supported`. Requires Claude Code v2.1.299 or later. +Nesting depth of a hook’s return value, outside `ui.render`, `ui.resolve`, and async generator hooks| 28,000 levels. Past that, the hook’s result is refused, and [the notice that reports it](</docs/en/plugins/mods/troubleshoot#find-out-why-a-mod-does-nothing>) includes `nesting deeper than 28000 levels is not supported`. Requires Claude Code v2.1.299 or later. Scopes, such as functions, blocks, and loops, nested inside one another in one file of a hooks module| 2,000 Command, tool, subagent type, and pane names| Letters, digits, `_`, and `-`, up to 64 characters One `claude plugin test` test| 5 seconds unless the test sets `timeoutMs`
modified Continue local sessions from any device with Remote Control View current →
--- a/remote-control.md +++ b/remote-control.md @@ -172,7 +172,7 @@ The VS Code extension and the Desktop app also have an auto-connect toggle: * **VS Code extension** : **Enable Remote Control for all sessions** in the [command menu’s](</docs/en/vs-code#use-the-prompt-box>) Settings section. - * **Desktop app** : **Settings > Claude Code > Connect new sessions to Remote Control**. See [Control which sessions appear on your other devices](</docs/en/desktop#control-which-sessions-appear-on-your-other-devices>). + * **Desktop app** : **Connect new sessions to Remote Control** in **Settings > Code** or **Settings > Claude Code**. See [Control which sessions appear on your other devices](</docs/en/desktop#control-which-sessions-appear-on-your-other-devices>). To turn auto-connect on from a settings file instead, set [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) to `true` in your user `~/.claude/settings.json` or in [managed settings](</docs/en/managed-settings>). In project or local settings (`.claude/settings.json`, `.claude/settings.local.json`), Claude Code honors a `false` and turns auto-connect off for that repository, but ignores a `true`, so a checked-in file can’t turn on Remote Control for everyone who opens the repository. Auto-connect signs in with your own claude.ai account, so a session it starts appears only in your own account’s Claude apps and grants no one else access. With this setting on, each interactive Claude Code process registers one remote session. If you run multiple instances, each one gets its own remote session. To run multiple concurrent sessions from a single process, use server mode instead. @@ -361,7 +361,7 @@ * Text-output commands: `/compact`, `/clear`, `/context`, `/usage`, `/exit`, `/usage-credits`, `/recap`, and `/reload-plugins`. `/usage-credits` prints the billing URL instead of opening a browser. `/reload-plugins` works only when the session runs in an interactive terminal; a session without one declines it. * `/model`, `/effort`, `/fast`, `/color`, and `/rename`: pass the value as an argument, for example `/model sonnet` or `/effort high`. From mobile and web, `/model` and `/effort` take the argument in place of the terminal picker or slider. * `/mcp`: from the mobile app, returns a text summary of server status instead of opening the picker. On the web, `/mcp` on its own opens a directory of [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) instead of returning the summary. The `reconnect`, `enable`, and `disable` [subcommands](</docs/en/commands#all-commands>) work from both when the session runs in an interactive terminal. `/mcp reconnect` with no server name retries every server that has failed or needs authentication. To authorize a claude.ai connector without the picker, see Authorize a connector again from your shell. - * `/config`: from the mobile app, pass `key=value` to set a setting, or run it with no argument to list the keys you can set. On the web, `/config` opens the Claude Code section of your settings instead. + * `/config`: from the mobile app, pass `key=value` to set a setting, or run it with no argument to list the keys you can set. On the web, `/config` opens **Settings > Code** or **Settings > Claude Code** instead. * On Team and Enterprise, `/usage-credits` from mobile or web doesn’t send a [usage-credits request to your admin](</docs/en/costs#add-usage-credits-to-your-subscription>). Sending requires a confirmation that appears only in the interactive CLI, so the command tells you to run it there instead. * `/autocompact`, from v2.1.221: pass the window size as an argument, for example `/autocompact 500k`. With no argument, it prints the current window size as text instead of opening the dialog the command shows in a terminal session. * `/advisor`, from v2.1.260: pass the model as an argument, for example `/advisor opus`, or pass `off` to turn the advisor off. Both forms apply to the current session only and leave your saved default unchanged. With no argument, it prints the current advisor as text instead of opening the picker.
modified Automate work with scheduled tasks View current →
--- a/routines.md +++ b/routines.md @@ -69,7 +69,7 @@ Name the task and write the prompt -Give the scheduled task a descriptive name and write the prompt Claude runs each time. The prompt is the most important part: the task runs autonomously, so the prompt must be self-contained and explicit about what to do and what success looks like. Select a model in the prompt input’s model selector. Claude uses it on every run.When a trigger fires, the session receives the saved prompt as its assignment and carries it out, rather than treating it as untrusted content that arrived mid-conversation. The trigger attests only that the prompt was stored ahead of time by an authorized session on your account. The fired prompt is therefore not live user input and can’t act as approval or consent for actions during the run. Content the session fetches during the run keeps its normal handling. +Give the scheduled task a descriptive name and write the prompt Claude runs each time. The prompt is the most important part: the task runs autonomously, so the prompt must be self-contained and explicit about what to do and what success looks like.When a trigger fires, the session receives the saved prompt as its assignment and carries it out, rather than treating it as untrusted content that arrived mid-conversation. The trigger attests only that the prompt was stored ahead of time by an authorized session on your account. The fired prompt is therefore not live user input and can’t act as approval or consent for actions during the run. Content the session fetches during the run keeps its normal handling. 3 @@ -109,11 +109,17 @@ 6 +Select a model and effort level + +Select a model in the prompt input’s model selector for Claude to use on every run. For a Claude Code task, if the model offers [effort levels](</docs/en/model-config#adjust-effort-level>), **Effort** in the same selector shows the current level. To change it, select another level. The selector’s **Default** option offers no levels. + +7 + Review connectors Switch to the **Connectors** tab of **Advanced settings**. All of your connected [MCP connectors](</docs/en/mcp>) are included by default. Remove any the task doesn’t need: Claude can use an included connector during a run, including writes. For when a run stops to ask you first, see Permission prompts during a run. -7 +8 Create the task @@ -136,7 +142,7 @@ In the Desktop app, if a menu with **Local** and **Cloud** opens, select **Cloud**. A page titled **New routine** or **New scheduled task** opens. Fill in its fields: * **Name** : enter one. - * **Instructions** : enter the prompt. In the same box, select the model, the repositories, and the environment. For what each one controls, see the steps under Create from the web. + * **Instructions** : enter the prompt. In the same box, select the model, the effort level if the model offers one, the repositories, and the environment. For what each one controls, see the steps under Create from the web. * **Select a trigger** : select **Schedule** , **GitHub event** , or **API**. For a schedule, see Add a schedule trigger. For a GitHub event, select a repository. For an API trigger, copy the token from the **API token** dialog that opens after you click **Create** , because it is shown once. To combine several triggers, click **Add another trigger**. * **Connectors** : all of your connected connectors are included by default, so remove the ones the task doesn’t need. @@ -153,7 +159,7 @@ * **API trigger** : edit the task on the web at [claude.ai/code/routines](<https://claude.ai/code/routines>) * **GitHub trigger** : edit the task on the web, or ask Claude in the CLI. Adding one from the CLI requires Claude Code v2.1.225 or later -A scheduled task with no schedule trigger, such as one started only by API calls or GitHub events, has no next run time. The CLI shows none when Claude saves or updates it. Before v2.1.211, the CLI reported a next run time in the year 1 for these tasks. +A scheduled task with no schedule trigger, such as one started only by API calls or GitHub events, has no next run time. The CLI shows none when Claude saves or updates it. ##
modified Configure the sandboxed Bash tool View current →
--- a/sandboxing.md +++ b/sandboxing.md @@ -290,6 +290,7 @@ * **Every command in the call has to match** : `npm ci && docker compose build` stays sandboxed unless another entry covers `npm ci` * **Claude Code matches the text of the call** : a script or `make` target that calls `docker` internally doesn’t match, and neither does `/usr/local/bin/docker` * **Some calls stay sandboxed** : a redirect to a file, a `cd`, or a command substitution such as `$(...)` keeps the whole call sandboxed. The [reference entry](</docs/en/settings-reference#sandbox-excludedcommands>) lists more calls that stay sandboxed + * **A`git clone` needs relative paths**: your entry doesn’t cover a clone that names an absolute path, a path starting with `~`, or one with a `..` segment. If the clone can go inside your working directory, ask Claude to use a relative path with no `..` segment, such as `vendor/lib` * **Where you save the entry can matter** : while the sandbox is admin-required, Claude Code ignores entries in `.claude/settings.json` and `.claude/settings.local.json` An excluded command goes through the regular permission flow: @@ -322,7 +323,7 @@ } } -The sandbox has two independent layers: filesystem isolation controls which paths sandboxed commands can read and write, and network isolation controls which domains they can reach. With the filesystem layer off, sandboxed commands get unrestricted read and write access to the host filesystem, while their network egress stays confined to your allowed domains. Turn the layer off when you sandbox to control where commands connect rather than what they write. `sandbox.filesystem.disabled` defaults to `false`. Requires Claude Code v2.1.216 or later. +The sandbox has two independent layers: filesystem isolation controls which paths sandboxed commands can read and write, and network isolation controls which domains they can reach. With the filesystem layer off, sandboxed commands get unrestricted read and write access to the host filesystem, while their network egress stays confined to your allowed domains. Turn the layer off when you sandbox to control where commands connect rather than what they write. `sandbox.filesystem.disabled` defaults to `false`. With filesystem isolation off and commands auto-allowed, a sandboxed command can write files that later commands run or read, such as shell startup files, executables on `$PATH`, or `~/.claude/settings.json`, and use them to widen its own access on the next run. Set `filesystem.disabled` to `true` only for workloads you trust not to escalate their own access. Locking network domains with `allowManagedDomainsOnly` narrows the risk but doesn’t remove it, since that lock applies only to commands running inside the sandbox.
modified Configure server-managed settings View current →
--- a/server-managed-settings.md +++ b/server-managed-settings.md @@ -272,7 +272,7 @@ * **`claude install` or `claude update`**: Claude Code doesn’t show the dialog during either command. The command runs with the last-approved settings, and the dialog appears in your next interactive session. If Claude Code waits for the settings fetch at startup, such as with `forceRemoteSettingsRefresh` set or on a [Claude apps gateway](</docs/en/claude-apps-gateway>) deployment, it shows the dialog during the command instead, and an install run from a pipe fails; see [`Raw mode is not supported` during install](</docs/en/troubleshoot-install#raw-mode-is-not-supported-during-install>). Before v2.1.246, Claude Code tried to show the dialog during these commands too. * **A`claude plugin` command that prints to a terminal but can’t read from the keyboard**: when Claude Code doesn’t wait for the settings fetch at startup, the command doesn’t apply the delivered settings. Without cached settings, a command that changes your plugins or marketplaces [stops with an error](</docs/en/errors#managed-settings-need-your-approval>). With cached settings, it runs with the last-approved settings. The dialog appears when you next run `claude` in a terminal. The command can’t read from the keyboard when you pipe or redirect its input and, on macOS and Linux, it also can’t open `/dev/tty`. If you pipe or redirect its output too, the run is non-interactive instead, and the delivered settings apply for that run only. * **An error closes the dialog before you answer** : Claude Code doesn’t apply the delivered settings and keeps the last-approved settings. It shows the dialog again in the next session that can show it. - * **A non-interactive run** , such as `claude -p`, an Agent SDK session, or a session in the VS Code extension’s chat panel or the desktop app’s Code tab: Claude Code can’t show the dialog, so when the delivered settings would require approval, it applies them for that run only. It doesn’t record them as approved or write them to the local cache, and the next interactive session shows the dialog. Until a user approves in an interactive session, each non-interactive run fetches the settings again at startup. Before v2.1.207, a non-interactive run saved the settings as approved, so later interactive sessions never showed the dialog for them. + * **A non-interactive run** , such as `claude -p`, an Agent SDK session, or a session in the VS Code extension’s chat panel or the desktop app’s Code tab: Claude Code can’t show the dialog. When the delivered settings would require approval, they apply for that run only. Claude Code doesn’t record the settings as approved or write them to the local cache, and the next interactive session shows the dialog. Until a user approves in an interactive session, each non-interactive run fetches the settings again at startup. #### @@ -294,7 +294,7 @@ * `OTEL_EXPORTER_OTLP_ENDPOINT` * `CLAUDE_CODE_DISABLE_1M_CONTEXT` -When a delivered variable needs approval, the dialog names it, so the user sees exactly what the policy is asking to set. Before v2.1.218, Claude Code applied fewer variables without asking the user, so settings such as `DISABLE_AUTO_COMPACT` triggered the dialog at any non-empty value. Claude Code decides whether four privacy toggles need approval by the delivered value rather than by the variable name: `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_ERROR_REPORTING`, `DISABLE_TELEMETRY`, and `DO_NOT_TRACK`. A truthy value such as `1` or `true` only turns tracking, reporting, or other nonessential traffic off, so Claude Code applies it without asking the user. For any other non-empty value, Claude Code shows the dialog. Before v2.1.218, all of them except `DO_NOT_TRACK` applied without approval at any value, and `DO_NOT_TRACK` triggered the dialog at any non-empty value. Claude Code also decides whether [`API_FORCE_IDLE_TIMEOUT`](</docs/en/env-vars>) needs approval by the delivered value: a truthy value only turns the [body idle timeout](</docs/en/network-config#streaming-idle-watchdogs>) on, so Claude Code applies it without asking the user. For any other non-empty value, Claude Code shows the dialog. Before v2.1.248, any non-empty value triggered the dialog. Whether [`ANTHROPIC_CUSTOM_HEADERS`](</docs/en/env-vars#variables>) needs approval also depends on the delivered value. Headers that only tag requests, such as `Accept-Language`, apply without the dialog. A line that names a credential, an org or tenant selector, a routing or host override, or an API-behavior header, such as `Authorization`, `X-Api-Key`, `Host`, `anthropic-beta`, or the `X-Amzn-Bedrock-*` headers, requires approval. A line also requires approval when its name isn’t a valid HTTP header token or its value contains a character an HTTP header can’t carry. The check matches words inside the header name, so `X-Client-Version`, which contains `client` and `version`, requires approval too. Before v2.1.251, any `ANTHROPIC_CUSTOM_HEADERS` value applied without it. A falsy value such as `0` or `false` for [`ENABLE_BETA_TRACING_DETAILED`](</docs/en/env-vars#variables>) or [`OTEL_LOG_RAW_API_BODIES`](</docs/en/env-vars#variables>) applies without the dialog, because it only turns detailed tracing or raw API body capture off. Any other non-empty value for either variable requires approval. +When a delivered variable needs approval, the dialog names it, so the user sees exactly what the policy is asking to set. Claude Code decides whether four privacy toggles need approval by the delivered value rather than by the variable name: `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_ERROR_REPORTING`, `DISABLE_TELEMETRY`, and `DO_NOT_TRACK`. A truthy value such as `1` or `true` only turns tracking, reporting, or other nonessential traffic off, so Claude Code applies it without asking the user. For any other non-empty value, Claude Code shows the dialog. Claude Code also decides whether [`API_FORCE_IDLE_TIMEOUT`](</docs/en/env-vars>) needs approval by the delivered value: a truthy value only turns the [body idle timeout](</docs/en/network-config#streaming-idle-watchdogs>) on, so Claude Code applies it without asking the user. For any other non-empty value, Claude Code shows the dialog. Before v2.1.248, any non-empty value triggered the dialog. Whether [`ANTHROPIC_CUSTOM_HEADERS`](</docs/en/env-vars#variables>) needs approval also depends on the delivered value. Headers that only tag requests, such as `Accept-Language`, apply without the dialog. A line that names a credential, an org or tenant selector, a routing or host override, or an API-behavior header, such as `Authorization`, `X-Api-Key`, `Host`, `anthropic-beta`, or the `X-Amzn-Bedrock-*` headers, requires approval. A line also requires approval when its name isn’t a valid HTTP header token or its value contains a character an HTTP header can’t carry. The check matches words inside the header name, so `X-Client-Version`, which contains `client` and `version`, requires approval too. Before v2.1.251, any `ANTHROPIC_CUSTOM_HEADERS` value applied without it. A falsy value such as `0` or `false` for [`ENABLE_BETA_TRACING_DETAILED`](</docs/en/env-vars#variables>) or [`OTEL_LOG_RAW_API_BODIES`](</docs/en/env-vars#variables>) applies without the dialog, because it only turns detailed tracing or raw API body capture off. Any other non-empty value for either variable requires approval. ##
modified Settings files and precedence View current →
--- a/settings.md +++ b/settings.md @@ -362,7 +362,7 @@ * **Shared project settings with several repositories** : in an Anthropic-hosted environment, a session with several repositories starts above the clones and reads only the `enabledPlugins` and `extraKnownMarketplaces` keys from each repository’s `.claude/settings.json`, not permission rules, hooks, `env`, or other keys. The marketplaces and plugins those two keys declare still [don’t load in a cloud session](</docs/en/cloud-environments#what-carries-over-from-your-setup>). For a self-hosted environment, see [which repository’s settings apply](</docs/en/self-hosted-environments-configuration#repository-settings-in-sessions-with-several-repositories>). * **User and project local settings** (`~/.claude/settings.json` and `.claude/settings.local.json`): not read. Both stay on your machine, and the local file isn’t in the clone. * **Managed settings** : a `managed-settings.json` file or MDM profile on your device doesn’t reach a cloud session. Your organization’s [server-managed settings](</docs/en/server-managed-settings>) do; [surface coverage](</docs/en/model-config#surface-coverage>) lists which cloud sessions receive them. A [self-hosted environment](</docs/en/self-hosted-environments>) also reads the managed settings file in its runner image. [How Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>) says when that file applies. - * **`/config`** : in your browser at claude.ai/code, opens the Claude Code section of your claude.ai settings instead of changing a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a project’s threads, you can instead commit the key to that repository’s `.claude/settings.json`. + * **`/config`** : in your browser at claude.ai/code, opens your claude.ai **Code** or **Claude Code** settings page instead of changing a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment. In a session with one repository outside a project’s threads, you can instead commit the key to that repository’s `.claude/settings.json`. [What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>) lists the rest: `CLAUDE.md`, skills, MCP servers, plugins, and credentials.
modified All settings View current →
--- a/settings-reference.md +++ b/settings-reference.md @@ -1419,7 +1419,7 @@ * A command starting with `sudo`, `eval`, or `xargs` * A `cd`, `pushd`, or `popd`, wherever it appears in the call * A command substitution, a subshell, or a control-flow block such as `if` or `for` - * A redirection, such as `docker build . > build.log`, other than one that only duplicates a file descriptor, as `2>&1` does + * A redirection, such as `docker build . > build.log` or a `<<EOF` heredoc, other than one that only duplicates a file descriptor, as `2>&1` does * A command name that comes from a variable * A `git clone`, `git init`, `git worktree add`, `git worktree move`, or `git bundle create` with a path argument that is absolute, starts with `~`, or contains a `..` segment @@ -1665,7 +1665,7 @@ `sandbox.filesystem.disabled` -Skip filesystem isolation while keeping network isolation. Sandboxed commands get unrestricted read and write access to the host filesystem, and their network egress stays confined to `network.allowedDomains`. Use it when you sandbox to control where commands connect rather than what they write. Requires Claude Code v2.1.216 or later. +Skip filesystem isolation while keeping network isolation. Sandboxed commands get unrestricted read and write access to the host filesystem, and their network egress stays confined to `network.allowedDomains`. Use it when you sandbox to control where commands connect rather than what they write. * **Scope** : `User or managed`. When managed settings configure `sandbox.filesystem` at all, or list a `sandbox.credentials.files` entry with `"mode": "deny"`, only managed settings can set it. * **Type** : Boolean @@ -1689,7 +1689,7 @@ } } -With the layer off, Claude Code doesn’t enforce `denyRead` or `credentials.files` `deny` entries, while `credentials.envVars` entries and applied `mask` entries keep working. `autoAllowBashIfSandboxed` still defaults to `true`, so set it to `false` to keep prompting. See [Disable filesystem isolation](</docs/en/sandboxing#disable-filesystem-isolation>) for the full list of sources that can set it and what changes when isolation is off. Requires Claude Code v2.1.216 or later. +With the layer off, Claude Code doesn’t enforce `denyRead` or `credentials.files` `deny` entries, while `credentials.envVars` entries and applied `mask` entries keep working. `autoAllowBashIfSandboxed` still defaults to `true`, so set it to `false` to keep prompting. See [Disable filesystem isolation](</docs/en/sandboxing#disable-filesystem-isolation>) for the full list of sources that can set it and what changes when isolation is off. ### @@ -2682,6 +2682,7 @@ * [`CLAUDE_CODE_RESTRICTED`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file. * [`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file. The variable requires Claude Code v2.1.283 or later. * [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`, `CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`, `CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT`, and `CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, are ignored from every file. + * [`CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file. * [`CLAUDE_CODE_WARN_DISK_FREE_GIB` and `CLAUDE_CODE_WARN_MEMORY_FREE_GIB`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, are ignored from every file. The variables require Claude Code v2.1.304 or later. ### @@ -3068,7 +3069,7 @@ "emojiCompletionEnabled": false } -See [Emoji shortcodes](</docs/en/interactive-mode#emoji-shortcodes>). Requires Claude Code v2.1.217 or later. +See [Emoji shortcodes](</docs/en/interactive-mode#emoji-shortcodes>). ### @@ -4207,7 +4208,7 @@ `workflowSizeGuideline` -Set the [agent count Claude aims for](</docs/en/workflows#set-a-size-guideline>) in the dynamic workflows it writes. Claude Code sends the value to Claude as advice, not an enforced cap: `"small"` asks for fewer than 5 agents, `"medium"` fewer than 10, and `"large"` fewer than 50. Choose `"small"` when you want to bound what a workflow spends. Requires Claude Code v2.1.219 or later. +Set the [agent count Claude aims for](</docs/en/workflows#set-a-size-guideline>) in the dynamic workflows it writes. Claude Code sends the value to Claude as advice, not an enforced cap: `"small"` asks for fewer than 5 agents, `"medium"` fewer than 10, and `"large"` fewer than 50. Choose `"small"` when you want to bound what a workflow spends. * **Scope** : `Any file`. A value there takes precedence over the **Dynamic workflow size** choice in `/config`, which Claude Code stores in `~/.claude.json`, and Claude Code hides that row while a settings file sets the key. * **Type** : string, one of: @@ -4222,8 +4223,6 @@ { "workflowSizeGuideline": "small" } - -Requires Claude Code v2.1.219 or later; on v2.1.202 through v2.1.218, set the guideline in `/config` instead. ##
modified Stream responses in real-time View current →
--- a/streaming-output.md +++ b/streaming-output.md @@ -112,7 +112,12 @@ Handle a stream that’s cut off -If a stream is cut off mid-message, such as when you interrupt the turn or the connection drops, you still receive that message’s `message_stop` before the turn ends. A cut text or thinking block also gets its `content_block_stop`. A cut tool call doesn’t, so if `message_stop` arrives while a tool call’s block is still open, treat that call’s input as incomplete. Before Claude Code v2.1.290, a cut stream could end the turn without `message_stop`, so a reply you render from stream events could stay shown as in progress. The TypeScript Agent SDK bundles Claude Code v2.1.290 or later from v0.3.290, and the Python Agent SDK from v0.2.164. If a reply stays shown as in progress after the turn ends, update the SDK. +If a stream is cut off mid-message, you still receive that message’s `message_stop` before the turn ends. Causes of a cut-off stream include an interrupted turn, a dropped connection, and a fallback to a non-streaming request. `content_block_stop` and `message_delta` can be missing before that `message_stop`: + + * **`content_block_stop`** : arrives for the block that was open, unless that block is a tool call. If `message_stop` arrives while a tool call’s block is still open, treat that call’s input as incomplete. + * **`message_delta`** : arrives when you interrupt the turn, and can be missing after a dropped connection or a fallback to non-streaming, so don’t wait for one on a cut message. + +Before Claude Code v2.1.290, a cut stream could end the turn without `message_stop`, so a reply you render from stream events could stay shown as in progress. The TypeScript Agent SDK bundles Claude Code v2.1.290 or later from v0.3.290, and the Python Agent SDK from v0.2.164. If a reply stays shown as in progress after the turn ends, update the SDK. ##
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -301,7 +301,7 @@ * **Full model ID** : use a full model ID such as `claude-opus-5-5` or `claude-sonnet-5`. Accepts the same values as the `--model` flag * **inherit** : use the same model as the main conversation -When Claude invokes a subagent, it can also pass a `model` parameter for that specific invocation. Claude Code resolves the subagent’s model in this order: +When Claude invokes a subagent, it can also pass a `model` parameter for that specific invocation. On an Agent tool call, that parameter takes a model alias: `sonnet`, `opus`, `haiku`, or `fable`. Claude can’t pass a full model ID or `inherit` on that call. Claude Code resolves the subagent’s model in this order: 1. The per-invocation `model` parameter 2. The subagent definition’s `model` frontmatter, where `inherit` selects the main conversation’s model @@ -681,7 +681,7 @@ Frontmatter hooks fire when the agent is spawned as a subagent through the Agent tool or an @-mention, and when the agent runs as the main session via `--agent` or the `agent` setting. In the main-session case they run alongside any hooks defined in [`settings.json`](</docs/en/hooks>). -To let a project-level subagent’s frontmatter hooks run, accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for the folder that contains the agent file. Hooks from user-level subagents in `~/.claude/agents/` and from definitions you pass with `--agents` run without this step. If you added a folder with `--add-dir` from outside your trusted workspace’s repository, trust that folder separately: its `.claude/agents/` hooks don’t inherit the workspace’s grant. Until you trust the folder, the subagent still runs, but Claude Code skips its frontmatter hooks and logs an error to the debug log explaining how to trust the folder. This is a stricter rule than the one for hooks in settings files: trusting a parent folder isn’t enough, and a `-p` session doesn’t count as trusted. [What runs before you trust a folder](</docs/en/permissions#what-runs-before-you-trust-a-folder>) compares the two. Before v2.1.218, frontmatter hooks could run from folders you hadn’t trusted, including in non-interactive sessions. All [hook events](</docs/en/hooks#hook-events>) are supported. The most common events for subagents are: +To let a project-level subagent’s frontmatter hooks run, accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for the folder that contains the agent file. Hooks from user-level subagents in `~/.claude/agents/` and from definitions you pass with `--agents` run without this step. If you added a folder with `--add-dir` from outside your trusted workspace’s repository, trust that folder separately: its `.claude/agents/` hooks don’t inherit the workspace’s grant. Until you trust the folder, the subagent still runs, but Claude Code skips its frontmatter hooks and logs an error to the debug log explaining how to trust the folder. This is a stricter rule than the one for hooks in settings files: trusting a parent folder isn’t enough, and a `-p` session doesn’t count as trusted. [What runs before you trust a folder](</docs/en/permissions#what-runs-before-you-trust-a-folder>) compares the two. All [hook events](</docs/en/hooks#hook-events>) are supported. The most common events for subagents are: Event| Matcher input| When it fires ---|---|--- @@ -987,11 +987,6 @@ With this value, your subagents can delegate to a second layer of their own, and that second layer can’t delegate further. Set `1` to turn nesting off. A nested subagent is configured the same way as a top-level one and resolves from the same scopes. To keep one subagent from spawning while nesting is on, such as a reviewer that should stay read-only, omit `Agent` from its `tools` list or add it to `disallowedTools`. In the terminal, Claude Code shows nested subagents as a tree in the subagent panel below the prompt input and marks each row that still has descendants in the panel with a `(+N)` count of them. Open a row to see that subagent’s siblings and direct children with a path back to `main`. -Earlier versions used different defaults: - - * **v2.1.172 through v2.1.216** : subagents could nest by default, up to five layers deep, and the limit couldn’t be changed. - * **v2.1.217 through v2.1.218** : the limit defaulted to one, so a subagent couldn’t spawn its own unless you raised it; v2.1.219 raised the default to three. - ### ​
modified Troubleshoot a mod View current →
--- a/troubleshoot.md +++ b/troubleshoot.md @@ -449,16 +449,16 @@ A key your `settings.read` hook returns doesn’t take effect -Returned `env` entries don’t become environment variables. Returned `allow`, `ask`, and `deny` rules aren’t checked on tool calls. Set those in a [settings file](</docs/en/settings>), or call [`$.env.set`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>) for environment variables. For another key, check [which mods get `settings.read` and from which version](</docs/en/plugins/mods/events#settings-read-hook>), then search the debug log for `settings.read` and look for one of these lines: +If you return permission rules or `env` on [Claude Code’s own read](</docs/en/plugins/mods/events#settings-read-hook>), the rules aren’t checked on tool calls and the `env` entries don’t become environment variables. Use a [settings file](</docs/en/settings>) for both, or [`$.env.set`](</docs/en/plugins/mods/api#reach-files-processes-and-the-network>) for `env`. For another key, check [which mods get `settings.read` and from which version](</docs/en/plugins/mods/events#settings-read-hook>), then search the debug log for `settings.read` and look for one of these lines: Log line| Meaning and step ---|--- `settings.read hook skipped`, after your mod’s name| Your hook failed. Fix the error the line reports. `settings.read bypassed by cc-plugin-sec-default`, on a line that names your mod ahead of it| The [built-in guard](</docs/en/plugins/mods/admin#know-what-happens-by-default>) skipped your hook. Ask your organization’s administrator to [install the mod as one of the organization’s mods](</docs/en/plugins/mods/admin#install-your-organizations-mods>). -`settings.read: the answer for <key> is no value the key can hold`| The returned value doesn’t fit the key’s schema. Return one it allows. +`settings.read: the answer for <key> is no value the key can hold`| Claude Code refused the value a hook returned for that key. The hook may be yours or another mod’s. Follow the step for your case. `settings.read: the merge never settles for <key>`| The keys the line names keep the settings sources’ values. Set them in a settings file. -`answered settings.read without next()`, after a mod’s name| Relevant only if that mod [runs before yours](</docs/en/plugins/mods/events#the-order-mods-run-in>). Then your hook didn’t run on that read. [Turn that mod off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>), or if your organization deployed it, ask its administrator to. -`settings.read: refused to the engine`| The read was refused, so no hook’s `{ value }` applied. Find what refused it. +`answered settings.read without next()`, after a mod’s name| Your hook is affected if the named mod [runs before yours](</docs/en/plugins/mods/events#the-order-mods-run-in>). Then your hook didn’t run on that read. [Turn that mod off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>), or if your organization deployed it, ask its administrator to. +`settings.read: refused to the engine`| Your value didn’t apply because Claude Code’s own read was refused. Find what refused it. If no line explains the key, check the mods that run before yours for a `settings.read` hook that [changes the key](</docs/en/plugins/mods/events#settings-read-example>). Turn that mod off, or ask your organization’s administrator to. If no hook does, set the key in a settings file. @@ -468,11 +468,16 @@ `the answer for <key> is no value the key can hold` -This debug log line means Claude Code refused the value your [`settings.read`](</docs/en/plugins/mods/events#settings-read-hook>) hook returned for the named key, and that key alone: +This debug log line means Claude Code refused the value a [`settings.read`](</docs/en/plugins/mods/events#settings-read-hook>) hook returned for the named key, and that key alone: settings.read: the answer for <key> is no value the key can hold; the settings' own value stands -The value you returned for the named key didn’t fit that key’s schema, for example by type or by range. Return a value that the key’s [settings reference](</docs/en/settings-reference>) entry allows. While your value doesn’t fit, the key keeps the value merged from the settings sources before any hook answered. The line calls it the settings’ own value. +The value returned for the named key didn’t fit that key’s schema, for example by type or by range. + + * **Your value doesn’t fit the key’s schema** : return one the key’s [settings reference](</docs/en/settings-reference>) entry allows. + * **Your value fits** : the value that doesn’t fit came from another mod’s `settings.read` hook. To find that mod, follow the steps to turn off mods one at a time. Search each new log for this line instead of `refused to the engine`. + +While the value doesn’t fit, the key keeps the value merged from the settings sources before any hook answered. The line calls it the settings’ own value. ### @@ -480,16 +485,18 @@ `settings.read: refused to the engine` -This debug log line means [Claude Code’s own read](</docs/en/plugins/mods/events#settings-read-hook>) was refused, so no hook’s `{ value }` applied, yours included. When a `settings.read` hook refuses that read with [`{ deny: reason }`](</docs/en/plugins/mods/events#settings-read-returns>), the line carries that hook’s reason: +You see this line in the debug log when [Claude Code’s own read](</docs/en/plugins/mods/events#settings-read-hook>) is refused, and Claude Code drops every hook’s value. When a `settings.read` hook refuses that read with [`{ deny: reason }`](</docs/en/plugins/mods/events#settings-read-returns>), the line carries that hook’s reason: settings.read: refused to the engine (engine: $.settings.read: <reason>); the settings' own values stand -Search your own hook’s code for the `<reason>` text: +Search your code for the reason in the parentheses: * **Your code has it** : your hook refused the read. Make it return `{ value }` when [`next.origin`](</docs/en/plugins/mods/events#settings-read-origin>) shows Claude Code’s own read. - * **Your code doesn’t have it** : [turn off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>) your other mods one at a time. After each, rerun this session’s command from your shell with one `--debug-file` on a new path, and search that file for `refused to the engine`. If the line is there, turn off the next mod. If not, the last mod you turned off refused the read, so keep it off. - -With no other mod left, use a [settings file](</docs/en/settings>) for the keys your hook returns. Its values hold while the read is refused. + * **Your code doesn’t have it** : [turn off](</docs/en/plugins/mods/overview#turn-mods-on-or-off>) your other mods one at a time. If your organization deployed a mod, ask its administrator to turn it off. After each: + 1. Start the session from your shell with `claude --debug-file ./settings-read-2.log`, followed by the flags it started with. Use a new path each time. + 2. Search that file for `refused to the engine`. If the line is there, turn off the next mod. If not, the last mod you turned off refused the read, so keep it off. + +If the line stays with no other mod left, set the keys your hook returns in a [settings file](</docs/en/settings>). Its values hold while the read is refused. ##
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -113,7 +113,7 @@ Returns -Returns a `Promise<``WarmQuery``>` that resolves once the subprocess has spawned and completed its initialize handshake. +Returns a `Promise<``WarmQuery``>` that resolves once the subprocess has spawned and completed its initialize handshake. Of the `hook_progress` messages a `SessionStart` or `Setup` hook emits before the handshake completes, you get only the newest, which carries all of the hook’s output so far. `startup()` holds that message, the hook’s `hook_started` message, and anything else the subprocess emits before the handshake completes. The held messages reach you once you call `.query()` on the `WarmQuery` and iterate the result. #### @@ -616,7 +616,7 @@ `managedSettings`| `Settings`| `undefined`| Policy-tier settings your host process supplies to the spawned session. On machines with admin-deployed managed settings, Claude Code ignores these unless the admin’s highest-priority managed source sets `parentSettingsBehavior: 'merge'`, and never merges them while a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings. Merged values pass through a restrictive-only filter; [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) covers what the filter admits and the `allowManaged*Only` locks. A host that sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>) has three keys read straight from this payload instead: its [model configuration](</docs/en/model-config#restrict-model-selection>) on Claude Code v2.1.222 or later, [`modelPricing`](</docs/en/settings-reference#modelpricing>) when no managed source sets it on v2.1.246 or later, and its `ENABLE_TOOL_SEARCH` env entry on v2.1.247 or later `maxBudgetUsd`| `number`| `undefined`| Stop the query when the client-side cost estimate reaches this USD value. The estimate can pass this value, so [leave headroom](</docs/en/agent-sdk/agent-loop#budget-headroom>). Counts only the call’s own spend; totals restored from a resumed session don’t count. For accuracy caveats and reset behavior, see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) `maxThinkingTokens`| `number`| `undefined`| _Deprecated:_ Use `thinking` instead. Maximum tokens for thinking process -`maxTurns`| `number`| `undefined`| Maximum agentic turns (tool-use round trips) +`maxTurns`| `number`| `undefined`| Maximum agentic [turns](</docs/en/agent-sdk/agent-loop#turns-and-messages>) `mcpServers`| `Record<string, [`McpServerConfig`](#mcpserverconfig)>`| `{}`| MCP server configurations `model`| `string`| Default from CLI| Claude model alias or full model name. See [accepted values and provider-specific IDs](</docs/en/model-config#available-models>) `onElicitation`| `(request: ElicitationRequest, options: { signal: AbortSignal }) => Promise<ElicitationResult>`| `undefined`| Callback for handling MCP elicitation requests. Called when an MCP server requests user input and no hook handles it first. When not provided, unhandled elicitation requests are declined automatically @@ -1497,6 +1497,8 @@ toolUseID?: string; }; +If you return `allow` with more than 4,096 items in `updatedPermissions`, Claude Code treats the result as invalid and denies the tool call. Each update counts as one item, and so does each entry in its `rules` or `directories` list. The denial message ends with `updatedPermissions may hold at most 4096 updates, rules and directories in all`. To have the call allowed, return 4,096 items or fewer. + ### ​ @@ -1794,7 +1796,7 @@ * `'account_on_hold'`: [your account is on hold](</docs/en/errors#your-account-is-on-hold>) * `'cloud_credential_error'`: Claude Code couldn’t obtain usable AWS or Google Cloud credentials on the machine it runs on, so no request reached the cloud provider. The usual cause is a cloud sign-in that expired or was never completed on that machine, though a briefly unreachable credential service reports the same value. See [Could not load AWS or Google Cloud credentials](</docs/en/errors#could-not-load-aws-or-google-cloud-credentials>). Requires TypeScript Agent SDK v0.3.267 or later, which bundles Claude Code v2.1.267 -`aborted` is `true` when an interrupt or abort truncated the assistant message before the stream completed: the message has no `stop_reason` and the content may end mid-word. The field is absent on normally completed messages. It requires Agent SDK v0.3.214 or later. `agent_id` identifies the subagent that produced the message and is absent on main-thread messages. The value equals the `task_id` on that subagent’s `task_started` and other task events, and is unchanged when the subagent is [resumed](</docs/en/agent-sdk/subagents#resume-subagents>). The field requires Agent SDK v0.3.292 or later. Match a subagent’s messages to its task events on `agent_id` rather than pairing a message’s `parent_tool_use_id` with a task event’s `tool_use_id`. When a tool call resumes the subagent, the task events carry that call’s `tool_use_id`, while the messages keep the `parent_tool_use_id` of the tool call that first started the subagent, so the two no longer match. Claude Code sets `user_message_uuid` and `user_message_uuids` on the turn’s first assistant message, under the conditions in `user_message_uuid`. When the turn continues one that a restart interrupted, the assistant messages that carry those fields also carry `resume_reason`. `timestamp` is the ISO 8601 time when the message’s content finished generating on the process that produced it. The value comes from that machine’s clock, so use it for display only and don’t order messages by it. One API turn can produce several assistant messages that share a `message.id`, each with its own `timestamp`. When the field is absent, fall back to the time you received the message. `context_usage` is a structured copy of the `/context` report, typed as `SDKContextUsage`, and requires Agent SDK v0.3.232 or later. When you send `/context` as a prompt, Claude Code delivers the report as an assistant message whose `message.content` holds the markdown table, and attaches `context_usage` to that same message. Claude Code doesn’t set the field on any other assistant message, and earlier versions deliver the `/context` table without it, so read the breakdown from the field when it’s present and fall back to the markdown text when it isn’t. `usage_report` is a structured copy of the `/usage` report, typed as `SDKUsageReport`, and requires Agent SDK v0.3.273 or later. When you send `/usage` as a prompt, Claude Code delivers the report as an assistant message whose `message.content` holds the text. It attaches `usage_report` to that same message only when the session meets all of these conditions: +`aborted` is `true` when an interrupt or abort truncated the assistant message before the stream completed: the message has no `stop_reason` and the content may end mid-word. The field is absent on normally completed messages. It requires Agent SDK v0.3.214 or later. `agent_id` identifies the subagent that produced the message and is absent on main-thread messages. The value equals the `task_id` on that subagent’s `task_started` and other task events, and is unchanged when the subagent is [resumed](</docs/en/agent-sdk/subagents#resume-subagents>). On messages from a [nested subagent](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>), it names the nested subagent, not the subagent that spawned it. The field requires Agent SDK v0.3.292 or later. Match a subagent’s messages to its task events on `agent_id` rather than pairing a message’s `parent_tool_use_id` with a task event’s `tool_use_id`. When a tool call resumes the subagent, the task events carry that call’s `tool_use_id`, while the messages keep the `parent_tool_use_id` of the tool call that first started the subagent, so the two no longer match. Claude Code sets `user_message_uuid` and `user_message_uuids` on the turn’s first assistant message, under the conditions in `user_message_uuid`. When the turn continues one that a restart interrupted, the assistant messages that carry those fields also carry `resume_reason`. `timestamp` is the ISO 8601 time when the message’s content finished generating on the process that produced it. The value comes from that machine’s clock, so use it for display only and don’t order messages by it. One API turn can produce several assistant messages that share a `message.id`, each with its own `timestamp`. When the field is absent, fall back to the time you received the message. `context_usage` is a structured copy of the `/context` report, typed as `SDKContextUsage`, and requires Agent SDK v0.3.232 or later. When you send `/context` as a prompt, Claude Code delivers the report as an assistant message whose `message.content` holds the markdown table, and attaches `context_usage` to that same message. Claude Code doesn’t set the field on any other assistant message, and earlier versions deliver the `/context` table without it, so read the breakdown from the field when it’s present and fall back to the markdown text when it isn’t. `usage_report` is a structured copy of the `/usage` report, typed as `SDKUsageReport`, and requires Agent SDK v0.3.273 or later. When you send `/usage` as a prompt, Claude Code delivers the report as an assistant message whose `message.content` holds the text. It attaches `usage_report` to that same message only when the session meets all of these conditions: * The session authenticates with a claude.ai credential * The credential shows a known plan type or carries the `user:profile` scope @@ -3467,7 +3469,7 @@ Agent -**Tool name:** `Agent`. The previous name `Task` is still accepted as an alias, and the `tools` array in the `SDKSystemMessage` init message currently lists this tool as `Task` for backward compatibility. +**Tool name:** `Agent`. The previous name `Task` is still accepted as an alias when this tool is available to the session. The `tools` array in the `SDKSystemMessage` init message lists this tool as `Task` for backward compatibility. The `mode` field is deprecated and ignored on Claude Code v2.1.212 or later. A subagent runs in either the parent session’s permission mode or its definition’s `permissionMode`, and the [subagent inheritance rules](</docs/en/agent-sdk/permissions#available-modes>) decide which. @@ -4264,7 +4266,7 @@ Agent -**Tool name:** `Agent`. The previous name `Task` is still accepted as an alias, and the `tools` array in the `SDKSystemMessage` init message currently lists this tool as `Task` for backward compatibility. +**Tool name:** `Agent`. The previous name `Task` is still accepted as an alias when this tool is available to the session. type AgentOutput = | { @@ -5889,7 +5891,7 @@ `SDKHookStartedMessage` -Emitted when a hook begins executing. Claude Code delivers this message, `SDKHookProgressMessage`, and `SDKHookResponseMessage` to the message stream immediately, including while a `SessionStart` or `Setup` hook is still running during session startup. Claude Code v2.1.169 through v2.1.203 delivered these messages in one batch after a `SessionStart` or `Setup` hook completed; v2.1.204 restored live delivery. +Emitted when a hook begins executing. Claude Code delivers this message, `SDKHookProgressMessage`, and `SDKHookResponseMessage` to the message stream immediately, including while a `SessionStart` or `Setup` hook is still running during session startup. Claude Code v2.1.169 through v2.1.203 delivered these messages in one batch after a `SessionStart` or `Setup` hook completed; v2.1.204 restored live delivery. If you start the session with `startup()`, these messages reach you once you call `.query()` and iterate the result. type SDKHookStartedMessage = { type: "system"; @@ -6410,7 +6412,7 @@ `allowManagedDomainsOnly`| `boolean`| `false`| Managed-settings only. When set in [managed settings](</docs/en/managed-settings>), only `allowedDomains` entries and `WebFetch(domain:...)` allow rules from managed settings are honored, and allow entries from user, project, or local settings are ignored. From the SDK, pass it through the `managedSettings` option `allowLocalBinding`| `boolean`| `false`| Allow processes to bind to local ports (for example, for dev servers) `allowUnixSockets`| `string[]`| `[]`| Unix socket paths that processes can access (for example, Docker socket) -`allowAllUnixSockets`| `boolean`| `false`| Allow access to all Unix sockets +`allowAllUnixSockets`| `boolean`| `false`| Allow access to all Unix sockets, and on Linux to VM sockets (`AF_VSOCK`) `httpProxyPort`| `number`| `undefined`| HTTP proxy port for network requests `socksProxyPort`| `number`| `undefined`| SOCKS proxy port for network requests
modified Find bugs with ultrareview View current →
--- a/ultrareview.md +++ b/ultrareview.md @@ -67,7 +67,7 @@ Pass a request in plain words -On Claude Code v2.1.218 or later, you can also describe what you’re working on in plain words: +You can also describe what you’re working on in plain words: /code-review ultra check my auth changes @@ -133,7 +133,9 @@ claude ultrareview 1234 claude ultrareview origin/main -Without arguments, the subcommand reviews the diff between your current branch and the default branch, with the same whole-repository fallback as `/code-review ultra` when no merge base exists. Pass a PR number to review a pull request on `github.com`, or a base branch to review against it; base-branch handling matches the interactive command. You consent to the whole-repository fallback and to the billing and terms prompt when you run the subcommand, so the run doesn’t stop to confirm them. Running it yourself is what counts as consent. When Claude runs the subcommand for you instead, for example through the Bash tool, Claude Code refuses the whole-repository review. `claude -p '/code-review ultra'` doesn’t get you the findings, so use `claude ultrareview` in scripts. The `-p` run launches the cloud review and exits without waiting for it. When the review would bill usage credits, the `-p` run stops without launching it. Before v2.1.218, `/code-review ultra` in a non-interactive session ran a local review. +Without arguments, the subcommand reviews the diff between your current branch and the default branch, with the same whole-repository fallback as `/code-review ultra` when no merge base exists. Pass a PR number to review a pull request on `github.com`, or a base branch to review against it; base-branch handling matches the interactive command. You consent to the whole-repository fallback and to the billing and terms prompt when you run the subcommand, so the run doesn’t stop to confirm them. Running it yourself is what counts as consent. When Claude runs the subcommand for you instead, for example through the Bash tool, Claude Code refuses the whole-repository review. + +`claude -p '/code-review ultra'` doesn’t get you the findings, so use `claude ultrareview` in scripts. The `-p` run launches the cloud review and exits without waiting for it. When the review would bill usage credits, the `-p` run stops without launching it. Flag| Description ---|---
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -307,7 +307,7 @@ Run `/usage` to open the Account & usage dialog, which shows your signed-in account and your usage. The usage figures match how you signed in: - * **claude.ai plan** : usage bars for your plan’s limits, such as the current session and the week. Each bar shows how long until its limit resets. The dialog also breaks down what is contributing to your plan limits: + * **claude.ai plan** : usage bars for your plan’s limits, such as the current session and the week. The dialog also breaks down what is contributing to your plan limits: * **Recommendations** : suggested changes, one per row, such as `Trim ~/code/api/CLAUDE.md · 49k tokens per request` * **Fix button** : to have Claude Code apply the recommendations it can, click the button under them, such as **Fix both**. To learn which rows the button acts on and what then happens in your session, see [Apply recommendations with the fix shortcut](</docs/en/costs#apply-recommendations-with-the-fix-shortcut>). Requires Claude Code v2.1.305 or later. The button isn’t shown while [Remote Control](</docs/en/remote-control>) is connected. If a warning reads `The usage fix wasn’t fully sent. Open usage and try again.` after Remote Control connected, [disconnect Remote Control](</docs/en/remote-control#check-connection-status>) before you try again. * **Attribution** : tables of how much usage came from each skill, subagent, plugin, and MCP server
modified Get started with Claude Code in the cloud View current →
--- a/web-quickstart.md +++ b/web-quickstart.md @@ -194,7 +194,7 @@ * You can also click **Changes** in the session’s title bar, or in the bar’s **⋮** menu. * To show the panel when it’s hidden, click the **Show session rail** icon in the session’s title bar, or in the bar’s **⋮** menu. -The diff compares the session’s changes against its base branch by default. To compare against a different branch, select **Compare against** and pick one. +The diff compares the session’s changes against its base branch by default. To compare against a different branch, select **Compare against** and pick one. Against the base branch, the diff can [leave out changes that aren’t pushed yet](</docs/en/claude-code-on-the-web#troubleshoot-a-missing-file-in-the-diff-view>). 2
modified Orchestrate subagents at scale with dynamic workflows View current →
--- a/workflows.md +++ b/workflows.md @@ -204,12 +204,12 @@ * `.claude/workflows/` in your project: shared with everyone who clones the repo * `~/.claude/workflows/` in your home directory: available in every project, visible only to you. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), this location is the `workflows/` directory under that path. -The save dialog shows the resolved path for the personal location. Press Enter to save. The workflow runs as `/<name>` in future sessions from either location. Claude Code checks the save location for symlinks before writing, and shows an error instead of writing through one. What it checks depends on where you save: +The save dialog shows the resolved path for the personal location. Press Enter to save. The workflow runs as `/<name>` in future sessions from either location. Claude Code checks the save location for symlinks before writing, and shows an error instead of writing through one: * Project location: Claude Code refuses if `.claude`, `.claude/workflows`, or the target file is a symlink. * Personal location: Claude Code refuses only if the target file itself is a symlink, so a `~/.claude` directory managed by a dotfiles tool still works. -Before v2.1.216, Claude Code followed the link, which could place the file outside the location you chose. In a monorepo with several `.claude/` directories, you can keep workflows alongside the package they apply to. Saving to the project location writes to the closest `.claude/workflows/` directory that already exists between your working directory and the repository root, or to the repository root if none exists yet. Project workflows also load from every `.claude/workflows/` along that path, and when more than one defines the same name Claude Code runs the one closest to the working directory. If a project workflow and a personal workflow share a name, the project one runs. +In a monorepo with several `.claude/` directories, you can keep workflows alongside the package they apply to. Saving to the project location writes to the closest `.claude/workflows/` directory that already exists between your working directory and the repository root, or to the repository root if none exists yet. Project workflows also load from every `.claude/workflows/` along that path, and when more than one defines the same name Claude Code runs the one closest to the working directory. If a project workflow and a personal workflow share a name, the project one runs. ### @@ -487,7 +487,7 @@ `medium`| Fewer than 10 agents `large`| Fewer than 50 agents -The default is `medium`, or `small` when you’re signed in on a Pro plan with Claude Code v2.1.271 or later. Until you choose a value, the `/config` row marks the value as the default, and the workflow’s `Running in background` line names the size in force. Requires Claude Code v2.1.219 or later; earlier versions default to `unrestricted`. To change the guideline, pick a value for the Dynamic workflow size setting in `/config`, or run `/config workflowSizeGuideline=small`. On v2.1.219 and later, you can also set the [`workflowSizeGuideline` key](</docs/en/settings-reference#workflowsizeguideline>) in any settings file; that value takes precedence over `/config`, and Claude Code hides the `/config` row while a settings file provides one. Changes take effect on the next prompt. The runtime agent caps still apply regardless of the setting. +The default is `medium`, or `small` when you’re signed in on a Pro plan with Claude Code v2.1.271 or later. Until you choose a value, the `/config` row marks the value as the default, and the workflow’s `Running in background` line names the size in force. To change the guideline, pick a value for the Dynamic workflow size setting in `/config`, or run `/config workflowSizeGuideline=small`. You can also set the [`workflowSizeGuideline` key](</docs/en/settings-reference#workflowsizeguideline>) in any settings file; that value takes precedence over `/config`, and Claude Code hides the `/config` row while a settings file provides one. Changes take effect on the next prompt. The runtime agent caps still apply regardless of the setting. ###
modified Run parallel sessions with worktrees View current →
--- a/worktrees.md +++ b/worktrees.md @@ -35,7 +35,7 @@ Ask Claude to create a worktree -You can also ask Claude to “work in a worktree” during a session, and it creates one with the [`EnterWorktree`](</docs/en/tools-reference>) tool. Once in a worktree, Claude can switch directly to another one under `.claude/worktrees/` by calling `EnterWorktree` with the target path; the previous worktree stays on disk untouched. When Claude enters a path outside the repository’s `.claude/worktrees/` directory, Claude Code asks for your approval first, because the move takes the session’s working directory, write access, and project configuration such as `CLAUDE.md` and settings to that location. An `EnterWorktree` [permission rule](</docs/en/permissions>) or choosing “don’t ask again” doesn’t suppress this prompt; only `bypassPermissions` mode skips it. Before v2.1.206, Claude could enter any existing worktree path without asking. +You can also ask Claude to “work in a worktree” during a session, and it creates one with the [`EnterWorktree`](</docs/en/tools-reference>) tool. Once in a worktree, Claude can switch directly to another one under `.claude/worktrees/` by calling `EnterWorktree` with the target path; the previous worktree stays on disk untouched. When Claude enters a path outside the repository’s `.claude/worktrees/` directory, Claude Code asks for your approval first. The move takes the session’s working directory, write access, and project configuration such as `CLAUDE.md` and settings to that location. An `EnterWorktree` [permission rule](</docs/en/permissions>) or choosing “don’t ask again” doesn’t suppress this prompt; only `bypassPermissions` mode skips it. **Hook paths don’t follow the worktree.** After Claude enters a worktree, Claude Code keeps `${CLAUDE_PROJECT_DIR}` in your [hooks](</docs/en/hooks#reference-scripts-by-path>) where it was and passes the worktree path to them a different way: @@ -55,7 +55,7 @@ * **Another branch is checked out** : if the worktree is on a branch other than its own that has commits past the worktree’s starting commit, Claude prompts you to keep or remove the worktree. Either answer keeps that other branch and its commits. Removing deletes the worktree directory and the worktree’s own branch, the one Claude created with it * **The worktree’s state can’t be verified** : when Claude Code can’t count the worktree’s changes or can’t inspect its submodule checkouts, it prompts you rather than removing the worktree automatically. The prompt names what it couldn’t check -Non-interactive runs with `-p` have no exit prompt, so Claude doesn’t clean up their worktrees, and Claude Code leaves the lock it took on each one at creation in place until a later session’s stale-lock sweep releases it. To remove one, run `git worktree remove`; if git refuses because the worktree is locked, run `git worktree unlock` on it first. On Windows, removing a worktree doesn’t delete files outside it. If a folder inside the worktree is a link to somewhere else, such as an NTFS junction or a directory symlink, Claude Code deletes only the link and keeps the folder it points to. Before v2.1.205, removing a worktree with a link nested in a subdirectory could delete the folder it pointed to. +Non-interactive runs with `-p` have no exit prompt, so Claude doesn’t clean up their worktrees, and Claude Code leaves the lock it took on each one at creation in place until a later session’s stale-lock sweep releases it. To remove one, run `git worktree remove`; if git refuses because the worktree is locked, run `git worktree unlock` on it first. On Windows, removing a worktree doesn’t delete files outside it. If a folder inside the worktree is a link to somewhere else, such as an NTFS junction or a directory symlink, Claude Code deletes only the link. ## @@ -71,7 +71,7 @@ Before v2.1.212, a non-interactive resume stayed in the starting directory and `ExitWorktree` reported that there was no active worktree session to exit. -When Claude enters or exits a worktree that Claude Code created with git, the transcript follows: Claude Code records the session under the session’s new working directory, the same way [`/cd`](</docs/en/commands>) does, so `/desktop` and `--resume` find it there. Exiting moves it back the same way. A worktree created by a `WorktreeCreate` hook keeps its transcript at the launch directory. Requires Claude Code v2.1.198 or later. +When Claude enters or exits a worktree that Claude Code created with git, the transcript follows. Claude Code records the session under the session’s new working directory, the same way [`/cd`](</docs/en/commands>) does, so `/desktop` and `--resume` find it there. Exiting moves it back the same way. A worktree created by a `WorktreeCreate` hook keeps its transcript at the launch directory. ## @@ -121,7 +121,15 @@ * The worktree belongs to a `--worktree` session you haven’t backgrounded, whatever its age. * You created the worktree yourself with `git worktree add`, even if you then ran a `--worktree <name>` session in it and backgrounded that session. -Claude Code writes a marker into the git metadata of every worktree it creates with git, and the sweep keeps any worktree without one, including a worktree a `WorktreeCreate` hook created. While an agent is running, Claude Code holds a `git worktree lock` on its worktree so that concurrent cleanup can’t remove it, and releases the lock when the agent finishes. Claude Code holds the same lock on the worktree it created for a backgrounded session while the session runs, so the sweep leaves the worktree in place and `git worktree remove` refuses to remove it. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. Before v2.1.210, a lock left by a killed session stayed in place until you ran `git worktree unlock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files. If git refuses because the worktree is locked, run `git worktree unlock` on it first. +Claude Code writes a marker into the git metadata of every worktree it creates with git, and the sweep keeps any worktree without one, including a worktree a `WorktreeCreate` hook created. + +#### + +​ + +Worktree locks and manual removal + +While an agent is running, Claude Code holds a `git worktree lock` on its worktree so that concurrent cleanup can’t remove it, and releases the lock when the agent finishes. Claude Code holds the same lock on the worktree it created for a backgrounded session while the session runs, so the sweep leaves the worktree in place and `git worktree remove` refuses to remove it. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files. If git refuses because the worktree is locked, run `git worktree unlock` on it first. ## @@ -142,7 +150,13 @@ * `"fresh"` (default): branch from the repository’s default branch on the remote, usually `main`, so the worktree starts from a clean tree matching the remote. * `"head"`: branch from your current local `HEAD`, so the worktree carries your unpushed commits and feature-branch state. Use this when isolating subagents that need to operate on in-progress work. Inside a worktree, `"head"` resolves to that worktree’s `HEAD`, not the main checkout’s. -You can’t set `worktree.baseRef` to a branch name. To start a worktree from a specific existing branch, create it with git directly. For a `"fresh"` base, Claude Code keeps `origin/HEAD` current: when the repository hasn’t been fetched in the last 24 hours, it fetches the default branch, capped at five seconds, and uses the locally cached ref if the fetch fails. The fetch never waits for input in your terminal, so it also counts as failed when git or ssh would ask for a password, a key passphrase, or confirmation of a new SSH host. If no remote is configured, or `origin/HEAD` isn’t cached locally and can’t be fetched, the worktree falls back to your current local `HEAD`. Before v2.1.208, a fresh worktree used whatever `origin/HEAD` was already cached locally. This example makes every new worktree branch from your current work: +You can’t set `worktree.baseRef` to a branch name. To start a worktree from a specific existing branch, create it with git directly. For a `"fresh"` base, Claude Code keeps `origin/HEAD` current: + + * When the repository hasn’t been fetched in the last 24 hours, it fetches the default branch, capped at five seconds, and uses the locally cached ref if the fetch fails. + * The fetch never waits for input in your terminal. It also counts as failed when git or ssh would ask for a password, a key passphrase, or confirmation of a new SSH host. + * If no remote is configured, or `origin/HEAD` isn’t cached locally and can’t be fetched, the worktree falls back to your current local `HEAD`. + +This example makes every new worktree branch from your current work: { "worktree": { @@ -203,8 +217,6 @@ * `worktree.baseRef` is `"head"`. * The name is a pull request or merge request reference. -Before v2.1.208, when you reused a name, Claude Code always reopened the old worktree at its old tip. - ### ​ @@ -222,8 +234,8 @@ A worktree gets its own files and branch, but it shares the following with the main checkout: * **The repository’s`.git` directory**: git commands in a worktree write to the main repository’s shared `.git` directory, and [sandboxing](</docs/en/sandboxing#filesystem-isolation>) allows those writes, so commands such as `git commit` work from inside a worktree with the sandbox enabled. - * **Plugins** : plugins installed at [project scope](</docs/en/plugins/loading#find-where-a-plugin-is-enabled>) from the main checkout also load in worktrees of the same repository, so you don’t need to reinstall them per worktree. Requires Claude Code v2.1.200 or later. - * **Permission approvals** : choosing “Yes, and don’t ask again” for a Bash command in a worktree session saves the rule to the main checkout’s `.claude/settings.local.json`, so it applies in the main checkout and in every other worktree of the repository, and it survives the worktree’s removal. On Windows and in the other cases where Claude Code [doesn’t use the repository root](</docs/en/settings#where-claude-code-looks-for-each-file>), the rule stays with that worktree. Before v2.1.211, an approval granted in a worktree was saved inside that worktree, didn’t apply elsewhere, and was lost when the worktree was removed. See [where approvals are saved](</docs/en/permissions#permission-system>). + * **Plugins** : plugins installed at [project scope](</docs/en/plugins/loading#find-where-a-plugin-is-enabled>) from the main checkout also load in worktrees of the same repository, so you don’t need to reinstall them per worktree. + * **Permission approvals** : choosing “Yes, and don’t ask again” for a Bash command in a worktree session saves the rule to the main checkout’s `.claude/settings.local.json`. The rule applies in the main checkout and in every other worktree of the repository, and it survives the worktree’s removal. On Windows and in the other cases where Claude Code [doesn’t use the repository root](</docs/en/settings#where-claude-code-looks-for-each-file>), the rule stays with that worktree. See [where approvals are saved](</docs/en/permissions#permission-system>). * **Untracked skills, agents, and commands** : when the worktree checkout has no `.claude/skills` directory at its root, for example because your `.claude/skills` is gitignored, Claude Code loads the main checkout’s [project skills](</docs/en/skills#where-skills-live>) in the worktree session. In a worktree with its own `.claude/skills` directory, only that copy loads. The same read-through covers `.claude/agents` and `.claude/commands`. For skills, the read-through requires Claude Code v2.1.277 or later. All of these apply whether you create the worktree with `--worktree` or with `git worktree add`. In a worktree session you start from the [desktop app](</docs/en/desktop#run-a-session-in-its-own-worktree>), Claude Code reads project configuration such as settings, hooks, skills, agents, commands, and [`.mcp.json`](</docs/en/mcp#project-scope>) servers from the main checkout’s root. Hook commands run in that root, and `${CLAUDE_PROJECT_DIR}` points at it. To reach the files Claude is working on, read the worktree’s path from the hook’s [`cwd` input field](</docs/en/hooks#common-input-fields>). `CLAUDE.md` files and `.claude/rules/` still load from the worktree. @@ -310,6 +322,14 @@ ​ +A worktree Claude Code created has the original content of replaced objects + +If your repository uses [`git replace`](<https://git-scm.com/docs/git-replace>), the files in a worktree that Claude Code creates hold the original objects’ content rather than the replacements your `refs/replace/` entries name. Claude Code runs the git commands that check out the worktree’s files with `GIT_NO_REPLACE_OBJECTS=1`, ignoring any value you exported for that variable. To get the replaced content, create the worktree yourself with `git worktree add` and start Claude Code inside it. + +### + +​ + Git LFS files are pointer files in a worktree Claude Code created If you set up [Git LFS](<https://git-lfs.com>) with `git lfs install --local`, a worktree that Claude Code creates contains LFS pointer files instead of the real files. The `--local` flag writes the LFS filter into the repository’s own `.git/config` rather than your global git config. A plain `git lfs install` writes to your global config and isn’t affected. The same applies to any other [filter driver](<https://git-scm.com/docs/gitattributes>) defined in the repository’s own config. Claude Code skips the repository’s own filter drivers when it creates a worktree because a filter driver is a shell command, and anything that can write to the repository, including Claude, could have put one there. Before v2.1.247, Claude Code ran those drivers during worktree creation. To get the real files, run `git lfs pull` inside the worktree. In four rare cases, Claude Code creates no worktree at all: it can’t tell which filter drivers the repository’s config defines, or it finds a setting there it can’t switch off. Match the error to its fix: