modified Orchestrate teams of Claude Code sessions View current →
--- a/agent-teams.md +++ b/agent-teams.md @@ -238,7 +238,7 @@ **Task list**| Shared list of work items that teammates claim and complete **Mailbox**| Messaging system for communication between agents -Each agent’s mailbox is a JSON file at `~/.claude/teams/{team-name}/inboxes/{agent-name}.json`. Claude Code validates every entry when it reads a mailbox file. Entries that don’t match the message format are reported as errors and removed from the file; the valid messages are still delivered. Before v2.1.207, a single malformed mailbox entry caused a repeated error every second and blocked delivery for that mailbox until you deleted the file manually. Claude Code reports a message as sent only when the write to the recipient’s mailbox file succeeds, whether the message is plain text or a structured protocol message such as a plan approval or shutdown request. When the write fails, for example because the disk is full or the mailbox directory isn’t writable, the sending agent receives an error and nothing is sent. See [Failed to write to a teammate’s inbox](</docs/en/errors#failed-to-write-to-a-teammate-inbox>) for the error messages and recovery steps. Claude Code manages task dependencies automatically: when a teammate completes a task that other tasks depend on, it unblocks the dependent tasks without any action from you. Teams and tasks are stored locally under a session-derived name. The name is `session-` followed by the first eight characters of the session ID: +Each agent’s mailbox is a JSON file at `~/.claude/teams/{team-name}/inboxes/{agent-name}.json`. Claude Code validates every entry when it reads a mailbox file. Entries that don’t match the message format are reported as errors and removed from the file; the valid messages are still delivered. Claude Code reports a message as sent only when the write to the recipient’s mailbox file succeeds, whether the message is plain text or a structured protocol message such as a plan approval or shutdown request. When the write fails, for example because the disk is full or the mailbox directory isn’t writable, the sending agent receives an error and nothing is sent. See [Failed to write to a teammate’s inbox](</docs/en/errors#failed-to-write-to-a-teammate-inbox>) for the error messages and recovery steps. Claude Code manages task dependencies automatically: when a teammate completes a task that other tasks depend on, it unblocks the dependent tasks without any action from you. Teams and tasks are stored locally under a session-derived name. The name is `session-` followed by the first eight characters of the session ID: * **Team config** : `~/.claude/teams/{team-name}/config.json` * **Task list** : `~/.claude/tasks/{team-name}/`
modified Claude Code on Amazon Bedrock View current →
--- a/amazon-bedrock.md +++ b/amazon-bedrock.md @@ -151,7 +151,7 @@ Credential caching and resolution timeout -Claude Code resolves the AWS default credential provider chain once and keeps the resolved credentials in memory. It reuses them until five minutes before they expire, or for one hour when they carry no expiration, so an SSO-backed profile requests credentials from IAM Identity Center about once per credential lifetime. A credential error from the API clears the cache, and the retry resolves fresh credentials. Requires Claude Code v2.1.207 or later. The cache covers every credential method listed at the start of this step except an Amazon Bedrock API key, which doesn’t use the provider chain. To resolve the chain on every request instead, set [`CLAUDE_CODE_SKIP_AWS_CRED_CACHE=1`](</docs/en/env-vars>). The resolve that fills the cache times out after 60 seconds. If a step in the chain stalls, for example a `credential_process` helper that waits for input it can’t receive, the request fails with [`AWS default-chain credential resolve timed out`](</docs/en/errors#aws-default-chain-credential-resolve-timed-out>). If your chain runs an interactive sign-in that legitimately needs longer, such as browser-based SSO with MFA through a wrapper like `aws-vault`, raise the limit in milliseconds with [`CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS`](</docs/en/env-vars>). With `CLAUDE_CODE_SKIP_AWS_CRED_CACHE=1` set, each API request resolves the chain without this limit. Except when you authenticate with an Amazon Bedrock API key, the setup wizard applies the same limit to each AWS call it makes while verifying your credentials, and to the credential lookup before each model check. During credential verification, a check that exceeds it fails with [`Timed out after 60s waiting for AWS`](</docs/en/errors#bedrock-setup-verification-timed-out-waiting-for-aws>). +Claude Code resolves the AWS default credential provider chain once and keeps the resolved credentials in memory. It reuses them until five minutes before they expire, or for one hour when they carry no expiration, so an SSO-backed profile requests credentials from IAM Identity Center about once per credential lifetime. A credential error from the API clears the cache, and the retry resolves fresh credentials. The cache covers every credential method listed at the start of this step except an Amazon Bedrock API key, which doesn’t use the provider chain. To resolve the chain on every request instead, set [`CLAUDE_CODE_SKIP_AWS_CRED_CACHE=1`](</docs/en/env-vars>). The resolve that fills the cache times out after 60 seconds. If a step in the chain stalls, for example a `credential_process` helper that waits for input it can’t receive, the request fails with [`AWS default-chain credential resolve timed out`](</docs/en/errors#aws-default-chain-credential-resolve-timed-out>). If your chain runs an interactive sign-in that legitimately needs longer, such as browser-based SSO with MFA through a wrapper like `aws-vault`, raise the limit in milliseconds with [`CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS`](</docs/en/env-vars>). With `CLAUDE_CODE_SKIP_AWS_CRED_CACHE=1` set, each API request resolves the chain without this limit. Except when you authenticate with an Amazon Bedrock API key, the setup wizard applies the same limit to each AWS call it makes while verifying your credentials, and to the credential lookup before each model check. During credential verification, a check that exceeds it fails with [`Timed out after 60s waiting for AWS`](</docs/en/errors#bedrock-setup-verification-timed-out-waiting-for-aws>). #### @@ -188,7 +188,7 @@ } } -The flat output from `aws configure export-credentials --format process` is also accepted, with the same keys at the top level instead of nested under `Credentials`. `Expiration` is optional. When the command returns a valid ISO 8601 `Expiration`, Claude Code caches the credentials until five minutes before that time. Without it, credentials are cached for one hour. When you configure `awsCredentialExport` without `awsAuthRefresh`, Claude Code uses the exported credentials directly and doesn’t re-resolve the AWS default credential provider chain at startup. Requires Claude Code v2.1.206 or later. +The flat output from `aws configure export-credentials --format process` is also accepted, with the same keys at the top level instead of nested under `Credentials`. `Expiration` is optional. When the command returns a valid ISO 8601 `Expiration`, Claude Code caches the credentials until five minutes before that time. Without it, credentials are cached for one hour. When you configure `awsCredentialExport` without `awsAuthRefresh`, Claude Code uses the exported credentials directly and doesn’t re-resolve the AWS default credential provider chain at startup. ### @@ -255,9 +255,9 @@ * 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 a deployment that doesn’t pin a primary model is billed at the Opus rate once it updates to v2.1.207 or later. To keep 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. Before v2.1.207, the primary model defaulted to Sonnet 4.5, the `opus` alias resolved to Opus 4.6, and background tasks always used the primary model. To customize models further, use one of these methods: +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: # 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 @@ -158,7 +158,7 @@ After your session publishes an artifact, Claude Code watches that artifact for comments. When someone who can edit the artifact sends a comment to Claude, it reaches your session right away, and Claude can read the thread and reply without you asking. You need Claude Code v2.1.228 or later. If you turned [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>) off, Claude Code doesn’t watch for comments. Your [permission mode](</docs/en/permission-modes>) decides what Claude does when a sent comment arrives: - * **Claude replies on its own** : when your permission mode lets Claude post the reply without asking you, Claude reads the thread and replies, and edits the artifact when the comment asks for a change. You see `Auto-replied to comment thread on Artifact: <name>` or `Auto-edited Artifact: <name> in response to a comment thread`. + * **Claude replies on its own** : if you’re in a permission mode that lets Claude post the reply without asking you, Claude reads the thread and replies. You see `Auto-replied to comment thread on Artifact: <name>`. * **Claude waits for you** : outside plan mode, when posting the reply would need your approval, you see `Comments are waiting on Artifact: <name>`. Claude then asks you for approval to read the thread, and again to post the reply. * **Claude pauses in plan mode** : you see `Comments are waiting on Artifact: <name>`, and Claude doesn’t reply until you leave plan mode and ask it to read and reply.
modified Claude Code changelog View current →
Show diff (215 lines)
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,212 @@ 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.299 + +October 14, 2026 + +**Added** + + * Added `CLAUDE_CODE_DISABLE_FILE_MENTIONS` environment variable: Claude gets the paths of `@` file mentions to read with its file tools, not the files’ contents + * Added idle compaction in the terminal: a 200K+ token conversation left idle for about 54 minutes is compacted before its one-hour prompt cache expires, so your next message doesn’t reprocess it all + * Added `CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS` to change idle compaction’s 200K-token minimum; `"idleCompaction": false` in settings.json turns it off. Both need v2.1.290 or later + * Added `$.prompt.media` so a `prompt.submit` hook of a mod installed by managed settings can read the bytes of an image or document attached to the prompt + * Added `$.session.identity()` for mods installed by managed settings: how the session is signed in, and its organization and email when managed `forceLoginOrgUUID` lists that organization + * Added `size`, `weight`, `mono` and `tabular` to a mod’s `Text` and named spacing steps (`xs` to `xl`) to its `Box`; `bold` is deprecated in favor of `weight` + * Added `--shutdown-drain-sec` to `claude self-hosted-runner orchestrator`: on SIGTERM it stops polling and gives the poll in flight and running spawn hooks up to that many seconds to finish + * Added the skill’s frontmatter, source, plugin name and file path to what a mod’s `skill.prompt` hook receives + * Added `/effort` and `/fast` in agent view to set what new sessions start with; a bare `/model`, `/effort` or `/fast` there now opens a picker + * Added a “safe mode” line to the agents view peek panel for background sessions started with `--safe-mode` + * Added a one-time note when plan mode won’t ask before most edits or commands because bypass permissions is available + * Added `--disallow-tools` and a `disallowed_tools` case field to `claude plugin eval` to keep specific built-in tools, such as Agent, out of eval runs + * Added support for turning off the attribution block in Claude Desktop’s Code tab: set `CLAUDE_CODE_ATTRIBUTION_HEADER=0` in the `env` of a Claude apps gateway’s `code` policy + * Added a field to the attribution block in Claude Code sessions behind a Claude apps gateway; remove the block with `CLAUDE_CODE_ATTRIBUTION_HEADER=0` + * Added a `queue` door to the `session.append` mod hook, so a mod can make the transcript’s queue records differ from the prompt as sent + * Added a note in `/plugin` and `claude plugin validate` naming a mod’s hooks that are skipped where an organization manages Claude Code + * Added `/usage` warnings for max effort, workflows, always-on context and large tool results + * [Claude Tag] Added the ability for Claude in Slack to delete a canvas it created in a channel when someone asks it to + +**Changed** + + * Changed plugin hooks and workflow scripts to refuse values they hand back that nest deeper than 28,000 levels, with an error naming the limit (workflow scripts allowed 100,000) + * Changed actions a plugin hook can block to be refused, not let through, when the hook cannot be handed them or cannot hand back its answer; a tool that already ran has its result withheld + * Changed requests to claude.ai’s connector proxy and to Anthropic-hosted MCP servers to no longer follow HTTP redirects; redirects by a connector’s own server are unaffected + * Changed MCP requests in cloud and self-hosted runner sessions to no longer follow HTTP redirects from the session’s MCP proxy + * Changed skill and command loading: one whose file or folder name has hidden, direction-changing or blank-like characters, `<` or `>` is no longer offered until renamed; such a `name:` is ignored + * Changed `ui.render` trees in `claude plugin test`: each mod’s Box or Text root now carries `part: { plugin }` naming the mod, so exact-tree assertions must include it + * Changed WebFetch page reads to pick their effort as web searches do: the caller’s level on the caller’s own model, otherwise the level settings give the small model + * Changed `claude plugin test` to fail a call to a mod’s served `$` method that has not answered within ten seconds, as a session does + * Changed MCP allow rules to reach only the server they name: `mcp__a` no longer allows a server named `a__b` or `a_`; write `mcp__<server>__*` with the server’s whole normalized name + * Changed agent `tools:` lists to take only the named MCP server’s tools; list a server whose name contains `__` as `mcp__<whole name>__*` + * Changed Claude in Chrome in Cowork cloud sessions outside auto mode: an approved-site action the safety classifier flags now asks you instead of being refused, unless managed settings apply + * Changed cloud session and Remote Control MCP connectors to negotiate MCP protocol version 2026-07-28 by default on installs that fetch no flags; `MCP_PROTOCOL_NEGOTIATION=legacy` opts out + * Changed MCP tool descriptions and server instructions from Anthropic’s first-party MCP servers at `api.anthropic.com` to reach Claude in full instead of being cut at 4,096 characters + * Changed auto mode in Cowork cloud sessions: a `PermissionRequest` hook can no longer approve shell commands or subagents; those prompts wait or are denied + * Changed the resume command printed at exit: it names the session by its ID and no longer by its name, so that nothing in a session name can run when the line is pasted + * Changed the resume command printed at exit of a worktree session: it uses `-w` and `-r` if the long flags do not fit the terminal. If neither fits a kept worktree, rows above it say where to run it + * Changed `/btw` side questions in non-interactive sessions to return a timeout error when still unanswered after 11 minutes + * Changed `UserPromptSubmit` hooks to run before a skill or custom slash command expands, so a hook that blocks the prompt now also stops its embedded shell commands + * Changed a skill’s own front-matter `UserPromptSubmit` hook to first run on the prompt after the one that invokes the skill + * Changed the `turn.start` mod hook to also hear subagents’ and teammates’ turns, not only the main loop’s; tell them apart by `e.agentId` (absent on the main loop) + * Changed the errors shown when `/ultrareview` can’t upload a repository to stop suggesting `git add .`, which could stage or commit untracked files such as `.env` + * Changed the cyber safeguard notice to no longer ask people to apply to the Cyber Verification Program + * [Cloud sessions] Changed deleting a self-hosted environment to turn off its routines right away, with the reason shown on each routine, instead of leaving their runs to fail + * [Claude Tag] Changed how Claude in Slack corrects a message it got wrong: it edits the message in place and adds a short “Edited” note instead of striking through the old text + * [Claude Tag] Changed Claude in Slack to join channels with more than 100 members quietly, with no intro message + +Show 16 improvements + + * Self-hosted runner: Improved what `setup` and `doctor` say when the runner’s machine has no git credentials + * Improved the error shown when a cloud session is refused because your claude.ai login was rejected or has expired: it now tells you to sign in again with `claude auth login` + * Improved enforcement of managed permission rules, managed hooks and organization MCP tool names against user-installed mods + * Improved memory and disk use when PDFs are @-mentioned: their bytes are no longer kept in the session transcript + * Improved sandboxed Bash on Linux: Esc and Ctrl-C now work while wildcard read rules are being expanded for a command + * Improved the startup warning for an unrecognized model ID: it is now one short line under the welcome banner with a docs link, instead of a long raw message + * Improved the plugin-authoring skill’s steps for sharing a mod: Claude asks public or private and checks the files before creating a GitHub repository + * Improved the Skill tool’s “Unknown skill” error to suggest a skill’s listed name when Claude wrongly adds the `anthropic-skills:` prefix to it + * Improved `/reload-skills` to say it re-sends the full skill list to Claude, which is how to get skills back after compaction + * Improved the error shown when a worktree cannot be created because its base commit does not resolve: it now says how the lookup ended and the likely reasons, such as a repository without a commit + * Improved the error for creating a worktree at a bare-repository layout’s root: it now explains the layout instead of an unrelated git error + * Improved artifact watching: a local session can now watch up to 25 published artifacts at once, up from 10 + * Improved background agent notifications: they now say when an agent is only waiting on its own background work, got a message too late for its result, or was stopped by a usage limit + * [VSCode] Improved startup time in workspaces without a Python environment by starting Claude while the Python extension loads + * [VSCode] Improved startup: the model picker and slash command menu now fill in right away in a new window on a folder you’ve opened before + * [Cloud sessions] Improved the deploy command shown when you create a self-hosted environment or environment key: it shows in full, wraps between arguments, and has a visible copy button + +Show 131 bug fixes + + * Fixed the error for a denied cloud session, which could point to the wrong organization when a key from `apiKeyHelper` was in use + * Fixed sessions on a gateway-specific model name behind a custom `ANTHROPIC_BASE_URL` ending with “Prompt is too long · automatic compaction failed” near 200K tokens instead of sending the request + * Fixed a mod that submits a prompt at the end of every turn keeping a headless run going past `--max-turns`, `--max-budget-usd`, an interrupt, or the end of the host’s conversation + * Fixed cloud sessions sometimes showing the model’s follow-up text after a tool group’s one-line label + * Fixed the Write and Edit tools creating a mod in a session’s mods folder without asking in accept-edits mode when the config directory’s path has no `.claude` in it + * Fixed installed mods that kept running in an open session after being turned off remotely; they now unload between turns + * Fixed Edit and Retry in Cowork and claude.ai cloud sessions failing on a message stopped while its `UserPromptSubmit` or mod `prompt.submit` hooks were still running (regression in 2.1.296) + * Fixed an agent teammate started without a description keeping part of a credential from its prompt in the task description shown for it + * Fixed the claude.ai view of a Remote Control or cloud session freezing when a large batch of events could not finish uploading over a slow connection + * Fixed a sandboxed shell command being able to write into a `--plugin-dir` folder, whose code Claude Code reloads and runs outside the sandbox + * Fixed memory growth under heavy debug logging (`--debug`, `--debug-file`), and a hang on exit when the debug log is on a disk or network mount that stops accepting writes + * Fixed memory growing without bound when debug output goes to stderr and the parent process stops reading it + * Fixed rm prompts on shell `-c` scripts that don’t run `rm`. An rm built at run time in a script Claude Code can’t read no longer prompts unless `CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT=1` + * Fixed double-clicking a word in an expanded transcript row in fullscreen mode collapsing the row instead of selecting the word + * Fixed `claude mcp list`, `claude doctor` and `/status` reporting an empty `.mcp.json` as invalid + * Fixed `/btw` jumping the transcript to the bottom when asked while scrolled up in fullscreen + * Fixed sandboxed commands failing on WSL2 with `bwrap: Can't mkdir /mnt/c/Program Files/ClaudeCode` when the sandbox can write to the Windows drive + * Fixed scheduled wakeups (ScheduleWakeup) not firing while a background task was running in Agent SDK, IDE and `claude remote-control` sessions + * Fixed a mod’s `prompt.submit` rewrite being silently dropped, sending the prompt as typed, for some prompts with a pasted image or an image that can’t be read + * Fixed a Remote Control prompt being lost when another queued prompt in the same batch failed to deliver + * Fixed a Remote Control prompt that had passed its hooks being dropped from prompt history when Stop interrupted the next queued prompt’s hook + * Fixed sign-in, MCP servers and project trust appearing lost on Linux after a sandboxed command left an empty `.config.json` in the config directory + * Fixed `/sandbox` reporting success when its setting could not be saved because the project folder is not writable; it now says nothing changed and why + * Fixed SDK and headless sessions staying in auto mode after the host switched to a model that doesn’t support auto mode + * Fixed MCP servers named `constructor` or `prototype` in an MCP config never being connected + * Fixed tools of an MCP server named `constructor` or `toString` asking for permission in auto mode and bypass permissions mode + * Fixed a spurious “synced[0] commands path not found” plugin error at startup when another Claude Code process had just updated a claude.ai-synced plugin + * Fixed the Artifact tool advising a retry when a publish that requests connectors or other access was refused by the server or a proxy (HTTP 403); it now says so and what to tell the user + * Fixed Cowork cloud sessions staying on an old account plugin after a plugin reload that timed out or a restart that reused a recent sync + * Fixed document blocks being dropped from your own message sent while Claude is working + * Fixed Claude in Chrome asking for permission while no browser is connected; it now says the extension is not connected + * Fixed the fullscreen “Update installed” notice being hidden behind the idle “/clear to save tokens” hint; it now shows beside the hint + * Fixed a mod hook, with or without a `.catch`, being run again without end when it waits on another mod’s noun that does its work outside the call + * Fixed the Claude apps gateway serving models that a policy’s `availableModelsMatch: exact` or `deniedModels` blocks; it now answers 400 and leaves them out of its model lists + * Fixed the server-managed settings request to Anthropic carrying a third-party gateway’s API key when a managed settings file sets `ANTHROPIC_BASE_URL` + * Fixed streams through a custom `ANTHROPIC_BASE_URL` being aborted after 180 seconds with no data arriving; they now wait 300 seconds, whether or not feature flags are loaded + * Fixed a mod’s `tool.describe` or `prompt.section` answer that changed after `$.ui.invalidate` never reaching Claude; the new answer is now sent on the next turn + * Fixed a settings file being ignored when `enabledMcpjsonServers` or `disabledMcpjsonServers` held a single server name (letters, digits, - or _) as a plain string + * Fixed `claude plugin test` pausing a hook’s time budget while a served `$` method it had called kept making `$` calls after answering + * Fixed high memory use after resuming a cloud or Remote Control session that had run many subagents + * Fixed plugin hooks being skipped when they pass a very deeply nested tool input or message on with next() + * Fixed a value a mod’s hook passes to `next()`, returns, or sends to a `$` method being refused whole when one of its getters throws a `RangeError`; now only that key is refused + * Fixed `/usage`, the approaching-limit warning (terminal and VS Code) and the status line sometimes showing more than 100% used (anthropics/claude-code#92238) + * Fixed wrapped text mixing CJK or emoji with Latin words losing its last line or leaving a blank row at some terminal widths + * Fixed a cloud session sometimes ignoring the answer to a permission prompt or a question when the answer was given while the session’s worker was being replaced + * Fixed bold, italic and other nested text styles running over table borders or being lost on wrapped rows + * Fixed Cowork cloud sessions running the old version of an account plugin changed, removed or disabled from another device until the session restarted + * Fixed deny and ask rules for an MCP server (`mcp__<server>`) not applying when the server’s normalized name contains a double underscore + * Fixed long conversations losing newly attached images on every turn after one oversized image was refused by the API + * Fixed the `plugin_loaded` telemetry event reporting `has_hooks` as false for plugins whose hooks are a hooks module, built-in plugins included + * Fixed images attached while Claude is working (VS Code, desktop app, SDK) being sent at full size, which led to repeated image errors in long conversations + * Fixed the image coordinate hint being missing or slightly off for large near-square images on newer models + * Fixed feature flag, startup, fast mode, profile and feedback requests to Anthropic carrying the API key configured for a third-party gateway (`ANTHROPIC_BASE_URL`); Anthropic API keys are still sent + * Fixed a mod’s hot reload ignoring a fix saved right after a failed reload; saving a mod file without changing it no longer reloads the mod + * Fixed mods loaded from source files being refused when a hook hands `$` to a function declaration imported from another file of the mod + * Fixed a regression in 2.1.296 where cloud and headless sessions could run an approved tool call twice if a new message arrived as the session resumed after a restart + * Fixed scheduled tasks being announced for the wrong minute: the scheduling tools now report each job’s actual next run time + * Fixed mods’ hooks being handed values with `__proto__` keys silently removed, which could skip a `tool.check` guard on a tool call another mod made + * Fixed `claude -p` saying nothing when a settings file fails validation: text-output runs now list the file and the invalid entry on stderr + * Fixed long pastes in terminals without bracketed paste losing all text after an invisible control character, such as a mis-decoded curly quote + * Fixed managed settings and organization policy not being fetched when the stored login’s plan was changed locally on machines whose MDM or managed-settings file sets `forceLoginOrgUUID` + * Fixed MCP connections over HTTP hanging for 30 seconds and failing when a server never ends the body of its reply to a notification (anthropics/claude-code#99014) + * Fixed MCP servers added to a running headless or SDK session being connected before some policy checks ran; a blocked server is now reported as failed without being contacted + * Fixed `claude mcp list`, `claude mcp get` and subagent MCP servers starting a server that a policy check blocks; it is now reported as blocked without being started + * Fixed `/reload-plugins` not loading a plugin installed from another terminal a moment earlier + * Fixed blank rows appearing under CJK and emoji text squeezed into a one-cell column, as in a very narrow terminal + * Fixed text cut in the middle beside wide characters leaving a cell unused or being cut twice, and an emoji vanishing where a color changed inside it + * Fixed bare mode notices in background sessions telling you to restart without `--bare`, which keeps the mode; they now name `/stop` and `claude --resume`, as safe mode ones do + * Fixed `←` not saying why it stayed put over a queued message while Remote Control is on + * Fixed `$.http.fetch` in mods refusing a `304`, `204` or `205` response that declares a `Content-Length` over the 4 MiB body limit + * Fixed `/config` push notification toggles sending your account the previous setting instead of the one you just chose + * Fixed a cloud session leaving a reply unfinished when its worker was replaced just after the reply hit the output token limit + * Fixed Read failing on PDF page ranges in remote sessions on Linux that run without elevated privileges + * Fixed Enter answering a question or permission prompt that had been held back while you typed an unsent message + * Fixed a file attached to a message in a remote session being left out when its download stalled part way; the download is now tried again + * Fixed queued prompts sent as content blocks over `--input-format stream-json` running together without a line break when merged into one turn + * Fixed self-hosted runner sessions shutting down MCP servers added through an `--exec-path` wrapper’s own `--mcp-config` when connectors change mid-session + * Fixed `claude plugin eval` passing runs that the API refused: a run that ends on an API error now scores 0 without grading and makes the suite exit 1 + * Fixed permission prompts cutting off or wrapping too early when the reason text contains keycap or joined emoji + * Fixed `forceLoginOrgUUID` and `forceLoginMethod` from MDM or the managed-settings file being hidden or replaced by server-managed settings + * Fixed `--bare` sessions leaving out an MCP server named `constructor` or `prototype` that `--channels` asked for + * Fixed resuming a conversation from before `/clear` reattaching to the Remote Control session of the conversation after it + * Fixed a prompt starting with `/`, sent with the Agent SDK’s `verbatimPrompts` option, running as a slash command when `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` re-ran it after a restart + * Fixed background sessions started with `--safe-mode` silently leaving safe mode when the session was woken or restarted + * Fixed scheduled tasks and loops firing again after every turn, or firing early, during the repeated hour when daylight saving time ends + * Fixed the diff view listing a new file whose name begins or ends with a space under the wrong name + * Fixed MCP tool calls in headless and SDK sessions sometimes failing or running twice when a background reconnect closed the connection they were running on + * Fixed `/btw` side questions in non-interactive sessions not being cancelled when the session ends, and running a second time when the same request arrived again mid-run + * Fixed sandboxed commands on macOS being able to read or write a denied path by its real location when the denied path passes through a symlink + * Fixed sandbox `denyRead` and `allowRead` globs with braces, parentheses or backslashes in a folder’s name being read differently by Claude Code’s settings checks than by the sandbox + * Fixed sandbox glob `allowRead` and `allowWrite` entries not being re-checked when the directory they start from is replaced by a symlink + * Fixed worktree-isolated sessions accepting some awk programs the isolation guard should refuse + * Fixed `claude mcp add <name> -- <command> --background` being started as a background session + * Fixed a prompt or reply of `--bg` or `--background` to a background session being taken for the flag, which could start new sessions over and over instead of delivering it + * Fixed a custom slash command’s embedded shell line running twice when a newer message interrupted the command while its prompt was being checked + * Fixed `--worktree` sessions leaving a folder behind in `.git/worktrees` in repositories using git’s reftable ref storage + * Fixed `claude self-hosted-runner` sessions using Anthropic-managed git showing tracked files as staged deletions when starting in a reused clone whose remote is still empty + * Fixed Ultracode not being announced to scheduled tasks and other delivered headless turns when `ultracode` is on in settings + * Fixed MCP OAuth sign-in, token refresh and sign-out not sending configured `headers`/`headersHelper` values, which broke servers behind an authenticating proxy + * Fixed the Artifact tool reporting a spurious one-line difference against the live page, and refusing the publish, when a large page with a line break after `<head>` is published again unchanged + * Fixed `$.ui.open` reporting a mod’s pane as placed in sessions where no surface draws it, such as Claude Code for VS Code and `claude -p` + * Fixed the `agent.spawn` mod hook not running when a finished subagent or a killed teammate is resumed: the hook’s event now carries `resume`, and a mod can refuse it + * Fixed `claude plugin validate` rejecting a mod’s `$.state` references when `plugin.json` has no `types` key and the contract is at `./types/index.d.ts` + * Fixed a mod’s `dimColor` text looking the same as plain text under the dark ANSI theme and on 16-color terminals + * Fixed plan mode running a write (an MCP tool’s, a file’s, a shell command’s) that a `PreToolUse` hook or a mod’s `tool.check` hook allowed + * Fixed background subagents in auto mode sometimes sending their final report twice, once as the result and once as a message + * Fixed `SendMessage` not finding a subagent by name after the CLI restarted and resumed the session (names given before the last compaction still need the agent ID) + * Fixed replies cut off at the output token limit ending the turn silently, with no retry or error, after a request fell back to non-streaming mode + * Fixed Read garbling UTF-16LE files with a byte-order mark, and Write dropping byte-order marks or silently converting Windows-1252, Shift-JIS, GBK or UTF-16BE files to UTF-8 (now refused) + * Fixed cloud sessions sometimes leaving a message unanswered when the worker was replaced right after a compaction + * Fixed cloud sessions and `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` sometimes answering a finished turn again after a restart, when a tool ended the turn and a skill loaded in the same step + * Fixed photos sent over Remote Control being dropped when their copy could not be saved on your computer; Claude now still sees the photo + * Fixed files sent over Remote Control sometimes not arriving in long-running sessions + * Fixed files of 30 to 35 MiB sent over Remote Control or to a cloud session not arriving + * Fixed a user-installed mod’s `$.env.set` changing the environment or shell prefix that command hooks from managed settings start with + * Windows: Fixed the process-liveness check leaving orphaned PowerShell processes behind on busy machines until memory ran out + * Windows: Fixed PreToolUse and PermissionRequest hooks that set no shell failing open when Git for Windows isn’t installed; a guard that fails now blocks the call + * Windows: Fixed Bash commands failing with “command not found” for a whole session when Git Bash did not report its PATH at startup + * Self-hosted runner: Fixed sessions that wrote output before their first turn being left with no release timer, ignoring `--retire-at` and delaying shutdown + * [VSCode] Fixed an unsent prompt and its attachments being lost when switching to another session and back + * [VSCode] Fixed unused blank chats keeping a background Claude process running after starting a new conversation + * [VSCode] Fixed the mic button showing an internal error message when you are signed out of claude.ai; it now offers to sign you in + * [Cloud sessions] Fixed a memory spike that could crash a session when many of its existing output files were re-sent to it at once + * [Cloud sessions] Fixed saving an edited routine silently moving it to a different environment when its own had been deleted or wasn’t in the list; the routine now keeps its environment + * [Cloud sessions] Fixed Sessions search in a self-hosted environment’s admin details finding nothing when you paste the session ID from a session’s link + * [Cloud sessions] Fixed the Sessions and Runners lists in a self-hosted environment’s admin details saying the list is empty when a search just has no matches + * [Remote Control] Fixed Remote Control sessions whose computer can’t be reached still appearing to send your messages; your text now stays in the box and Send is off until it reconnects + * [Claude Tag] Fixed Claude in Slack staying silent on untagged posts that a channel’s own instructions tell it to answer, such as posts that tag someone else, in channels with guests + * [Claude Tag] Fixed Claude in Slack reporting a reply to another channel’s thread as posted when it isn’t a member there; it now says the reply wasn’t delivered and how to fix that + * [Claude Tag] Fixed Claude in Slack sometimes ending a turn without posting its answer when a self-hosted runner’s image has no python3 + * [Code Review] Fixed Code Review’s monthly spend-limit comment and check-run card sending admins to Claude Code settings; they now link the Usage page, where that limit is set ​
modified Claude apps gateway configuration View current →
--- a/claude-apps-gateway-config.md +++ b/claude-apps-gateway-config.md @@ -930,7 +930,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. Before v2.1.207, a non-interactive run saved the settings as approved and no later interactive session showed the dialog for them. 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 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`. ####
modified Use Claude Code in the cloud View current →
--- a/claude-code-on-the-web.md +++ b/claude-code-on-the-web.md @@ -256,7 +256,7 @@ Cloud sessions support [built-in commands](</docs/en/commands>) that produce text output. Commands that only run in the terminal interface, such as `/plugin` or `/resume`, aren’t available. Commands that open a picker or panel in the terminal behave differently in cloud sessions: - * **`/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 require Claude Code v2.1.205 or later in the session’s environment and follow each command’s [availability notes](</docs/en/commands#all-commands>). + * **`/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, and text after the command, including `key=value`, is ignored. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment, or in a session with one repository, commit the key to that repository’s `.claude/settings.json`. [Settings in cloud sessions](</docs/en/settings#settings-in-cloud-sessions>) lists what each session reads. @@ -440,8 +440,9 @@ Message| What it means ---|--- `Cloud sessions aren't available with <provider>. They run on Anthropic's infrastructure and require an Anthropic account.`| Claude Code is configured for a third-party provider. The message names the provider with the label your configuration uses, such as `Amazon Bedrock` or `Google Vertex AI`. Remove that provider’s configuration, for example by unsetting `CLAUDE_CODE_USE_BEDROCK`, and sign in with an Anthropic account (`claude auth login`). -`Cloud sessions are disabled by your organization's policy. Contact your organization admin to enable them.`| The `allow_remote_sessions` organization policy is off. -`Couldn't verify your organization's policy for cloud sessions. Check your network connection and try again.`| Claude Code couldn’t fetch your organization’s policy, so it refuses the send rather than assume cloud sessions are allowed. Check your network connection and retry. +`Cloud sessions are disabled by your organization's policy. Contact your organization admin to enable them.`| Your organization’s `allow_remote_sessions` policy is off; see [Cloud sessions are disabled by your organization’s policy](</docs/en/errors#cloud-sessions-are-disabled-by-your-organizations-policy>). If the message instead names a credential this session is using, see [Cloud sessions use your claude.ai login](</docs/en/errors#cloud-sessions-use-your-claude-ai-login>). +`Couldn't verify your organization's policy for cloud sessions. Check your network connection and try again.`| Claude Code hasn’t finished loading your organization’s policy, so it refuses the send rather than assume cloud sessions are allowed. Check your network connection and retry. +`Cloud sessions aren't available:` followed by a cause| Loading your organization’s policy failed, and the rest of the message says how. Act on the cause it names; see [Couldn’t verify your organization’s policy for cloud sessions](</docs/en/errors#couldnt-verify-your-organizations-policy-for-cloud-sessions>). `Attaching to an existing cloud session is not enabled for your account.`| You ran `--cloud <session-id>` without `-p`. Send the message with `claude -p "your message" --cloud <session-id>`. `Session not found: <id>`| The ID or URL doesn’t match a session you can access. Check it against the session’s claude.ai/code URL. `cloud session <id> is archived and cannot accept new messages`| The session has been archived. Start a new session instead.
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, to Opus 4.8 from v2.1.207, and to Opus 4.7 before that. 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, 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: export ANTHROPIC_DEFAULT_FABLE_MODEL=claude-fable-5 export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-8
modified Configure cloud environments View current →
--- a/cloud-environments.md +++ b/cloud-environments.md @@ -252,7 +252,7 @@ * **Git credentials** : the git client inside the VM uses a scoped credential, which the proxy verifies and swaps for your actual GitHub token. * **API requests** : requests from the built-in GitHub tools, and from `gh` under the `proxy-injected` placeholder, go out with your real credentials substituted. * **Push restrictions** : the proxy rejects branch deletions and pushes of anything other than a branch, such as a tag. It doesn’t limit which branches a push can update. To do that, use branch protection rules or rulesets on GitHub. - * **Repository scope** : the proxy serves GitHub API requests for the repositories attached to the session. An API request for another repository gets a 403 whose message starts with `GitHub access to` and contains `is not enabled for this session`. + * **Repository scope** : the proxy serves GitHub API requests for the repositories attached to the session. An API request for another repository gets a 403 whose message starts with `GitHub access to` and contains `is not enabled for this session`. A source archive you fetch over a `github.com/{owner}/{repo}/archive/` or `codeload.github.com` URL gets that same 403 when the repository isn’t attached, even a public one. * **GraphQL restrictions** : the proxy rejects requests to GitHub’s GraphQL endpoint with a 403 whose message starts with `GitHub GraphQL is not available from Claude Code sessions` and names the REST fallback, `gh api repos/{owner}/{repo}/...`. `gh` subcommands that use GraphQL, such as `gh pr` and `gh issue`, get the same 403. The restriction applies to every request through the proxy regardless of the credentials you supply, so a `GH_TOKEN` you set gets the same 403. Claude can’t reach GitHub APIs that exist only in GraphQL, such as Projects v2, through the proxy. Committed files from public repositories arrive through `raw.githubusercontent.com`, which the security proxy handles instead. That domain is in the default Trusted list, so those files stay reachable unless the environment’s access level excludes it.
modified Code Review View current →
--- a/code-review.md +++ b/code-review.md @@ -141,7 +141,7 @@ * You must have write, maintain, or admin permission on the repository * The PR must be open -If the repository belongs to an organization and your membership in that organization is private, which is GitHub’s default, GitHub doesn’t identify you to Claude as a member. Claude may still react to your comment with 👀, but it doesn’t start a review unless you were added to the repository directly as a collaborator, even when a team or the organization’s base permissions give you write access. To fix this, [make your organization membership public](<https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/publicizing-or-hiding-organization-membership>) or ask a repository admin to add you to the repository as a collaborator. Unlike automatic triggers, manual triggers run on draft PRs, since an explicit request signals you want the review now regardless of draft status. If a review is already running on that PR, the request is queued until the in-progress review completes. You can monitor progress via the check run on the PR. +Unlike automatic triggers, manual triggers run on draft PRs, since an explicit request signals you want the review now regardless of draft status. If a review is already running on that PR, the request is queued until the in-progress review completes. You can monitor progress via the check run on the PR. ###
modified Commands View current →
--- a/commands.md +++ b/commands.md @@ -41,13 +41,13 @@ `/branch [name]`| Create a branch of the current conversation at this point, so you can try a different direction without losing the conversation as it stands. Switches you into the branch and preserves the original, which you can return to with `/resume`. To run a copy as a separate [background session](</docs/en/agent-view>) instead of switching into it, use `/fork`; to hand a side task to a [subagent](</docs/en/sub-agents>) that reports back into this conversation, use `/subtask` `/btw [question]`| Ask a [side question](</docs/en/interactive-mode#side-questions-with-%2Fbtw>) about the current session without adding to the conversation. If you run `/btw` without a question, Claude Code shows your most recent side question so you can browse earlier answers; if you haven’t asked one yet, Claude Code prints a usage line. Before v2.1.212, `/btw` required a question `/bug [report]`| Report a bug or share your conversation. You choose how much session history to include and confirm on a consent screen before anything is sent. When you’re signed in to Anthropic on a first-party connection, the report goes to Anthropic; on a third-party provider, or without Anthropic credentials, Claude Code writes the report to a [local archive under `~/.claude/feedback-bundles/`](</docs/en/data-usage#telemetry-services>) that you forward yourself. In the [VS Code extension](</docs/en/vs-code#use-the-prompt-box>), `/bug` opens the extension’s own feedback dialog instead; requires Claude Code v2.1.229 or later. When you run it while Claude is responding, Claude Code opens the dialog immediately. Before v2.1.232, Claude Code queued the command until the turn finished. Alias: `/share`. Before v2.1.212, `/bug` and `/share` were aliases of `/feedback` -`/cd <path>`| Move this session to a new working directory, keeping the conversation. Type a partial path to see matching directory suggestions; press `Tab` to accept one. The suggestions require Claude Code v2.1.206 or later. For what Claude Code applies from the new directory as soon as you move, and how `/cd` differs from `/add-dir`, see [Move the session to another directory](</docs/en/permissions#move-the-session-to-another-directory>) +`/cd <path>`| Move this session to a new working directory, keeping the conversation. Type a partial path to see matching directory suggestions; press `Tab` to accept one. For what Claude Code applies from the new directory as soon as you move, and how `/cd` differs from `/add-dir`, see [Move the session to another directory](</docs/en/permissions#move-the-session-to-another-directory>) `/chrome`| Configure [Claude in Chrome](</docs/en/chrome>) settings `/claude-api [migrate|upgrade|managed-agents-onboard|prompt-audit|cost-optimize|build-eval|hillclimb|preserved-thinking-migration]`| **[Skill](</docs/en/skills#bundled-skills>).** Load [Claude API](<https://platform.claude.com/docs/en/api/overview>) and [Managed Agents](<https://platform.claude.com/docs/en/managed-agents/overview>) reference material for your project’s language. Also activates automatically when your code imports `anthropic` or `@anthropic-ai/sdk`. For what each subcommand does and the version it requires, see [Work on Claude API projects](</docs/en/skills#work-on-claude-api-projects>) `/claude-in-chrome [task]`| **[Skill](</docs/en/skills#bundled-skills>).** Have Claude carry out a task in your browser, such as testing a page, filling a form, or reading console logs, through [Claude in Chrome](</docs/en/chrome>). Available when Chrome integration is enabled for the session, for example with `claude --chrome`, or when Claude Code can offer to [install the extension](</docs/en/chrome#install-the-extension-when-claude-asks>) `/clear [name]`| Start a new conversation with empty context. Pass a name to label the previous conversation in the `/resume` picker. To free up context while continuing the same conversation, use `/compact` instead. Resume the previous conversation with `/resume`, or, in the same Claude Code process, restore it from [the rewind menu’s previous-session entry](</docs/en/checkpointing#rewind-past-a-cleared-conversation>). Aliases: `/reset`, `/new` `/code-review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the current diff, or a PR number, branch, or path you pass, for correctness bugs. Depending on your model and effort level, the review also covers cleanup opportunities. Pass `--fix` to apply findings, `--comment` to post them on the GitHub PR or GitLab merge request, or `ultra` to run a deep [cloud review](</docs/en/ultrareview>). Posting to a GitLab merge request requires Claude Code v2.1.257 or later. With `ultra` on a `github.com` PR target, pass `--post` to preselect [posting the finished findings to the PR](</docs/en/ultrareview#post-findings-to-the-pull-request>) in the launch dialog; `--post` requires Claude Code v2.1.227 or later. See [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for the effort levels, targeting, and how it relates to `/simplify`. Alias: `/review` -`/color [color|default]`| Set the prompt bar color for the current session. Available colors: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan`. Use `default` to reset, or run with no argument to pick a random color. When [Remote Control](</docs/en/remote-control>) is connected, the color syncs to claude.ai/code. Also available in non-interactive mode (`-p`); requires Claude Code v2.1.205 or later +`/color [color|default]`| Set the prompt bar color for the current session. Available colors: `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, `cyan`. Use `default` to reset, or run with no argument to pick a random color. When [Remote Control](</docs/en/remote-control>) is connected, the color syncs to claude.ai/code. Also available in non-interactive mode (`-p`) `/compact [instructions]`| Free up context by summarizing the conversation so far. Optionally pass focus instructions for the summary. See [how compaction handles rules, skills, and memory files](</docs/en/context-window#what-survives-compaction>) `/config [key=value ...]`| Open the [Settings](</docs/en/settings>) interface to adjust theme, model, [output style](</docs/en/output-styles>), and other preferences. Pass one or more `key=value` pairs to set a setting directly without opening the interface, for example `/config thinking=false`, `/config theme=dark`, or `/config model=sonnet`. The `key=value` form also works in non-interactive mode (`-p`) and from the Claude mobile app via [Remote Control](</docs/en/remote-control>). The `key=value` form can’t turn on a setting that needs your confirmation in the panel, such as [`autoContinueAtUsageLimit`](</docs/en/interactive-mode#turn-automatic-continue-off>), though it can turn one off. Run `/config --help` to list the keys it accepts. Alias: `/settings` `/context [all]`| Visualize current context usage as a colored grid. Shows optimization suggestions for context-heavy tools, memory bloat, and capacity warnings. When the conversation exceeds the context window, the output includes a [warning](</docs/en/errors#context-exceeds-the-token-limit>) showing how far over the limit you are and which command frees space. In [fullscreen mode](</docs/en/fullscreen>), `/context` collapses the per-item breakdown to keep the grid visible. Pass `all` to expand it @@ -65,7 +65,7 @@ `/effort [level|auto|status|ultracode [on|off]]`| Set the [effort level](</docs/en/model-config#adjust-effort-level>): `low` to `xhigh`, `max`, or `auto`; `status` prints it. `ultracode` or `ultracode on` turns [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) on for the session at the current level, and `ultracode off` turns it off; the [`ultracode`](</docs/en/settings-reference#ultracode>) key persists. `max` is session-only. The `on` and `off` arguments and keeping the current level require Claude Code v2.1.284 or later. Before v2.1.284, `/effort ultracode` set the session to `xhigh`, and `/effort ultracode off` failed with `Invalid argument`. Run it while Claude is responding and, once you confirm the [cache warning](</docs/en/prompt-caching#changing-effort-level>), if Claude Code shows one, Claude Code applies the new level to the next request in that turn. Before v2.1.242, Claude Code decided from a feature flag it fetched from Anthropic whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as on a [third-party provider](</docs/en/third-party-integrations>). Works in `-p` `/exit`| Exit the CLI. In an attached [background session](</docs/en/agent-view#attach-to-a-session>), this detaches and the session keeps running. Alias: `/quit` `/export [filename]`| Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file -`/fast [on|off]`| Toggle [fast mode](</docs/en/fast-mode>) on or off. Run it while Claude is responding and Claude Code toggles fast mode without waiting for the turn to end, though the running turn finishes at its original speed. Before v2.1.242, Claude Code decided from a feature flag it fetched from Anthropic whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). Availability in non-interactive mode with `-p` is limited; see [Toggle fast mode](</docs/en/fast-mode#toggle-fast-mode>). Requires Claude Code v2.1.205 or later +`/fast [on|off]`| Toggle [fast mode](</docs/en/fast-mode>) on or off. Run it while Claude is responding and Claude Code toggles fast mode without waiting for the turn to end, though the running turn finishes at its original speed. Before v2.1.242, Claude Code decided from a feature flag it fetched from Anthropic whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>). Availability in non-interactive mode with `-p` is limited; see [Toggle fast mode](</docs/en/fast-mode#toggle-fast-mode>) `/feedback [report]`| Send product feedback about Claude Code. Opens the same dialog as `/bug`, with the same consent step, sending rules, and mid-turn behavior. In sessions with [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>), `/feedback` with no argument opens the drafts queue instead, where you review, edit, send, or discard the drafts Claude queued; the queue includes an option to write a new report in the dialog. With an argument, and for `/bug` always, the dialog opens directly `/fewer-permission-prompts`| **[Skill](</docs/en/skills#bundled-skills>).** Scan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project `.claude/settings.json` to reduce permission prompts `/focus`| Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response. The tool-call summary also counts the subagents launched in the turn and collapses completed background-task notifications into a single count. The selection persists across sessions; set [`viewMode`](</docs/en/settings-reference#viewmode>) in settings to override it. Only available in [fullscreen rendering](</docs/en/fullscreen>). From a [Remote Control](</docs/en/remote-control>) client, run `/focus [on|off]` to turn the focus view on or off for the current session only, without changing your saved selection; this requires Claude Code v2.1.281 or later. The [VS Code extension](</docs/en/vs-code#use-the-prompt-box>) offers its own Focus view as a command-menu toggle, stored as an extension setting, independent of `viewMode` @@ -85,7 +85,7 @@ `/login`| Sign in to your Anthropic account `/logout`| Sign out from your Anthropic account `/loop [interval] [prompt]`| **[Skill](</docs/en/skills#bundled-skills>).** Run a prompt repeatedly while the session stays open. Omit the interval and Claude [self-paces between iterations](</docs/en/scheduled-tasks#let-claude-choose-the-interval>). Omit the prompt and Claude runs the [built-in maintenance prompt](</docs/en/scheduled-tasks#run-the-built-in-maintenance-prompt>) or your [`loop.md`](</docs/en/scheduled-tasks#customize-the-default-prompt-with-loop-md>). Example: `/loop 5m check if the deploy finished`. See [Run prompts on a schedule](</docs/en/scheduled-tasks>). Alias: `/proactive` -`/mcp [reconnect (<server>|all)|enable|disable [<server>|all]]`| Manage MCP server connections and OAuth authentication. Run with no argument to open the interactive list, or pass `reconnect`, `enable`, or `disable` with a server name or `all` to change connection state without opening it. `reconnect all` [retries every server that failed or needs authentication](</docs/en/mcp#retry-failed-servers-yourself>). In non-interactive mode (`-p`), running it with no argument prints a text summary of server status instead of opening the list; requires Claude Code v2.1.205 or later +`/mcp [reconnect (<server>|all)|enable|disable [<server>|all]]`| Manage MCP server connections and OAuth authentication. Run with no argument to open the interactive list, or pass `reconnect`, `enable`, or `disable` with a server name or `all` to change connection state without opening it. `reconnect all` [retries every server that failed or needs authentication](</docs/en/mcp#retry-failed-servers-yourself>). In non-interactive mode (`-p`), running it with no argument prints a text summary of server status instead of opening the list `/memory`| Edit `CLAUDE.md` files, enable or disable [auto memory](</docs/en/memory#auto-memory>), and view auto memory entries `/mobile`| Show QR code to download the Claude mobile app. Aliases: `/ios`, `/android` `/model [model]`| Switch the AI model and save it as your default for new sessions. For models that support it, use left/right arrows to [adjust effort level](</docs/en/model-config#adjust-effort-level>). With no argument, opens a picker; press `s` on a row to switch for the current session only. See [when Claude Code asks you to confirm the switch](</docs/en/prompt-caching#switching-models>). Once you confirm the switch, if Claude Code asks, Claude Code applies the change without waiting for the current response to finish. Before v2.1.242, Claude Code decided from a feature flag it fetched from Anthropic whether to run the command mid-turn or queue it until the turn finished, and always queued it in a session that doesn’t [fetch feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>), such as on a [third-party provider](</docs/en/third-party-integrations>). Also available in non-interactive mode (`-p`) with a model argument instead of the picker, where it applies to the current session only and isn’t saved as your default; requires Claude Code v2.1.205 or later @@ -104,9 +104,9 @@ `/release-notes`| View the changelog in an interactive version picker. Select a specific version to see its release notes, or choose to show all versions. The notes appear in your transcript without entering the conversation Claude sees `/reload-plugins [--force]`| Reload all active [plugins](</docs/en/plugins/overview>) to apply pending changes without restarting. Reports counts for each reloaded component and flags any load errors. When the reload would change which MCP tools are loaded and invalidate the prompt cache, the command warns and skips unless you pass `--force`. Also available in non-interactive mode (`-p`), the Agent SDK, and the desktop app, where it runs only on input typed directly into the session and doesn’t apply plugin MCP server changes; requires Claude Code v2.1.260 or later. See [Apply plugin changes without restarting](</docs/en/plugins/cli-reference#reload-plugins>) `/reload-skills`| Re-scan [skill](</docs/en/skills>) and command directories so skills added or changed on disk during the session become available without restarting. Reports how many skills are available and how many were added or removed -`/remote-control`| Make this session available for [Remote Control](</docs/en/remote-control>) from claude.ai. Running it while signed out prints that Remote Control requires a claude.ai subscription and tells you how to sign in; before v2.1.206 it reported `Unknown command: /remote-control`. Alias: `/rc` +`/remote-control`| Make this session available for [Remote Control](</docs/en/remote-control>) from claude.ai. Running it while signed out prints that Remote Control requires a claude.ai subscription and tells you how to sign in. Alias: `/rc` `/remote-env`| Choose the default [cloud environment](</docs/en/cloud-environments#select-an-environment-from-the-cli>) for cloud sessions you start from the CLI -`/rename [name]`| Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history. Also available in non-interactive mode (`-p`); requires Claude Code v2.1.205 or later. From every rename surface, including claude.ai and the desktop app, Claude Code replaces control and invisible characters in the new name with spaces and caps the name at 200 characters. If the name is empty once invisible characters are removed, Claude Code rejects it and shows `That name is empty once invisible characters are removed. Usage: /rename <name>`. The character replacement and length cap require Claude Code v2.1.221 or later +`/rename [name]`| Rename the current session and show the name on the prompt bar. Without a name, auto-generates one from conversation history. Also available in non-interactive mode (`-p`). From every rename surface, including claude.ai and the desktop app, Claude Code replaces control and invisible characters in the new name with spaces and caps the name at 200 characters. If the name is empty once invisible characters are removed, Claude Code rejects it and shows `That name is empty once invisible characters are removed. Usage: /rename <name>`. The character replacement and length cap require Claude Code v2.1.221 or later `/resume [session]`| Resume a conversation by ID or name, or open the session picker. [Background sessions](</docs/en/agent-view>) appear in the picker marked with `bg`. Resuming one that is still running, from the picker or by ID or name, [opens that session](</docs/en/sessions#resume-a-running-background-session>): your current conversation moves to the background and this terminal attaches to the running one. Press `←` on an empty prompt to return to agent view, which also lists the conversation you left. Before v2.1.285, Claude Code refused and told you to open the session with `claude attach` or stop it first. Alias: `/continue` `/review [low|medium|high|xhigh|max|ultra] [--fix] [--comment] [--max-findings n|all|default] [pr#|branch|path]`| Alias of [`/code-review`](</docs/en/code-review#review-a-diff-locally>): reviews the current diff, or a PR number, branch, or path you pass, such as `/review 1234`, and takes the same effort levels and flags. With no level given, the review reuses the last `low` through `max` level you typed; see [Review a diff locally](</docs/en/code-review#review-a-diff-locally>) for the exact rules. For a deep cloud review, use [`/code-review ultra`](</docs/en/ultrareview>). Before v2.1.223, `/review` was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as `/code-review medium` `/rewind`| Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](</docs/en/checkpointing>). Aliases: `/checkpoint`, `/undo`
modified Explore the context window View current →
--- a/context-window.md +++ b/context-window.md @@ -44,7 +44,7 @@ When your context fills up -Claude Code compacts automatically as you approach the limit, so a full context window doesn’t end your session. The automatic pass works the same way as the `/compact` step in the timeline. See [When context fills up](</docs/en/how-claude-code-works#when-context-fills-up>) for what it preserves. You can also act before the automatic pass runs: +Claude Code compacts automatically as you approach the limit, so a full context window doesn’t end your session. The automatic pass works the same way as the `/compact` step in the timeline. See [When context fills up](</docs/en/how-claude-code-works#when-context-fills-up>) for what it preserves. For when Claude Code also compacts a conversation you leave idle, see [idle compaction](</docs/en/settings-reference#idlecompaction>). You can also act before the automatic pass runs: * **Compact with a focus** : run `/compact` with instructions, like `/compact focus on the auth bug fix`, before starting a long new task. The summary keeps what you choose instead of what the automatic pass guesses is important. * **Compact part of the conversation** : run `/rewind`, select a message, and choose **Summarize from here** or **Summarize up to here**. See [Rewind and summarize](</docs/en/checkpointing#rewind-and-summarize>) for what each option keeps and how to guide the summary.
modified Run Claude Code behind a corporate launcher View current →
--- a/corporate-launcher.md +++ b/corporate-launcher.md @@ -110,6 +110,7 @@ * **Tolerate being invoked from inside itself.** Claude Code applies the launcher to every nested self-spawn, so a launcher that acquires an exclusive resource must detect that it already holds it. * **Don’t write to the terminal before Claude Code starts.** Anything printed before the `exec` is reported as the crash cause if the session dies before initializing. * **Don’t depend on how arguments are spelled.** A flag’s value can arrive as its own argument, `--flag value`, or joined to the flag, `--flag=value`. Which form a flag uses can change between versions. + * **Run`exec` from the directory the launcher started in.** Claude Code works in the directory it starts in, so a launcher that changes directory can start a session in the wrong project. If the launcher must enter a namespace or sandbox that resets the working directory, change back to the starting directory inside it, before the `exec`. ###
modified Debug your configuration View current →
--- a/debug-your-config.md +++ b/debug-your-config.md @@ -144,7 +144,7 @@ Skill doesn’t appear in `/skills`| Skill file is at `.claude/skills/name.md` instead of in a folder| Use a folder with `SKILL.md` inside: `.claude/skills/name/SKILL.md`. Skill appears in `/skills` but Claude never invokes it| Skill has `disable-model-invocation: true` in its frontmatter, or its description doesn’t match how you phrase the request| Check the badge in `/skills`: a “user-only” label means Claude won’t trigger it on its own. See [skill invocation](</docs/en/skills>). Subdirectory `CLAUDE.md` instructions seem ignored| Subdirectory files load on demand, not at session start| To load a subdirectory’s `CLAUDE.md`, ask Claude to read another file in that subdirectory. See [when subdirectory files load](</docs/en/memory#how-claude-md-files-load>). -Subagent ignores `CLAUDE.md` instructions| The built-in Explore and Plan agents skip `CLAUDE.md`. A custom subagent loads it the same way the main conversation does, unless its definition sets [`omitClaudeMd`](</docs/en/sub-agents#supported-frontmatter-fields>)| For Explore or Plan, restate the instruction in your delegating prompt. For a subagent that sets `omitClaudeMd`, remove the field. For any other custom subagent, put critical instructions in the agent file body, which becomes the agent’s system prompt. See [what loads at startup](</docs/en/sub-agents#what-loads-at-startup>). +Subagent ignores `CLAUDE.md` instructions| The built-in Explore and Plan agents skip `CLAUDE.md` at startup. A custom subagent loads it the same way the main conversation does, unless it has [`omitClaudeMd`](</docs/en/sub-agents#supported-frontmatter-fields>) set in its definition| For Explore or Plan, restate the instruction in your delegating prompt. For a subagent that sets `omitClaudeMd`, remove the field. For any other custom subagent, put critical instructions in the agent file body, which becomes the agent’s system prompt. See [what loads at startup](</docs/en/sub-agents#what-loads-at-startup>). Cleanup logic never runs at session end| No `SessionEnd` hook configured| Add a `SessionEnd` hook in `settings.json`. See the [hook events list](</docs/en/hooks#hook-events>). MCP servers in `.mcp.json` never load| File is under `.claude/`, or its servers sit under a top-level `servers` key, as in VS Code’s `mcp.json`, instead of `mcpServers`| Project MCP config goes at the repository root as `.mcp.json`, not inside `.claude/`, with servers under the `mcpServers` key. See [MCP configuration](</docs/en/mcp>). MCP servers added under `mcpServers` in `settings.json` never appear| `settings.json` does not read an `mcpServers` key| Define project servers in `.mcp.json` at the repository root, or run `claude mcp add --scope user` for user-scoped servers. See [MCP configuration](</docs/en/mcp>).
modified Plugin dependencies View current →
--- a/dependencies.md +++ b/dependencies.md @@ -211,6 +211,19 @@ Auto-update fetches a constrained dependency at the highest git tag that satisfies every installed plugin’s range, rather than at the marketplace’s latest version. If the installed plugins’ ranges don’t overlap, auto-update leaves that dependency at its current version, and the `/plugin` **Errors** tab shows an entry naming the constraining plugin. If they overlap but no tag falls in the range, auto-update fetches the marketplace’s current copy and skips the update when that copy’s `version` falls outside any installed plugin’s range. When a user uninstalls the last plugin that constrains a dependency, the dependency is no longer constrained to a version range and resumes tracking its marketplace entry on the next update. +### + +​ + +Dependencies when your plugin loads from claude.ai + +When a user turns your plugin on for their claude.ai account, Claude Code loads it as `<name>@synced`, [with no marketplace](</docs/en/plugins/loading#synced-plugins>). For that copy of your plugin, Claude Code counts a dependency entry that names a marketplace as met when the user has either of these: + + * **The dependency from its marketplace** : installed from the marketplace your entry names, and enabled. Claude Code checks a `version` range in your entry against the installed copy’s version. + * **A claude.ai plugin of the same name** : enabled from their claude.ai account. Claude Code checks a `version` range in your entry against that plugin’s `version`, and a plugin that states no `version` passes the check. + +If you tell users to turn your plugin on from claude.ai, tell them to turn the dependency on there too, or to install it from its marketplace. A claude.ai plugin meets the entry only when your plugin also loads from claude.ai. + ## ​
modified Desktop application View current →
Show diff (258 lines)
--- a/desktop.md +++ b/desktop.md @@ -34,7 +34,7 @@ Before you send your first message, configure four things in the prompt area: - * **Environment** : choose where Claude runs. Select **Local** for your machine, **Cloud** for a cloud session that continues after you close the app, an **SSH connection** for a remote machine you manage, or on Windows a [**WSL distribution**](</docs/en/desktop-wsl>). See environment configuration. + * **Environment** : choose where Claude runs. Select **Local** for your machine, **Cloud** for a cloud session that continues after you close the app, an **SSH connection** for a remote machine you manage, or on Windows a [**WSL distribution**](</docs/en/desktop-wsl>). A task in an SSH session can keep going while Desktop is disconnected, but with a Claude account it can stop when its sign-in expires. See environment configuration. * **Project folder** : select the folder or repository Claude works in. For cloud sessions, you can add multiple repositories. * **Model** : pick a [model](</docs/en/model-config#available-models>) from the dropdown next to the send button. You can change this during the session. * **Permission mode** : choose how much autonomy Claude has from the mode selector. You can change this during the session. @@ -218,7 +218,7 @@ Run commands in the terminal -The integrated terminal lets you run commands alongside your session without switching to another app. Click **Terminal** in the session’s title bar or press **Ctrl+`** on macOS or Windows. The terminal opens in your session’s working directory and shares the same environment as Claude, so commands like `npm test` or `git status` see the same files Claude is editing. To open a second terminal tab, click **+** in the terminal pane header or right-click a folder in the chat to choose **Open in terminal**. The terminal is available in local and SSH sessions. +The integrated terminal lets you run commands alongside your session without switching to another app. Click **Terminal** in the session’s title bar or press **Ctrl+`** on macOS or Windows. The terminal opens in your session’s working directory and shares the same environment as Claude, so commands like `npm test` or `git status` see the same files Claude is editing. To open a second terminal tab, click **+** in the terminal pane header or right-click a folder in the chat to choose **Open in terminal**. The terminal is available in local and SSH sessions, with a limit on Windows remote machines. ### @@ -440,6 +440,8 @@ For large refactors, test suites, migrations, or other long-running tasks, select **Cloud** instead of **Local** when starting a session. Cloud sessions run on Anthropic-managed infrastructure by default and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction. You can also monitor cloud sessions from [claude.ai/code](<https://claude.ai/code>) or the [Claude mobile app](</docs/en/mobile>). Cloud sessions also support multiple repositories. After selecting a cloud environment, click the **+** button next to the selected repository to add more repositories to the session. Each repo gets its own branch selector. This is useful for tasks that span multiple codebases, such as updating a shared library and its consumers. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for more on how cloud sessions work. When one body of work needs many cloud sessions, select **Projects** in the sidebar to create a [project](</docs/en/claude-projects>), where Claude starts and tracks the sessions for you from one conversation. +A task in an SSH session can also keep going while Desktop is disconnected, but with a Claude account it can stop when its sign-in expires. + ### ​ @@ -500,7 +502,7 @@ Use skills -[Skills](</docs/en/skills>) extend what Claude can do. Claude loads them automatically when relevant, or you can invoke one directly: type `/` in the prompt box or click the **+** button and select **Slash commands** to browse what’s available. This includes [built-in commands](</docs/en/commands>), your [custom skills](</docs/en/skills#create-your-first-skill>), project skills from your codebase, and skills from any [installed plugins](</docs/en/plugins/install>). Select one and it appears highlighted in the input field. Type your task after it and send as usual. You can send a command while Claude is working, the same as any other message, and the session returns to idle once the turn finishes. Before v2.1.206, a command sent mid-turn could leave the session showing as running and messages you sent afterward weren’t delivered. Local sessions load your personal skills from `~/.claude/skills/`. An SSH session reads `~/.claude/skills/` from the remote host’s home directory, not from your machine. Local and cloud sessions also load the skills enabled for your claude.ai account, except local sessions when your organization sets [`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>). Cloud sessions load them instead of `~/.claude/skills/`, as [Skills in Cowork and cloud sessions](</docs/en/skills#skills-in-cowork-and-cloud-sessions>) describes. +[Skills](</docs/en/skills>) extend what Claude can do. Claude loads them automatically when relevant, or you can invoke one directly: type `/` in the prompt box or click the **+** button and select **Slash commands** to browse what’s available. This includes [built-in commands](</docs/en/commands>), your [custom skills](</docs/en/skills#create-your-first-skill>), project skills from your codebase, and skills from any [installed plugins](</docs/en/plugins/install>). Select one and it appears highlighted in the input field. Type your task after it and send as usual. You can send a command while Claude is working, the same as any other message, and the session returns to idle once the turn finishes. Local sessions load your personal skills from `~/.claude/skills/`. An SSH session reads `~/.claude/skills/` from the remote host’s home directory, not from your machine. Local and cloud sessions also load the skills enabled for your claude.ai account, except local sessions when your organization sets [`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>). Cloud sessions load them instead of `~/.claude/skills/`, as [Skills in Cowork and cloud sessions](</docs/en/skills#skills-in-cowork-and-cloud-sessions>) describes. ### @@ -702,7 +704,7 @@ * **Local** : runs on your machine with direct access to your files * **Cloud** : runs on Anthropic-managed infrastructure by default. Sessions continue even if you close the app. - * **SSH** : runs on a remote machine you connect to over SSH, such as your own servers, cloud VMs, or dev containers + * **SSH** : runs on a remote machine you connect to over SSH, such as your own servers, cloud VMs, or dev containers. A running task can keep going while Desktop is disconnected, but with a Claude account it can stop when its sign-in expires. * **WSL** (Windows): runs inside a [WSL 2 distribution](</docs/en/desktop-wsl>) on your machine, using its Linux toolchain and native paths ### @@ -740,7 +742,11 @@ SSH sessions -SSH sessions let you run Claude Code on a remote machine while using the desktop app as your interface. This is useful for working with codebases that live on cloud VMs, dev containers, or servers with specific hardware or dependencies. To add an SSH connection, open the environment dropdown in the prompt box before you start a session, then select **SSH > Add SSH connection…** and fill in the connection details: +SSH sessions let you run Claude Code on a remote machine while using the desktop app as your interface. This is useful for working with codebases that live on cloud VMs, dev containers, or servers with specific hardware or dependencies. + +If you use Desktop with a [third-party provider](</docs/en/third-party-integrations>), SSH sessions need their own setup. See [SSH remote sessions in Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions>). + +To add an SSH connection, open the environment dropdown in the prompt box before you start a session, then select **SSH > Add SSH connection…** and fill in the connection details: * **Name** : a friendly label for this connection * **SSH host** : `user@hostname` or a host defined in `~/.ssh/config` @@ -748,7 +754,187 @@ * **SSH key (optional)** : path to your private key, such as `~/.ssh/id_ed25519`. Leave empty to use your SSH config or SSH agent. * **Worktree folder** : a folder on the remote machine, such as `~/worktrees`, where new sessions create their worktrees. Leave empty to use the remote machine’s default. -Once added, the connection appears under **SSH** in the environment dropdown. Select it to start a session on that machine. Claude runs on the remote machine with access to its files and tools. The remote machine must run Linux or macOS. Desktop installs Claude Code on the remote machine automatically the first time you connect. Once connected, SSH sessions support permission modes, connectors, plugins, and MCP servers. +Once added, the connection appears under **SSH** in the environment dropdown. Select it to start a session on that machine. Claude runs on the remote machine with access to its files and tools. The remote machine can run Linux, macOS, or Windows. Desktop installs Claude Code on the remote machine automatically the first time you connect. Once connected, SSH sessions support permission modes, connectors, plugins, and MCP servers. + +#### + +​ + +Remote machine requirements for SSH sessions + +A Linux or macOS remote machine needs a supported processor, an SSH server with SFTP, an install folder that isn’t mounted `noexec`, a working shell, and network access. Check each requirement before you connect, or when a connection fails after you log in: + + * **System** : an x86_64 or arm64 processor. The machine also has to meet Claude Code’s [system requirements](</docs/en/setup#system-requirements>). + * **SFTP** : the SSH server has to offer the SFTP subsystem, which a `Subsystem sftp` line in its `sshd_config` turns on. To check, connect to the same host and port with `sftp` in a terminal on your computer. A working server shows the `sftp>` prompt. + * **Sessions per connection** : Desktop on macOS and Linux opens several sessions on one SSH connection. If the server’s `sshd_config` sets `MaxSessions 1`, raise it, for example to OpenSSH’s default of 10. + * **Install folder** : Desktop installs a helper program and Claude Code under `~/.claude/remote/` in your home directory. It runs them from there, so that folder can’t be on a file system mounted `noexec`. Allow about 1 GB of disk space in the home directory of each user who connects. + * **Shell** : the shell set for your account on the remote machine has to run commands sent over SSH, as Bash, Zsh, and `sh` do + * **Network** : Claude Code runs on the remote machine and makes its network requests from there, so the machine needs the [network access that Claude Code requires](</docs/en/network-config#network-access-requirements>). If the machine can’t download Claude Code, Desktop downloads it on your computer and uploads it. Claude Code’s other requests still go out from the remote machine. + +#### + +​ + +Use your SSH configuration on macOS and Linux + +On macOS and Linux, Desktop connects by running the OpenSSH client on your computer, so it uses your `~/.ssh/config`. Connecting through the OpenSSH client requires Claude Desktop v1.37937.0 or later. Enter a `Host` name from that file in the **SSH host** field to use settings from its entry, such as `HostName`, `User`, `IdentityFile`, `CertificateFile`, `ProxyJump`, and `ProxyCommand`. Before you add the connection, check the client and the entry in a terminal on your computer: + + * **Client version** : run `ssh -V`. The client has to be OpenSSH 7.6 or later. + * **Entry** : run `ssh` with the `Host` name, such as `ssh devbox`. If that fails, fix the entry first. + +You can leave the **SSH port** and **SSH key (optional)** fields empty. If you fill one in, Desktop uses it with the entry: + + * **SSH port** : a value here overrides the entry’s `Port` + * **SSH key (optional)** : Desktop offers the key file you pick in addition to the entry’s `IdentityFile` and the keys in your SSH agent + +##### Reach a machine behind a jump host + +To reach a machine behind a jump host, also called a bastion, set `ProxyJump` or `ProxyCommand` in the entry. The following entry reaches `devbox.internal.example.com` through `bastion.example.com`: + +~/.ssh/config + + Host devbox + HostName devbox.internal.example.com + User alice + ProxyJump bastion.example.com + +Enter `devbox` in the **SSH host** field. + +##### Raise the SSH connection timeout + +If your SSH configuration sets no `ConnectTimeout` for the host, Desktop gives `ssh` 30 seconds to connect. Through a jump host or a `ProxyCommand`, that time includes the time the route takes to connect. If your route needs longer, add a higher value to the entry: + +~/.ssh/config + + Host devbox + HostName devbox.internal.example.com + User alice + ProxyJump bastion.example.com + ConnectTimeout 120 + +`ssh` uses the first value it finds for a host, so keep the entry above any `Host *` entry that sets `ConnectTimeout`. To confirm, run `ssh -G devbox` in a terminal on your computer. Its output includes `connecttimeout 120`. After you change the value, quit and reopen Desktop. + +#### + +​ + +Windows remote machines + +A Windows remote machine requires Claude Desktop v2.31226.0 or later. Use Microsoft’s OpenSSH Server. The machine can be x64 or ARM64. The shell that the SSH server starts can be `cmd.exe`, Windows PowerShell 5.1, or Git Bash. Windows remote machines get less testing than Linux ones. Try your own work there before you rely on it. Expect these limits, among others, on a Windows remote machine: + + * **Terminal** : the terminal doesn’t open in a session whose folder is a Windows path, such as `C:/projects/app` + * **Sandbox** : Claude Code runs there on native Windows, where it runs commands unsandboxed. See [where the sandbox runs](</docs/en/sandboxing>). + * **Plugins** : Desktop doesn’t copy a plugin that holds a file or folder name Windows can’t store, such as a name with `:`. The session lists the plugins that Desktop left out. + * **MCP servers** : on some Windows remote machines, Claude’s calls to MCP servers from `claude_desktop_config.json` go through Desktop, so Claude can’t call their tools while Desktop is disconnected. Before Claude Desktop v2.37337.0, this holds on every Windows remote machine. + * **Worktrees** : worktrees go in `<project-root>/.claude/worktrees/`. If you choose another folder, Desktop ignores it. + * **Earlier messages** : if the SSH server’s shell is `cmd.exe` or Windows PowerShell, you may have to connect before you see a session’s earlier messages + * **Forks** : if the SSH server’s shell is `cmd.exe` or Windows PowerShell, you can fork a session only at its first message + * **Running while disconnected** : a task keeps running while Desktop is disconnected only if the SSH server lets a program outlive the connection that started it. To find out, test the remote machine. + * **Leftover processes** : after a session ends, check the machine for programs that Claude Code started, because they can keep running. The background helper that Desktop installs doesn’t stop on its own there. + +#### + +​ + +Keep a task running while Desktop is disconnected + +If your computer sleeps, you lose your network, or you quit Desktop, the task goes on until it finishes, needs you, or reaches one of the limits. Closing the lid counts as sleep. A restart of Desktop or of your computer, including for an update, counts as a quit. Claude Code runs as a process on the remote machine, under a background helper that Desktop installs there, so it doesn’t need your SSH connection to keep running. The behavior in this section requires Claude Desktop v2.31226.0 or later. + +If you sign in to Desktop with a Claude account, don’t count on a task to run overnight. Desktop renews that sign-in for the task only while Desktop is running and connected, so the task’s sign-in can expire after you disconnect, and the task then stops. How much time is left when you disconnect varies.The work done so far stays on the remote machine, and you can continue with a message when you return.If the task must run through the night: + + * [Keep your computer awake](</docs/en/desktop-scheduled-tasks#how-scheduled-tasks-run>) and online, with the lid open and Desktop running + * Use a login that works without a prompt, such as a key that your SSH agent holds, for the remote machine and for any jump host on the way. Desktop can then reconnect on its own after a drop. + +For a task that must run while your computer is asleep or off, start a cloud session instead. + + * **After sleep or a network loss** : you get the running task back if the process still runs and Desktop can log in without a prompt. If it can’t, send a message. + * **After a quit, with Desktop on macOS or Linux and a Claude account** : you get the running task back if Desktop can rejoin the process. If it can’t, the task stops. If it stays stopped, send a message. + * **After a quit, with Desktop on Windows or a[third-party provider](</docs/en/third-party-integrations>)**: you lose the running task, because Desktop ends the process when the session opens. Send a message to continue. + +When you come back and the task isn’t done, check for word that Desktop can’t reconnect, an authentication error, or a waiting request: + + * **Desktop can’t reconnect** : the session says why, and a notification may say so too. Desktop may need you to log in. + * **Authentication error** : the sign-in token or credential may have expired. With a Claude account, send a message to continue. With a third-party provider, see [SSH remote sessions in Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions>). + * **Waiting request** : answer it + * **None of these** : send a message to continue + +##### Prepare a long task + + * **Update first** : update Desktop before you start a long task. On macOS and Windows, Desktop can restart on its own to install an update that it has downloaded. That restart waits while Claude is working on an SSH task. On macOS with a Claude account, by default the restart can go ahead anyway once the update has waited 72 hours. + * **Don’t quit Desktop** : if Desktop runs on Windows or uses a third-party provider, leave it open while the long task runs. After a quit, it ends the running task when the session opens. Leaving it open doesn’t protect a request that waits for you. + * **Reduce requests** : choose a permission mode, rules, or hooks that make the task wait for you less often + * **Check the jump host** : if your jump host asks for a sign-in, for example a push to a phone, switch to a login that works without a prompt. Otherwise Desktop can send another push each time it tries to reconnect. + * **Test the remote machine** : start a short task, quit Desktop while the task is still running, and open the session again well after the task should be done. If the task isn’t finished and the session shows no authentication error, check the remote machine for what can end a task. + * **Keep commands out of Desktop’s terminal** : if the remote machine logs out idle terminals, run your own commands from an SSH login outside Desktop + +##### Limits while Desktop is disconnected + +A task that you leave running can end when its sign-in expires, when the remote machine ends it, or when the helper stops or is replaced: + + * **Sign-in token or credential** : with a Claude account, the task stops with an authentication error when the token expires. With a third-party provider, the same holds for a credential that expires, such as one from single sign-on or a credential helper. See [SSH remote sessions in Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions>). With a Claude account, keep Desktop running and connected so that it can renew the sign-in. + * **The remote machine** : if the remote machine restarts, or ends your processes when your SSH connection closes, the running task ends. Nothing starts it again while Desktop is disconnected. Linux machines where systemd-logind’s `KillUserProcesses` is `yes` and applies to your user end your processes this way. To keep a task running there, ask the administrator to exempt your user, for example with `KillExcludeUsers`. + * **Idle terminals** : some Linux remote machines log out a terminal that nobody types in for a set time (systemd-logind’s `StopIdleSessionSec`). With Desktop on macOS or Linux, a session’s terminal and `!` commands share Desktop’s SSH connection by default. That logout then ends the connection while Desktop is connected, and the running task can end with it. Closing the terminal pane doesn’t prevent it, so keep commands out of that terminal. + * **Desktop updates** : if an update brings a new helper, Desktop replaces the helper on the remote machine at a later connection, which can end a task that still runs + * **Long absences** : on a Linux or macOS remote machine, if Desktop doesn’t connect for 30 days, the helper stops and ends every Claude Code process that runs under it. Connect before then. + +File edits and some tools can fail while Desktop is disconnected. If the task needs them, keep Desktop connected: + + * **Worktrees** : in a session that uses a worktree, Desktop checks each file edit before Claude makes it. While Desktop is disconnected, each edit waits about 30 seconds and then fails. Shell commands still run. On a Linux or macOS remote machine, edits can keep working. If you aren’t sure, start the session without a worktree. + * **Folder restrictions** : if your organization restricts which folders sessions may use, Desktop checks each file read, search, and edit, with or without a worktree. While Desktop is disconnected, each one waits up to 10 minutes and then fails. + * **Connectors** : connectors and other tools that Desktop provides run through Desktop, so while it is disconnected each call fails after about 30 seconds + * **Workflows** : Desktop checks each new [workflow](</docs/en/workflows>) before it starts, so while Desktop is disconnected a new one waits up to 10 minutes and then fails + * **MCP servers** : MCP servers that Claude Code starts on the remote machine don’t run through Desktop, so Claude can still call their tools. Servers from `claude_desktop_config.json` are among them only if Desktop doesn’t use its built-in SSH client. Otherwise, and on some Windows remote machines, Claude can’t call their tools while Desktop is disconnected. + +When edits in a worktree keep working + +On a Linux or macOS remote machine, the check doesn’t go through Desktop, so edits inside the worktree keep working while Desktop is disconnected. Before Claude Desktop v2.37337.0, this holds on a Linux remote machine only.Edits still fail in some cases, including these: + + * **Built-in SSH client** : Desktop uses it, for example in a Microsoft Store install, on a Windows computer without Microsoft’s OpenSSH 9.4 or later, or by default on Windows with a third-party provider + * **Repository location** : the repository is your home directory, a folder above it, or `~/.claude` + * **macOS paths** : on a macOS remote machine, the repository is under `/Volumes`, or a folder name in the path of the repository or the worktree has a `~` or a non-ASCII character + * **Folder restrictions** : your organization restricts which folders sessions may use + * **Corporate launcher** : before Claude Desktop v2.37337.0, you sign in with a Claude account, and your organization starts Claude Code on the remote machine through a [corporate launcher](</docs/en/corporate-launcher>) + +A session without a worktree has no such check, unless your organization restricts which folders sessions may use. + +##### Handle requests that arrive while you are away + +If Claude needs your approval or asks you a question while Desktop is disconnected, Claude waits on the remote machine. The wait has no time limit of its own. When Desktop rejoins the process, it shows you the request. If Desktop starts a new process instead, you lose the request. While a task waits for you, Desktop can restart on its own, for example to install an update. If Desktop runs on Windows or uses a third-party provider, you lose the request after that restart. If you lose a request, send a message to continue. To reduce how often a task stops to wait for you, and to hear from it while you are away, set up any of these before you leave: + + * **Auto mode** : choose Auto mode if it is available to you. After repeated blocks, you are [asked again](</docs/en/permission-modes#when-auto-mode-falls-back>). + * **Allow rules** : in your user settings file on the remote machine, `~/.claude/settings.json`, add [allow rules](</docs/en/permissions#manage-permissions>) for the commands the task needs. If your organization [accepts permission rules from managed settings only](</docs/en/settings-reference#allowmanagedpermissionrulesonly>), ask your administrator to add them to the managed settings that reach the remote machine. For allow rules in a project’s `.claude/settings.json`, see [Project allow rules and workspace trust](</docs/en/permissions#project-allow-rules-and-workspace-trust>). + * **A hook that answers** : configure a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) in `~/.claude/settings.json` on the remote machine to allow or deny requests in your place + * **A hook that alerts you** : configure a [`Notification` hook](</docs/en/hooks#notification>) with the `permission_prompt` matcher in the same file to send yourself a message when a request is waiting + * **A hook that tells you when Claude is done** : configure a [`Stop` hook](</docs/en/hooks#stop>) in the same file to send yourself a message when Claude has finished responding. It doesn’t run when an API error ends the turn. For that case, configure a [`StopFailure` hook](</docs/en/hooks#stopfailure>). + +If your organization [runs managed hooks only](</docs/en/settings-reference#allowmanagedhooksonly>), ask your administrator to add the hook to the managed settings that reach the remote machine. Claude Code doesn’t auto-approve [a few actions](</docs/en/permission-modes#actions-no-mode-auto-approves>) in any permission mode, including Bypass permissions. Depending on the permission mode, Claude Code denies such an action or asks you, and the task then waits for your answer. + +##### Reconnect after sleep or a network loss + +If Desktop hasn’t reconnected when you come back, send a message in the session. Desktop reconnects on its own only where it can log in without a prompt, for example with a key that your SSH agent holds. + + * **Remembered password** : a password that you let Desktop remember also works without a prompt, but for a long absence prefer a key that your SSH agent holds. If sign-ins with that password break off or hang, Desktop can stop reconnecting and wait for you. + * **Any other prompt** : if the remote machine prompts for anything else, such as a one-time code, you can get a notification on your computer. Click the notification, or send a message in the session, and Desktop shows the prompt. + +If a jump host asks for a sign-in, the outage is long, output is missing, or the process is gone + + * **Jump host, pushes stop while you’re away** : this can happen with Desktop on macOS or Linux when nobody answers a jump host’s sign-in, for example a push to a phone. Desktop then stops reconnecting while nobody is at your computer. When you unlock or use the computer, you can get another push, because Desktop can try again. After three unanswered attempts it waits until you retry or send a message. + * **Jump host, pushes keep coming** : where Desktop can’t tell that nobody answers, as with Desktop on Windows, it keeps trying while it has a process to rejoin, whether or not that process still runs. You can get another push with each attempt. To end the attempts, quit Desktop, which can cost you the running task. + * **Long outage** : Desktop slows to about one attempt every five minutes. To reconnect sooner, retry in the session or send a message, which Desktop delivers once it is connected. + * **Missing output** : while Desktop is disconnected, the helper keeps each session’s most recent Claude Code output in a 16 MiB buffer and drops older output. After Desktop reconnects, the session can show `Loading recent output from <host>…`. If Desktop can’t load all of the output, you see the row `Some output produced while you were disconnected may be missing here.` The row doesn’t mean that the task stopped. + * **Process gone** : if the process is gone when Desktop reconnects, Desktop can start a new one from the conversation’s saved history and tell Claude to continue the task. Desktop doesn’t continue the task on its own if the process keeps ending, or if Desktop uses a third-party provider. Send a message to continue. + +##### Reopen a session after you quit Desktop + +After you quit Desktop, the task keeps running on the remote machine until it finishes, needs you, or reaches one of the limits. + + * **Desktop on macOS or Linux, with a Claude account** : start Desktop and open the session. You get the running task back when Desktop can rejoin the process. It can’t always rejoin, for example after some Desktop updates or after your organization changes its managed settings. + * **On macOS or Linux, when Desktop can’t rejoin** : Desktop ends the process and starts a new one from the conversation’s saved history. Your running task stops, and you lose any approval or question that was waiting for you. After an update, Desktop can then tell Claude to continue. If the task stays stopped, send a message. + * **Desktop on Windows, or with a third-party provider on any platform** : start Desktop again only when you expect the task to be done. You don’t get the running task back, because Desktop never rejoins after a quit. It ends the process when the session opens, which can happen as Desktop starts. Send a message to continue. + +For third-party deployments, see [SSH remote sessions in Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/ssh-remote-sessions>). + +While a conversation’s Claude Code process is still running, don’t run [`claude --resume`](</docs/en/cli-reference#cli-flags>) for it on the remote machine. Claude Code doesn’t stop you, and both processes then write to the same conversation. If you aren’t sure, add `--fork-session`, which continues in a copy of the conversation, but both processes still work on the same files. #### @@ -762,7 +948,7 @@ 2. [`worktree.location`](</docs/en/settings-reference#worktree-location>) in `~/.claude/settings.json` on the remote machine 3. `<project-root>/.claude/worktrees/`, the default -Each project gets its own subfolder in the folder you set, so with `~/worktrees` a worktree’s path is `~/worktrees/<project>-<id>/<worktree-name>`. If the folder you set is inside the project, Desktop ignores it for that project and uses the default. To set **Worktree folder** on a connection you added earlier or one your organization manages, hover over it in the environment dropdown and click the gear icon. The field requires Claude Desktop v1.44121.0 or later. If your organization restricts which folders sessions may use, Desktop hides the field and keeps worktrees inside the project. +Each project gets its own subfolder in the folder you set, so with `~/worktrees` a worktree’s path is `~/worktrees/<project>-<id>/<worktree-name>`. If the folder you set is inside the project, Desktop ignores it for that project and uses the default. On a Windows remote machine, Desktop always uses the default. To set **Worktree folder** on a connection you added earlier or one your organization manages, hover over it in the environment dropdown and click the gear icon. The field requires Claude Desktop v1.44121.0 or later. If your organization restricts which folders sessions may use, Desktop hides the field and keeps worktrees inside the project. ####
modified Get started with the desktop app View current →
--- a/desktop-quickstart.md +++ b/desktop-quickstart.md @@ -66,7 +66,7 @@ You can also select: * **Cloud** : Run sessions in the cloud that continue even if you close the app. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for how cloud sessions work. - * **SSH** : Connect to a remote machine over SSH, such as your own servers, cloud VMs, or dev containers. Desktop installs Claude Code on the remote machine automatically the first time you connect. + * **SSH** : Connect to a remote machine over SSH, such as your own servers, cloud VMs, or dev containers. Desktop installs Claude Code on the remote machine automatically the first time you connect. A running task can [keep going while Desktop is disconnected](</docs/en/desktop#keep-a-task-running-while-desktop-is-disconnected>), but with a Claude account it can stop when its sign-in expires. * **WSL** (Windows): Run the session inside a [WSL 2 distribution](</docs/en/desktop-wsl>); Claude Code, tools, and git execute on the Linux side with native paths. 2
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -232,6 +232,7 @@ `CLAUDE_CODE_DISABLE_FAST_MODE`| Set to `1` to disable [fast mode](</docs/en/fast-mode>) `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY`| Set to `1` to disable the “How is Claude doing?” session quality surveys. Surveys are also disabled when `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, unless `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` opts back in. To set a sample rate instead of disabling outright, use the [`feedbackSurveyRate`](</docs/en/settings-reference#feedbacksurveyrate>) setting. See [Session quality surveys](</docs/en/data-usage#session-quality-surveys>) `CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING`| Set to `1` to disable file [checkpointing](</docs/en/checkpointing>). The `/rewind` command will not be able to restore code changes. Overrides the [`fileCheckpointingEnabled`](</docs/en/settings-reference#filecheckpointingenabled>) setting +`CLAUDE_CODE_DISABLE_FILE_MENTIONS`| Set to `1` to stop Claude Code from expanding [`@` mentions](</docs/en/common-workflows#reference-files-and-directories>) of files and directories. Claude instead gets the mentioned paths with a note to read them using its file tools. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). Requires Claude Code v2.1.299 or later `CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS`| Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude’s context. Useful when using your own git workflow skills. Takes precedence over the [`includeGitInstructions`](</docs/en/settings-reference#includegitinstructions>) setting when set `CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT`| Set to `1` to stop Claude Code from reading scripts passed to a shell with `-c`, such as `bash -c 'rm -rf ~'`, for [critical-path](</docs/en/permission-modes#removals-inside-nested-commands-and-inline-scripts>) removals. Claude Code still checks the shell variable and positional parameter targets in those scripts, and the other critical-path checks keep running. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.288 or later `CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP`| Set to `1` to prevent automatic remapping of Opus 4 and Opus 4.1 to the current Opus version on the Anthropic API. Use when you intentionally want to pin an older model. The remap does not run on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry @@ -292,9 +293,10 @@ `CLAUDE_CODE_IDE_HOST_OVERRIDE`| Override the host address used to connect to the IDE extension. By default Claude Code auto-detects the correct address, including WSL-to-Windows routing `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`| Set to `1` to skip auto-installation of IDE extensions. Equivalent to setting [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false` `CLAUDE_CODE_IDE_SKIP_VALID_CHECK`| Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running +`CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS`| Context size, in tokens, at which [idle compaction](</docs/en/settings-reference#idlecompaction>) applies to a conversation (default: `200000`). Accepts a positive whole number, and anything else is ignored. Values below `100000` are raised to `100000`, the lowest threshold. Idle compaction is on by default for conversations that meet its conditions. To turn it off, set `idleCompaction` to `false`. Requires Claude Code v2.1.290 or later `CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`| How many [subagents](</docs/en/sub-agents#concurrent-subagent-limit>) can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can’t disable it. Requires Claude Code v2.1.217 or later `CLAUDE_CODE_MAX_CONTEXT_TOKENS`| Override the context window size Claude Code assumes for the active model. As of v2.1.193, how it applies depends on how Claude Code resolves the model ID; see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>). Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name -`CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH`| Maximum length in characters of each MCP tool description and each MCP server’s instructions that Claude Code sends to the model (default: 2048). Claude Code [truncates longer text](</docs/en/mcp#for-mcp-server-authors>). Accepts a positive whole number in plain digits. Anything else is ignored and the default applies. Requires Claude Code v2.1.280 or later +`CLAUDE_CODE_MAX_MCP_DESCRIPTION_LENGTH`| Maximum length in characters of each MCP tool description and each MCP server’s instructions that Claude Code sends to the model. The value you set replaces both [default limits](</docs/en/mcp#for-mcp-server-authors>): 4096, and 16384 for the description of a tool that Claude loads through tool search. Claude Code truncates longer text. Accepts a positive whole number in plain digits. Anything else is ignored and the defaults apply. Requires Claude Code v2.1.280 or later `CLAUDE_CODE_MAX_OUTPUT_TOKENS`| Set the maximum number of output tokens for most requests. Defaults and caps vary by model; see [max output tokens](<https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison>). Claude Code lowers a value above a model’s cap to the cap. For a model ID Claude Code can’t resolve to a model it knows, the default is 32000 and the cap is 128000. Increasing this value reduces the effective context window available before [auto-compaction](</docs/en/costs#reduce-token-usage>) triggers `CLAUDE_CODE_MAX_RETRIES`| Override the number of times to retry failed API requests (default: 10). Capped at 15 as of v2.1.186; as of v2.1.199, `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. For unattended sessions that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG` instead `CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSION`| Removed in v2.1.224 and now a no-op. Previously capped the total number of [subagents](</docs/en/sub-agents>) Claude could spawn with the Agent tool in one session (default: 200); spawning past the cap failed with `Subagent spawn limit reached`. The [concurrent subagent limit](</docs/en/sub-agents#concurrent-subagent-limit>) and the [depth limit](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>) still apply @@ -323,6 +325,7 @@ `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`| Interval for refreshing dynamic OpenTelemetry headers in milliseconds (default: 1740000 / 29 minutes). See [Dynamic headers](</docs/en/monitoring-usage#dynamic-headers>) `CLAUDE_CODE_OTEL_SHUTDOWN_TIMEOUT_MS`| Timeout in milliseconds for the OpenTelemetry exporter to finish on shutdown (default: 2000). Increase if metrics are dropped at exit. See [Monitoring](</docs/en/monitoring-usage>) `CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS`| Starting delay in milliseconds, in place of the default 500, of the exponential backoff between [automatic retries](</docs/en/errors#tune-retry-behavior>) of a request that the API rejects with a `529` overloaded error. Raise it to spread the retries over a longer window when the API is at capacity. Give whole milliseconds from 500 to 32000 in plain digits; Claude Code treats any other value as unset. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](</docs/en/fast-mode#handle-rate-limits>). Requires Claude Code v2.1.292 or later +`CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS`| Ceiling in milliseconds, in place of the default 32000, on the exponential backoff between [automatic retries](</docs/en/errors#tune-retry-behavior>) of a request that the API rejects with a `529` overloaded error. Raise it so that later retries keep spreading apart when the API is at capacity. Give whole milliseconds from 32000 to 64000 in plain digits; Claude Code treats any other value as unset. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](</docs/en/fast-mode#handle-rate-limits>). Requires Claude Code v2.1.296 or later `CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE`| Set to `1` to let Claude Code run your package manager’s upgrade command in the background when a new version is available. Applies to Homebrew and WinGet installations. Other package managers continue to show the upgrade command without running it. See [Auto updates](</docs/en/setup#auto-updates>) `CLAUDE_CODE_PERFORCE_MODE`| Set to `1` to enable Perforce-aware write protection. When set, Edit, Write, and NotebookEdit fail with a `p4 edit <file>` hint if the target file lacks the owner-write bit, which Perforce clears on synced files until `p4 edit` opens them. This prevents Claude Code from bypassing Perforce change tracking `CLAUDE_CODE_PLUGIN_CACHE_DIR`| Override the plugins root directory. Despite the name, this sets the parent directory, not the cache itself: marketplaces and the plugin cache live in subdirectories under this path. Defaults to `~/.claude/plugins` @@ -401,6 +404,7 @@ `CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE`| When `CLAUDE_AUTO_BACKGROUND_TASKS` is set to `1`, how long Claude Code waits before each reminder to Claude to check on [background subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>) that are still running. Takes one or more comma-separated waits in whole seconds from `1` to `86400`, such as `600` or `600,1800,3600`. Each value is the wait before the next reminder, and the last value repeats. Takes plain digits only; any other value or spelling reads as unset. When unset, there are no reminders. Requires Claude Code v2.1.283 or later `CLAUDE_CODE_WORKFLOW_MAX_CONCURRENT_AGENTS`| How many agents a single [workflow](</docs/en/workflows>) run executes at once, from `1` to `256`. By default, a run executes up to 16 agents at once, fewer when Claude Code has fewer CPUs available; queued `agent()` calls wait for a free slot. Each running agent’s transcript stays in Claude Code’s memory, so higher values raise memory use. Takes plain digits only; out-of-range values and other spellings keep the default. Requires Claude Code v2.1.269 or later `CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS`| Upper bound in milliseconds on how long a [workflow](</docs/en/workflows>) agent waits for a same-prefix sibling’s first response to begin before sending its own first request. When a fan-out starts several agents that share a [prompt-cache prefix](</docs/en/workflows#prompt-caching-in-a-fan-out>), Claude Code holds all but the first agent for up to this long so the rest read the cached prefix instead of each processing it uncached. Default `5000`. Set to `0` to disable the wait. When `DISABLE_PROMPT_CACHING` is set, agents never wait. Requires Claude Code v2.1.229 or later +`CLAUDE_CODE_YOU_SHOULD_KNOW_DEBUG`| Set to `1` to show, above the prompt, a line for each of the last three checks the [You should know mod](</docs/en/interactive-mode#you-should-know-suggestions>) made in this session. Use it to confirm the mod is checking when no notes appear. Requires Claude Code v2.1.287 or later `CLAUDE_CONFIG_DIR`| Override the configuration directory (default: `~/.claude`). All settings, session history, and plugins are stored under this path. For credentials, see [where Claude Code stores credentials](</docs/en/authentication#credential-management>). Useful for running multiple accounts side by side: for example, `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'`. Set it in your shell, user settings, or managed settings. In a settings file, write the absolute path. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>) `CLAUDE_DISABLE_ADOPT`| Set to `1` to stop in-flight background work instead of carrying it over when you background a session by pressing `←` or with [`/background`](</docs/en/agent-view#from-inside-a-session>). Claude Code asks you to confirm before backgrounding, then stops the tasks that would otherwise carry over. Requires Claude Code v2.1.195 or later `CLAUDE_EFFORT`| Set automatically in Bash tool subprocesses and hook commands to the [effort level](</docs/en/model-config#adjust-effort-level>) in effect when the subprocess starts: `low`, `medium`, `high`, `xhigh`, or `max`. Matches the `effort.level` field passed to [hooks](</docs/en/hooks>). Only set when the current model supports the effort parameter @@ -416,7 +420,7 @@ `CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`| Removed in v2.1.260 and now a no-op. Previously capped how long a [background shell command](</docs/en/interactive-mode#background-bash-commands>) that a [subagent](</docs/en/sub-agents>) started could run, in milliseconds, with a 60-minute default. See [the background command lifetime rules](</docs/en/tools-reference#background-commands>) `DEBUG`| Set to `1` to enable debug mode, equivalent to launching with [`--debug`](</docs/en/cli-reference#cli-flags>). Debug logs are written to `~/.claude/debug/<session-id>.txt`, or to the path set by `CLAUDE_CODE_DEBUG_LOGS_DIR`. Only the truthy values `1`, `true`, `yes`, and `on` enable debug mode, so namespace patterns like `DEBUG=express:*` set for other tools do not trigger it `DISABLE_AUTOUPDATER`| Set to `1` to disable automatic background updates. Manual `claude update` still works. Use `DISABLE_UPDATES` to block both -`DISABLE_AUTO_COMPACT`| Set to `1` to disable automatic compaction when approaching the context limit. The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the [`autoCompactEnabled`](</docs/en/settings-reference#autocompactenabled>) setting +`DISABLE_AUTO_COMPACT`| Set to `1` to disable automatic compaction when approaching the context limit, along with [idle compaction](</docs/en/settings-reference#idlecompaction>). The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the [`autoCompactEnabled`](</docs/en/settings-reference#autocompactenabled>) setting `DISABLE_COMPACT`| Set to `1` to disable all compaction: both automatic compaction and the manual `/compact` command `DISABLE_COST_WARNINGS`| Set to `1` to disable cost warning messages `DISABLE_DOCTOR_COMMAND`| Set to `1` to hide the [`/doctor`](</docs/en/commands#all-commands>) setup checkup skill and its `/checkup` alias. Useful for managed deployments where users shouldn’t run setup diagnostics from a session. Doesn’t affect the `claude doctor` terminal command. Before v2.1.205, this variable hid the `/doctor` diagnostics screen command @@ -442,7 +446,7 @@ `ENABLE_CLAUDEAI_MCP_SERVERS`| Set to `false` to stop Claude Code from fetching [claude.ai MCP servers](</docs/en/mcp#use-mcp-servers-from-claude-ai>). Enabled by default for logged-in users. To disable per-project or per-org, set [`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>) in settings instead `ENABLE_PROMPT_CACHING_1H`| Set to `1` to request a 1-hour [prompt cache TTL](</docs/en/prompt-caching#cache-lifetime>) instead of the default 5 minutes. Intended for API key, [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) users. Subscription users within included usage receive the 1-hour TTL automatically on the [main conversation](</docs/en/prompt-caching#which-ttl-each-request-gets>). Subscription users drawing on [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) can set it to keep the 1-hour TTL. 1-hour cache writes are billed at a higher rate. To choose the TTL per request bucket instead, use `CLAUDE_CODE_PROMPT_CACHE_TTL` and `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`, which take precedence over this variable `ENABLE_PROMPT_CACHING_1H_BEDROCK`| Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead -`ENABLE_TOOL_SEARCH`| Controls [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>). Unset, Claude Code defers all MCP tools by default. It still loads them upfront on Google Cloud’s Agent Platform models earlier than the Claude 4.5 generation, on a Microsoft Foundry deployment hosted on Azure, and when `ANTHROPIC_BASE_URL` points to a non-first-party host. `true` always defers and sends the beta header, except on those same Agent Platform models and Microsoft Foundry deployments; requests fail on proxies that don’t support `tool_reference`. `auto` loads upfront when tool definitions fit within 10% of context. `auto:N` sets a custom threshold, such as `auto:5` for 5%. `false` loads all tools upfront. A value you set yourself is ignored when `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` is set. Before v2.1.221, Claude Code disabled tool search for all models on Google Cloud’s Agent Platform unless you set this variable to `true` +`ENABLE_TOOL_SEARCH`| Controls [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>). Unset, Claude Code defers all MCP tools by default, and loads them upfront instead when `ANTHROPIC_BASE_URL` points to a non-first-party host. `true` keeps them deferred on such a host too. `auto` loads upfront when tool definitions fit within 10% of context. `auto:N` sets a custom threshold, such as `auto:5` for 5%. `false` loads all tools upfront. For the models and deployments that load every tool upfront whatever this value is, see [Configure tool search](</docs/en/mcp#configure-tool-search>) `FALLBACK_FOR_ALL_PRIMARY_MODELS`| Set to any non-empty value, such as `1`, to make Claude Code stop retrying on repeated overload errors for every model when no fallback model is configured. **Setting it to`0` or `false` still enables this**, unlike most on/off variables; unset the variable to restore the default retry behavior. Without it, Claude Code stops retrying this way on models it recognizes as Opus, Fable, or Mythos models when you authenticate with an API key or a [third-party provider](</docs/en/third-party-integrations>) rather than a Claude subscription. On Claude Code v2.1.160 or later, Claude Code switches to your configured [fallback model chain](</docs/en/model-config#fallback-model-chains>) on repeated overload errors for any primary model, so this variable doesn’t affect switching to a fallback model `FORCE_AUTOUPDATE_PLUGINS`| Set to `1` to force plugin auto-updates even when the main auto-updater is disabled via `DISABLE_AUTOUPDATER` `FORCE_HYPERLINK`| Set to `1` to enable clickable OSC 8 hyperlinks when your terminal supports them but isn’t auto-detected, or `0` to disable them. When unset, Claude Code enables hyperlinks only when it detects terminal support. Claude Code parses this value as a number, not a Boolean, so a value such as `false`, `no`, or `off` enables hyperlinks rather than disabling them. The footer [PR or merge request badge](</docs/en/interactive-mode#pr-review-status>) renders as a hyperlink even when Claude Code can’t detect terminal support, such as over SSH. Set `0` to render the badge as plain text @@ -549,6 +553,7 @@ * Run [`claude import` or the `/import` command](</docs/en/cli-reference#cli-commands>) * Run [`/skill-doctor`](</docs/en/skills#find-unused-skills>) or open its report in the `/plugin` **Stats** tab * Sync the [skills](</docs/en/skills#where-synced-skills-load>) and [plugins](</docs/en/plugins/loading#synced-plugins>) enabled for your claude.ai account into your terminal sessions + * Turn on the [You should know mod](</docs/en/interactive-mode#you-should-know-suggestions>) * Use [the advisor tool](</docs/en/advisor#requirements>) * Read or reply to [comments on an artifact](</docs/en/artifacts#collect-comments-on-an-artifact>) * Have Claude read [another organization’s public artifact](</docs/en/artifacts#read-an-artifact-shared-with-you>) @@ -556,6 +561,7 @@ * Get [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>), which Claude Code turns on through a fetched flag * Have Claude [treat large pastes as pasted rather than typed text](</docs/en/terminal-config#how-claude-treats-pasted-text>); the content behind a `[Pasted text #N]` placeholder reaches Claude unmarked * Have Claude Code [exclude MCP tools whose input schema the API would reject](</docs/en/mcp#tools-with-invalid-input-schemas>); it sends the schema anyway, and a request that includes it fails with [a 400 error naming the tool by its position](</docs/en/errors#tool-input-schema-is-invalid>) + * Have Claude Code [compact a long conversation while your terminal session is idle](</docs/en/settings-reference#idlecompaction>), shortly before a one-hour prompt cache expires ###
modified Error reference View current →
Show diff (197 lines)
--- a/errors.md +++ b/errors.md @@ -124,6 +124,7 @@ `proxy refused the connection`| Network `403` with `GitHub GraphQL is not available from Claude Code sessions` in a cloud session| [GitHub proxy](</docs/en/cloud-environments#github-proxy>) `The cloud environments service returned an empty response` / `The cloud environments service returned a response in an unexpected format`| Network +`Failed to fetch session from Sessions API: Failed to fetch session logs`| Network `Couldn't reconnect to your Remote Control session`| Network `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 @@ -143,9 +144,12 @@ `Request too large for the API's 32MB request limit`| Request errors `Image was too large`| Request errors `Unable to resize image`| Request errors +`Request rejected as unprocessable by the model`| Request errors `PDF too large` / `PDF is password protected` / `pdftoppm is not installed`| Request errors `Extra inputs are not permitted`| Request errors `API Error: 400 ... tools.N.custom.input_schema: JSON schema is invalid` / `Property keys should match pattern`| Request errors +`Tool "mcp__<server>__<tool>" is not sent to Claude: its name has <N> characters and the API accepts at most 128`| Request errors +`tools.N.custom.name: String should have at most 128 characters`| Request errors `tool_use.name: String should have at most 200 characters`| Request errors `There's an issue with the selected model`| Request errors `Model ... is not a recognized model id`| Request errors @@ -188,8 +192,11 @@ `Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.`| Command-line errors `Cloud sessions cannot be created from a --restricted session`| Command-line errors `Cloud sessions are disabled by your organization's policy`| Command-line errors +`Cloud sessions use your claude.ai login`, at the end of a policy denial that names a credential| Command-line errors `Couldn't verify your organization's policy for cloud sessions`| Command-line errors +`Cloud sessions aren't available:` followed by why your organization’s policy couldn’t be loaded| Command-line errors `Cloud sessions need a claude.ai sign-in`| [Unable to get organization UUID](</docs/en/claude-code-on-the-web#unable-to-get-organization-uuid>) +`Nothing was stashed: "<path>" is now a folder in place of a tracked file or link` / `are now folders in place of tracked files or links`| Command-line errors `Error: --json-schema is not a valid JSON Schema`| Command-line errors `Error: Invalid --agents configuration:`| Command-line errors `Error: --agents takes a JSON object, or a file path only with --print (-p)`| Command-line errors @@ -249,6 +256,7 @@ `Output styles are saved to local settings (.claude/settings.local.json), which this session doesn't load`| Command-line errors `/recap only runs when you ask for it yourself in this session`| Command-line errors ``plugin eval` is currently in early access` / ``plugin eval` is currently unavailable`| Plugin errors +`cannot be evaluated where sessions load it`| [Test plugins with evals](</docs/en/plugin-evals#cannot-be-evaluated-where-sessions-load-it>) `Marketplace "<name>" is registered from an untrusted source`| Plugin errors `Claude Code refuses the marketplace name "<name>"`| Plugin errors `Marketplace name impersonates an official Anthropic/Claude marketplace`| Plugin errors @@ -433,6 +441,7 @@ [`CLAUDE_CODE_RETRY_WATCHDOG`](</docs/en/env-vars>)| unset| Set to `1` in unattended sessions such as CI jobs to retry `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once when a standard-speed request gets a `429` that reports a spend limit or exhausted usage credits, even one from a gateway spend cap that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. For fast mode requests, see [Handle rate limits](</docs/en/fast-mode#handle-rate-limits>). On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. [`CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`](</docs/en/env-vars>)| unset| Maximum time in milliseconds that each API request spends waiting out `429` and `529` errors when `CLAUDE_CODE_RETRY_WATCHDOG` is set. When unset, the wait has no limit. Requires Claude Code v2.1.295 or later. [`CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MS`](</docs/en/env-vars>)| 500| Starting delay in milliseconds of the backoff between retries of a request that the API rejects with a `529` overloaded error. Raise it, up to 32000, to spread the retries over a longer window when the API is at capacity. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](</docs/en/fast-mode#handle-rate-limits>). Requires Claude Code v2.1.292 or later. +[`CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS`](</docs/en/env-vars>)| 32000| Ceiling in milliseconds on the backoff between retries of a request that the API rejects with a `529` overloaded error. Raise it, up to 64000, so that later retries keep spreading apart when the API is at capacity. Has no effect when `CLAUDE_CODE_RETRY_WATCHDOG` is set to `1`, or when the rejected request was sent in [fast mode](</docs/en/fast-mode#handle-rate-limits>). Requires Claude Code v2.1.296 or later. [`API_TIMEOUT_MS`](</docs/en/env-vars>)| 600000| Per-request timeout in milliseconds. Raise it for slow networks or proxies. It also caps how long Claude Code waits for response headers, described in No response from API. [`CLAUDE_CODE_NONSTREAMING_TIMEOUT_RETRIES`](</docs/en/env-vars>)| unset| Limit on re-sends of a non-streaming request that times out. At the limit, the request fails. A response from Claude that takes longer than the timeout to generate times out again on every re-send, so set a low number such as `0` to fail sooner. Each non-streaming attempt times out after 300 seconds in a local session, or after `API_TIMEOUT_MS` when you set a positive value. Requires Claude Code v2.1.285 or later. [`CLAUDE_STREAM_FIRST_BYTE_TIMEOUT_MS`](</docs/en/env-vars>)| unset| Deadline in milliseconds for the first response byte of a streaming request. Requires Claude Code v2.1.242 or later. For how Claude Code picks the deadline when this is unset, see No response from API. @@ -1824,6 +1833,22 @@ ​ +Failed to fetch session from Sessions API + +This message means Claude Code found the [cloud session you asked to pull into your terminal](</docs/en/claude-code-on-the-web#from-cloud-to-terminal>) but couldn’t read its conversation history from Anthropic’s servers, so it didn’t open it: + + Failed to fetch session from Sessions API: Failed to fetch session logs + +You see it after `claude --teleport`, `/teleport`, or choosing the session in the [`/tasks`](</docs/en/commands>) list. `claude --teleport <session-id>` prints it and exits with code 1. **What to do:** + + * Run the same teleport again. If it fails the same way, report the problem + +Before v2.1.296, Claude Code didn’t retry a failed read, and after one it could open the session with an empty conversation and report success instead of printing this message. + +### + +​ + Couldn’t reconnect to your Remote Control session Couldn't reconnect to your Remote Control session. Retry, or start a fresh session without --resume. @@ -2031,6 +2056,20 @@ ​ +Request rejected as unprocessable by the model + +The API refused the request as one the model can’t process. The message is the API’s own. + + API Error: 400 Request rejected as unprocessable by the model (too many or oversized images, or unsupported parameters) + +Claude Code can remove the oldest images and documents from a refused request and send it again. Before v2.1.290, Claude Code didn’t remove images on this refusal, so a long session that accumulated hundreds of them could fail with this error on every turn. **What to do:** + + * If the message keeps appearing in a conversation with images or documents, remove them yourself. Press Esc twice to step back past the turns that added them, or run `/clear` to start fresh. + +### + +​ + PDF errors The PDF you attached couldn’t be processed. The messages are shown here in their non-interactive form; in an interactive session they instead prompt you to double press esc and try again. @@ -2081,6 +2120,24 @@ * If your Claude Code version is earlier than v2.1.216, run `claude update`. * Remove or [disable](</docs/en/mcp#disable-a-server-without-removing-it>) the MCP server that declares the invalid schema. The error names the tool only by position. On v2.1.216 or later, check each server’s log for a line naming a tool whose input schema would be rejected. If no log names one, disable servers one at a time. * If you maintain the server, fix the tool’s `input_schema`. The schema must be valid JSON Schema, and top-level property names must be 1 to 64 characters long and use only ASCII letters and digits, `_`, `.`, and `-`. See [Tools with invalid input schemas](</docs/en/mcp#tools-with-invalid-input-schemas>). + +### + +​ + +MCP tool name over 128 characters + +An MCP server lists a tool whose full name, such as `mcp__<server>__<tool>`, is longer than the 128 characters the API accepts. Claude Code [leaves that tool out of the tools it sends to Claude](</docs/en/mcp#tools-with-names-longer-than-128-characters>), and the server’s other tools keep working. In a session you start with `claude --debug` from your shell, Claude Code writes this message to the debug log at `~/.claude/debug/<session-id>.txt`: + + Tool "mcp__<server>__<tool>" is not sent to Claude: its name has <N> characters and the API accepts at most 128 + +**What to do:** + + * If you maintain the server, shorten the tool’s name. + * If the server is in your [MCP configuration](</docs/en/mcp#mcp-installation-scopes>), give it a shorter name there, such as `db` in place of `analytics-database`. Then update what refers to the server or its tools by the old name, such as [permission rules](</docs/en/permissions#mcp>) and [hook matchers](</docs/en/hooks#match-mcp-tools>). + * If a [plugin bundles the server](</docs/en/mcp#plugin-provided-mcp-servers>), the tool’s full name also includes the plugin name. Ask the plugin’s maintainer to shorten the server or tool name. + +Before v2.1.292, Claude Code sent the tool anyway, and the API rejected every request that included it with `API Error: 400 ... tools.N.custom.name: String should have at most 128 characters`. ### @@ -2617,10 +2674,58 @@ Cloud sessions are disabled by your organization's policy. Contact your organization admin to enable them. -The message appears when you [create a cloud session from the terminal](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) and when you submit a command that needs cloud sessions, such as `/teleport`, `/remote-env`, or `/web-setup`. Before v2.1.268, submitting one of those commands returned `Unknown command` instead. This is a server-side organization policy, so it can’t be overridden from local settings, environment variables, or CLI flags. If Claude Code hasn’t loaded your organization’s policy yet or can’t fetch it, those commands answer `Couldn't verify your organization's policy for cloud sessions. Check your network connection, then restart Claude Code and try again.` instead. **What to do:** +The message appears when you [create a cloud session from the terminal](</docs/en/claude-code-on-the-web#from-terminal-to-cloud>) and when you submit a command that needs cloud sessions, such as `/teleport`, `/remote-env`, or `/web-setup`. Before v2.1.268, submitting one of those commands returned `Unknown command` instead. If the message instead names a credential this session is using and ends with `Cloud sessions use your claude.ai login.`, see Cloud sessions use your claude.ai login. If Claude Code couldn’t load your organization’s policy at all, you see a different message instead. **What to do:** * Ask an [Owner](</docs/en/server-managed-settings#access-control>) in your organization to enable cloud sessions in the Claude Code admin settings at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>) - * If the message says it couldn’t verify the policy, check your network connection, then restart Claude Code and try again + +### + +​ + +Cloud sessions use your claude.ai login + +When the policy denial names a credential this session is using and ends with this sentence, Claude Code checked the cloud-session policy of the organization that issued that credential. That organization can differ from the one your claude.ai login belongs to: + + Cloud sessions are disabled by your organization's policy. This session is using ANTHROPIC_API_KEY, so Claude Code checked the policy for the organization that key belongs to. Cloud sessions use your claude.ai login. + +The last sentence means that cloud sessions run on your claude.ai login rather than on that credential. This form appears when you start, resume, or message a cloud session from your shell, such as with `--cloud` or `--teleport`. Before v2.1.296, Claude Code printed the form that tells you to contact your organization admin in this case too. + +### + +​ + +Couldn’t verify your organization’s policy for cloud sessions + +These messages mean Claude Code couldn’t load your organization’s policy, which it checks before it creates, resumes, or messages a [cloud session](</docs/en/claude-code-on-the-web>). While the policy request hasn’t finished, the message is: + + Couldn't verify your organization's policy for cloud sessions. Check your network connection and try again. + +Inside a session, a command that needs cloud sessions, such as `/teleport` or `/web-setup`, gives this message too. It does so even where your shell would print a `Cloud sessions aren't available:` form, and its second sentence reads `Check your network connection, then restart Claude Code and try again.` Once the policy request has failed, the message says what failed. This applies when you start, resume, or message a cloud session from your shell with a flag such as `--cloud` or `--teleport`. With no route to the API, it reads: + + Cloud sessions aren't available: couldn't reach api.anthropic.com to load your organization's policy. Check your network or proxy. + +Other failures follow the same opening with their own cause, such as a proxy that refused the request with HTTP 403, a server error, or credentials the API didn’t accept. When the API didn’t accept a credential that this session uses in place of your claude.ai login, such as an `ANTHROPIC_API_KEY` environment variable, the message can also name it and say to unset it: + + Cloud sessions aren't available: api.anthropic.com didn't accept this session's credentials when Claude Code asked for your organization's policy. Cloud sessions use your claude.ai login. ANTHROPIC_API_KEY is set, so this session is using API-key auth — unset it (or run in a shell without it) to use cloud sessions. + +Before v2.1.296, these failures printed the `Couldn't verify` message too. **What to do:** + + * For the `Couldn't verify` message, check your network connection and try again. Inside a session, restart Claude Code first + * For a `Cloud sessions aren't available:` message, do what its cause calls for, such as checking your proxy or unsetting the credential it names, then run the command again + +### + +​ + +Nothing was stashed because a folder replaced a tracked file + +This message means a folder in your checkout now sits where a git-tracked file or link used to be. It appears after you choose the stash option while pulling a [cloud session](</docs/en/claude-code-on-the-web#from-cloud-to-terminal>) into your terminal, for example with `claude --teleport` or `/teleport`. Stashing that state could delete the files inside the folder, so Claude Code refuses the stash and leaves your checkout and index unchanged: + + Error: Nothing was stashed: "f" is now a folder in place of a tracked file or link, and stashing could delete what's in it for good. Commit the change or move the folder somewhere else, then try again. + +**What to do:** + + * Commit the change or move the folder somewhere else, as the message says, then run the teleport again ### @@ -3342,13 +3447,13 @@ Claude Code couldn’t restart -Claude Code was restarting, for example to switch to or from fullscreen rendering after you ran [`/tui`](</docs/en/fullscreen#enable-fullscreen-rendering>). It closed the session but couldn’t start the new process, so it printed this message and exited with status 1: +When this message says your conversation is saved, the conversation is on disk and you can pick it up where it stopped. Claude Code was restarting itself, for example to switch to or from fullscreen rendering after you ran [`/tui`](</docs/en/fullscreen#enable-fullscreen-rendering>), and couldn’t start the new process, so it exited with status 1: Claude Code couldn't restart. Your conversation is saved. Start Claude Code again and run /resume to pick it up. When the restart had no conversation to reopen, for example because `/tui` was your first input in a new session, the message reads `Claude Code couldn't restart. Start Claude Code again.` **What to do:** - * Run `claude` again in your shell from the same directory. If the message said your conversation is saved, run [`/resume`](</docs/en/sessions#resume-a-session>) in the new session and select it + * Run `claude` again in your shell. If the message said your conversation is saved, run [`/resume`](</docs/en/sessions#resume-a-session>) in the new session and select the conversation. If it isn’t in the list, [widen the session picker](</docs/en/sessions#where-the-session-picker-looks>) * If restarts keep failing, start Claude Code from your shell with [`claude --debug-file claude-debug.log`](</docs/en/cli-reference#cli-flags>). If a restart from that session fails, `claude-debug.log` in the directory you started from records a `Failed to relaunch:` line with the operating system’s error. Include that line when you report the problem ###
modified Feature availability View current →
--- a/feature-availability.md +++ b/feature-availability.md @@ -90,7 +90,7 @@ [Server-managed settings](</docs/en/server-managed-settings>)| ✓ (Team and Enterprise)| See [Platform availability](</docs/en/server-managed-settings#platform-availability>)| ✗| ✗| ✗| ✗ [Zero Data Retention](</docs/en/zero-data-retention>)| ✓ (qualified Enterprise accounts)| ✓ (qualified accounts)| See note 3| ✓ (qualified accounts)| See note 3| See note 3 1 On Google Cloud’s Agent Platform, web search is available for Opus 4, Sonnet 4, Haiku 4.5, and later models. -2 On these providers, auto mode supports only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models. See [Auto mode configuration](</docs/en/auto-mode-config>). For the permission mode a session on these providers starts in, see [Which mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>). In v2.1.158 through v2.1.206, auto mode on these providers also required setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`; v2.1.207 removed the requirement. +2 On these providers, auto mode supports only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models. See [Auto mode configuration](</docs/en/auto-mode-config>). For the permission mode a session on these providers starts in, see [Which mode a session starts in](</docs/en/permission-modes#which-mode-a-session-starts-in>). 3 Subject to your agreement with the cloud provider. 4 Dashboard and API only. [Contribution metrics](</docs/en/analytics#enable-contribution-metrics>) requires a claude.ai Team or Enterprise organization. 5 Requires Claude Code v2.1.224 or later on macOS and Linux, including Linux inside WSL 2. On native Windows, requires Claude Code v2.1.234 or later. With API key authentication, messaging is same-machine only. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, messaging is same-machine only and requires Claude Code v2.1.248 or later. Claude can find your [cloud sessions](</docs/en/claude-code-on-the-web>) and your sessions on other machines only from a session that is connected to [Remote Control](</docs/en/remote-control>). To connect, you need a claude.ai sign-in and the other [Remote Control requirements](</docs/en/remote-control#requirements>). See [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>).
modified Extend Claude Code View current →
--- a/features-overview.md +++ b/features-overview.md @@ -262,7 +262,7 @@ * The agent’s own system prompt, not the Claude Code system prompt * Full content of skills listed in the agent’s `skills:` field - * CLAUDE.md and git status, except the built-in Explore and Plan agents [omit both](</docs/en/sub-agents#what-loads-at-startup>), and an agent whose definition sets [`omitClaudeMd`](</docs/en/sub-agents#supported-frontmatter-fields>) skips the user, project, and local CLAUDE.md files + * CLAUDE.md and git status. The built-in Explore and Plan agents [start with neither](</docs/en/sub-agents#what-loads-at-startup>), and an agent whose definition sets [`omitClaudeMd`](</docs/en/sub-agents#supported-frontmatter-fields>) starts without the user, project, and local CLAUDE.md files. * Whatever context the lead agent passes in the prompt For a [fork](</docs/en/sub-agents#fork-the-current-conversation>), Claude Code loads the parent’s conversation so far, system prompt, and tools instead.**Context cost:** Isolated from main session.
modified Claude Code on Google Cloud's Agent Platform View current →
--- a/google-vertex-ai.md +++ b/google-vertex-ai.md @@ -172,9 +172,9 @@ * 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 a deployment that doesn’t pin a primary model is billed at the Opus rate once it updates to v2.1.207 or later. To keep 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. Before v2.1.207, the primary model defaulted to Sonnet 4.5, the `opus` alias resolved to Opus 4.6, and background tasks always used the primary model. To customize models further: +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: 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 @@ -150,7 +150,7 @@ --output-format json \ --json-schema '{"type":"object","properties":{"functions":{"type":"array","items":{"type":"string"}}},"required":["functions"]}' -If the value isn’t a valid JSON Schema, `claude` exits with `Error: --json-schema is not a valid JSON Schema` followed by the validator’s diagnostic. Claude Code accepts schemas that use the `format` keyword, such as `"format": "email"`, but treats `format` as an annotation and doesn’t enforce it. Before v2.1.205, Claude Code silently ignored an invalid schema and returned unstructured text, and treated any schema containing `format` as invalid. +If the value isn’t a valid JSON Schema, `claude` exits with `Error: --json-schema is not a valid JSON Schema` followed by the validator’s diagnostic. Claude Code accepts schemas that use the `format` keyword, such as `"format": "email"`, but treats `format` as an annotation and doesn’t enforce it. Use a tool like [jq](<https://jqlang.org/>) to parse the response and extract specific fields: @@ -237,9 +237,9 @@ The `system/init` event reports session metadata including the model, tools, MCP servers, and loaded plugins. It is the first event in the stream unless startup events precede it: * `plugin_install` events, when [`CLAUDE_CODE_SYNC_PLUGIN_INSTALL`](</docs/en/env-vars>) is set. - * [`hook_started`, `hook_progress`, and `hook_response` events](</docs/en/agent-sdk/typescript#sdkhookstartedmessage>), while a configured [`SessionStart`](</docs/en/hooks#sessionstart>) or [`Setup`](</docs/en/hooks#setup>) hook runs. These stream as the hook produces them. Claude Code v2.1.169 through v2.1.203 delivered them in one batch after the hook completed, still ahead of `system/init`; v2.1.204 restored live delivery. - -The event also carries an optional `capabilities` array of strings naming the protocol behaviors this Claude Code version implements, such as `interrupt_receipt_v1` or `interrupt_cancel_queued_v1`. Check it to feature-detect instead of comparing version strings, and ignore values you don’t recognize. The field requires Claude Code v2.1.205 or later and is absent from earlier versions. See [`SDKSystemMessage`](</docs/en/agent-sdk/typescript#sdksystemmessage>) for the capability list. + * [`hook_started`, `hook_progress`, and `hook_response` events](</docs/en/agent-sdk/typescript#sdkhookstartedmessage>), while a configured [`SessionStart`](</docs/en/hooks#sessionstart>) or [`Setup`](</docs/en/hooks#setup>) hook runs. These stream as the hook produces them. + +The event also carries an optional `capabilities` array of strings naming the protocol behaviors this Claude Code version implements, such as `interrupt_receipt_v1` or `interrupt_cancel_queued_v1`. Check it to feature-detect instead of comparing version strings, and ignore values you don’t recognize. See [`SDKSystemMessage`](</docs/en/agent-sdk/typescript#sdksystemmessage>) for the capability list. #### @@ -333,7 +333,7 @@ * User-invoked [skills](</docs/en/skills>) and custom commands work. Include `/skill-name` in the prompt string and Claude Code expands it before running. * Built-in commands that only run in the terminal interface, such as `/login`, aren’t available. - * `/model`, `/effort`, `/fast`, `/color`, and `/rename` accept the value as an argument, for example `/model sonnet`, and `/mcp` with no argument prints a text summary of server status. These forms require Claude Code v2.1.205 or later and follow each command’s [availability notes](</docs/en/commands#all-commands>). + * `/model`, `/effort`, `/fast`, `/color`, and `/rename` accept the value as an argument, for example `/model sonnet`, and `/mcp` with no argument prints a text summary of server status. These forms follow each command’s [availability notes](</docs/en/commands#all-commands>). * To change a setting, pass `key=value` to `/config`, for example `/config thinking=false`. * `/output-style <style>` switches [output styles](</docs/en/output-styles>) and `/output-style` alone lists them. Requires Claude Code v2.1.269 or later.
modified Set up Claude Code (local mode) for a HIPAA-ready organization View current →
--- a/hipaa-setup.md +++ b/hipaa-setup.md @@ -222,6 +222,7 @@ `--cloud`, `/teleport`, and [Remote Control](</docs/en/remote-control>) are refused| [Cloud sessions](</docs/en/claude-code-on-the-web>) and Remote Control are off `/feedback` and `/bug` are unavailable| Feedback submission is off Claude can’t publish an [artifact](</docs/en/artifacts>)| Artifact publishing is off +MCP tools load into context upfront| [MCP tool search](</docs/en/mcp#configure-tool-search>) is off. Neither `ENABLE_TOOL_SEARCH` nor managed settings turns it back on An MCP server or hook that reads `ANTHROPIC_API_KEY` stops authenticating| Claude Code removes Anthropic credentials from the processes it starts Restrictions remain after `/login` to a different organization| The HIPAA status lasts until Claude Code restarts
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -482,6 +482,64 @@ ​ +You should know suggestions + +“You should know” looks for one thing you should know but might have missed, such as a tradeoff Claude chose without calling it out or a result that may be off. When it finds one, it shows a short note above the prompt input: + + ✦ Heads up · There was a change to how folder sharing starts in June, which may have bumped usage metrics artificially. + 1: Learn more 2: Knew this already 0: Dismiss + +It’s one of Claude Code’s [built-in mods](</docs/en/plugins/mods/overview#mods-built-into-claude-code>), a plugin built into Claude Code that is off by default. Requires Claude Code v2.1.287 or later. While it’s on, a side agent rereads the conversation from time to time as Claude works through a longer task. The side agent is a separate request to the same model and has no tools, so it can’t read files, run commands, or change what Claude does. If the mod is available for your organization, `/plugin` lists it when you connect to the Claude API directly with a claude.ai account or a Console API key. It doesn’t when you connect through an [LLM gateway](</docs/en/llm-gateway>) or a [Claude apps gateway](</docs/en/claude-apps-gateway>), or get your key from an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>). Even with a direct connection, these sessions don’t list it: + + * A session that [doesn’t fetch the feature flags](</docs/en/env-vars#features-that-need-feature-flag-fetching>) the mod depends on, such as one with `DISABLE_TELEMETRY` set + * A [first session after an install or upgrade](</docs/en/env-vars#first-session-after-an-install-or-upgrade>) whose flags haven’t arrived yet + +To turn it on, run this at the Claude Code prompt: + + /plugin enable cc-plugin-you-should-know@builtin + +Where `/plugin` doesn’t list the mod, the enable command answers `Plugin "cc-plugin-you-should-know@builtin" is not installed in this project`. + +### + +​ + +Cost of checks + +While the mod is on, checks are background requests to the same model your session is using, and they count toward your plan’s usage limits or your API costs. Each check sends what’s already in Claude’s context, meaning the conversation so far with its tool results, followed by the mod’s own instructions and the text of your recent notes. The conversation part is read from the session’s [prompt cache](</docs/en/prompt-caching>) on the same terms as Claude’s own next request. The instructions, several thousand tokens of them, and the side agent’s reply are billed in full on every check. To watch the checks happen, set [`CLAUDE_CODE_YOU_SHOULD_KNOW_DEBUG=1`](</docs/en/env-vars>) in your shell before you start Claude Code. + +### + +​ + +Answer a note + +Type the choice’s digit on its own into an empty prompt input. A note offers these choices: + + * **Learn more** : opens a short explanation under the note, with its own choices: + * **Understood** : closes it and marks the topic as known + * **Chat in main session** : quotes the note into your prompt input so you can add a question and send it to Claude + * **Dismiss** : closes it without marking the topic as known + * **Knew this already** : closes the note and marks the topic as known. + * **Dismiss** : closes the note. + +The main agent doesn’t see a note unless you send it with **Chat in main session**. Claude Code keeps your recent notes and the topics you marked as known in a file whose name starts with `cc-plugin-you-should-know` under `~/.claude/plugins/store/`. Each check, in this session and later ones, lists them to the side agent as ones not to repeat. Claude Code deletes the file once it has gone [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) without a session reading or writing it. To clear them sooner, delete that file while no session is running. + +### + +​ + +Turn off You should know + +To turn off You should know, use either of the following: + + * At the Claude Code prompt, run `/plugin disable cc-plugin-you-should-know@builtin`, or turn it off from the **Installed** tab of `/plugin` + * After you choose **Dismiss** on a note without opening **Learn more** first, choose **Turn off suggestions** on the `Dismissed.` line, which clears after 20 seconds + +## + +​ + 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.
modified Set up Claude Code in a monorepo or large codebase View current →
--- a/large-codebases.md +++ b/large-codebases.md @@ -223,7 +223,7 @@ } } -When Claude creates a worktree, it checks out only `.claude/`, `packages/api/`, and `packages/shared/` instead of the full tree. Paths in `sparsePaths` are relative to the repository root, regardless of which subdirectory you start Claude from. Any directory paths work here, not only package roots. This is particularly useful for [subagent worktree isolation](</docs/en/worktrees#isolate-subagents-with-worktrees>). Subagents are parallel Claude instances spawned for subtasks, and each one that runs in a worktree gets a lightweight checkout instead of the full tree. All worktrees in a session share the same `sparsePaths`, so if one subagent needs `packages/api/` and another needs `packages/web/`, list both. List directories in `sparsePaths`, not individual files. Root-level files like `package.json`, `tsconfig.base.json`, and lock files are always checked out alongside the directories you list. Root-level directories are not, so include `.claude` in the list if you want the repository root’s `.claude/settings.json` or `.claude/rules/` available inside the worktree. For project skills, agents, and commands, see [What worktrees share with the main checkout](</docs/en/worktrees#what-worktrees-share-with-the-main-checkout>). Sparse checkout requires git to enable `extensions.worktreeConfig` in the repository’s shared `.git/config` while a sparse worktree exists. Claude Code removes that entry after the last worktree is removed, but only if Claude Code added it. It never removes a value you set yourself. Before v2.1.207, the entry remained after the last worktree was removed, and go-git-based tools such as `tea` failed to open the repository until you ran `git config --unset extensions.worktreeConfig`. To avoid duplicating large directories like `node_modules` across worktrees, pair `sparsePaths` with `symlinkDirectories` in the same `.claude/settings.json`: +When Claude creates a worktree, it checks out only `.claude/`, `packages/api/`, and `packages/shared/` instead of the full tree. Paths in `sparsePaths` are relative to the repository root, regardless of which subdirectory you start Claude from. Any directory paths work here, not only package roots. This is particularly useful for [subagent worktree isolation](</docs/en/worktrees#isolate-subagents-with-worktrees>). Subagents are parallel Claude instances spawned for subtasks, and each one that runs in a worktree gets a lightweight checkout instead of the full tree. All worktrees in a session share the same `sparsePaths`, so if one subagent needs `packages/api/` and another needs `packages/web/`, list both. List directories in `sparsePaths`, not individual files. Root-level files like `package.json`, `tsconfig.base.json`, and lock files are always checked out alongside the directories you list. Root-level directories are not, so include `.claude` in the list if you want the repository root’s `.claude/settings.json` or `.claude/rules/` available inside the worktree. For project skills, agents, and commands, see [What worktrees share with the main checkout](</docs/en/worktrees#what-worktrees-share-with-the-main-checkout>). Sparse checkout requires git to enable `extensions.worktreeConfig` in the repository’s shared `.git/config` while a sparse worktree exists. Claude Code removes that entry after the last worktree is removed, but only if Claude Code added it. It never removes a value you set yourself. To avoid duplicating large directories like `node_modules` across worktrees, pair `sparsePaths` with `symlinkDirectories` in the same `.claude/settings.json`: .claude/settings.json
modified Connect Claude Code to an LLM gateway View current →
--- a/llm-gateway-connect.md +++ b/llm-gateway-connect.md @@ -452,7 +452,7 @@ Microsoft Foundry -Put the gateway’s credential in `ANTHROPIC_FOUNDRY_API_KEY`; it is sent to the gateway as the `x-api-key` header. A gateway that expects a bearer token can take [`ANTHROPIC_FOUNDRY_AUTH_TOKEN`](</docs/en/env-vars>) instead. Claude Code sends that value as the `Authorization: Bearer` header, and it takes precedence over `ANTHROPIC_FOUNDRY_API_KEY` when both are set. Requires Claude Code v2.1.203 or later. For a gateway that injects its own `Authorization` header, set `CLAUDE_CODE_SKIP_FOUNDRY_AUTH=1` and leave both credential variables unset. Claude Code then sends requests without an Azure credential and preserves the `Authorization` header you supply, for example through `ANTHROPIC_CUSTOM_HEADERS`. Before v2.1.203, `CLAUDE_CODE_SKIP_FOUNDRY_AUTH` without an API key left the Microsoft Foundry client unable to send requests. +Put the gateway’s credential in `ANTHROPIC_FOUNDRY_API_KEY`; it is sent to the gateway as the `x-api-key` header. A gateway that expects a bearer token can take [`ANTHROPIC_FOUNDRY_AUTH_TOKEN`](</docs/en/env-vars>) instead. Claude Code sends that value as the `Authorization: Bearer` header, and it takes precedence over `ANTHROPIC_FOUNDRY_API_KEY` when both are set. Requires Claude Code v2.1.203 or later. For a gateway that injects its own `Authorization` header, set `CLAUDE_CODE_SKIP_FOUNDRY_AUTH=1` and leave both credential variables unset. Claude Code then sends requests without an Azure credential and preserves the `Authorization` header you supply, for example through `ANTHROPIC_CUSTOM_HEADERS`. * Bash or Zsh
modified Claude Code gateway compatibility guide View current →
--- a/llm-gateway-protocol.md +++ b/llm-gateway-protocol.md @@ -160,7 +160,7 @@ ---|--- `x-claude-code-request-class`| What kind of request this is: `main` for a turn of the main conversation, `subagent` for a turn of a [subagent](</docs/en/sub-agents>), `workflow` for an agent running inside a workflow, `compaction` for the summarization request that compacts a conversation, or `auxiliary` for side requests such as session titles, classifiers, and summaries. Sent on every request `x-claude-code-agent-type`| The kind of subagent that issued the request: a built-in agent type name such as `Explore`, `Plan`, or `general-purpose`, or `custom` for a user-defined agent, `teammate` for an [agent team](</docs/en/agent-teams>) member running in the lead’s process, or `fork` for a [fork](</docs/en/sub-agents#fork-the-current-conversation>). Present only on a subagent’s own turns; a subagent’s compaction or side requests keep the agent ID but carry no type. A user-chosen agent name is never sent -`x-claude-code-compaction`| Present on the request that summarizes the conversation during a [compaction](</docs/en/prompt-caching#compacting-the-conversation>). The value says what triggered it: `auto` when the context window approached capacity, `manual` for `/compact`, or `reactive` when the API rejected a request as too long. Absent on every other request +`x-claude-code-compaction`| Present on the request that summarizes the conversation during a [compaction](</docs/en/prompt-caching#compacting-the-conversation>). The value says what triggered it: `auto` when the context window approached capacity, `manual` for `/compact`, or `reactive` when the API rejected a request as too long. The value is also `auto` for [idle compaction](</docs/en/settings-reference#idlecompaction>). Absent on every other request `x-claude-code-context-compacted`| Present once, on the first main-conversation request after a compaction, with the same values as `x-claude-code-compaction`. The conversation prefix before this request is no longer used, so a cache keyed on it can be dropped `x-claude-code-prev-tool-durations`| Measured run time of the tool calls whose results this request carries, as `<name>=<ms>;<name>=<ms>`, for example `Bash=742;Read=9`. Sent on the next request of the same conversation after a batch of tool calls, from the main session or a subagent `x-claude-code-prompt-id`| Random UUID that identifies the user prompt a request serves. Requests serving one prompt share the value, including the turns of subagents that prompt started. Requests not attributed to a prompt omit it. Use it to group a session’s requests by prompt. Requires Claude Code v2.1.283 or later @@ -279,8 +279,9 @@ When a host platform that embeds Claude Code sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` doesn’t stop auto mode sessions on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or a [Claude apps gateway](</docs/en/claude-apps-gateway>) from asking the server for [classifier review](</docs/en/permission-modes#server-side-classifier-review>). That review adds an `anthropic-beta` value and a `safeguards` request field. Set `CLAUDE_CODE_AUTO_MODE_SERVER=0` to stop it there. On Claude Code v2.1.227 or later, your organization can keep [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) on under this variable through [managed settings](</docs/en/managed-settings>). What Claude Code sends with that override in place depends on how you connect: - * On a direct connection, or through a gateway set with `ANTHROPIC_BASE_URL`, Claude Code keeps sending the tool-search beta header, `defer_loading` tool fields, and `tool_reference` blocks, and strips the rest + * On a direct connection without the HIPAA configuration, or through a gateway set with `ANTHROPIC_BASE_URL`, Claude Code keeps sending the tool-search beta header, `defer_loading` tool fields, and `tool_reference` blocks * On a cloud provider, or signed in through a [Claude apps gateway](</docs/en/claude-apps-gateway>), the override has no effect + * In a session that [gets the HIPAA configuration](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>), the override has no effect and tool search stays off The set of capabilities Claude Code sends grows over releases. For current beta header strings, see the [beta headers reference](<https://platform.claude.com/docs/en/api/beta-headers>); test your gateway against new Claude Code releases rather than pinning to an observed list.
modified Connect to external tools with MCP View current →
--- a/mcp.md +++ b/mcp.md @@ -805,7 +805,7 @@ asyncio.run(main()) -A remote server’s status can also change after it reports `"connected"`. When the connection to it drops mid-session, Claude Code moves the server back to `"pending"` while [reconnecting](</docs/en/mcp#automatic-reconnection>). A later `mcpServerStatus()` call in TypeScript, or [`ClaudeSDKClient.get_mcp_status()`](</docs/en/agent-sdk/python#methods>) in Python, can then report `"pending"` for a server you saw connected earlier, with no configuration change on your side. After five reconnection attempts fail, the server reports `"failed"`, or `"needs-auth"` when it needs authorizing again. To retry manually, call [`reconnectMcpServer()`](</docs/en/agent-sdk/typescript#methods>) in TypeScript or [`ClaudeSDKClient.reconnect_mcp_server()`](</docs/en/agent-sdk/python#methods>) in Python. +A remote server’s status can also change after it reports `"connected"`. When the connection to it drops mid-session, Claude Code moves the server back to `"pending"` while [reconnecting](</docs/en/mcp#automatic-reconnection>). A later `mcpServerStatus()` call in TypeScript, or [`ClaudeSDKClient.get_mcp_status()`](</docs/en/agent-sdk/python#methods>) in Python, can then report `"pending"` for a server you saw connected earlier, with no configuration change on your side. After five reconnection attempts fail, the server reports `"failed"`, or `"needs-auth"` when it needs authorizing again. A `"failed"` HTTP or SSE server can still return to `"connected"` without a call from you, because Claude Code keeps [retrying in the background](</docs/en/mcp#mid-session-drops-of-a-remote-server>) after a transient error. To retry manually, call [`reconnectMcpServer()`](</docs/en/agent-sdk/typescript#methods>) in TypeScript or [`ClaudeSDKClient.reconnect_mcp_server()`](</docs/en/agent-sdk/python#methods>) in Python. ##
modified How Claude remembers your project View current →
--- a/memory.md +++ b/memory.md @@ -216,7 +216,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/**`. Before v2.1.207, one invalid pattern made the Read tool fail for every file the rule was evaluated against, instead of matching nothing. +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/**`. #### @@ -359,7 +359,7 @@ * **At session start** : every `AGENTS.md` and `.claude/AGENTS.md` in your working directory and the directories above it. In an interactive session you see a line such as `no CLAUDE.md found; AGENTS.md loaded: /home/you/repo/AGENTS.md` in the conversation * **As Claude works in subdirectories** : a subdirectory’s `AGENTS.md`, when Claude opens a file there with the Read tool and that subdirectory has none of the three `CLAUDE.md` files of its own - * **Inside each`AGENTS.md`**: `@path` imports are expanded, `claudeMdExcludes` patterns apply, and subagents that [skip project instructions](</docs/en/sub-agents#what-loads-at-startup>) skip these files too + * **Inside each`AGENTS.md`**: `@path` imports are expanded, `claudeMdExcludes` patterns apply, and subagents that [start without project instructions](</docs/en/sub-agents#what-loads-at-startup>) start without these files too * **Not read** : `AGENTS.local.md`, `AGENTS.override.md`, or anything under a `.agents/` directory Because `CLAUDE.local.md` counts, adding one to keep your own uncommitted instructions in a project that relies on `AGENTS.md` stops Claude from reading `AGENTS.md` for you. To keep your `CLAUDE.local.md` and still have Claude read `AGENTS.md`, set **Project instructions** to `claude-md-and-agents-md`. @@ -610,7 +610,7 @@ My CLAUDE.md is too large -Files over 200 lines consume more context and may reduce adherence. Claude Code skips a file over 4 MiB. Use path-scoped rules to load instructions only when Claude works with matching files, or trim content that isn’t needed in every session. Splitting into `@path` imports helps organization but doesn’t reduce context, since imported files load at launch. If one of your instruction files is over the recommended length, you see a warning at startup and when you run `/status`. You also see a warning when files that are each within that length add up past a combined limit at session start. Each CLAUDE.md, rules file, and `@path` import counts as a separate file. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can derive from the codebase, such as directory layouts, dependency lists, and architecture overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults. The trim check requires Claude Code v2.1.206 or later. +Files over 200 lines consume more context and may reduce adherence. Claude Code skips a file over 4 MiB. Use path-scoped rules to load instructions only when Claude works with matching files, or trim content that isn’t needed in every session. Splitting into `@path` imports helps organization but doesn’t reduce context, since imported files load at launch. If one of your instruction files is over the recommended length, you see a warning at startup and when you run `/status`. You also see a warning when files that are each within that length add up past a combined limit at session start. Each CLAUDE.md, rules file, and `@path` import counts as a separate file. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can derive from the codebase, such as directory layouts, dependency lists, and architecture overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults. ###
modified Claude Code on Microsoft Foundry View current →
--- a/microsoft-foundry.md +++ b/microsoft-foundry.md @@ -81,7 +81,7 @@ Use a bearer token -Claude Code sends the value of `ANTHROPIC_FOUNDRY_AUTH_TOKEN` on every request as the `Authorization: Bearer` header. Use this option when another process, such as a host application or a sign-in script, has already obtained an access token for you. Requires Claude Code v2.1.203 or later. Set the variable to a bearer token that Microsoft Entra ID issued for your resource: +Claude Code sends the value of `ANTHROPIC_FOUNDRY_AUTH_TOKEN` on every request as the `Authorization: Bearer` header. Use this option when another process, such as a host application or a sign-in script, has already obtained an access token for you. Set the variable to a bearer token that Microsoft Entra ID issued for your resource: export ANTHROPIC_FOUNDRY_AUTH_TOKEN=your-entra-access-token
modified Model configuration View current →
--- a/model-config.md +++ b/model-config.md @@ -720,6 +720,8 @@ * Models running with a native 1M window compact before the window fills, at about 967K tokens by default. These include the Fable models, Sonnet 5 and later, Haiku 5.5, and Opus 4.7 and later. Behind a custom `ANTHROPIC_BASE_URL`, see the context window behind a gateway * Sessions on a model ID Claude Code doesn’t recognize, such as an [LLM gateway](</docs/en/llm-gateway>) alias, compact at the context window Claude Code assumes for the ID; see Correct the window for a gateway or custom model ID +See the [`idleCompaction`](</docs/en/settings-reference#idlecompaction>) setting for when Claude Code also compacts a conversation you leave idle. + ### ​
modified Monitoring View current →
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -561,8 +561,8 @@ * `prompt.id`: UUID correlating a user prompt with all subsequent events until the next prompt. See Event correlation attributes. * `workspace.host_paths`: host workspace directories selected in the desktop app, as a string array - * `workflow.run_id`: run identifier, prefixed `wf_`, on the API and tool events emitted by agents that belong to a [Workflow](</docs/en/workflows>) tool run. Filtering events by one `workflow.run_id` reconstructs that run’s API requests and tool results. The identifier covers the agents the workflow script spawns and any agents those spawn in turn, such as skill invocations. It matches the run identifier reported in the Workflow tool result. Absent on all other events. Requires Claude Code v2.1.202 or later - * `workflow.name`: name of the workflow, its script’s `meta.name`, emitted alongside `workflow.run_id`. Built-in workflow names appear verbatim when the run executes the unmodified built-in script. User-authored names, including edited copies of built-in scripts, are replaced with `custom` unless `OTEL_LOG_TOOL_DETAILS=1` is set. Requires Claude Code v2.1.202 or later + * `workflow.run_id`: run identifier, prefixed `wf_`, on the API and tool events emitted by agents that belong to a [Workflow](</docs/en/workflows>) tool run. Filtering events by one `workflow.run_id` reconstructs that run’s API requests and tool results. The identifier covers the agents the workflow script spawns and any agents those spawn in turn, such as skill invocations. It matches the run identifier reported in the Workflow tool result. Absent on all other events. + * `workflow.name`: name of the workflow, its script’s `meta.name`, emitted alongside `workflow.run_id`. Built-in workflow names appear verbatim when the run executes the unmodified built-in script. User-authored names, including edited copies of built-in scripts, are replaced with `custom` unless `OTEL_LOG_TOOL_DETAILS=1` is set. #### @@ -1238,7 +1238,7 @@ * `pre_tokens`: Approximate token count before compaction * `post_tokens`: Approximate token count after compaction * `error`: Error message when compaction failed - * `precompute_reuse`: Only set when `trigger` is `"manual"`. Auto-compaction can prepare a summary in the background before the context window fills, and this attribute records whether `/compact` reused that prepared summary. `"hit"` means it was reused; `"miss_custom_instructions"`, `"miss_hook"`, and `"miss_not_ready"` give the reason a fresh summary was computed instead + * `precompute_reuse`: Only set when `trigger` is `"manual"` or for an [idle compaction](</docs/en/settings-reference#idlecompaction>), which reports `trigger` as `"auto"`. Auto-compaction can prepare a summary in the background before the context window fills, and this attribute records whether the compaction reused that prepared summary. `"hit"` means it was reused; `"miss_custom_instructions"`, `"miss_hook"`, and `"miss_not_ready"` give the reason a fresh summary was computed instead ####
modified Choose a permission mode View current →
--- a/permission-modes.md +++ b/permission-modes.md @@ -187,7 +187,6 @@ * **[Remote Control](</docs/en/remote-control>) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can’t select Bypass permissions from the app. To use Auto, the session has to meet the auto mode availability requirements. For a project thread running on your computer, see [Run a thread on your own computer](</docs/en/claude-projects#run-a-thread-on-your-own-computer>). * Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal. * Sessions hosted by the [desktop app](</docs/en/desktop>) or the [VS Code extension](</docs/en/vs-code>) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal. - * Before v2.1.202, sessions connected with `/remote-control` or `claude --remote-control` didn’t report their permission mode at all, so claude.ai and the mobile app could show a permission mode the session wasn’t in. The mismatch affected only the label. Claude Code generated permission prompts from the session’s actual permission mode, and they still appeared in the app for approval. For Remote Control, the local machine running the session must be signed in with your claude.ai account; API keys aren’t supported. You can also set the starting permission mode when launching that local session: @@ -268,7 +267,7 @@ Auto mode on Bedrock, Agent Platform, or Foundry -On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward. +On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode is available by default. When nothing else sets a permission mode, it’s also the built-in starting permission mode, on the versions that section’s table lists. To choose the starting permission mode yourself, set `permissions.defaultMode` as Start in a different permission mode describes, or pick a permission mode from the VS Code extension’s mode indicator. Only Claude Sonnet 5 or later, Opus 4.7 or later, Haiku 5.5, and the Fable models are supported on these providers. On any other model, the session starts in Manual instead. Auto mode with Haiku 5.5 on these providers requires Claude Code v2.1.293 or later. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. A session already running in auto mode leaves it when the setting reaches that session from an [admin-deployed source](</docs/en/managed-settings#which-managed-source-claude-code-uses>), and shows `auto mode disabled by settings`. Before v2.1.251, a running session kept auto mode until it ended. ### @@ -326,25 +325,19 @@ * Launching an autonomous agent loop that runs without human approval or a sandbox, such as one started with `--dangerously-skip-permissions` or `--no-sandbox`. This includes running a third-party agent or eval harness with isolation and per-action approval disabled, such as a runner started with `--yes-always` * [Claude in Chrome](</docs/en/chrome>) browser actions that could send page content, cookies, or credentials off-origin * Deleting files in `/tmp`, `$TMPDIR`, or another shared scratch or cache directory by wildcard, glob, or age filter rather than by a specific named path - * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary. That check requires Claude Code v2.1.203 or later + * Including sensitive details in content sent, uploaded, published, or written to other people or shared systems, when your own message didn’t authorize those details for that recipient. PR and issue bodies, commit messages, and comments count as this kind of outbound content when the repository is outside the trust boundary or public, including your organization’s own public repositories; internal file paths, code names, live API response data such as emails or account identifiers, and infrastructure identifiers count as sensitive details. Live personal data from an API response in a PR or issue body, such as an email address, an account or organization identifier, or a usage metric, requires you to name those details and the recipient regardless of the repository’s visibility or trust boundary * Sending keystrokes to Claude Code’s own tmux pane to drive its own interface, which the classifier treats as Claude changing its own permissions or oversight * Commenting out, deleting, or force-passing a test or assertion that guards security behavior, such as auth, access control, input validation, or sandboxing * Deleting or tearing down a stateful resource Claude didn’t create in the session, when no more specific deletion rule applies and you didn’t name that resource * Repointing an API base URL, proxy endpoint, webhook receiver, or registry mirror at a third-party host that doesn’t fit the task, including in example files like `.env.example` * Changing where pushes go with `git remote set-url` or `git remote add`, unless you named the new remote - * Pushing secrets or personal or entrusted data to a repository known to be public, or pushing confidential material there that isn’t part of that repository’s own work. A dotfiles repository’s own subject matter is the one exception for personal or entrusted data, and content from a private repository reaching any public surface is blocked the same way; both refinements require Claude Code v2.1.203 or later. Before v2.1.203, personal data was grouped with confidential material and blocked only when it wasn’t part of that repository’s own work. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead + * Pushing secrets or personal or entrusted data to a repository known to be public, or pushing confidential material there that isn’t part of that repository’s own work. A dotfiles repository’s own subject matter is the one exception for personal or entrusted data, and content from a private repository reaching any public surface is blocked the same way. When a repository’s visibility isn’t established, the classifier doesn’t block on that alone; it judges the content against the other rules instead * Opening a pull request against a different repository or organization, forking with `gh repo fork`, or pushing to a third-party repository, unless you named that external target - -Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.203 and later also block these by default: - * Content from a sensitive local store, or from a file whose name, path, or type marks it as sensitive, entering a commit, a push, PR or issue text, a gist or paste, or a package publish, unless you named both the source and the destination. Session transcripts and conversation logs, credential and configuration dot-folders such as SSH keys, cloud credentials, browser profiles, and shell history, and user-data exports all count, and the repository being private doesn’t clear it - -Claude Code v2.1.205 and later also block these by default: - * Writing to Claude Code session transcripts, the `.jsonl` history files under `~/.claude/projects/` or your configured config directory, whether directly or through a shell command. The rule also covers the metadata lines Claude Code appends to each transcript entry for its own checks. Reading a transcript isn’t blocked * A recursive forced delete such as `rm -rf "$VAR"` or `Remove-Item -Recurse -Force $dir` whose target is a shell variable that isn’t assigned anywhere in the conversation the classifier sees, or a glob rooted at such a variable. The value came only from earlier command output, which the classifier never receives, so the classifier can’t verify the deletion target against the other deletion rules. The block clears when you name the exact path being deleted, or when Claude re-runs the delete with the resolved literal path written into the command. Deletes whose target the classifier can resolve aren’t affected. A glob directly under the variable, as in `rm -rf "$VAR"/*`, is a critical path instead. `Remove-Item` targets that are a bare `*` or end in `/*` or `\*` never reach the classifier: Claude Code denies them outright. -Claude Code v2.1.257 and later also block these by default: +Several of these categories depend on [environment](</docs/en/auto-mode-config#define-trusted-infrastructure>) entries, such as sensitive remote targets and protected IaC scopes, that you can narrow to concrete names. Claude Code v2.1.257 and later also block these by default: * Requesting credentials from the cloud instance-metadata endpoint, such as `169.254.169.254`, or explicitly authenticating a cloud, cluster, or registry call with the machine’s own service-account or node identity * Reaching a public host by a route other than a direct request, such as a tunnel, a reverse shell, or a resolver or proxy configuration rewritten to point outside @@ -361,7 +354,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. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default, and before v2.1.203 any direct push to the default branch was blocked + * 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. The push’s content is still checked against the other rules, [`permissions.deny` rules](</docs/en/permissions#manage-permissions>) can still block push commands [as written](</docs/en/permissions#bash-rule-limits>) in every mode, and the remote’s own branch protection still applies. Before v2.1.211, only pushes to the branch you started on, branches Claude created, and routine pushes to the default branch were allowed by default * 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
modified Test plugins with evals View current →
--- a/plugin-evals.md +++ b/plugin-evals.md @@ -690,6 +690,18 @@ ​ +“cannot be evaluated where sessions load it” + +You ran `claude plugin eval` in your shell with the name of a plugin installed from a marketplace you [added from a local path](</docs/en/plugins/loading#in-place-and-copied-plugins>). No session could load the plugin from that marketplace now, so the command refuses with this message and exits with code 1. + + Error: formatter@my-marketplace cannot be evaluated where sessions load it: no session could load it now. Its marketplace is a folder whose catalog could not be read, or lists it no more. Check the marketplace with `claude plugin marketplace list`, or pass ./<dir> to evaluate a directory. + +The sentence after `no session could load it now.` names what failed. Run `claude plugin marketplace list` in your shell and fix what the message names. For example, restore the marketplace directory or put the plugin’s entry back in its catalog. To evaluate the plugin’s source without the marketplace, pass its directory as the target, such as `claude plugin eval ./plugins/formatter`. + +### + +​ + ”No eval cases found” No `<case>/prompt.md` or `<case>/case.yaml` exists beneath the eval directory in effect, or your `--case` and `--tag` filters matched no case. Run from the plugin root, or run `claude plugin eval init` to create a suite.
modified How Claude Code uses prompt caching View current →
--- a/prompt-caching.md +++ b/prompt-caching.md @@ -179,6 +179,8 @@ Compaction works in your favor when the context you discard is content you no longer need. To choose when its overhead happens, run `/compact` at a natural break in your work, such as between tasks, instead of waiting for auto-compaction to trigger mid-task. If you’ve gone down a path you want to abandon entirely, `/rewind` to an earlier turn instead. Rewinding truncates back to a prefix that is already cached, rather than building a new one as compaction does. +If you leave a long conversation idle in a terminal session while it is on the one-hour TTL, Claude Code can compact it shortly before the cache expires. To turn idle compaction off, set [`idleCompaction`](</docs/en/settings-reference#idlecompaction>) to `false`, which requires Claude Code v2.1.290 or later. + ### ​
modified Continue local sessions from any device with Remote Control View current →
--- a/remote-control.md +++ b/remote-control.md @@ -323,7 +323,7 @@ Limitations * **One remote session per interactive process** : outside of server mode, each Claude Code instance supports one remote session at a time. Use server mode to run multiple concurrent sessions from a single process. - * **Local process must keep running** : Remote Control runs as a local process. If you close the terminal, quit the Desktop app or VS Code, or otherwise stop the `claude` process, the session goes offline until you bring it back. If you run `claude` from a terminal on a remote machine, start it inside `tmux` or `screen` to keep the session running after you disconnect from SSH. + * **Local process must keep running** : Remote Control runs as a local process. If you close the terminal, quit the Desktop app or VS Code that runs the session on your machine, or otherwise stop the `claude` process, the session goes offline until you bring it back. If you run `claude` from a terminal on a remote machine, start it inside `tmux` or `screen` to keep the session running after you disconnect from SSH. * **Crashed sessions in server mode** : if a session served by `claude remote-control` crashes, send it a message from a connected device. Claude Code serves it again. You don’t have to restart the server. Requires Claude Code v2.1.238 or later. * **HTTP 403 refusals on a connected session** : once an interactive session is connected, Claude Code keeps retrying for up to three minutes when something between your machine and Anthropic’s servers answers with HTTP 403, as can happen after a VPN or network change. If the refusals last longer, Claude Code disconnects, and the reason names what refused: a network edge, or a proxy, VPN, or firewall on your own network. * **Extended network outage** : if your machine is awake but can’t reach the network, what you do next depends on the mode:
modified Automate work with routines View current →
--- a/routines.md +++ b/routines.md @@ -22,15 +22,7 @@ Create a routine -Create a routine from the web at [claude.ai/code/routines](<https://claude.ai/code/routines>), from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a routine you create in one shows up in the others immediately. In the Desktop app’s **Code** tab, click **Routines** in the sidebar or in the sidebar’s **More** menu, then **New routine** , and choose **Cloud** ; choosing **Local** instead creates a [Desktop scheduled task](</docs/en/desktop-scheduled-tasks>), which runs on your machine rather than in the cloud. The creation form sets up the routine’s prompt, repositories, environment, connectors, and triggers. Routines run autonomously as full Claude Code cloud sessions: there is no permission-mode picker, and the session runs shell commands, uses [skills](</docs/en/skills>) committed to the cloned repository, and calls any connectors you include, all without stopping for approval apart from some [artifact](</docs/en/artifacts>) actions. What a routine can reach is determined by the repositories you select, the [environment’s](</docs/en/cloud-environments>) network access and variables, and the connectors you include. Scope each of those to what the routine actually needs. When the routine’s schedule or **Run now** starts a run, Claude republishes an existing artifact without asking only when all of these hold: - - * You can edit the artifact and it belongs to your own organization - * The artifact isn’t shared publicly - * If the artifact is shared with specific people or your organization, its viewers don’t automatically see each new version - * The publish carries only the page, with no supporting files or anything else added, and doesn’t force over a newer version - * The page holds no grant that reaches beyond the page, such as [connector calls](</docs/en/artifacts#pull-live-data-with-mcp-connectors>) - -In every other case, including publishing a new artifact, Claude asks first. When a routine’s job is to keep a page current, give it an artifact you already published. Routines belong to your individual claude.ai account. They are not shared with teammates, and their runs count against your account’s usage and limits. Anything a routine does through your connected GitHub identity or connectors appears as you: commits and pull requests carry your GitHub user, and Slack messages, Linear tickets, or other connector actions use your linked accounts for those services. +Create a routine from the web at [claude.ai/code/routines](<https://claude.ai/code/routines>), from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a routine you create in one shows up in the others immediately. In the Desktop app’s **Code** tab, click **Routines** in the sidebar or in the sidebar’s **More** menu, then **New routine** , and choose **Cloud** ; choosing **Local** instead creates a [Desktop scheduled task](</docs/en/desktop-scheduled-tasks>), which runs on your machine rather than in the cloud. The creation form sets up the routine’s prompt, repositories, environment, connectors, and triggers. Routines run autonomously as full Claude Code cloud sessions: there is no permission-mode picker, and the session runs shell commands, uses [skills](</docs/en/skills>) committed to the cloned repository, and calls any connectors you include, all without stopping for approval apart from some artifact actions. What a routine can reach is determined by the repositories you select, the [environment’s](</docs/en/cloud-environments>) network access and variables, and the connectors you include. Scope each of those to what the routine actually needs. Routines belong to your individual claude.ai account. They are not shared with teammates, and their runs count against your account’s usage and limits. Anything a routine does through your connected GitHub identity or connectors appears as you: commits and pull requests carry your GitHub user, and Slack messages, Linear tickets, or other connector actions use your linked accounts for those services. ### @@ -142,7 +134,7 @@ Add an API trigger -An API trigger gives a routine a dedicated HTTP endpoint. POSTing to the endpoint with the routine’s bearer token starts a new session and returns a session URL. Use this to wire Claude Code into alerting systems, deploy pipelines, internal tools, or anywhere you can make an authenticated HTTP request. API triggers are added to an existing routine from the web. The CLI cannot currently create or revoke tokens. +An API trigger gives a routine a dedicated HTTP endpoint. POSTing to the endpoint with the routine’s bearer token starts a new session and returns a session URL. Use this to wire Claude Code into alerting systems, deploy pipelines, internal tools, or anywhere you can make an authenticated HTTP request. API triggers are added to an existing routine from the web. The CLI can’t currently create, regenerate, or delete tokens. 1 @@ -168,7 +160,10 @@ Send the token in the `Authorization: Bearer` header when you POST to the URL. The Trigger a routine section below shows a complete example. -Each routine has its own token, scoped to triggering that routine only. To rotate or revoke it, return to the same modal and click **Regenerate** or **Revoke**. +Each routine has its own token, scoped to triggering that routine only. To turn off API access or rotate the token, return to the same modal: + + * **Turn off API access** : click **Delete token** , the trash icon next to **Regenerate** + * **Rotate the token** : click **Regenerate** #### @@ -337,6 +332,24 @@ ​ +When a run publishes an artifact without asking + +When a routine’s schedule or **Run now** starts a run, Claude can publish a new [artifact](</docs/en/artifacts>) without asking. The new artifact is visible only to you until you [share it](</docs/en/artifacts#share-an-artifact>). If the publish declares runtime capabilities for the page, such as [connector calls](</docs/en/artifacts#pull-live-data-with-mcp-connectors>) or [file downloads](</docs/en/artifacts#offer-a-file-download>), Claude asks first. In those runs, Claude republishes an existing artifact without asking only when all of these hold: + + * You can edit the artifact and it belongs to your own organization + * If the publish carries more than the page, such as supporting files, you own the artifact + * The artifact isn’t shared publicly + * If the artifact is shared with specific people or your organization, its viewers don’t automatically see each new version + * The publish doesn’t force over a newer version + * The publish doesn’t declare runtime capabilities for the page + * The existing page holds no grant that reaches beyond the page, such as [connector calls](</docs/en/artifacts#pull-live-data-with-mcp-connectors>) + +In every other case, including a run that an API or GitHub trigger starts, Claude asks first. When a routine’s job is to keep a page current, give it an artifact you already published. + +### + +​ + Environments and network access Each routine uses a [cloud environment](</docs/en/cloud-environments>) that controls network access, environment variables, and setup scripts. The routine inherits the environment’s network policy on every run. The **Default** environment uses **Trusted** network access, which allows only the [default allowlist](</docs/en/cloud-environments#default-allowed-domains>) through the session’s network. Requests on that path to hosts outside the allowlist fail with `403` and `x-deny-reason: host_not_allowed`. MCP connector traffic is routed through Anthropic’s servers rather than that path, so the connectors you add to the routine work without adding their hosts to **Allowed domains**. Remove any connectors you don’t need under Connectors. To allow additional domains on one of your own environments, follow these steps. An [organization-shared environment](</docs/en/cloud-environments#organization-shared-environments>) opens read-only here, so an Owner changes its network access from the **Cloud environments** page in [admin settings](<https://claude.ai/admin-settings>) instead.
modified All settings View current →
Show diff (108 lines)
--- a/settings-reference.md +++ b/settings-reference.md @@ -111,6 +111,7 @@ `gcpAuthRefresh`| Refresh [Google Cloud credentials](</docs/en/google-vertex-ai#advanced-credential-configuration>) with your own command| Authentication and providers| Any file `hooks`| Run your own commands as [hooks](</docs/en/hooks>) at points in Claude Code’s lifecycle| Hooks and automation| Any file `httpHookAllowedEnvVars`| Limit which env vars [HTTP hooks](</docs/en/hooks>) can put in headers| Hooks and automation| Any file +`idleCompaction`| Stop Claude Code from compacting a long conversation while your terminal session is idle| Memory and context| Any file `includeCoAuthoredBy`| Deprecated; use `attribution` to hide or change commit and PR attribution| Git and attribution| Any file `includeGitInstructions`| Remove the built-in commit and PR instructions from Claude’s context| Git and attribution| Any file `inputNeededNotifEnabled`| Get a [push notification](</docs/en/remote-control#mobile-push-notifications>) when Claude is waiting on you| Remote, desktop, and notifications| Any file @@ -850,7 +851,7 @@ * `true`: sessions start with ultracode on when dynamic workflows are enabled for you and your model supports `xhigh` * `false`: sessions start with ultracode off * **Default** : unset, so ultracode is off - * **Per-session overrides** : `/effort ultracode` turns ultracode on for one session without this key, and `/effort ultracode off` turns it off for one session when this key is `true`. The `--effort ultracode` flag also turns it on for one session, at `xhigh` effort, and requires Claude Code v2.1.203 or later + * **Per-session overrides** : `/effort ultracode` turns ultracode on for one session without this key, and `/effort ultracode off` turns it off for one session when this key is `true`. The `--effort ultracode` flag also turns it on for one session, at `xhigh` effort settings.json @@ -2421,7 +2422,7 @@ "autoCompactEnabled": false } -The manual `/compact` command keeps working while auto-compact is off. +The manual `/compact` command keeps working while auto-compact is off. If you turn auto-compact off, idle compaction turns off too. ### @@ -2613,6 +2614,7 @@ * Variables that change how Claude Code starts or syncs, such as `CLAUDE_CODE_PROCESS_WRAPPER`, `CLAUDE_CODE_SYNC_SKILLS`, `CLAUDE_CODE_SYNC_PLUGINS`, `CLAUDE_CODE_PLUGIN_CACHE_DIR`, and `CLAUDE_CODE_PLUGIN_SEED_DIR`. * Variables that set the timers on an unanswered dialog: [`CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS`, `CLAUDE_AFK_TIMEOUT_MS`, and `CLAUDE_AFK_COUNTDOWN_MS`](</docs/en/env-vars#variables>). * [`CLAUDE_CODE_DISABLE_ATTACHMENTS`](</docs/en/env-vars#variables>), which turns off attachment processing. + * [`CLAUDE_CODE_DISABLE_FILE_MENTIONS`](</docs/en/env-vars#variables>), which stops Claude Code from expanding `@` mentions of files and directories. Before v2.1.251, project and local settings could also set the variables in this list that choose where Claude Code writes its files or that export session content, except `HOME` and `XDG_CONFIG_HOME`. Before v2.1.290, they could also set the dialog timer variables and `CLAUDE_CODE_DISABLE_ATTACHMENTS`. * Identity variables that Claude Code’s hosting environments own, such as `CLAUDE_CODE_REMOTE` and `CLAUDE_CODE_ACCOUNT_UUID`, are ignored from every file. * [`CLAUDE_CODE_MESSAGING_SOCKET` and `CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>), which Claude Code exports itself, are ignored from every file. Ignoring the socket variable requires Claude Code v2.1.224 or later, and ignoring the token requires v2.1.228 or later. @@ -2643,6 +2645,53 @@ } In a `-p` run or an Agent SDK session, Claude Code ignores this key. The SDK turns checkpointing on with its `enableFileCheckpointing` option, and a bare `-p` run needs `CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING=true`. See [File checkpointing in the Agent SDK](</docs/en/agent-sdk/file-checkpointing>). + +### + +​ + +`idleCompaction` + +Idle compaction [compacts](</docs/en/context-window#what-survives-compaction>) a long conversation that you’ve stepped away from, shortly before its prompt cache expires. Your next message then sends a summary instead of the whole conversation. When you come back, the conversation shows `Compacted while idle, before the prompt cache expired`. Idle compaction is on by default for conversations that meet all of these conditions: + + * **Session** : you’re in an interactive terminal session + * **Prompt cache** : the conversation is on the [one-hour prompt cache TTL](</docs/en/prompt-caching#which-ttl-each-request-gets>) + * **Feature flags** : Claude Code can [fetch feature flags from Anthropic](</docs/en/env-vars#features-that-need-feature-flag-fetching>) + * **Size** : the conversation’s context has reached the token threshold, which you can change from its default of 200,000 + * **Idle time** : about 54 minutes have passed since the last request, and your computer is awake at that point + +To turn idle compaction off, set this key to `false`. + + * **Scope** : `Any file` + * **Type** : Boolean + * `true`: Claude Code compacts idle conversations that meet the conditions + * `false`: Claude Code doesn’t compact while your session is idle + * **Default** : `true` + * **Per-session overrides** : [`DISABLE_AUTO_COMPACT`](</docs/en/env-vars>) turns idle compaction off along with auto-compaction + +settings.json + + { + "idleCompaction": false + } + +The key requires Claude Code v2.1.290 or later. On an earlier version, which ignores this key, turn off `autoCompactEnabled` to stop idle compaction. + +#### + +​ + +Change the idle compaction threshold + +Set [`CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS`](</docs/en/env-vars>) to the number of tokens a conversation’s context must reach before idle compaction applies to it. Use a positive whole number. Values below `100000` are raised to `100000`, the lowest threshold. At the default, a conversation on a 200K context window auto-compacts before it reaches 200,000 tokens. This example lowers the threshold to 150,000 so that those conversations qualify: + +settings.json + + { + "env": { + "CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS": "150000" + } + } ### @@ -4750,7 +4799,7 @@ } } -Built-in plugins store their options under the same key with an `@builtin` suffix. For example, the [**Project instructions**](</docs/en/memory#choose-which-instruction-files-load>) setting that controls whether Claude Code reads `AGENTS.md` files is `pluginConfigs["cc-plugin-agents-md@builtin"].options.instructionFiles`. Before v2.1.285, the plugin’s ID was `agents-md@builtin`. Later versions read an entry under either ID. Claude Code ignores project and local entries because it substitutes these values into plugin hook, MCP, and LSP configurations, and a cloned repository must not be able to supply them. Before v2.1.207, project and local settings were also read. +Built-in plugins store their options under the same key with an `@builtin` suffix. For example, the [**Project instructions**](</docs/en/memory#choose-which-instruction-files-load>) setting that controls whether Claude Code reads `AGENTS.md` files is `pluginConfigs["cc-plugin-agents-md@builtin"].options.instructionFiles`. Before v2.1.285, the plugin’s ID was `agents-md@builtin`. Later versions read an entry under either ID. Claude Code ignores project and local entries because it substitutes these values into plugin hook, MCP, and LSP configurations, and a cloned repository must not be able to supply them. ### @@ -5295,7 +5344,7 @@ } } -Outside a git repository, a [`WorktreeCreate` hook](</docs/en/worktrees#non-git-version-control>) that fails releases the block so the session can edit the working directory in place; that release requires Claude Code v2.1.203 or later. +Outside a git repository, a [`WorktreeCreate` hook](</docs/en/worktrees#non-git-version-control>) that fails releases the block so the session can edit the working directory in place. ###
modified Advanced setup View current →
--- a/setup.md +++ b/setup.md @@ -176,7 +176,7 @@ Auto-updates -Claude Code checks for updates on startup and periodically while running. Updates download and install in the background, then take effect the next time you start Claude Code. Run `claude doctor` to see the result of the most recent update attempt. On macOS and Linux, the native installer manages the launcher at `~/.local/bin/claude` as a symlink into `~/.local/share/claude/versions/`. If you replace that launcher with your own script or symlink, auto-update and `claude update` leave it in place: new versions still install under the `versions/` directory, and your launcher decides which version runs. Before v2.1.207, the auto-updater replaced a custom launcher at that path with its own symlink on every update. With a custom launcher, Claude Code also keeps every installed version on disk because it can’t tell which version the launcher needs. `claude doctor` reports a launcher that the native installer didn’t create. To let Claude Code manage the launcher again, remove `~/.local/bin/claude` and run `claude update`. If an npm global install can’t auto-update because the npm global directory isn’t writable, Claude Code shows a one-time notice at startup, and `claude doctor` lists the available fixes. See [permission errors during installation](</docs/en/troubleshoot-install#permission-errors-during-installation>) for details. +Claude Code checks for updates on startup and periodically while running. Updates download and install in the background, then take effect the next time you start Claude Code. Run `claude doctor` to see the result of the most recent update attempt. On macOS and Linux, the native installer manages the launcher at `~/.local/bin/claude` as a symlink into `~/.local/share/claude/versions/`. If you replace that launcher with your own script or symlink, auto-update and `claude update` leave it in place: new versions still install under the `versions/` directory, and your launcher decides which version runs. With a custom launcher, Claude Code also keeps every installed version on disk because it can’t tell which version the launcher needs. `claude doctor` reports a launcher that the native installer didn’t create. To let Claude Code manage the launcher again, remove `~/.local/bin/claude` and run `claude update`. If an npm global install can’t auto-update because the npm global directory isn’t writable, Claude Code shows a one-time notice at startup, and `claude doctor` lists the available fixes. See [permission errors during installation](</docs/en/troubleshoot-install#permission-errors-during-installation>) for details. Homebrew, WinGet, apt, dnf, and apk installations do not auto-update by default; see below to opt in for Homebrew and WinGet. To upgrade Homebrew manually, run `brew upgrade claude-code` or `brew upgrade claude-code@latest`, depending on which cask you installed. For WinGet, run `winget upgrade Anthropic.ClaudeCode`. For Linux package managers, see the upgrade commands in Install with Linux package managers.To have Claude Code run the upgrade command for you on Homebrew or WinGet, set [`CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE`](</docs/en/env-vars>) to `1`. Claude Code then runs the upgrade in the background when a new version is available and shows a restart prompt on success. The upgrade targets only the Claude Code package and does not affect other software you have installed.On WinGet the upgrade may fail while Claude Code is running because Windows locks the executable. In that case Claude Code shows the manual command instead. apt, dnf, and apk continue to require a manual upgrade because those commands need elevated privileges.**Known issue:** Claude Code may notify you of updates before the new version is available in these package managers. If an upgrade fails, wait and try again later.Homebrew keeps old versions on disk after upgrades. Run `brew cleanup` periodically to reclaim disk space.
modified Customize your status line View current →
--- a/statusline.md +++ b/statusline.md @@ -1142,9 +1142,9 @@ `description`| string| Short description of the task, such as the one Claude gave when it spawned the subagent `label`| string| Short progress summary of the task when Claude Code has one, otherwise the same text as `description` `startTime`| number| When the task started, in milliseconds since the Unix epoch -`model`| string, optional| ID of the resolved model the task runs on. Omitted until the model is resolved. Requires Claude Code v2.1.205 or later +`model`| string, optional| ID of the resolved model the task runs on. Omitted until the model is resolved `effort`| string or number, optional| Reasoning effort set for the subagent in its [definition frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>) or on the individual invocation: `low`, `medium`, `high`, `xhigh`, `max`, or a numeric token budget. This is the configured value, and the effort Claude Code applies can differ when the model doesn’t support that level. Omitted when no effort is set. Requires Claude Code v2.1.213 or later -`contextWindowSize`| number, optional| Context window of `model` in tokens, computed the same way as the main status line’s `context_window.context_window_size`, so you can render a per-row percentage from `tokenCount`. Omitted when `model` is. Requires Claude Code v2.1.205 or later +`contextWindowSize`| number, optional| Context window of `model` in tokens, computed the same way as the main status line’s `context_window.context_window_size`, so you can render a per-row percentage from `tokenCount`. Omitted when `model` is `tokenCount`| number| Running token count of the subagent, the figure the default row shows `tokenSamples`| array of numbers| Up to the last 16 `tokenCount` readings, one per refresh tick, oldest first and ending with the current one `cwd`| string| Working directory of the subagent: its own directory when it runs in one, such as an isolated worktree, otherwise the session’s working directory
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -18,7 +18,7 @@ Built-in subagents -Claude Code includes built-in subagents that Claude automatically uses when appropriate. Each inherits the parent conversation’s permission rules; most run with a restricted tool set. Explore and Plan skip your CLAUDE.md files and the git status snapshot to keep research fast and inexpensive. Every other built-in and custom subagent loads both, unless its definition sets the `omitClaudeMd` field to skip the user, project, and local CLAUDE.md files. For the full breakdown of what reaches a subagent, see what loads at startup. +Claude Code includes built-in subagents that Claude automatically uses when appropriate. Each inherits the parent conversation’s permission rules; most run with a restricted tool set. Explore and Plan start without your CLAUDE.md files and the git status snapshot to keep research fast and inexpensive. Other built-in and custom subagents load both, unless you set `omitClaudeMd` in a custom subagent’s definition to start it without the user, project, and local CLAUDE.md files. For the full breakdown of what reaches a subagent, see what loads at startup. * Explore @@ -148,7 +148,7 @@ `~/.claude/agents/`| All your projects| 4| Ask Claude, or create the file manually Plugin’s `agents/` directory| Where plugin is enabled| 5 (lowest)| Installed with [plugins](</docs/en/plugins/overview>) -**Project subagents** (`.claude/agents/`) are ideal for subagents specific to a codebase. Check them into version control so your team can use and improve them collaboratively. Project subagents are discovered by walking up from the current working directory, so every `.claude/agents/` between there and the repository root is scanned. When more than one of these nested directories defines the same `name`, Claude Code uses the definition closest to the working directory. When you add a directory with `--add-dir` or `/add-dir`, Claude Code also loads its `.claude/agents/` folder, alongside your project subagents. See [Additional directories](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) for which other configuration types load from `--add-dir`. To share subagents across projects without `--add-dir`, use `~/.claude/agents/` or a [plugin](</docs/en/plugins/overview>). **User subagents** (`~/.claude/agents/`) are personal subagents available in all your projects. Claude Code scans `.claude/agents/` and `~/.claude/agents/` recursively, so you can organize definitions into subfolders such as `agents/review/` or `agents/research/`. The subdirectory path doesn’t affect how a subagent is identified or invoked, because identity comes only from the `name` frontmatter field. Keep `name` values unique across the whole tree: if two files under the same `.claude/agents/` directory, including its subfolders, declare the same name, Claude Code loads only one of them, chosen by filesystem read order rather than a documented precedence. Across nested project directories, the definition closest to the working directory wins, as described above. The [`/doctor`](</docs/en/commands#all-commands>) setup checkup reports files in the same directory that share a name and proposes renaming or removing all but one. Before v2.1.205, `/doctor` opened a diagnostics screen that listed duplicates and showed which definition was active. Plugin `agents/` directories are also scanned recursively. Unlike project and user scopes, a subfolder inside a plugin’s `agents/` directory becomes part of the scoped identifier: a file at `agents/review/security.md` in plugin `my-plugin` registers as `my-plugin:review:security`. **CLI-defined subagents** are passed as JSON when launching Claude Code. They exist only for that session and aren’t saved to disk, making them useful for quick testing or automation scripts. You can define multiple subagents in a single `--agents` call: +**Project subagents** (`.claude/agents/`) are ideal for subagents specific to a codebase. Check them into version control so your team can use and improve them collaboratively. Project subagents are discovered by walking up from the current working directory, so every `.claude/agents/` between there and the repository root is scanned. When more than one of these nested directories defines the same `name`, Claude Code uses the definition closest to the working directory. When you add a directory with `--add-dir` or `/add-dir`, Claude Code also loads its `.claude/agents/` folder, alongside your project subagents. See [Additional directories](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) for which other configuration types load from `--add-dir`. To share subagents across projects without `--add-dir`, use `~/.claude/agents/` or a [plugin](</docs/en/plugins/overview>). **User subagents** (`~/.claude/agents/`) are personal subagents available in all your projects. Claude Code scans `.claude/agents/` and `~/.claude/agents/` recursively, so you can organize definitions into subfolders such as `agents/review/` or `agents/research/`. The subdirectory path doesn’t affect how a subagent is identified or invoked, because identity comes only from the `name` frontmatter field. Keep `name` values unique across the whole tree: if two files under the same `.claude/agents/` directory, including its subfolders, declare the same name, Claude Code loads only one of them, chosen by filesystem read order rather than a documented precedence. Across nested project directories, the definition closest to the working directory wins, as described above. The [`/doctor`](</docs/en/commands#all-commands>) setup checkup reports files in the same directory that share a name and proposes renaming or removing all but one. Plugin `agents/` directories are also scanned recursively. Unlike project and user scopes, a subfolder inside a plugin’s `agents/` directory becomes part of the scoped identifier: a file at `agents/review/security.md` in plugin `my-plugin` registers as `my-plugin:review:security`. **CLI-defined subagents** are passed as JSON when launching Claude Code. They exist only for that session and aren’t saved to disk, making them useful for quick testing or automation scripts. You can define multiple subagents in a single `--agents` call: * macOS, Linux, WSL @@ -220,7 +220,7 @@ You are a code reviewer. When invoked, analyze the code and provide specific, actionable feedback on quality, security, and best practices. -The frontmatter defines the subagent’s metadata and configuration. The body becomes the system prompt that guides the subagent’s behavior. Subagents receive only this system prompt plus basic environment details like the working directory, not the Claude Code system prompt. In [non-interactive mode](</docs/en/headless>), pass [`--append-subagent-system-prompt`](</docs/en/cli-reference#cli-flags>) to append your text to the end of every subagent’s system prompt, nested subagents included, apart from a forked subagent, which reuses the conversation’s own prompt. Requires Claude Code v2.1.205 or later. If your text is too long to pass on the command line, save it to a file and pass the path with `--append-subagent-system-prompt-file` instead. The file flag requires Claude Code v2.1.261 or later. A subagent starts in the main conversation’s current working directory. Within a subagent, `cd` commands don’t persist between Bash or PowerShell tool calls and don’t affect the main conversation’s working directory. To give the subagent an isolated copy of the repository instead, set `isolation: worktree`. A subagent with `isolation: worktree` runs its Bash and PowerShell commands inside its worktree. A command whose working directory resolves to your main checkout instead, for example because the worktree directory was removed while the subagent was running, fails with an error. Before v2.1.203, such a command could run in the main checkout. This working-directory check covers the whole repository containing the directory you launched Claude Code from. When your session runs in a linked [worktree](</docs/en/worktrees>) of its own, the check also covers the main checkout that worktree is linked from. Before v2.1.210, the check covered only the launch directory itself. A command whose working directory resolved elsewhere in the same repository, such as the repository root when you launched Claude Code from a monorepo subdirectory, ran there instead of failing. For Bash commands, Claude Code also checks the command itself in two ways: +The frontmatter defines the subagent’s metadata and configuration. The body becomes the system prompt that guides the subagent’s behavior. Subagents receive only this system prompt plus basic environment details like the working directory, not the Claude Code system prompt. In [non-interactive mode](</docs/en/headless>), pass [`--append-subagent-system-prompt`](</docs/en/cli-reference#cli-flags>) to append your text to the end of every subagent’s system prompt, nested subagents included, apart from a forked subagent, which reuses the conversation’s own prompt. Requires Claude Code v2.1.205 or later. If your text is too long to pass on the command line, save it to a file and pass the path with `--append-subagent-system-prompt-file` instead. The file flag requires Claude Code v2.1.261 or later. A subagent starts in the main conversation’s current working directory. Within a subagent, `cd` commands don’t persist between Bash or PowerShell tool calls and don’t affect the main conversation’s working directory. To give the subagent an isolated copy of the repository instead, set `isolation: worktree`. A subagent with `isolation: worktree` runs its Bash and PowerShell commands inside its worktree. A command whose working directory resolves to your main checkout instead, for example because the worktree directory was removed while the subagent was running, fails with an error. This working-directory check covers the whole repository containing the directory you launched Claude Code from. When your session runs in a linked [worktree](</docs/en/worktrees>) of its own, the check also covers the main checkout that worktree is linked from. Before v2.1.210, the check covered only the launch directory itself. A command whose working directory resolved elsewhere in the same repository, such as the repository root when you launched Claude Code from a monorepo subdirectory, ran there instead of failing. For Bash commands, Claude Code also checks the command itself in two ways: * It blocks a command that redirects git into the main checkout. * It refuses a command when it can’t verify from the command text that any git the command runs stays inside the worktree, for example when the command name is computed at runtime. @@ -249,7 +249,7 @@ `hooks`| No| Lifecycle hooks scoped to this subagent. Ignored for plugin subagents `memory`| No| Persistent memory scope: `user`, `project`, or `local`. Enables cross-session learning `background`| No| Set to `true` to keep this subagent in the background even when Claude asks to run it in the foreground. Where fork mode is on, Claude Code already runs the subagents Claude spawns in the background -`omitClaudeMd`| No| Set to `true` to launch this subagent without the user, project, and local CLAUDE.md files; [managed policy files](</docs/en/memory#how-claude-md-files-load>) still load, except for managed subagents. Use it for subagents that take everything they need from the delegation prompt. Ignored when the agent runs as the main session agent via `--agent` or the `agent` setting. Requires Claude Code v2.1.271 or later +`omitClaudeMd`| No| Set to `true` to start this subagent without the user, project, and local CLAUDE.md files in its initial context; [managed policy files](</docs/en/memory#how-claude-md-files-load>) still load, except for managed subagents. Use it for subagents that take everything they need from the delegation prompt. Ignored when the agent runs as the main session agent via `--agent` or the `agent` setting. Requires Claude Code v2.1.271 or later `effort`| No| Effort level when this subagent is active. Overrides the session effort level, but not the [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars#variables>) environment variable. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model. See Choose an effort level `isolation`| No| Set to `worktree` to run the subagent in a temporary [git worktree](</docs/en/worktrees>), giving it an isolated copy of the repository branched by default from your [default branch](</docs/en/worktrees#choose-the-base-branch>) rather than the parent session’s `HEAD`. The worktree is automatically cleaned up if the subagent makes no changes `color`| No| Display color for the subagent in the task list and transcript. Accepts `red`, `blue`, `green`, `yellow`, `purple`, `orange`, `pink`, or `cyan` @@ -955,9 +955,9 @@ * **CLAUDE.md files** : every level of the [CLAUDE.md hierarchy](</docs/en/memory#how-claude-md-files-load>) the main conversation loads, including `~/.claude/CLAUDE.md`, project rules, `CLAUDE.local.md`, managed policy files, and any [`AGENTS.md` files](</docs/en/memory#agents-md>) loaded as project instructions. The built-in Explore and Plan agents skip this. A subagent whose definition sets `omitClaudeMd` loads only the managed policy files, or none at all when the definition comes from managed settings. * **Git status** : a snapshot Claude Code reads from your repository when the subagent starts. For a subagent in [its own worktree](</docs/en/worktrees#isolate-subagents-with-worktrees>) of that repository, the snapshot shows the worktree’s branch, status, and recent commits. Absent outside a Git repository or whenever the snapshot is turned off; see [`includeGitInstructions`](</docs/en/settings-reference#includegitinstructions>). Explore and Plan skip it regardless. * **Preloaded skills** : full content of any skill named in the agent’s `skills` field. Built-in agents don’t preload skills. - * **Sibling roster** : a [system reminder](</docs/en/glossary#system-reminder>) listing `main` and every other named agent in the session, each a valid `to` value for `SendMessage`. Requires Claude Code v2.1.206 or later. The roster appears only when the subagent’s tools include `SendMessage` and at least one other agent has a name, whether Claude named it when spawning it or it runs as an [agent team](</docs/en/agent-teams>) teammate. It is a snapshot taken when the subagent starts, so agents named later don’t appear. - -To launch one of your own subagents without the user, project, and local CLAUDE.md files, set `omitClaudeMd: true` in its frontmatter or `--agents` JSON. The main conversation still has your full CLAUDE.md when it reads these subagents’ results, so most rules don’t need to reach the subagent itself. If a rule must, such as “ignore the `vendor/` directory,” restate it in the prompt you give Claude when delegating. You can’t change which subagents receive git status. Only Explore and Plan skip it. Some main-conversation state never reaches a non-fork subagent: + * **Sibling roster** : a [system reminder](</docs/en/glossary#system-reminder>) listing `main` and every other named agent in the session, each a valid `to` value for `SendMessage`. The roster appears only when the subagent’s tools include `SendMessage` and at least one other agent has a name, whether Claude named it when spawning it or it runs as an [agent team](</docs/en/agent-teams>) teammate. It is a snapshot taken when the subagent starts, so agents named later don’t appear. + +To launch one of your own subagents without the user, project, and local CLAUDE.md files, set `omitClaudeMd: true` in its frontmatter or `--agents` JSON. For Explore, Plan, and subagents with `omitClaudeMd`, a subdirectory’s `CLAUDE.md` and matching [path-scoped rules](</docs/en/memory#path-specific-rules>) still [load](</docs/en/memory#how-claude-md-files-load>) when the subagent works with files there. The main conversation still has your full CLAUDE.md when it reads these subagents’ results, so most rules don’t need to reach the subagent itself. If a rule must, such as “ignore the `vendor/` directory,” restate it in the prompt you give Claude when delegating. You can’t change which subagents receive git status. Only Explore and Plan skip it. Some main-conversation state never reaches a non-fork subagent: * **Output style** : a subagent runs its own system prompt, so your [output style](</docs/en/output-styles>) doesn’t shape its responses, except in a fork. * **Auto memory** : the main conversation’s [auto memory](</docs/en/memory#auto-memory>) isn’t loaded. To give a subagent persistent memory of its own, use the `memory` field. @@ -983,7 +983,7 @@ Continue that code review and now analyze the authorization logic [Claude resumes the subagent with full context from previous conversation] -When Claude sends a completed subagent a message with the `SendMessage` tool, the subagent resumes in the background without a new `Agent` invocation. The same applies to a subagent that Claude stopped with the `TaskStop` tool, once its stopped run has exited. The resumed run keeps the tool set from where the subagent first ran and can keep reading the [prompt cache the original run warmed](</docs/en/prompt-caching#subagents-and-the-cache>). A subagent that has the `SendMessage` tool can send that message too. In an interactive session, the resumed agent then reports back to the subagent that resumed it, not to your main conversation. That subagent waits for the result before finishing its own work. When a subagent messages an agent it reports to, such as its own launcher, Claude Code resumes that agent without redirecting its results. A subagent you stopped yourself, with `x` in `/tasks` or an SDK `stop_task` request, doesn’t auto-resume. If Claude sends it a message, the message is refused and Claude is told the agent was cancelled. While that subagent’s row is still in the subagent panel, type into its transcript to resume it yourself. After that, a message from Claude can auto-resume it again. Resuming starts a new run of the agent under the same ID, so a subagent that had already failed or completed shows as running again in the task list and in the Agent SDK’s task events. Before v2.1.205, it kept showing its earlier failed or completed status while the resumed run was working. `SendMessage` checks that a name still refers to the same agent it reached earlier in the conversation. If a newer agent has taken the name, such as a re-spawned background agent that reused it, Claude Code refuses the send rather than delivering it to the wrong agent, and the error reports which agent the name now reaches so Claude can retarget. To reach the earlier agent while it’s still running, Claude addresses it by the agent ID it received when it spawned that agent. The check is scoped to the current conversation and resets on `/clear`. A subagent treats messages from the agent that launched it as normal task direction, including mid-task course corrections, and acts on them within its own permission settings. Two limits hold regardless of who sent the message: no message from any agent counts as your approval for a pending permission prompt, and no agent message can change a subagent’s permission settings, `CLAUDE.md`, or configuration. Only the permission system or your own messages can grant approval. You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`. Subagent transcripts persist independently of the main conversation: +When Claude sends a completed subagent a message with the `SendMessage` tool, the subagent resumes in the background without a new `Agent` invocation. The same applies to a subagent that Claude stopped with the `TaskStop` tool, once its stopped run has exited. The resumed run keeps the tool set from where the subagent first ran and can keep reading the [prompt cache the original run warmed](</docs/en/prompt-caching#subagents-and-the-cache>). A subagent that has the `SendMessage` tool can send that message too. In an interactive session, the resumed agent then reports back to the subagent that resumed it, not to your main conversation. That subagent waits for the result before finishing its own work. When a subagent messages an agent it reports to, such as its own launcher, Claude Code resumes that agent without redirecting its results. A subagent you stopped yourself, with `x` in `/tasks` or an SDK `stop_task` request, doesn’t auto-resume. If Claude sends it a message, the message is refused and Claude is told the agent was cancelled. While that subagent’s row is still in the subagent panel, type into its transcript to resume it yourself. After that, a message from Claude can auto-resume it again. Resuming starts a new run of the agent under the same ID, so a subagent that had already failed or completed shows as running again in the task list and in the Agent SDK’s task events. `SendMessage` checks that a name still refers to the same agent it reached earlier in the conversation. If a newer agent has taken the name, such as a re-spawned background agent that reused it, Claude Code refuses the send rather than delivering it to the wrong agent, and the error reports which agent the name now reaches so Claude can retarget. To reach the earlier agent while it’s still running, Claude addresses it by the agent ID it received when it spawned that agent. The check is scoped to the current conversation and resets on `/clear`. A subagent treats messages from the agent that launched it as normal task direction, including mid-task course corrections, and acts on them within its own permission settings. Two limits hold regardless of who sent the message: no message from any agent counts as your approval for a pending permission prompt, and no agent message can change a subagent’s permission settings, `CLAUDE.md`, or configuration. Only the permission system or your own messages can grant approval. You can also ask Claude for the agent ID if you want to reference it explicitly, or find IDs in the transcript files at `~/.claude/projects/{project}/{sessionId}/subagents/`. Each transcript is stored as `agent-{agentId}.jsonl`. Subagent transcripts persist independently of the main conversation: * **Main conversation compaction** : when the main conversation compacts, subagent transcripts are unaffected. They’re stored in separate files. * **Session persistence** : subagent transcripts persist within their session. You can resume a subagent after restarting Claude Code by resuming the same session. @@ -995,7 +995,7 @@ Auto-compaction -Subagents support automatic compaction using the same logic as the main conversation. Compaction triggers under the same conditions, and `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` applies to subagents as well. See [environment variables](</docs/en/env-vars>) for when the override takes effect. Compaction events are logged in subagent transcript files: +Subagents support automatic compaction. Compaction triggers as the subagent’s own context window fills, and `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE` applies to subagents as well. See [environment variables](</docs/en/env-vars>) for when the override takes effect. Compaction events are logged in subagent transcript files: { "type": "system",
modified Subagents in the SDK View current →
--- a/subagents.md +++ b/subagents.md @@ -158,7 +158,7 @@ `initialPrompt`| `string`| No| Auto-submitted as the first user turn when this agent runs as the main thread agent. Ignored when the agent is invoked as a subagent `maxTurns`| `number`| No| Maximum number of agentic turns before the agent stops. When the agent reaches the limit, Claude Code returns its output marked as partial, and you can resume the agent to continue. The partial marking requires Claude Code v2.1.246 or later `background`| `boolean`| No| Run this agent as a non-blocking background task when invoked -`omitClaudeMd`| `boolean`| No| Run this agent without the user, project, and local CLAUDE.md files when it runs as a subagent; managed policy files still load. Ignored when the agent runs as the main thread agent. Requires TypeScript Agent SDK v0.3.271 or later. The Python SDK’s [`AgentDefinition`](</docs/en/agent-sdk/python#agentdefinition>) doesn’t have this field +`omitClaudeMd`| `boolean`| No| Leave the user, project, and local CLAUDE.md files out of this agent’s initial context; managed policy files still load. Ignored when the agent runs as the main thread agent. Requires TypeScript Agent SDK v0.3.271 or later. The Python SDK’s [`AgentDefinition`](</docs/en/agent-sdk/python#agentdefinition>) doesn’t have this field `effort`| `'low' | 'medium' | 'high' | 'xhigh' | 'max' | number`| No| Reasoning effort level for this agent `permissionMode`| `PermissionMode`| No| Permission mode for tool execution within this agent. The [subagent inheritance rules](</docs/en/agent-sdk/permissions#available-modes>) decide when it applies @@ -185,7 +185,7 @@ The subagent receives| The subagent doesn’t receive ---|--- Its own system prompt (`AgentDefinition.prompt`) and the Agent tool’s prompt| The parent’s conversation history or tool results -Project CLAUDE.md (loaded via [`settingSources`](</docs/en/agent-sdk/claude-code-features#control-filesystem-settings-with-settingsources>)), unless the agent sets `omitClaudeMd`| Preloaded skill content, unless listed in `AgentDefinition.skills` +Project CLAUDE.md (loaded via [`settingSources`](</docs/en/agent-sdk/claude-code-features#control-filesystem-settings-with-settingsources>)). An agent that sets `omitClaudeMd` starts without it| Preloaded skill content, unless listed in `AgentDefinition.skills` Tool definitions (inherited from parent or the subset in `tools`, [filtered for background runs](</docs/en/sub-agents#available-tools>))| The parent’s system prompt The parent receives the subagent’s final report, but may summarize it in its own response. To preserve subagent output verbatim in the user-facing response, include an instruction to do so in the prompt or `systemPrompt` option you pass to the main `query()` call.In v2.1.210 and later, Claude Code [scans the final message for instruction-shaped patterns](</docs/en/sub-agents#subagent-output-scanning>) before the parent reads it. The scan treats three kinds of pattern differently:
modified Scale to many tools with tool search View current →
--- a/tool-search.md +++ b/tool-search.md @@ -28,13 +28,13 @@ Value| Behavior ---|--- -(unset)| Tool search is on. Tool definitions are deferred and discovered on demand. Falls back to loading upfront on Google Cloud’s Agent Platform models earlier than the Claude 4.5 generation, a non-first-party `ANTHROPIC_BASE_URL`, or a Microsoft Foundry deployment hosted on Azure. -`true`| Tool search is always on, except on a Microsoft Foundry deployment hosted on Azure, where the server-side rejection still forces upfront loading, and on Google Cloud’s Agent Platform models earlier than the Claude 4.5 generation, where the SDK keeps loading tool definitions upfront. The SDK sends the beta header through proxies, and requests fail on proxies that don’t support `tool_reference` blocks. +(unset)| Tool search is on. Tool definitions are deferred and discovered on demand. Falls back to loading upfront on models earlier than Opus 4 and Sonnet 4, Google Cloud’s Agent Platform models earlier than Opus 4.5, Sonnet 4.5, and Haiku 4.5, a non-first-party `ANTHROPIC_BASE_URL`, or a Microsoft Foundry deployment hosted on Azure. +`true`| Tool search stays on with a non-first-party `ANTHROPIC_BASE_URL`. The other (unset) fallbacks still apply. The SDK sends the beta header through proxies, and requests fail on proxies that don’t support `tool_reference` blocks. `auto`| Counts the tokens in the tool definitions that tool search can defer and compares the total against the model’s context window. When the total reaches 10% of the window, tool search activates. Below that, the SDK loads every tool definition into context upfront. `auto:N`| Same as `auto` with a custom percentage. `auto:5` activates when those definitions reach 5% of the context window. Lower values activate sooner. `false`| Tool search is off. All tool definitions are loaded into context on every turn. -Setting [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/env-vars>) keeps tool search off. You can’t override it by setting `ENABLE_TOOL_SEARCH` yourself. Your organization can keep tool search on through [managed settings](</docs/en/managed-settings>), on Claude Code v2.1.227 or later. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies and what the variable strips. Tool search applies to all registered tools, whether they come from remote MCP servers or [custom SDK MCP servers](</docs/en/agent-sdk/custom-tools>). When you use `auto`, the SDK counts every definition that tool search can defer toward one combined threshold: each MCP tool that isn’t marked [`alwaysLoad`](</docs/en/mcp#exempt-a-server-from-deferral>), from any server, plus the built-in tools that load on demand. The SDK loads core built-in tools such as Bash, Read, and Edit upfront and doesn’t count them toward the threshold. A [mod](</docs/en/plugins/mods/reference#tools>) in one of your plugins can also defer a tool or load it upfront, which changes that count. Set the value in the `env` option on `query()`. In TypeScript, `env` replaces the subprocess environment, so spread `...process.env` to keep inherited variables. In Python, `env` is merged on top of the inherited environment. This example connects to a remote MCP server that exposes many tools, pre-approves all of them with a wildcard, and uses `auto:5` so tool search activates when the definitions it can defer reach 5% of the context window: +Setting [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/env-vars>) keeps tool search off. You can’t override it by setting `ENABLE_TOOL_SEARCH` yourself. On Claude Code v2.1.227 or later, your organization can keep tool search on under this variable through [managed settings](</docs/en/managed-settings>). In a session that [gets the HIPAA configuration](</docs/en/hipaa-setup#check-how-developers-sign-in-and-connect>), tool search is off, and neither `ENABLE_TOOL_SEARCH` nor managed settings turns it back on. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies and what the variable strips. Tool search applies to all registered tools, whether they come from remote MCP servers or [custom SDK MCP servers](</docs/en/agent-sdk/custom-tools>). When you use `auto`, the SDK counts every definition that tool search can defer toward one combined threshold: each MCP tool that isn’t marked [`alwaysLoad`](</docs/en/mcp#exempt-a-server-from-deferral>), from any server, plus the built-in tools that load on demand. The SDK loads core built-in tools such as Bash, Read, and Edit upfront and doesn’t count them toward the threshold. A [mod](</docs/en/plugins/mods/reference#tools>) in one of your plugins can also defer a tool or load it upfront, which changes that count. Set the value in the `env` option on `query()`. In TypeScript, `env` replaces the subprocess environment, so spread `...process.env` to keep inherited variables. In Python, `env` is merged on top of the inherited environment. This example connects to a remote MCP server that exposes many tools, pre-approves all of them with a wildcard, and uses `auto:5` so tool search activates when the definitions it can defer reach 5% of the context window: TypeScript @@ -141,7 +141,7 @@ * **Maximum tools:** 10,000 tools in your catalog * **Search results:** returns up to five most relevant tools per search by default - * **Model support:** Claude Sonnet 4.5, Claude Haiku 4.5, Claude Opus 4.5, and later models; see [model compatibility in the API docs](<https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool#model-compatibility>) for the current list. The same minimums apply on Google Cloud’s Agent Platform. + * **Model support:** Opus 4, Sonnet 4, Haiku 4.5, and later models, or Opus 4.5, Sonnet 4.5, Haiku 4.5, and later models on Google Cloud’s Agent Platform. On earlier models the SDK loads tool definitions upfront, as Configure tool search describes. ##
modified Tools reference View current →
--- a/tools-reference.md +++ b/tools-reference.md @@ -30,7 +30,7 @@ `ReadMcpResourceTool`| Reads a specific MCP resource by URI| No `RemoteTrigger`| Creates, updates, runs, and lists [Routines](</docs/en/routines>) on claude.ai. Backs the `/schedule` command. The [`RemoteTrigger` input reference](</docs/en/agent-sdk/typescript#remotetrigger>) documents every action and the organization policies that remove the tool. Routines live on claude.ai and require a Pro, Max, Team, or Enterprise plan, so this tool is not accessible from Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry| No `ReportFindings`| Reports code-review findings as a structured list, with a file, summary, and failure scenario per finding, so Claude Code can render them instead of printing them as text. Claude calls it when active code-review instructions tell it to. A finding can also carry an optional `category` slug, such as `correctness` or `test-coverage`, shown next to the file location in the rendered list| No -`ScheduleWakeup`| Reschedules the next iteration of a [self-paced `/loop`](</docs/en/scheduled-tasks#let-claude-choose-the-interval>). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don’t call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. The `stop` field requires Claude Code v2.1.202 or later. The pending wakeup appears in `session_crons` in [Stop hook input](</docs/en/hooks#stop-input>)| No +`ScheduleWakeup`| Reschedules the next iteration of a [self-paced `/loop`](</docs/en/scheduled-tasks#let-claude-choose-the-interval>). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don’t call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. The pending wakeup appears in `session_crons` in [Stop hook input](</docs/en/hooks#stop-input>)| No `SendFeedback`| Drafts a feedback report about Claude Code, covering a product problem or Claude’s own behavior in the session, and queues it on your machine for you to review. Claude Code sends nothing until you choose to send the draft. See SendFeedback tool behavior. Requires Claude Code v2.1.238 or later| No `SendMessage`| Sends a message to another agent: an [agent team](</docs/en/agent-teams>) teammate, a [subagent it resumes](</docs/en/sub-agents#resume-subagents>) by agent ID or name, or one of your other Claude Code sessions, on this machine or beyond it. Messaging other sessions requires Claude Code v2.1.224 or later. [Cross-session messaging](</docs/en/cross-session-messaging>) covers which sessions Claude can reach, [what a message looks like when it arrives](</docs/en/cross-session-messaging#what-a-message-looks-like>), and [how Claude gets a notice when another session goes idle](</docs/en/cross-session-messaging#get-a-notice-when-another-session-goes-idle>). Claude can include an optional `summary` input, typically 5-10 words, that Claude Code shows as a one-line preview. When Claude omits it on a [plain-text message](</docs/en/cross-session-messaging#limitations>), Claude Code uses the first line of the message as the summary. Claude Code truncates a summary longer than 200 characters with an ellipsis| No `SendUserFile`| Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. The optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](</docs/en/remote-control>) client is connected or in a [cloud session](</docs/en/claude-code-on-the-web>). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry| No @@ -40,8 +40,8 @@ `TaskCreate`| Creates a new task in the task list. Provided by default only on the models listed under Task tool availability, and on other models when you opt in| No `TaskGet`| Retrieves full details for a specific task. Provided by default only on the models listed under Task tool availability, and on other models when you opt in| No `TaskList`| Lists all tasks with their current status. Provided by default only on the models listed under Task tool availability, and on other models when you opt in| No -`TaskOutput`| Retrieves output from a background task. Deprecated in favor of `Read` on the task’s output file path. When no task matches the ID, the error lists the running background agents by ID and description. Before v2.1.203, the error named only the missing ID| No -`TaskStop`| Stops a running background task by ID. It also accepts an [agent-team teammate](</docs/en/agent-teams>) or a named background agent by agent ID or name. When no task matches the ID, the error lists the running background agents by ID and description, including agents that another agent spawned. Before v2.1.203, the error listed running teammates and named agents but not background agents another agent spawned, so those couldn’t be identified or stopped from the main conversation| No +`TaskOutput`| Removed in v2.1.277. Previously retrieved output from a background task; Claude reads a background task’s [output file](</docs/en/interactive-mode#how-backgrounding-works>) with `Read` instead| No +`TaskStop`| Stops a running background task by ID. It also accepts an [agent-team teammate](</docs/en/agent-teams>) or a named background agent by agent ID or name. When no task matches the ID, the error lists the running background agents by ID and description, including agents that another agent spawned| No `TaskUpdate`| Updates task status, dependencies, details, or deletes tasks. Provided by default only on the models listed under Task tool availability, and on other models when you opt in| No `TodoWrite`| Manages the session task checklist. Disabled by default in favor of `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate`. Set `CLAUDE_CODE_ENABLE_TASKS=0` to re-enable it in sessions that have the task-tracking tools| No `ToolSearch`| Searches for and loads deferred tools when [tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is enabled| No
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -909,6 +909,7 @@ | "malformed" | "not_honoured" >; + claude_code_version?: string; }; `hooks_applied` reports whether Claude Code registered the `hooks` that the `initialize` request carried. The SDK sends that request once when the session starts and again on each `reinitialize()` call. The field requires Agent SDK v0.3.238 or later. Claude Code omits the field when the request carried no hooks. When the request carried hooks, the value depends on whether the request is the session’s first initialize and, for a repeated one, on how it reached the session: @@ -916,7 +917,12 @@ * `true`: Claude Code registered the hooks. A session’s first initialize returns this value. A repeated initialize sent over the CLI’s stdin also returns `true`. In that case the hooks in the new request replace the hooks registered earlier. * `false`: Claude Code ignored the hooks. A repeated initialize sent to a remote session returns this value, so a second client that joins a session can’t replace the hooks the first client registered. -Before Agent SDK v0.3.238, the response never carried the field, and Claude Code ignored `hooks` on every repeated initialize. The request’s `sdkMcpServerManifests` field and the response’s `sdk_mcp_manifests_parked` field are for the in-process [SDK MCP servers](</docs/en/agent-sdk/custom-tools>) you created with `createSdkMcpServer()`. Your application doesn’t set or read either field. The response always reports `fast_mode_state`, and when something blocks [fast mode](</docs/en/fast-mode>), `fast_mode_disabled_reason` carries the reason code alongside it, so you can explain the blocked state instead of re-deriving availability. Both behaviors require Claude Code v2.1.219 or later. Before v2.1.219, the response omitted `fast_mode_state` when fast mode wasn’t available and never carried a reason. For the reason codes and their meanings, see `fast_mode_disabled_reason` on the result message. The control-response wrapper for a successful `initialize` also carries a `pending_permission_requests` array. The field is on the response wrapper itself, not in the `SDKControlInitializeResponse` payload above. Each entry is a complete `control_request` message with the same `{ type: "control_request", request_id, request }` shape the session streams for permission requests while running. The array lists the permission requests that this Claude Code process has issued and not yet resolved. The SDK reads the array for you and dispatches each entry to your `canUseTool` callback, the same redelivery that `reinitialize()` triggers after a transport gap. Handle repeated request IDs idempotently, because an entry can repeat a request the callback already received before the connection dropped. The array is always present on a successful `initialize` response and is empty when this process has no unresolved permission request. Requires Claude Code v2.1.268 or later. Earlier versions could omit the field, so if you parse the wire protocol yourself, treat a missing field as an older CLI rather than as proof that nothing is pending. +Before Agent SDK v0.3.238, the response never carried the field, and Claude Code ignored `hooks` on every repeated initialize. The request’s `sdkMcpServerManifests` field and the response’s `sdk_mcp_manifests_parked` field are for the in-process [SDK MCP servers](</docs/en/agent-sdk/custom-tools>) you created with `createSdkMcpServer()`. Your application doesn’t set or read either field. `claude_code_version` is the Claude Code version of the process that runs the session’s turns. It is the same value the `SDKSystemMessage` init message carries, so you can read the CLI version before the first turn. + + * The field requires Agent SDK v0.3.296 or later, which bundles Claude Code v2.1.296. + * If the field is `undefined` and you set `pathToClaudeCodeExecutable`, point it at Claude Code v2.1.296 or later. + +The response always reports `fast_mode_state`, and when something blocks [fast mode](</docs/en/fast-mode>), `fast_mode_disabled_reason` carries the reason code alongside it, so you can explain the blocked state instead of re-deriving availability. Both behaviors require Claude Code v2.1.219 or later. Before v2.1.219, the response omitted `fast_mode_state` when fast mode wasn’t available and never carried a reason. For the reason codes and their meanings, see `fast_mode_disabled_reason` on the result message. The control-response wrapper for a successful `initialize` also carries a `pending_permission_requests` array. The field is on the response wrapper itself, not in the `SDKControlInitializeResponse` payload above. Each entry is a complete `control_request` message with the same `{ type: "control_request", request_id, request }` shape the session streams for permission requests while running. The array lists the permission requests that this Claude Code process has issued and not yet resolved. The SDK reads the array for you and dispatches each entry to your `canUseTool` callback, the same redelivery that `reinitialize()` triggers after a transport gap. Handle repeated request IDs idempotently, because an entry can repeat a request the callback already received before the connection dropped. The array is always present on a successful `initialize` response and is empty when this process has no unresolved permission request. Requires Claude Code v2.1.268 or later. Earlier versions could omit the field, so if you parse the wire protocol yourself, treat a missing field as an older CLI rather than as proof that nothing is pending. ### @@ -1211,7 +1217,7 @@ `initialPrompt`| No| Auto-submitted as the first user turn when this agent runs as the main thread agent `maxTurns`| No| Maximum number of agentic turns (API round-trips) before stopping `background`| No| Run this agent as a non-blocking background task when invoked -`omitClaudeMd`| No| Run this agent without the user, project, and local CLAUDE.md files when it runs as a subagent; managed policy files still load. Use it for agents that take everything they need from the Agent tool prompt. Ignored when this agent runs as the main thread agent. Requires TypeScript Agent SDK v0.3.271 or later +`omitClaudeMd`| No| Leave the user, project, and local CLAUDE.md files out of this agent’s initial context; managed policy files still load. Use it for agents that take everything they need from the Agent tool prompt. Ignored when this agent runs as the main thread agent. Requires TypeScript Agent SDK v0.3.271 or later `memory`| No| Memory source for this agent: `'user'`, `'project'`, or `'local'` `effort`| No| Reasoning effort level for this agent. Accepts a named level or an integer `permissionMode`| No| Permission mode for tool execution within this agent. The [subagent inheritance rules](</docs/en/agent-sdk/permissions#available-modes>) decide when it applies. See `PermissionMode` @@ -3361,9 +3367,15 @@ offset?: number; limit?: number; pages?: string; - }; - -Reads files from the local filesystem, including text, images, PDFs, and Jupyter notebooks. Use `pages` for PDF page ranges (for example, `"1-5"`). For a PDF, Claude receives the file’s contents inside the Read call’s `tool_result` content. A read that returns the `pdf` output carries a summary `text` block followed by a `document` block. One that returns the `parts` output carries the summary `text` block followed by one block per extracted page: an `image` block, or a `text` block naming the page when Claude Code couldn’t render it as an image. Before Agent SDK v0.3.242, Claude Code delivered the file’s contents as a separate `user` message after the tool result. + allow_large?: boolean; + }; + +Reads files from the local filesystem, including text, images, PDFs, and Jupyter notebooks. + + * Use `pages` for PDF page ranges (for example, `"1-5"`). + * `allow_large` lets Claude read a text file past the [usual size limits](</docs/en/tools-reference#large-files>) when the session’s context window has room. It requires Agent SDK v0.3.296 or later, which bundles Claude Code v2.1.296. + +For a PDF, Claude receives the file’s contents inside the Read call’s `tool_result` content. A read that returns the `pdf` output carries a summary `text` block followed by a `document` block. One that returns the `parts` output carries the summary `text` block followed by one block per extracted page: an `image` block, or a `text` block naming the page when Claude Code couldn’t render it as an image. Before Agent SDK v0.3.242, Claude Code delivered the file’s contents as a separate `user` message after the tool result. ###
modified Find bugs with ultrareview View current →
--- a/ultrareview.md +++ b/ultrareview.md @@ -113,7 +113,7 @@ Track a running review -A review typically takes 5 to 10 minutes. The review runs as a background task, so you can keep working in your session or start other commands. If you chose to post the findings to the pull request, keep the session open until the review finishes; if the session ends first, Claude Code posts nothing. Use `/tasks` to see running and completed reviews, open the detail view for a review, or stop a review that is in progress. If you stop a review, Claude Code archives the cloud session and doesn’t return partial findings. Claude can also tell you that a review was stopped or that its session wasn’t found: +A review typically takes 15 to 25 minutes. The review runs as a background task, so you can keep working in your session or start other commands. If you chose to post the findings to the pull request, keep the session open until the review finishes; if the session ends first, Claude Code posts nothing. Use `/tasks` to see running and completed reviews, open the detail view for a review, or stop a review that is in progress. If you stop a review, Claude Code archives the cloud session and doesn’t return partial findings. Claude can also tell you that a review was stopped or that its session wasn’t found: * If the review’s cloud session is stopped or [archived](</docs/en/claude-code-on-the-web#archive-sessions>) on claude.ai before the review finishes, Claude tells you it was stopped. * If the review’s cloud session was deleted, or you’ve signed in to a different Claude account or organization since launching it, Claude tells you the session wasn’t found. @@ -168,7 +168,7 @@ Target| your working diff, a pull request, a branch, or a path| your working diff or a pull request Runs| locally in your session| in a cloud sandbox Depth| scales with the effort argument| multi-agent fleet with independent verification -Duration| seconds to a few minutes| roughly 5 to 10 minutes +Duration| seconds to a few minutes| roughly 15 to 25 minutes Cost| counts toward normal usage| free runs, then roughly $5 to $25 per review as usage credits Best for| quick feedback while iterating| pre-merge confidence on substantial changes
modified Orchestrate subagents at scale with dynamic workflows View current →
--- a/workflows.md +++ b/workflows.md @@ -87,7 +87,7 @@ ---|--- `↑` / `↓`| Select a phase or agent `Enter` or `→`| Drill into the selected phase, then into an agent’s detail. In the detail, `Enter` expands or collapses it -`Esc` or `←`| Back out one level. In v2.1.203 through v2.1.205, `←` didn’t step back out of a phase or agent; use `Esc` on those versions +`Esc` or `←`| Back out one level `j` / `k`| Scroll within the agent detail when it overflows `f`| Filter the agent list in the selected phase by status. Press again to cycle `p`| Pause or resume the run @@ -155,7 +155,7 @@ /effort ultracode -To start a session with ultracode already on, launch with `claude --effort ultracode`, which also sets the effort level to `xhigh`. Requires Claude Code v2.1.203 or later. To turn it on from the `/effort` slider, press `Tab` to flip the **Ultracode** toggle, then `Enter` to apply it. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists the routes that turn ultracode on. With ultracode on, Claude decides when a task warrants a workflow. A single request can turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than the same request without a workflow. On a subscription plan those tokens draw on your usage limits, so a session with ultracode on reaches a session or weekly limit sooner than the same work with it off. Turning ultracode on already opts you in to large runs, so these checks don’t apply while it’s on: +To start a session with ultracode already on, launch with `claude --effort ultracode`, which also sets the effort level to `xhigh`. To turn it on from the `/effort` slider, press `Tab` to flip the **Ultracode** toggle, then `Enter` to apply it. [Adjust effort level](</docs/en/model-config#adjust-effort-level>) lists the routes that turn ultracode on. With ultracode on, Claude decides when a task warrants a workflow. A single request can turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than the same request without a workflow. On a subscription plan those tokens draw on your usage limits, so a session with ultracode on reaches a session or weekly limit sooner than the same work with it off. Turning ultracode on already opts you in to large runs, so these checks don’t apply while it’s on: * The `Large workflow` warning doesn’t appear on a workflow run * The session’s [concurrent subagent limit](</docs/en/sub-agents#concurrent-subagent-limit>) isn’t enforced for the subagents Claude spawns with the Agent tool @@ -479,7 +479,7 @@ Set a size guideline -A size guideline tells Claude how many agents to aim for when it writes a dynamic workflow. Claude Code sends the guideline to Claude as advice, not a cap, so a prompt that calls for a different scale still overrides it. Requires Claude Code v2.1.202 or later. Each value maps to an agent count: +A size guideline tells Claude how many agents to aim for when it writes a dynamic workflow. Claude Code sends the guideline to Claude as advice, not a cap, so a prompt that calls for a different scale still overrides it. Each value maps to an agent count: Value| Agent count Claude aims for ---|---