added Week 35 · August 24–28, 2026 View current →
--- a/2026-w35.md +++ b/2026-w35.md @@ -0,0 +1,71 @@ +Releases [v2.1.240 → v2.1.250](</docs/en/changelog#2-1-240>)3 features · August 24–28 + +Resume terminal sessions in the Desktop appDesktop + +Type `/resume` in the Claude Code Desktop prompt box to pick up any session you started from the CLI and continue it in the app with the full conversation and context intact. Search your sessions by title, folder, or branch, and preview where you left off before you resume. + +In a Desktop session, run the command to list your terminal sessions: + +Claude Code + + > /resume + +Select a session and press `Enter`. The conversation opens in the app where you left off. + +[Move between the CLI and Desktop](</docs/en/desktop#coming-from-the-cli>) + +Claude-drafted feedbackCLI + +When a tool keeps failing, Claude can’t help with a request, or you point out a mistake, Claude now drafts a feedback report for you with the `SendFeedback` tool. A card above your prompt shows the draft, and you can review, send, or dismiss it from there. Nothing reaches Anthropic until you send it. Requires v2.1.238 or later. + +Run `/feedback` with no argument to open your queue of drafts from every session: + +Claude Code + + > /feedback + +Select a draft, then edit, send, or discard it. To turn drafting off, set **Claude-drafted feedback** to `off` in `/config`. + +[SendFeedback tool behavior](</docs/en/tools-reference#sendfeedback-tool-behavior>) + +Restricted modev2.1.248 + +Restricted mode starts Claude Code without the built-in tools that run commands or code. Use it when an evaluation harness drives `claude` on a shared machine. Start it with `--restricted` or set `CLAUDE_CODE_RESTRICTED=1`. Claude Code also removes `WebFetch`, confines the file tools to the working directories, loads only managed settings and `--settings`, and refuses the `bypassPermissions` permission mode. + +Run a non-interactive query without the command-running tools: + +terminal + + claude --restricted -p "review src/ for SQL injection risks" + +To give Claude one of the removed tools back, list it in `--tools` together with the other built-in tools you want, for example `--tools "Bash,Read,Edit"`. `--tools` is an allowlist, and its `default` preset doesn’t restore the removed tools. + +[CLI flags](</docs/en/cli-reference#cli-flags>) + +Other wins + +Set the new [`modelPicker`](</docs/en/settings-reference#modelpicker>) setting to extend or replace the `/model` picker’s built-in list with your own ordered, labeled entries, including Amazon Bedrock or Google Cloud’s Agent Platform model IDs + +Set [`promptCacheTtl`](</docs/en/prompt-caching#choose-the-ttl-yourself>) to `1h` to keep a one-hour prompt cache on the main conversation when you use an API key or a cloud provider; `subagentPromptCacheTtl` sets the TTL for subagents and all other requests outside the main conversation + +On Pro, Max, Team, and Enterprise plans, [`/usage`](</docs/en/costs#plan-usage-breakdown>) adds a Loops breakdown: run count, total tokens, tokens per run, and last run for the `/loop` and scheduled tasks that used the most tokens + +Organizations on contracted rates can set the [`modelPricing`](</docs/en/costs#report-spend-at-your-contracted-rates>) managed setting so `/usage`, the status line, and OpenTelemetry report cost at those rates instead of list price + +`/login` offers **Sign in with your Console account** under the **Anthropic Console account** option, so members of Console organizations that don’t allow API keys can sign in without creating one + +Run `/permissions` and open the new [**Auto mode** tab](</docs/en/auto-mode-config#edit-rules-from-permissions>) to view and edit auto mode classifier rules without opening a settings file + +When auto mode is available, Bash permission prompts in the Manual and `acceptEdits` permission modes offer a [**Yes, and switch to auto mode**](</docs/en/permission-modes#switch-permission-modes>) option; select it to approve the command and switch the session to auto mode + +After you [move a session with `/cd`](</docs/en/permissions#move-the-session-to-another-directory>), the new directory’s project settings, hooks, `.mcp.json` servers, skills, and subagents take effect immediately instead of on the next `--resume` + +In non-interactive sessions, including `-p` runs, Agent SDK runs, and cloud sessions, Claude Code [continues a response](</docs/en/errors#the-response-above-may-be-incomplete>) that a server error, dropped connection, or stall cut off mid-stream, when the partial response contains text and no tool calls + +A subagent that stops at its `maxTurns` limit returns its output marked as partial, with a hint that Claude can [continue it with `SendMessage`](</docs/en/sub-agents#resume-subagents>), instead of appearing finished + +On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, sessions on the same machine can now [message each other](</docs/en/cross-session-messaging#availability>), `/loop` can [choose its own interval](</docs/en/scheduled-tasks#let-claude-choose-the-interval>), and `/model` and `/effort` apply immediately instead of after the turn ends + +The native installer and auto-updater download a zstd-compressed build, about 75 MB instead of 340 MB on Linux x64, and native builds load code on demand, using roughly 40 to 70 MB less memory per session + +[Full changelog for v2.1.240–v2.1.250 →](</docs/en/changelog#2-1-240>)
added Week 36 · August 31 – September 4, 2026 View current →
--- a/2026-w36.md +++ b/2026-w36.md @@ -0,0 +1,77 @@ +Releases [v2.1.251 → v2.1.261](</docs/en/changelog#2-1-251>)4 features · August 31 – September 4 + +Claude Fable 5.1new model + +Claude Fable 5.1 is available in Claude Code with a 1M-token context window, and the `fable` alias now selects it. In Claude apps gateway sessions, `fable` still selects Fable 5. If your gateway serves Fable 5.1, run `/model claude-fable-5-1`. Requires v2.1.257 or later. + +Switch the current session to Fable 5.1 and save it as your default: + +Claude Code + + > /model fable + +On the Anthropic API, the picker lists Fable only once the server reports it available for your organization, but typing `/model fable` checks with the server directly. + +[Work with Fable](</docs/en/model-config#work-with-fable>) + +Computer use runs in the background on DesktopDesktop + +On macOS, computer use in the Claude Code Desktop app now works in the background: Claude sees and acts in the apps you’ve approved while you keep working. Background computer use is in beta on Pro and Max plans. + +[Let Claude use your computer](</docs/en/desktop#let-claude-use-your-computer>) + +Live diff panel in fullscreen renderingv2.1.260 + +In fullscreen rendering, `/diff` now opens a panel beside the conversation instead of a viewer you have to close. The panel lists the changed files with their added and removed line counts and refreshes each time Claude edits a file or runs a shell command. Select lines in the panel with the mouse to attach them to your next prompt. + +With fullscreen rendering on, inside a git repository, and in a terminal at least 110 columns wide, toggle the panel: + +Claude Code + + > /diff + +Run `/diff` again or click the `✕` in its header to close it. + +[Diff panel](</docs/en/interactive-mode#diff-panel>) + +Find unused skills with /skill-doctorCLI + +`/skill-doctor` shows what each of your skills costs in context and how often it gets used, so you can decide which ones to turn off. Every skill in the [skill listing](</docs/en/skills#skill-descriptions-are-cut-short>) adds to your context on every turn, whether or not Claude ever uses it. Requires v2.1.252 or later and isn’t available in sessions that skip [feature-flag fetching](</docs/en/env-vars#features-that-need-feature-flag-fetching>). + +Run it in an interactive session to open the report in the `/plugin` manager’s **Stats** tab: + +Claude Code + + > /skill-doctor + +In non-interactive mode with `-p`, Claude Code prints the report as text instead. + +[Find unused skills](</docs/en/skills#find-unused-skills>) + +Other wins + +A [`PreModelSwitch`](</docs/en/hooks#premodelswitch>) hook can block a model switch you request, and a [`PostModelSwitch`](</docs/en/hooks#postmodelswitch>) hook can add context for Claude after the session’s model changes + +[`/cost`](</docs/en/costs#prompt-cache-statistics>) adds a `Prompt cache (main)` line: the share of input tokens served from cache, the cache misses, whether the cache is warm, and a likely cause for the last miss when Claude Code can name one. Status line scripts get a matching `prompt_cache` object + +Organizations can list HTTP and SSE MCP servers under the [`managedMcpServers`](</docs/en/managed-mcp#provide-servers-through-managed-settings>) managed setting to give them to every user, in addition to the servers that users add on their own + +`/effort` and the `/model` picker now [save a separate effort level for each model](</docs/en/model-config#adjust-effort-level>); press `s` instead of `Enter` to apply a level to the current session only + +By default, the auto mode classifier [now also blocks](</docs/en/permission-modes#what-the-classifier-blocks-by-default>) actions such as requesting credentials from the cloud instance-metadata endpoint or connecting to sibling containers that Claude didn’t start + +In auto mode, Claude Code asks you before Claude [first reads a file outside your working directories](</docs/en/permission-modes#first-read-outside-the-working-directories>), with an option to block such reads from then on + +Raise [`bashOutputMaxChars`](</docs/en/settings-reference#bashoutputmaxchars>) and [`taskOutputMaxChars`](</docs/en/settings-reference#taskoutputmaxchars>), up to 128,000 characters, so Claude receives more of the output from a successful command or background task inline + +The prompt’s [word-editing shortcuts follow readline](</docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>) for everyone, and the `keybindingFlavor` setting no longer has any effect. `Ctrl+W` deletes back to the previous whitespace, and `Alt+B`, `Alt+F`, and `Alt+D` treat punctuation such as `/` and `.` as word breaks + +If you set `defaultMode` to `“bypassPermissions”` in a project’s `.claude/settings.json` or `.claude/settings.local.json`, it [no longer takes effect](</docs/en/permission-modes#which-mode-a-session-starts-in>) and the session starts in Manual mode; set `“bypassPermissions”` in user or managed settings instead, or pass `--permission-mode` + +Seat-based Enterprise plans now [default to Opus 5](</docs/en/model-config#default-model-setting>) + +In the VS Code extension, click the model name at the bottom of the prompt box to [open the model picker](</docs/en/vs-code#use-the-prompt-box>) + +In the VS Code extension, select **Output styles** in the command menu’s Customize section to [pick an output style](</docs/en/vs-code#use-the-prompt-box>), including your custom ones + +[Full changelog for v2.1.251–v2.1.261 →](</docs/en/changelog#2-1-251>)
added Week 37 · September 7–11, 2026 View current →
--- a/2026-w37.md +++ b/2026-w37.md @@ -0,0 +1,45 @@ +Releases [v2.1.263 → v2.1.269](</docs/en/changelog#2-1-263>)2 features · September 7–11 + +Test plugins with claude plugin evalv2.1.269 + +`claude plugin eval` runs your plugin against a suite of test cases, scores the results, and by default runs each case again without the plugin so you can see what it contributes. `claude plugin eval init` asks you what a good result looks like, then proposes test cases and the checks that score them, tries the suite once, and writes the files. Every run, and every check that has a second model judge the reply, is a real model call on your account. + +From your plugin’s root directory, have Claude draft the suite: + +terminal + + claude plugin eval init + +When Claude tells you the suite is ready, exit the session that `claude plugin eval init` opened and run `claude plugin eval .` to score every case. The summary table prints in your terminal, and `report.html` under `evals/results/` has the per-run detail. + +[Test plugins with evals](</docs/en/plugin-evals>) + +Pop Desktop panes out into their own windowsDesktop + +In the Claude Code Desktop app, you can pop any pane out into its own window. Drag the diff or terminal to a second screen while Claude keeps working in the main window, then dock the pane back when you’re done. + +[Arrange your workspace](</docs/en/desktop#arrange-your-workspace>) + +Other wins + +Set [`maxEffortLevel`](</docs/en/settings-reference#maxeffortlevel>) at the top level or per model under `modelSettings` to cap the effort level on every provider, including Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry; any higher level runs at the cap + +Point `--plugin-dir` at a folder of plugins to [load each immediate subfolder that has a manifest](</docs/en/plugins#test-your-plugins-locally>) + +If WebFetch hasn’t finished downloading a page within five minutes, [the fetch fails with a deadline error](</docs/en/tools-reference#webfetch-tool-behavior>) instead of hanging; set `CLAUDE_CODE_WEBFETCH_DEADLINE_MS` to change the deadline, or to `0` to remove the limit + +Pass `--json` to `claude plugin install`, `uninstall`, `update`, `enable`, or `disable` to print the result as [one JSON object on the last line of stdout](</docs/en/plugins-reference#plugin-json-result>) + +When the auto mode classifier blocks an action, the reason Claude receives [usually names the rule that matched](</docs/en/auto-mode-config#fix-a-denial-with-an-allow-rule-an-environment-entry-or-a-retry>), such as `[Data Exfiltration]` + +When you type `/` partway through a prompt, you can now pick from [a list of matching commands](</docs/en/interactive-mode#complete-a-command-mid-prompt>) instead of a single suggestion. The list opens as you type in fullscreen rendering. A plugin skill also matches on its name without the plugin prefix + +In the VS Code extension, click the agent count at the bottom of the prompt box to open the [agent map](</docs/en/vs-code#use-the-prompt-box>), where you can open a subagent’s read-only transcript or stop it + +In the VS Code extension, select **Hooks** or **Permissions** in the command menu’s Customize section to [add or remove hooks and permission rules](</docs/en/vs-code#use-the-prompt-box>) in your user, project, and local settings + +Claude can pick a [browser-tab icon](</docs/en/artifacts#create-an-artifact>) to match each artifact it publishes + +In Claude Code on the web, take back a queued message in a cloud session before Claude reads it: remove it from the queue, or press `Esc` or `Up`, and the text returns to the message box + +[Full changelog for v2.1.263–v2.1.269 →](</docs/en/changelog#2-1-263>)
modified Claude Code on Amazon Bedrock View current →
--- a/amazon-bedrock.md +++ b/amazon-bedrock.md @@ -139,7 +139,7 @@ } } -As of Claude Code v2.1.181, 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. As of Claude Code v2.1.176, when the command returns a valid ISO 8601 `Expiration`, Claude Code caches the credentials until five minutes before that time. Without it, or on earlier versions, 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. +As of Claude Code v2.1.181, 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. ###
modified Share session output as artifacts View current →
--- a/artifacts.md +++ b/artifacts.md @@ -293,7 +293,7 @@ No backend| An artifact is a static page. It can’t authenticate viewers itself. Downloads| The page can’t start a download itself. To let viewers save a file the page generates, Claude declares the downloads capability. See Offer a file download. Single page| Relative links do not resolve, because nothing is deployed alongside the page. For multi-section content, Claude uses in-page anchors rather than separate files. -Source file types| The published file must be `.html`, `.htm`, or `.md`, and must decode as UTF-8, or as little-endian UTF-16 by its byte-order mark. Markdown files render as styled HTML. A file that doesn’t decode, or that contains the replacement character `U+FFFD`, is [refused with the line and column to fix](</docs/en/errors#the-source-file-is-not-valid-utf-8-text>). +Source file types| The published file must be `.html`, `.htm`, or `.md`, and must decode as UTF-8, or as little-endian UTF-16 by its byte-order mark. Markdown files render as styled document pages with syntax-highlighted code. A file that doesn’t decode, or that contains the replacement character `U+FFFD`, is [refused with the line and column to fix](</docs/en/errors#the-source-file-is-not-valid-utf-8-text>). Rendered size| The rendered page must be 16 MiB or smaller. Large embedded images are the usual cause when a publish fails for size. Generating an artifact uses output tokens like any other response, and a styled page is more token-intensive than the same content as terminal text. Inline CSS, JavaScript for interactive controls, and especially images embedded as data URIs are the main contributors. To reduce an artifact’s token cost:
modified Best practices for Claude Code View current →
--- a/best-practices.md +++ b/best-practices.md @@ -518,8 +518,6 @@ claude -p "<your prompt>" --output-format json | your_command -Use `--verbose` for debugging during development, and turn it off in production. - ### ​
modified Claude Code changelog View current →
Show diff (118 lines)
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,115 @@ This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version. + +​ + +2.1.272 + +September 15, 2026 + + * Bug fixes and reliability improvements + +​ + +2.1.271 + +September 14, 2026 + + * Added fast mode in Claude Code Remote sessions (cloud and self-hosted runners): the host’s fast-mode setting or `/fast` typed in the session applies where your organization allows it + * Added mouse support to the `/config` panel in fullscreen mode: the wheel scrolls the settings list, a click on a setting’s value changes it, and the row under the pointer is highlighted + * Added `claude self-hosted-runner --drain-marker-file <path>`: when that file exists at a SIGTERM drain, the runner reports its exit to the server as a host drain (telemetry only) + * Added per-command `allowed_domains` to Bash, PowerShell and Monitor in auto mode with sandboxing: the hosts a command needs are reviewed with it and opened for it alone; other hosts are refused + * Added `omitClaudeMd` to agent frontmatter and `--agents` JSON, letting custom and plugin subagents run without user, project and local CLAUDE.md files; managed policy files still load + * Added `--accept-command <sha256>` to `claude plugin install` and `claude plugin update` to accept exactly the command a previous `--json` run displayed, instead of `-y` + * Added support for a `multiplier` above 1, up to 10, in the `modelPricing` managed setting and the Claude apps gateway `pricing` block, for marked-up internal chargeback rates + * Added a spinner tip pointing Bedrock, Vertex AI, Foundry and LLM gateway users to the Claude desktop app; the claude.ai desktop app tip now suggests `/desktop`, which offers to download the app + * Fixed a cached organization policy being reused after switching accounts, organizations, or API keys, and the policy not refreshing until the hourly check when the credential changes mid-session + * Fixed the tool and command lists not updating when the organization policy finishes loading after startup or changes mid-session + * Fixed an enterprise `managed-mcp.json` that can’t be read or parsed being ignored: it now keeps exclusive MCP control (user, project and plugin servers don’t load) and warns at startup + * Fixed org policy being fetched through, and rejected by, third-party local proxies set via `ANTHROPIC_UNIX_SOCKET`; they are again treated like other custom gateways, including for Remote Control + * Fixed cloud sessions rejecting every subagent tool call (“updatedInput … failed schema validation”) when a workflow or agent approval was applied after the session’s worker restarted + * Fixed `/fast off` answering “Fast mode unavailable” instead of turning fast mode off when the organization has fast mode disabled + * Fixed sessions started with `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK` re-sending fast requests every turn after the API rejected fast mode; the rejection now stands and its reason is shown + * Fixed fast mode under `CLAUDE_CODE_RETRY_WATCHDOG` failing the turn on a usage-credits limit, or retrying an overload at fast speed, instead of falling back to standard speed + * Fixed Bash permission checks missing the file that `fmt`, `column` and similar commands read when it follows an option the checker doesn’t recognize + * Fixed Bash permission checks skipping files a wildcard expands to when the wildcard sits in a command’s pattern or option value (for example `grep -v dir/* file`) + * Fixed Bash permission checks so that shell variable declaration flags cannot misrepresent the command being run + * Fixed Bash commands with two directory changes, a subshell, or a `cd`+`git` chain skipping the prompt under `permissions.blockReadsOutsideWorkingDirectories` in bypass and auto mode + * Fixed a stale `.git/config.lock` breaking `git checkout -b`, `git push -u` and `git config` for the rest of a session after a sandboxed command failed to start (Linux) + * Fixed settings file changes made outside the session going unnoticed on macOS machines whose system file-event service is saturated; the watcher now falls back to polling + * Fixed resumed `claude -p` sessions whose tools all come from MCP servers failing with “At least one tool must have defer_loading=false” + * Fixed turns failing with “API returned an empty or malformed response” when an LLM gateway returns the non-streaming reply as `text/plain` + * Fixed sustained high CPU usage and repeated tool-list requests when an MCP server sends `list_changed` notifications in a tight loop + * Fixed MCP OAuth mishandling client registrations: denying consent forced a new one, one for another redirect URI was reused, and a concurrent write could delete a valid one or keep a mismatched one + * Fixed tool search returning no match when Claude selects an MCP tool by its bare name instead of its full `mcp__server__tool` name + * Fixed Ctrl+O cancelling pending MCP server reconnects, and `/mcp` sent from Remote Control failing while the transcript view is open + * Fixed the Claude in Chrome prompt telling the model to load tools through ToolSearch when ToolSearch is unavailable + * Fixed cross-session messages held by the receiving session’s permission-mode policy leaving no trace: headless senders now get a delivery notice, and `SendMessage` results no longer imply it was read + * Fixed Claude starting a second copy of a background command (such as a watch task or dev server) that was still running after the conversation was compacted + * Fixed `/model` warning about losing the conversation cache when switching back to the model the conversation actually ran on + * Fixed `/reload-skills` reporting a skill count that disagreed with the slash menu after `/cd` + * Fixed `/resume` and `/continue` showing only 1-2 sessions in fullscreen mode on short terminals + * Fixed `/resume` and `/teleport` keeping the previous conversation’s file-read tracking, so Claude could edit files the resumed conversation had never read + * Fixed `--resume` dropping the 1M context window (`[1m]`) when the resumed session’s model family differs from the configured default model + * Fixed artifacts attached with `/artifacts` disappearing from the session after `--resume` + * Fixed background sessions (`claude --bg`, `claude agents`) not watching the artifacts they publish for republishes made elsewhere + * Fixed custom agents, slash commands and output styles beyond the first not loading from a virtual drive that reports inode 0, such as an encrypted vault mounted as a Windows drive + * Fixed self-hosted runner sessions silently losing all host config (settings, skills, plugins, MCP servers) when the host config directory exceeds 64 MiB; added `--host-config-snapshot disk|memory` + * Fixed skills synced from claude.ai staying on disk indefinitely after signing out; copies not refreshed within `cleanupPeriodDays` now move to the recoverable trash at the next launch + * Fixed spinner tips suggesting commands that aren’t available for your account type or are disabled in your session + * Fixed the `/add-dir` path input: the left and right arrow keys now move the cursor, and Enter adds only the typed path instead of also adding the highlighted completion + * Fixed text fields outside the main prompt moving a leading `!` to the end of what you typed (`!foo` came out as `foo!`) + * Fixed the interactive `/hooks` menu crashing when a hook matcher is named after an inherited object property such as `__proto__` or `constructor` + * Fixed a fullscreen rendering glitch where text kept a stale background color after the box around it lost its background + * Fixed Delete in st and Alt+arrow keys in rxvt-unicode not working in attached background sessions + * Fixed the terminal’s replies to capability queries (`^[[?1;2c`) appearing at the shell prompt or in an editor when Claude Code exits, is suspended, or opens an editor right after starting + * Improved terminal rendering performance: large diffs and long transcripts render faster, with fewer slow frames + * Improved startup time slightly by skipping a redundant validation of built-in model data on every launch + * Improved hook feedback: while a SessionStart, UserPromptSubmit, PreToolUse or SessionEnd hook runs, the spinner says so with elapsed time, and Esc cancels a prompt waiting on a SessionStart hook + * Improved the spinner status during long thinking: it now reads “deep in thought” after 45s, and shows “picking the thought back up” while recovering from the output-token limit + * Improved dynamic workflows to pause when you hit your usage limit and continue automatically when it resets, instead of dropping the affected agents + * Improved Remote Control to leave fewer empty sessions on claude.ai when setup fails on a flaky network + * Improved the Claude in Chrome message in cloud sessions when the browser can’t be reached: it now says the computer may be asleep before it suggests an install + * Improved `claude mcp serve`: a running tool call now sends a progress update every 30 seconds, so clients show it is still running and idle timeouts don’t abort a long command that prints nothing + * Improved Foundry and Claude Platform on AWS sessions: an `alwaysLoad` MCP server that finishes connecting mid-conversation is usable on the next turn without a tool-search round trip + * Improved Markdown files published as artifacts: they now render as styled document pages (title header, document typography, syntax-highlighted code) + * Improved Artifact tool publish errors: a publish with no file now says to write the page to a file first, and an unsupported file type is reported before a missing favicon + * Improved the Artifact tool’s error when a page declares a capability its contract version lacks: it now lists every supported capability and notes when a newer contract version has it + * Improved artifact watching: a session can now watch up to 10 published artifacts at once for republishes made elsewhere, up from 5 + * Improved PDF @-mentions to say “page count unknown” instead of a page count guessed from the file size when pdfinfo cannot count the pages + * Improved `/mobile` to show a single QR code for claude.ai/mobile, which opens the right app store for your phone + * Changed auto mode so that a skill’s or slash command’s inline `!` shell commands follow default-mode permission rules instead of the classifier; a command no rule decides runs as a reviewed tool call + * Changed auto mode so a subagent reports back to its caller through a dedicated hand-back call that the safety classifier reviews, instead of its last message being reviewed after the fact + * Changed Monitor watches to always have a deadline (at most 30 minutes; 10 in single-prompt `-p` runs) and notify Claude to re-arm, replacing the no-timeout `persistent` option + * Changed the IDE selection indicator in the prompt to a `[⧉ …]` pill that wraps with the text instead of squeezing multi-line prompts; delete it with Backspace to leave the selection out + * Changed the default dynamic workflow size to small on Pro plans and lowered the medium size guideline from 15 to 10 agents + * Changed Claude apps gateway, Bedrock, Vertex AI, and Foundry sessions so that they no longer refresh a leftover claude.ai login that the session does not use + * Updated the bundled `claude-api` skill to enable `eager_input_streaming` on streaming custom tools, and to start deliverable-shaped Managed Agents work with `user.define_outcome` + * [VSCode] Added an Attach Open File setting that, when turned off, stops the open file from being added to messages; selected text is still attached + * [VSCode] Fixed the Hooks and Permission rules dialogs reporting a save that landed as failed, and the Hooks dialog going blank under a plugin-only policy lock or showing color codes in save errors + * [VSCode] Fixed Hooks dialog saves: no duplicate hook on replace, a header name retyped in other capitals keeps its secret, and settings.local.json is gitignored before the save returns + * [VSCode] Fixed session history showing only the current session when the workspace is on a Windows mapped network drive or SUBST drive + * [VSCode] Fixed the session list’s Active filter hiding open idle sessions when Open is also checked in the filter menu + * [VSCode] Fixed a new chat switching back to the previous chat when the session list refreshed + * [VSCode] Fixed open tabs and the side bar keeping the old config folder until a window reload after `CLAUDE_CONFIG_DIR` changed in the `environmentVariables` setting + * [VSCode] Fixed console windows flashing on Windows when the extension runs background commands such as git, ripgrep, and the sign-in status check + * [VSCode] Fixed the prompt cache clock’s hover text appearing only after a delay, and the auto-compact icon showing the browser’s own tooltip beside its popup + * [VSCode] Improved the Hooks dialog: a save refused because of the settings file itself now opens a popup with an “Open settings file” button and the reason behind “Copy error” + * [VSCode] Changed the on state of toggle switches from Claude orange to the editor theme’s button color + * [Claude Code on the web] Fixed a cloud session sometimes taking about ten minutes to respond after its process exited while the session still looked live; sending a message now restarts it right away + * [Claude Code on the web] Changed the Routines page on claude.ai/code to a new layout with Yours and Templates tabs and two-column routine cards that show run status, and removed its calendar view + * [Claude Code on the web] Added a Custom network access option to the Cloud environments editor in admin settings, with the same allowed-domains list the environment dialog on claude.ai/code offers + * [Claude Code on the web] Improved the Cloud environments admin page: it shows the default environment for Claude Tag and Claude Code, with a link to change it, and marks the recommended kind to create + * [Claude Tag] Fixed Claude in a channel where it stays active losing its working context about once an hour when the conversation is mostly in threads; thread activity now keeps it from being reset + * [Claude Tag] Fixed a thread that asked Claude to watch a pull request no longer hearing about CI failures, comments and reviews after Claude was restarted in that thread + * [Claude Tag] Fixed deleting the first message of a thread Claude had already replied in not ending Claude’s work there; it now stops, as it did when a message with no replies was deleted + * [Claude Tag] Fixed Claude holding back a post because of an earlier instruction addressed to a different bot or assistant; only instructions addressed to Claude bind it, and it asks when unsure + * [Claude Tag] Fixed the reply-mode card Claude posts on joining a busy channel saying it “sees a lot of automated posts” when the channel is only chatty or large; the card now names the real reason + * [Claude Tag] Improved the Environment picker in Claude Tag admin settings: options are labeled Anthropic-hosted or self-hosted, with links to edit that environment or create one + * [Code Review] Fixed a pull request in a repository reviewed once per PR sometimes getting no review when a commit arrived while its review was waiting to start; it now reviews the requested commit + * [Code Review] Fixed Code Review occasionally posting the same findings two or three times when GitHub reported an error for a review it had in fact created + * [Code Review] Fixed follow-up reviews re-posting a security finding a person had already resolved when a later push moved the lines it was anchored to + * [Code Review] Fixed reopening a finished /ultrareview cloud session in the Claude app starting the whole review over again unprompted + * Windows: Fixed PowerShell commands failing with “Exit code 1” and no output when the session’s temp output path reaches 260 characters ​
modified Claude apps gateway configuration View current →
--- a/claude-apps-gateway-config.md +++ b/claude-apps-gateway-config.md @@ -18,7 +18,7 @@ * `admin`: Admin API auth and retention for spend limits * `enforcement`: spend-limit fail-open or fail-closed behavior - * `pricing`: contracted rates and a discount multiplier for the spend meter and for the cost figures developers see + * `pricing`: contracted rates and a multiplier for the spend meter and for the cost figures developers see * `models` and `auto_include_builtin_models`: admin-curated model list and per-upstream IDs * `managed`: managed settings policies by IdP group * `telemetry`: OTLP forwarding to your observability stack @@ -457,7 +457,7 @@ Field| Required| Description ---|---|--- -`multiplier`| No| Default `1`. The meter multiplies every metered amount by this, whether list-priced or overridden, so `0.85` bills 85% of the price. Must be greater than 0 and at most 1. +`multiplier`| No| Default `1`. The meter multiplies every metered amount by this, whether list-priced or overridden, so `0.85` bills 85% of the price. Must be greater than 0 and at most 10, and a value above 1 is a markup. `overrides`| No| Rows of `{upstream, model, input, output, cache_read, cache_write}` in USD per million tokens. All four rates are required. Each must be greater than 0 and at most 10000. How the meter matches an override row: @@ -469,6 +469,19 @@ * Web-search requests stay at the $0.01 list price; the multiplier still applies to them. For per-region rates, give each region its own named upstream and one row per upstream. + +#### + +​ + +Mark prices up + +With v2.1.271 or later on the gateway server, you can set `multiplier` above 1, up to 10, to meter more than the provider charges, for example an internal chargeback rate. This example meters every request at 120% of the price: + + pricing: + multiplier: 1.2 + +With an `admin:` block, the markup also applies to spend limits. The meter counts 120% of the price, so developers reach their caps sooner. The gateway logs a warning at boot that says so. The multiplier doesn’t change what the upstream provider charges for the requests. If the gateway also sends the rates to signed-in clients, developers need Claude Code v2.1.271 or later to see the markup. Earlier clients ignore a `multiplier` above 1 and show costs without it. A gateway server earlier than v2.1.271 refuses to start if you set a `multiplier` above 1. #### @@ -851,8 +864,8 @@ # enforcement: # fail_closed_on_error: false - # Meter at contracted rates instead of USD list price. Requires admin:. - # With managed:, the same rates also go to signed-in clients. + # Meter at contracted rates instead of USD list price. Requires admin: or a + # managed: policy. With managed:, the same rates also go to signed-in clients. # Rates below are placeholders, not real contract prices. # pricing: # multiplier: 0.85
modified Use Claude Code on the web View current →
--- a/claude-code-on-the-web.md +++ b/claude-code-on-the-web.md @@ -196,7 +196,8 @@ 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`, `/fast`, `/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>): `/effort` reports `Not applied` while a model’s [launch-default effort hold](</docs/en/model-config#adjust-effort-level>) is in force, and `/fast` works only in a session that started with fast mode turned on. + * **`/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>): `/effort` reports `Not applied` while a model’s [launch-default effort hold](</docs/en/model-config#adjust-effort-level>) is in force. + * **`/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`** : on the web, 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 settings for a cloud session, use [environment variables](</docs/en/cloud-environments#set-environment-variables>) or commit [settings files](</docs/en/settings>) to the repository. For context management specifically:
modified Explore the .claude directory View current →
--- a/claude-directory.md +++ b/claude-directory.md @@ -20,7 +20,7 @@ ---|---|--- `managed-settings.json`| System-level, varies by OS| Enterprise-enforced settings that you can’t override, apart from [narrow exceptions](</docs/en/settings#security-keys-where-the-stricter-value-applies>). See [where to save the file](</docs/en/managed-settings#deploy-a-managed-settings-file>) and [which managed source Claude Code uses](</docs/en/managed-settings#precedence-within-the-managed-tier>). `CLAUDE.local.md`| Project root| Your private preferences for this project, loaded alongside CLAUDE.md. Create it manually and add it to `.gitignore`. -Installed plugins| `~/.claude/plugins`| Cloned marketplaces, installed plugin versions, and per-plugin data, managed by `claude plugin` commands. For a plugin installed from a marketplace [`command` source](</docs/en/plugin-marketplaces#command-sources>) in link mode, Claude Code stores links here instead of a copy, and the plugin’s files stay in the directory the command prints. See [plugin caching](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for how orphaned versions are cleaned up. +Installed plugins| `~/.claude/plugins`| Cloned marketplaces, installed plugin versions, and per-plugin data, managed by `claude plugin` commands. For a plugin installed from a marketplace [`command` source](</docs/en/plugin-marketplaces#command-sources>) in link mode, Claude Code stores links here instead of a copy, and the plugin’s files stay in the directory the command prints. A `command` source requires Claude Code v2.1.229 or later. See [plugin caching](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for how orphaned versions are cleaned up. `~/.claude` also holds data Claude Code writes as you work: transcripts, prompt history, file snapshots, caches, and logs. See application data below. @@ -133,7 +133,7 @@ * **Auto memory** : the sweep doesn’t delete the memory files in a project’s [auto memory](</docs/en/memory#auto-memory>) directory, `projects/<project>/memory/`. Claude Code removes that directory only if it has been empty for the whole retention period. Before v2.1.228, the sweep treated folders inside the memory directory as session data and could delete old files beneath it. * **Claude Desktop and Cowork transcripts** : Claude Code keeps the transcript of a session you started or most recently continued in Claude Desktop or Cowork at any age. To give these transcripts an age limit, set [`desktopSessionCleanupPeriodDays`](</docs/en/settings-reference#desktopsessioncleanupperioddays>). When [managed settings](</docs/en/managed-settings>) set `cleanupPeriodDays`, Claude Code deletes these transcripts after that period instead. Requires Claude Code v2.1.248 or later; earlier versions delete them after `cleanupPeriodDays`. -Claude Code skips the sweep entirely in these cases: +Claude Code skips the age-based sweep in these cases: * **Bare mode** : when you run `claude -p` with [`--bare`](</docs/en/headless#start-faster-with-bare-mode>), Claude Code doesn’t run the sweep in that session. * **Paused sweep** : if Claude Code can’t safely determine the retention period, it pauses the retention cleanup sweep; the [`retention_sweep` event](</docs/en/monitoring-usage#retention-sweep-event>) lists each configuration that pauses it. When the cause is a settings file that can’t be read or parsed, or settings errors with `cleanupPeriodDays` or `desktopSessionCleanupPeriodDays` explicitly set, Claude Code also shows a warning in `/status` until you fix the settings errors. When [managed settings](</docs/en/server-managed-settings>) provide `cleanupPeriodDays`, Claude Code runs the sweep at the managed value in either case. @@ -152,7 +152,7 @@ `stats-cache.json`| Aggregated token and cost counts shown by `/usage` `remote-settings.json`| Cached copy of [server-managed settings](</docs/en/server-managed-settings>) for your organization, or `{}` when your organization has configured none. Only present when the session [fetches them](</docs/en/server-managed-settings#platform-availability>). Claude Code checks for updates at startup and hourly during a session. Claude Code deletes it when you log out. `cache/changelog.md`| Cached copy of the Claude Code changelog, shown by `/release-notes`. Refreshed in the background. -`policy-limits.json`| Cached feature policy settings for your organization. Only present for some account types. Refreshed automatically. Claude Code deletes it when you log out. +`policy-limits.json`| Cached feature policy settings for your organization. Only present for some account types. Refreshed automatically. A `policy-limits.json.stamp.json` sidecar records which account or API key the cache belongs to. Claude Code deletes both files when you log out. Other files appear depending on which features you use. Caches and lock files are safe to delete. Keep these state files:
modified Configure cloud environments View current →
--- a/cloud-environments.md +++ b/cloud-environments.md @@ -510,7 +510,6 @@ Anthropic services * api.anthropic.com - * statsig.anthropic.com * docs.claude.com * platform.claude.com * code.claude.com @@ -582,6 +581,7 @@ * [www.java.net](<http://www.java.net>) * download.oracle.com * yum.oracle.com + * *.r2.cloudflarestorage.com JavaScript and Node package managers @@ -592,6 +592,8 @@ * npmjs.org * yarnpkg.com * registry.yarnpkg.com + * jsr.io + * npm.jsr.io Python package managers @@ -646,11 +648,13 @@ * central.maven.org * repo1.maven.org * repo.maven.apache.org + * maven.google.com * jcenter.bintray.com * gradle.org * [www.gradle.org](<http://www.gradle.org>) * services.gradle.org * plugins.gradle.org + * plugins-artifacts.gradle.org * kotlinlang.org * [www.kotlinlang.org](<http://www.kotlinlang.org>) * spring.io @@ -728,14 +732,7 @@ Cloud services and monitoring - * statsig.com - * [www.statsig.com](<http://www.statsig.com>) - * api.statsig.com - * sentry.io - * *.sentry.io - * downloads.sentry-cdn.com * http-intake.logs.datadoghq.com - * browser-intake-us5-datadoghq.com * *.datadoghq.com * *.datadoghq.eu * api.honeycomb.io
modified Common workflows View current →
--- a/common-workflows.md +++ b/common-workflows.md @@ -398,7 +398,7 @@ [Routines](</docs/en/routines>)| Cloud, Anthropic-managed by default| Tasks that should run even when your computer is off. Can also trigger on API calls or GitHub events in addition to a schedule. Configure at [claude.ai/code/routines](<https://claude.ai/code/routines>). [Desktop scheduled tasks](</docs/en/desktop-scheduled-tasks>)| Your machine, via the desktop app| Tasks that need direct access to local files, tools, or uncommitted changes. [GitHub Actions](</docs/en/github-actions>)| Your CI pipeline| Tasks tied to repo events like opened PRs, or cron schedules that should live alongside your workflow config. -[`/loop`](</docs/en/scheduled-tasks>)| The current CLI session| Quick polling while a session is open. Tasks stop when you start a new conversation; `--resume` and `--continue` restore unexpired ones. +[`/loop`](</docs/en/scheduled-tasks>)| The current CLI session| Quick polling while a session is open. `--resume` and `--continue` restore unexpired fixed-interval loops. When writing prompts for scheduled tasks, be explicit about what success looks like and what to do with results. The task runs autonomously, so it can’t ask clarifying questions. For example: “Review open PRs labeled `needs-review`, leave inline comments on any issues, and post a summary in the `#eng-reviews` Slack channel.”
modified Explore the context window View current →
--- a/context-window.md +++ b/context-window.md @@ -31,6 +31,7 @@ Nested CLAUDE.md in subdirectories| Claude Code reloads them as Claude reads files in that subdirectory Files Claude read or edited| Claude Code re-reads up to five, most recently modified first Invoked skill bodies| Re-injected, capped at 5,000 tokens per skill and 25,000 tokens total; oldest dropped first +[Background commands](</docs/en/interactive-mode#background-bash-commands>) and background [subagents](</docs/en/sub-agents#run-subagents-in-foreground-or-background>)| Keep running. Claude Code reminds Claude which ones are still running so it doesn’t start a duplicate Context that hooks added earlier| Summarized with the rest of the conversation [SessionStart hooks](</docs/en/hooks-guide#re-inject-context-after-compaction>) that match the `compact` source| Claude Code runs them and adds their output to the compacted context
modified Manage costs effectively View current →
--- a/costs.md +++ b/costs.md @@ -55,7 +55,7 @@ * **Behavior flags** : behaviors such as long context or cache misses, flagged when one accounts for 10% or more of recent usage. * **Loops** : a row for each of the heaviest [`/loop` or other scheduled tasks](</docs/en/scheduled-tasks>) that ran recently, ordered by total tokens, with a count of the rest. Claude Code reports how often each task fires, how many times it ran, its total and per-run tokens, and when it last ran. Claude Code keys a row by the task’s prompt, so a loop you stop and re-create stays one row. Requires Claude Code v2.1.242 or later. -Press `d` or `w` to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local session history on this machine, so usage from other devices or claude.ai is not included. In the [VS Code extension](</docs/en/vs-code#check-account-and-usage>), the attribution shares and behavior flags appear in the Account & usage dialog with a Day and Week toggle, without the Loops rows. Requires Claude Code v2.1.174 or later. +Press `d` or `w` to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local session history on this machine, so usage from other devices or claude.ai is not included. In the [VS Code extension](</docs/en/vs-code#check-account-and-usage>), the attribution shares and behavior flags appear in the Account & usage dialog with a Day and Week toggle, without the Loops rows. #### @@ -136,7 +136,7 @@ Write the setting -Set `multiplier` for a flat percentage off list price, list each model’s four per-token rates under `overrides`, or do both. The [`modelPricing` entry](</docs/en/settings-reference#modelpricing>) has the shape and a paste-ready example. +Set `multiplier` below 1 for a flat discount or above 1 for a markup, list each model’s four per-token rates under `overrides`, or do both. A markup requires Claude Code v2.1.271 or later. The [`modelPricing` entry](</docs/en/settings-reference#modelpricing>) has the shape and a paste-ready example. 3
modified Message your other Claude Code sessions View current →
--- a/cross-session-messaging.md +++ b/cross-session-messaging.md @@ -208,7 +208,7 @@ * If this session’s permission-mode class changes while messages are held, Claude Code re-applies the inbound rules, delivers the messages they now accept, and shows a notice. * If a settings change makes `refuse` apply while messages are held, Claude Code drops every held message and reports a refusal to each sender it can reach. -When the sender is an interactive session on the same machine, Claude Code shows a notice there when the receiver holds the message, and a follow-up when the receiver later delivers, denies, or expires it. If the receiver refuses it, Claude Code shows a notice there that the receiver isn’t accepting cross-session messages and tells the sender’s Claude not to wait or resend. Claude Code holds at most 100 messages, separately from the delivery queue, and past that drops the oldest. +When the sender is a session on the same machine, Claude Code sends a notice back to it when the receiver holds the message, and a follow-up when the receiver later delivers, denies, or expires it. The notice reaches the sending Claude, so it knows not to keep waiting on a message the other session hasn’t read. In an interactive sending session, the notice appears in the transcript. A [`claude -p`](</docs/en/headless>) sender receives it in [streamed output](</docs/en/headless#stream-responses>) as an [informational `system` message](</docs/en/agent-sdk/typescript#sdkinformationalmessage>). Notices to `claude -p` senders require Claude Code v2.1.271 or later. If the receiver refuses the message, the sender’s notice says the receiver isn’t accepting cross-session messages and tells the sender’s Claude not to wait or resend. Claude Code holds at most 100 messages, separately from the delivery queue, and past that drops the oldest. ###
modified Debug your configuration View current →
--- a/debug-your-config.md +++ b/debug-your-config.md @@ -95,7 +95,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| They load when Claude reads a file in that directory with the Read tool, not at launch and not when writing or creating files there. See [how CLAUDE.md 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`. Custom subagents load it the same way the main conversation does| For Explore or Plan, restate the instruction in your delegating prompt. For a 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`. 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>). 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 Desktop application View current →
--- a/desktop.md +++ b/desktop.md @@ -183,7 +183,7 @@ Arrange your workspace -The Code tab is built around panes you can arrange in any layout: chat, diff, browser, terminal, file, plan, tasks, and subagent, along with the [iOS Simulator](</docs/en/desktop-ios-simulator>) on macOS. Drag a pane by its header to reposition it, or drag a pane edge to resize it. Press **Cmd+\** on macOS or **Ctrl+\** on Windows to close the focused pane. Open additional panes from the **Views** menu in the session toolbar. +The Code tab is built around panes you can arrange in any layout: chat, diff, browser, terminal, file, plan, tasks, and subagent, along with the [iOS Simulator](</docs/en/desktop-ios-simulator>) on macOS. Drag a pane by its header to reposition it, or drag a pane edge to resize it. Press **Cmd+\** on macOS or **Ctrl+\** on Windows to close the focused pane. Open additional panes from the **Views** menu in the session toolbar. To work across screens, pop a pane such as the diff or terminal out into its own window, and dock it back when you’re done. Claude keeps working in the main window. The pane layout, terminal, file editor, and view modes in this section require Claude Desktop v1.2581.0 or later. Open **Claude → Check for Updates** on macOS or **Help → Check for Updates** on Windows to update. @@ -280,7 +280,7 @@ Computer use is a research preview on macOS and Windows that requires a Pro or Max plan. It is not available on Team or Enterprise plans. The Claude Desktop app must be running. -Computer use is off by default. Enable it in Settings before Claude can control your screen. On macOS, you also need to grant Accessibility and Screen Recording permissions. +Computer use is off by default. Enable it in Settings before Claude can control your screen. On macOS, you also need to grant Accessibility and Screen Recording permissions. On macOS, computer use can also run in the background: Claude works in the apps you’ve approved while you keep working. Unlike the [sandboxed Bash tool](</docs/en/sandboxing>), computer use runs on your actual desktop with access to whatever you approve. Claude checks each action and flags potential prompt injection from on-screen content, but the trust boundary is different. See the [computer use safety guide](<https://support.claude.com/en/articles/14128542>) for best practices. @@ -348,7 +348,7 @@ Apps with broad reach, like terminals, Finder or File Explorer, and System Settings or Settings, show an extra warning in the prompt so you know what approving them grants. You can configure two settings in **Settings > General** (under **Desktop app**): * **Denied apps** : add apps here to reject them without prompting. Claude may still affect a denied app indirectly through actions in an allowed app, but it can’t interact with the denied app directly. - * **Unhide apps when Claude finishes** : while Claude is working, your other windows are hidden so it interacts with only the approved app. When Claude finishes, hidden windows are restored unless you turn this setting off. + * **Unhide apps when Claude finishes** : when computer use isn’t running in the background, Claude hides your other windows while it works so it interacts with only the approved app. When Claude finishes, hidden windows are restored unless you turn this setting off. ## @@ -873,7 +873,7 @@ Coming from the CLI? -If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each maintains separate session history, but they share configuration and project memory via CLAUDE.md files. To move a CLI session into Desktop, run `/desktop` in the terminal. Claude saves your session and opens it in the desktop app, then exits the CLI. This command is available on macOS and x64 Windows when you are signed in with a Claude subscription. It is not available with API key authentication or on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. +If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each keeps its own session list, and you can bring a CLI session into Desktop. They share configuration and project memory via CLAUDE.md files. To move a CLI session into Desktop, run `/desktop` in the terminal. Claude saves your session and opens it in the desktop app, then exits the CLI. This command is available on macOS and x64 Windows when you are signed in with a Claude subscription. It is not available with API key authentication or on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. To pick up a CLI session from inside Desktop instead, type `/resume` in the prompt box. Desktop lists the sessions you started from the CLI, and you can search them by title, folder, or branch and preview where each one left off. Select a session and it continues in the app with its full conversation and context. When to use Desktop vs CLI: use Desktop when you want to manage parallel sessions in one window, arrange panes side by side, or review changes visually. Use the CLI when you need scripting, automation, or prefer a terminal workflow. @@ -888,7 +888,7 @@ CLI| Desktop equivalent ---|--- `--model sonnet`| Model dropdown next to the send button -`--resume`, `--continue`| Click a session in the sidebar +`--resume`, `--continue`| Click a session in the sidebar, or type `/resume` in the prompt box to pick up a session you started from the CLI `--permission-mode`| Mode selector next to the send button `--dangerously-skip-permissions`| Bypass permissions mode. On Pro and Max plans, enable it in Settings → Claude Code → “Allow bypass permissions mode”; on Team and Enterprise plans, organization policy controls it `--add-dir`| Add multiple repos with the **+** button in cloud sessions
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -322,7 +322,7 @@ `CLAUDE_CODE_RESUME_INTERRUPTED_TURN`| Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt. To turn this off, unset the variable or set it to `0`. Before v2.1.221, Claude Code ignored `0` and other falsy values, so setting `0` still triggered the resume in non-interactive mode and unsetting the variable was the only way to turn it off `CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS`| Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume. When the last message is older than this bound, Claude Code skips both the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` automatic resume and the injected `CLAUDE_CODE_RESUME_PROMPT` continuation message, and the session starts idle so you continue explicitly. Unset or `0` means no bound; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript doesn’t re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed [agent view](</docs/en/agent-view>) session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later `CLAUDE_CODE_RESUME_PROMPT`| Override the continuation message injected when resuming a session that ended mid-turn. Defaults to `Continue from where you left off.`. Spawn scripts for long-running agents can set this to a more directive boot message. An empty string uses the default -`CLAUDE_CODE_RETRY_WATCHDOG`| Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once on a `429` that reports a spend limit or exhausted usage credits, even one from a [gateway spend cap](</docs/en/errors#spend-limit-reached>) that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later +`CLAUDE_CODE_RETRY_WATCHDOG`| Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once when a standard-speed request gets a `429` that reports a spend limit or exhausted usage credits, even one from a [gateway spend cap](</docs/en/errors#spend-limit-reached>) that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. For fast mode requests, see [Handle rate limits](</docs/en/fast-mode#handle-rate-limits>). The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later `CLAUDE_CODE_SAFE_MODE`| Set to `1` to start in safe mode: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto memory do not load, for troubleshooting a broken configuration. Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Equivalent to passing [`--safe-mode`](</docs/en/cli-reference#cli-flags>). Directly spawned child processes inherit the variable `CLAUDE_CODE_SCRIPT_CAPS`| JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control `CLAUDE_CODE_SCROLL_SPEED`| Set the mouse wheel scroll multiplier in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Accepts any positive value up to 20, including fractional values below 1 such as `0.5` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification. Ignored in the JetBrains IDE terminal, where Claude Code uses its own scroll handling
modified Error reference View current →
--- a/errors.md +++ b/errors.md @@ -313,7 +313,7 @@ Variable| Default| Effect ---|---|--- [`CLAUDE_CODE_MAX_RETRIES`](</docs/en/env-vars>)| 10| Number of retry attempts. Capped at 15 as of v2.1.186; as of v2.1.199 `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. Lower it to surface failures faster in scripts. -[`CLAUDE_CODE_RETRY_WATCHDOG`](</docs/en/env-vars>)| unset| Set to `1` in unattended sessions such as CI jobs to retry `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once on 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. 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`](</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. [`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_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. @@ -871,6 +871,7 @@ * A `CLAUDE_CODE_USE_*` provider variable, such as `CLAUDE_CODE_USE_BEDROCK` for [Amazon Bedrock](</docs/en/amazon-bedrock>) or `CLAUDE_CODE_USE_VERTEX` for [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) * [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) pointing at a host other than `api.anthropic.com`, such as an [LLM gateway](</docs/en/llm-gateway>) or proxy, even when you sign in with claude.ai; before v2.1.196, a custom base URL didn’t block Remote Control + * `ANTHROPIC_UNIX_SOCKET` set, so the session sends its requests through a local socket rather than to `api.anthropic.com` * An enterprise [cloud gateway](</docs/en/claude-apps-gateway>) sign-in made through `/login`, which doesn’t support Remote Control and has no variable to unset **What to do:** @@ -954,8 +955,7 @@ Your saved login is no longer valid. A revoked token means you signed out everywhere or an admin removed access; an expired token means the automatic refresh failed mid-session. Both messages report a rejection the API returned for a request Claude Code sent. When the saved login has already been cleared after a failed refresh, you see Login expired instead. If you authenticate with a long-lived token in [`CLAUDE_CODE_OAUTH_TOKEN`](</docs/en/env-vars>), you see the same messages when that token expires or is revoked. OAuth token revoked · Please run /login - OAuth token has expired · Please run /login - API Error: 401 ... authentication_error + Please run /login · API Error: 401 OAuth token has expired ... **What to do:** @@ -996,7 +996,7 @@ Failed to authenticate: OAuth session expired and could not be refreshed -This is not the same state as OAuth token revoked or expired. Those messages report a 401 the API returned. Claude Code itself produces `Login expired` for a login it already failed to renew, so it sends no request. When the renewal fails because the account itself is suspended rather than the login being stale, Claude Code shows Your account is on hold instead. Sessions authenticated with an API key, [`CLAUDE_CODE_OAUTH_TOKEN`](</docs/en/env-vars>), or a third-party provider don’t use the saved login and never see this message. You can check for this state before a request fails: [`/status`](</docs/en/commands>) shows a `Login` row reading `Expired — log in again`, plus the organization and email it has saved for the expired login. The row appears only when the saved login is your active credential and can no longer be refreshed. Sessions authenticated another way don’t show the row, even if an expired login remains saved. Before v2.1.210, `/status` gave no indication in this state that a login had ever existed, because the cleared credential left it nothing to report. **What to do:** +This is not the same state as OAuth token revoked or expired. Those messages report a rejection the API returned. Claude Code itself produces `Login expired` for a login it already failed to renew, so it sends no request. When the renewal fails because the account itself is suspended rather than the login being stale, Claude Code shows Your account is on hold instead. Sessions authenticated with an API key, [`CLAUDE_CODE_OAUTH_TOKEN`](</docs/en/env-vars>), or a third-party provider don’t use the saved login and never see this message. You can check for this state before a request fails: [`/status`](</docs/en/commands>) shows a `Login` row reading `Expired — log in again`, plus the organization and email it has saved for the expired login. The row appears only when the saved login is your active credential and can no longer be refreshed. Sessions authenticated another way don’t show the row, even if an expired login remains saved. Before v2.1.210, `/status` gave no indication in this state that a login had ever existed, because the cleared credential left it nothing to report. **What to do:** * Run `/login` to sign in again. Retrying without signing in shows the same message on every request. * In non-interactive mode, run `claude` in the same environment, complete `/login`, then rerun your command. For automation that can’t sign in interactively, authenticate with `ANTHROPIC_API_KEY` or [generate a long-lived token with `claude setup-token`](</docs/en/authentication#generate-a-long-lived-token>). @@ -1302,7 +1302,7 @@ * A `Response:` clause with the content type, the kind of body, such as `body is an HTML page` or `empty body`, its size in bytes, and whether the response carried an Anthropic request id. When the response names a recognizable server, such as `nginx` or `cloudflare`, or carries intermediary headers, such as `cf-ray` or `via`, the clause lists those too. * A sentence naming the failed streaming request’s id and the failure that triggered the retry. When a stream had opened before the failure, it also reports how many stream events arrived and, if any did, how long the stream had been silent when the attempt failed. -Before v2.1.234, the message ended after `intercepting the request`. **What to do:** +Before v2.1.234, the message ended after `intercepting the request`. Before v2.1.271, a reply that carried a valid API message under a non-JSON content type such as `text/plain` also ended the turn with this error. Some LLM gateways use that content type for the non-streaming reply. **What to do:** * Read the `Response:` clause to see which system answered. An HTML body, no Anthropic request id, or a named server such as `nginx` or `cloudflare` means that something between Claude Code and the API replied in its place * If you route through an [LLM gateway](</docs/en/llm-gateway-connect#troubleshoot-gateway-errors>), test the route with a direct request and fix the hop that returns the non-API response @@ -1533,7 +1533,7 @@ Context exceeds the 200k-token limit by 94k tokens — run /compact or /clear to continue. -When the limit you exceeded is a compaction window smaller than the model’s context window, such as the 200K boundary on 1M-context models, the warning reads differently. Requests still succeed past a compaction window; run the named command to bring usage back under it. +When the limit you exceeded is a compaction window, such as the 200K boundary on 1M-context models, the warning reads differently. A compaction window can sit below the model’s context window, so requests past it can still succeed. Context is 94k tokens past the 200k-token compaction window — run /compact to reduce usage.
modified Speed up responses with fast mode View current →
--- a/fast-mode.md +++ b/fast-mode.md @@ -18,7 +18,7 @@ * Type `/fast` and press Tab to toggle on or off * Set `"fastMode": true` in your [user settings file](</docs/en/settings>) -By default, fast mode you turn on in an interactive session persists across sessions. In [non-interactive mode](</docs/en/headless>), with the `-p` flag, `/fast` works only in a session launched with fast mode in its [`--settings`](</docs/en/cli-reference#cli-flags>) value, for example `claude -p --settings '{"fastMode": true}'`; the toggle then applies to that session only and isn’t saved as your default, and in any other non-interactive session the command reports that fast mode isn’t available. You can configure fast mode to reset each session. See require per-session opt-in for details. You can run `/fast` while Claude is working, and Claude Code toggles fast mode without waiting for the turn to end. Claude Code finishes the running turn at its original speed, so the speed change takes effect from your next turn. If your current model doesn’t support fast mode, turning it on also switches your model, and Claude Code uses the new model from its next request in that turn. For the best cost efficiency, enable fast mode at the start of a session rather than switching mid-conversation. See understand the cost tradeoff for details. When you enable fast mode: +By default, fast mode you turn on in an interactive session persists across sessions. You can configure fast mode to reset each session. See require per-session opt-in for details. Outside a cloud session, in [non-interactive mode](</docs/en/headless>) with the `-p` flag, `/fast` works only in a session launched with fast mode in its [`--settings`](</docs/en/cli-reference#cli-flags>) value, for example `claude -p --settings '{"fastMode": true}'`; the toggle then applies to that session only and isn’t saved as your default. The `-p` form requires Claude Code v2.1.205 or later. Elsewhere in non-interactive mode, the command reports that fast mode isn’t available. You can run `/fast` while Claude is working, and Claude Code toggles fast mode without waiting for the turn to end. Claude Code finishes the running turn at its original speed, so the speed change takes effect from your next turn. If your current model doesn’t support fast mode, turning it on also switches your model, and Claude Code uses the new model from its next request in that turn. For the best cost efficiency, enable fast mode at the start of a session rather than switching mid-conversation. See understand the cost tradeoff for details. When you enable fast mode: * If your current model doesn’t support fast mode, Claude Code switches to Opus * You’ll see a confirmation message: “Fast mode ON” @@ -40,6 +40,14 @@ Whenever a model switch turns fast mode on or off, Claude Code shows a `Fast mode ON` or `Fast mode OFF` confirmation, and the `↯` icon appears while fast mode is on. This holds whether you switch with `/model`, with [`/config model=<model>`](</docs/en/settings>), or from a device connected through [Remote Control](</docs/en/remote-control>). Claude Code resends the session’s fast mode status to devices connected through Remote Control after a model switch, a reconnection, or a failed availability check. +### + +​ + +Use fast mode in cloud sessions + +Fast mode works in [cloud sessions](</docs/en/claude-code-on-the-web>) when it’s available on your account, whether the session runs on Anthropic-managed infrastructure or a [self-hosted runner](</docs/en/self-hosted-environments>). Requires Claude Code v2.1.271 or later in the session’s environment. Type `/fast on` in the session to turn fast mode on. It stays on for that session only and isn’t saved as your default. The requirements apply in cloud sessions too. + ## ​ @@ -118,7 +126,10 @@ * **Paid Console organization** : Claude Console accounts don’t use usage credits, and your organization pays for fast mode per token with the rest of its API usage. On the Console’s free Evaluation plan, `/fast` shows “Fast mode unavailable during evaluation. Please purchase credits.” To clear it, purchase credits in your [Console billing settings](<https://platform.claude.com/settings/billing>). * **Owner enablement for Team and Enterprise** : fast mode is disabled by default for Team and Enterprise organizations. An Owner must explicitly enable fast mode before users can access it. -If fast mode has not been enabled for your organization, the `/fast` command will show “Fast mode has been disabled by your organization.” If your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes the fast-mode Opus model, `/fast` is refused with “is not in your organization’s allowed models”. The exception is a session already running on an allowed Opus model that supports fast mode: `/fast` enables fast mode on your current model instead of switching models. +Two organization settings can block turning fast mode on with `/fast`: + + * **Fast mode not enabled** : if fast mode hasn’t been enabled for your organization, turning fast mode on with `/fast` shows “Fast mode has been disabled by your organization.” + * **Fast-mode model not allowed** : if your organization’s [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist excludes the fast-mode Opus model, turning it on is refused with “is not in your organization’s allowed models”. In a session already running on an allowed Opus model that supports fast mode, `/fast` instead enables fast mode on your current model without switching models. ### @@ -149,7 +160,7 @@ * A session that authenticates with [`ANTHROPIC_AUTH_TOKEN`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>) alone skips the check: without a claude.ai login or an Anthropic API key, and without a cached successful check, Claude Code treats fast mode as disabled by your organization without sending the request. * A proxy that intercepts the check and answers with its own page, for example a TLS-inspecting proxy returning an HTTP 200 block page, is read as a response saying your organization has fast mode disabled. -In both cases, set `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK=1` to restore fast mode. `CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS` doesn’t apply to either case, since it only bypasses failed checks and both of these produce a disabled response instead. Allowlisting direct egress doesn’t help the bearer-token case, which never sends the request. The variables affect only the client-side check. When your organization has fast mode disabled, the API rejects fast mode requests whether or not they’re set. Setting `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` also suppresses the availability check. Without a previously cached successful check, `/fast` reports “Fast mode is currently unavailable”; both skip variables restore fast mode in that configuration too. +In both cases, set `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK=1` to restore fast mode. `CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS` doesn’t apply to either case, since it only bypasses failed checks and both of these produce a disabled response instead. Allowlisting direct egress doesn’t help the bearer-token case, which never sends the request. The variables affect only the client-side check. When your organization has fast mode disabled, the API rejects fast mode requests whether or not they’re set. A rejection from the API stands even with a skip variable set. Claude Code retries the rejected request at standard speed, turns fast mode off, and `/fast` reports that your organization has disabled fast mode. Setting `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` also suppresses the availability check. Without a previously cached successful check, `/fast` reports “Fast mode is currently unavailable”; both skip variables restore fast mode in that configuration too. ###
modified Extend Claude Code View current →
--- a/features-overview.md +++ b/features-overview.md @@ -246,7 +246,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>) + * 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 * 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 Fullscreen rendering View current →
--- a/fullscreen.md +++ b/fullscreen.md @@ -84,6 +84,7 @@ * **Click a suggestion in the`/` command or `@` file list** to accept it. Hovering highlights the row under your cursor. * **Click an option in a select menu** to choose it. This covers permission prompts, `/model`, `/config`, and other dialogs that show a list of options. Hovering shows a pointer on the row under your cursor. Requires Claude Code v2.1.187 or later. * **Click an option in a multi-select menu** to toggle it, and click the submit button to confirm your choices. Clicking a free-text row, such as the `Other` row in a multiple-choice question, focuses its input field so you can type an answer. Requires Claude Code v2.1.208 or later. + * **Click a setting’s value in the`/config` panel** to change it, and scroll the settings list with the mouse wheel. Requires Claude Code v2.1.271 or later. * **Click a collapsed tool result** to expand it and see the full output. Click again to collapse. The tool call and its result expand together. Only messages that have more to show are clickable. * Clicking also expands the output of a `!` shell command, whether an older truncated result or the live progress row while the command runs. Requires Claude Code v2.1.257 or later. * **Hold`Cmd` on macOS, or `Ctrl` on Linux and Windows, and click a URL or file path** to open it. Plain `http://` and `https://` URLs open in your browser, and file paths in tool output, like the ones printed after an Edit or Write, open in your default application. A plain click without the modifier doesn’t open links, matching native terminal behavior.
modified How Claude Code works View current →
--- a/how-claude-code-works.md +++ b/how-claude-code-works.md @@ -187,7 +187,7 @@ Claude Code can teach you how to use it. Ask questions like “how do I set up hooks?” or “what’s the best way to structure my CLAUDE.md?” and Claude will explain. Built-in commands also guide you through setup: - * `/init` walks you through creating a CLAUDE.md for your project + * `/init` generates a starter CLAUDE.md for your project * `/doctor` runs a setup checkup that diagnoses installation and configuration issues and can fix them ###
modified What's new View current →
--- a/index.md +++ b/index.md @@ -2,6 +2,36 @@ ​ +Week 37 + +v2.1.263–v2.1.269 + +September 7–11, 2026 + +**`claude plugin eval`** : run your plugin against a suite of test cases, score the results, and compare against a no-plugin baseline. `claude plugin eval init` drafts the cases and graders for you.Also this week: pop any **Claude Code Desktop pane** out into its own window and dock it back later; the **`maxEffortLevel`** setting caps the effort level on every provider; and a page that **WebFetch** hasn’t finished downloading within five minutes fails instead of hanging.[Read the Week 37 digest →](</docs/en/whats-new/2026-w37>) + +​ + +Week 36 + +v2.1.251–v2.1.261 + +August 31 – September 4, 2026 + +**Claude Fable 5.1** : available in Claude Code with a 1M-token context window.Also this week: on Pro and Max plans, **computer use in the Desktop app** works in the background on macOS while you keep working; in fullscreen rendering, **`/diff`** opens a live panel beside the conversation that refreshes as Claude edits; and **`/skill-doctor`** shows what each of your skills costs in context and how often it gets used.[Read the Week 36 digest →](</docs/en/whats-new/2026-w36>) + +​ + +Week 35 + +v2.1.240–v2.1.250 + +August 24–28, 2026 + +**Resume terminal sessions in the Desktop app** : type `/resume` in the Claude Code Desktop prompt box to pick up any session you started from the CLI, with the full conversation and context intact.Also this week: **Claude-drafted feedback** has Claude write up a feedback report when something goes wrong in a session, which you review and send from `/feedback`; **`--restricted`** starts a session without the command-running tools or your user and project settings, for evaluation harnesses on shared machines; and the **`modelPicker`** setting controls which models the `/model` picker lists.[Read the Week 35 digest →](</docs/en/whats-new/2026-w35>) + +​ + Week 34 v2.1.234–v2.1.239
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -601,7 +601,8 @@ When the panel can’t open, `/diff` opens the diff viewer instead or tells you why. The panel also opens on its own once Claude starts editing files, if your terminal is at least 144 columns wide. After you’ve opened it yourself with `/diff`, later sessions open it as soon as Claude edits a file in any terminal wide enough to fit it. Close the panel and it stays closed, in this session and later ones, until you run `/diff` again. While the panel is open, you can: * **Jump to a file** : click its row in the list. Scroll the panel with the mouse wheel. When the file list itself is too long to fit, scroll it with `Alt+Up` and `Alt+Down`, or `Ctrl+Up` and `Ctrl+Down`. - * **Ask Claude about specific lines** : select them in the panel with the mouse. Claude Code attaches the selection to your next prompt and shows a line count next to the input until you send it. + * **Ask Claude about specific lines** : select them in the panel with the mouse. Claude Code attaches the selection to your next prompt and shows a line count in the input until you send it. + * To send the prompt without the selection, move the cursor to just after the line-count indicator and press `Backspace` to delete it. Requires Claude Code v2.1.271 or later. * **Show the files the panel leaves out** : the list skips test files and generated files, and collapses changes from before this session into one line at the bottom. Click either count line to expand it. * **Change what the panel compares against** : press `Ctrl+X B` to cycle from this session’s changes, to your uncommitted changes as one list, to everything since your branch split from the default branch. Claude Code remembers the choice for each project.
modified JetBrains IDEs View current →
--- a/jetbrains.md +++ b/jetbrains.md @@ -112,7 +112,7 @@ General settings * **Claude command** : specify a custom command to run Claude, for example `claude`, `/usr/local/bin/claude`, or `npx @anthropic-ai/claude-code` - * **Suppress notification for Claude command not found** : skip notifications about not finding the Claude command + * **Suppress notification for when Claude Command is not found** : skip notifications about not finding the Claude command * **Enable using Option+Enter for multi-line prompts** : on macOS only. When enabled, Option+Enter inserts new lines in Claude Code prompts. Disable if the Option key is being captured unexpectedly. Requires a terminal restart. * **Enable automatic updates** : automatically check for and install plugin updates, applied on restart @@ -269,7 +269,7 @@ Tool name (as seen by hooks)| What it does| Read-only ---|---|--- -`mcp__ide__getDiagnostics`| Returns the IDE’s inspection diagnostics, the errors and warnings shown in the editor. Optionally scoped to one file.| Yes +`mcp__ide__getDiagnostics`| Returns the IDE’s inspection diagnostics, the errors and warnings shown in the editor. Each call covers one file: the file Claude specifies, or the file in your active editor if Claude doesn’t specify one.| Yes The JetBrains plugin does not expose a code-execution tool to the model. **Listening interface.** Which network interface the server binds to is controlled by **Accept connections from all network interfaces** under **Settings → Tools → Claude Code [Beta] → Networking (Advanced)**. With the setting disabled, the server listens on `127.0.0.1` only and is not reachable from other hosts. With it enabled, the port is reachable from your local network. The setting exists for cases where the CLI cannot reach the IDE over loopback, such as WSL2 with default NAT networking or a remote-IDE setup; see WSL configuration for that scenario.
modified Set up Claude Code in a monorepo or large codebase View current →
--- a/large-codebases.md +++ b/large-codebases.md @@ -331,13 +331,13 @@ Keep skills discoverable -With skills spread across many directories, the list Claude chooses from can grow large. Claude picks a skill by reading every discovered skill’s name and description, and only the chosen skill’s full content loads into context. This section covers how to keep that list small and write descriptions that survive shortening. Which skills are in scope depends on where you start Claude: +With skills spread across many directories, the list Claude chooses from can grow large. Claude picks a skill by reading every discovered skill’s name and description, and only the chosen skill’s full content loads into context. This section covers how to keep that list small. Which skills are in scope depends on where you start Claude: * **From a subdirectory such as`packages/api/`**: skills from that directory, every parent up to the repository root, and the user and enterprise levels * **From the repository root** : root skills, plus skills from every subdirectory Claude touches during the session, which can accumulate into the hundreds * **After adding a sibling with`--add-dir`**: that sibling’s skills load too. The `additionalDirectories` setting grants file access only and does not load skills -Names always load, but [descriptions are shortened when there are many](</docs/en/skills#skill-descriptions-are-cut-short>), which can strip the keywords Claude uses to decide whether a skill applies. Keep descriptions short and lead with words a request would contain, like “writing or modifying tests in `packages/api/`”. For skills that many directories share, such as PR conventions or a deploy checklist, place them in the repository root’s `.claude/skills/` so they load from any starting directory. When shared skills need their own version history or must work across repositories, package them as a [plugin](</docs/en/plugins>) instead. Plugin skills use a `plugin-name:skill-name` namespace, so they never collide with per-directory skills. A platform team can version and update them in one place. To find which skills go unused, enable the OpenTelemetry [logs exporter](</docs/en/monitoring-usage>) and set `OTEL_LOG_TOOL_DETAILS=1` so skill names are recorded verbatim instead of redacted. The [`skill_activated` event](</docs/en/monitoring-usage#skill-activated-event>) records every invocation in its `skill.name` attribute, and `invocation_trigger` records whether a command, Claude, or a nested skill invoked it, which tells you what to consolidate or retire. +Names always load, but [when there are many, some skills lose their descriptions entirely](</docs/en/skills#skill-descriptions-are-cut-short>), which can strip the keywords Claude uses to decide whether a skill applies. Keep descriptions short and lead with words a request would contain, like “writing or modifying tests in `packages/api/`”. For skills that many directories share, such as PR conventions or a deploy checklist, place them in the repository root’s `.claude/skills/` so they load from any starting directory. When shared skills need their own version history or must work across repositories, package them as a [plugin](</docs/en/plugins>) instead. Plugin skills use a `plugin-name:skill-name` namespace, so they never collide with per-directory skills. A platform team can version and update them in one place. To find which skills go unused, enable the OpenTelemetry [logs exporter](</docs/en/monitoring-usage>) and set `OTEL_LOG_TOOL_DETAILS=1` so skill names are recorded verbatim instead of redacted. The [`skill_activated` event](</docs/en/monitoring-usage#skill-activated-event>) records every invocation in its `skill.name` attribute, and `invocation_trigger` records whether a command, Claude, or a nested skill invoked it, which tells you what to consolidate or retire. ##
modified Control MCP server access for your organization View current →
--- a/managed-mcp.md +++ b/managed-mcp.md @@ -36,7 +36,13 @@ Exclusive control with managed-mcp.json -If you deploy a `managed-mcp.json` file, Claude Code loads only the servers that file defines, the servers you provide through `managedMcpServers`, plus any in-process servers the app that started the session registers, such as the VS Code extension’s own server or the [connectors the desktop app delivers](</docs/en/mcp#how-connectors-reach-claude-code>). Users can’t add, modify, or use any other MCP servers, including plugin-provided servers and servers passed with the [`--mcp-config` CLI flag](</docs/en/cli-reference#cli-flags>). The file also suppresses the claude.ai connectors Claude Code fetches itself unless you allow them alongside the managed set. +When you deploy a `managed-mcp.json` file, Claude Code loads only these MCP servers: + + * The servers the file defines + * Servers you provide through `managedMcpServers` + * In-process servers that the app that started the session registers, such as the VS Code extension’s own server or the [connectors the desktop app delivers](</docs/en/mcp#how-connectors-reach-claude-code>) + +Users can’t add, modify, or use any other MCP servers, including plugin-provided servers and servers passed with the [`--mcp-config` CLI flag](</docs/en/cli-reference#cli-flags>). The file also suppresses the claude.ai connectors Claude Code fetches itself unless you allow them alongside the managed set. ### @@ -121,7 +127,9 @@ To confirm the file is in effect, run two checks on a managed machine: - 1. `claude mcp list` shows only the servers in `managed-mcp.json`, plus any you provide through `managedMcpServers`. If a user’s own servers still appear, the file isn’t being read; check the path and permissions. + 1. `claude mcp list` shows only the servers in `managed-mcp.json`, plus any you provide through `managedMcpServers`. Two other results mean something is wrong: + * If a user’s own servers still appear, Claude Code isn’t reading the file, so check its path and the permissions on its parent directories. + * If the file’s servers don’t appear and the `MCP config diagnostics` section marks the enterprise config as failed to parse, Claude Code can’t read or parse the file. Fix the error that section names, then have the user restart Claude Code. 2. `claude mcp add --transport http test https://example.com/mcp` fails with `Cannot add MCP server: enterprise MCP configuration is active and has exclusive control over MCP servers`. The URL doesn’t need to be a real server, since the policy check rejects the command before anything is contacted. ### @@ -477,7 +485,7 @@ The server is on a denylist and the user runs `claude mcp add`| `Cannot add MCP server "<name>": server is explicitly blocked by enterprise policy` The server isn’t on the allowlist and the user runs `claude mcp add`| `Cannot add MCP server "<name>": not allowed by enterprise policy` The user runs `claude mcp remove` on a server from `managedMcpServers`| `MCP server "<name>" is provided by your organization (managed settings) and cannot be removed locally.` -A previously configured server is now blocked by policy| The server silently disappears from `/mcp` and `claude mcp list` with no warning +A previously configured server is now blocked by policy| The server disappears from `/mcp` and `claude mcp list` A server becomes blocked while a session is running, and the user selects **Reconnect** or turns it back on in `/mcp`| [`MCP server <name> is blocked by enterprise managed policy`](</docs/en/errors#mcp-server-is-blocked-by-enterprise-managed-policy>) When a server silently disappears, the user gets no signal that policy is the reason, so tell affected users which servers are blocked when you roll out a new restriction.
modified Claude Code on mobile View current →
--- a/mobile.md +++ b/mobile.md @@ -14,7 +14,7 @@ Install the Claude app for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) or [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>). On an iPad, install the same iOS app. -Run `/mobile` in a Claude Code session to display a download QR code you can scan. `/ios` and `/android` do the same thing. +Run `/mobile` in a Claude Code session to show a QR code for [claude.ai/mobile](<https://claude.ai/mobile>), which opens the right app store for your phone. `/ios` and `/android` do the same thing. 2
modified Monitoring View current →
Show diff (258 lines)
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -197,7 +197,7 @@ ---|---|--- `user_prompt`| Prompt text. Value is `<REDACTED>` unless the gate is set| `OTEL_LOG_USER_PROMPTS` `user_prompt_length`| Prompt length in characters| -`interaction.sequence`| 1-based counter of interactions in this session| +`interaction.sequence`| 1-based counter of interactions, counted per Claude Code process rather than per session, as described for `event.sequence`| `parent.source`| How the span got its trace parent: `env` when it parented under an inbound `TRACEPARENT`, `none` when it started its own trace. Requires Claude Code v2.1.268 or later| `interaction.duration_ms`| Wall-clock duration of the turn| @@ -635,10 +635,11 @@ Attribute| Description ---|--- `prompt.id`| UUID v4 identifier linking all events produced while processing a single user prompt +`event.sequence`| 0-based counter for ordering events, counted per Claude Code process rather than per session `message.uuid`| UUID of the message as persisted in the session transcript, the `~/.claude/projects/*/*.jsonl` files. Present on `assistant_response`, and on `user_prompt` except for command dispatches, which can produce zero or many messages. On `assistant_response`, this is the response’s final transcript entry, which the next turn’s `parentUuid` chains from. Requires Claude Code v2.1.214 or later `client_request_id`| Client-generated UUID sent as the `x-client-request-id` request header. Present on `api_request` and `api_error` on first-party API connections; absent on third-party provider backends and when the request was retried through the non-streaming fallback. Pairs a request with its response and remains available for failures such as timeouts that never produced a server `request_id`. Matches the same attribute on the `llm_request` trace span. Requires Claude Code v2.1.214 or later -To trace all activity triggered by a single prompt, filter your events by a specific `prompt.id` value. This returns the user_prompt event, any api_request events, and any tool_result events that occurred while processing that prompt. For message-level reconstruction, each event class carries a key that matches a field in the session transcript. The transcript entry format is [internal to Claude Code](</docs/en/sessions#where-transcripts-are-stored>) and changes between versions, so a pipeline that joins on these fields can break on any release; treat the joins as version-specific rather than a stable contract: +To trace all activity triggered by a single prompt, filter your events by a specific `prompt.id` value. This returns the user_prompt event, any api_request events, and any tool_result events that occurred while processing that prompt. `event.sequence` starts at 0 each time a Claude Code process starts and counts up for the life of that process. It keeps counting across `/clear`, which assigns a new `session.id`. If you [resume a session without forking](</docs/en/how-claude-code-works#resume-or-fork-sessions>), the session keeps its `session.id` but takes its `event.sequence` values from the process that resumed it, so within one session a later event can carry a lower value than an earlier one, or repeat one. To order a session’s events, sort by `event.timestamp` and use `event.sequence` to order events that share a timestamp. For message-level reconstruction, each event class carries a key that matches a field in the session transcript. The transcript entry format is [internal to Claude Code](</docs/en/sessions#where-transcripts-are-stored>) and changes between versions, so a pipeline that joins on these fields can break on any release; treat the joins as version-specific rather than a stable contract: * `message.uuid` on `user_prompt` and `assistant_response` * `request_id` on the API events, persisted as `requestId` on the transcript’s assistant entries @@ -655,7 +656,7 @@ * All standard attributes * `event.name`: `"user_prompt"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `prompt_length`: Length of the prompt * `prompt`: Prompt content. Redacted by default. Set `OTEL_LOG_USER_PROMPTS=1` to include it * `message.uuid`: UUID of the resulting user message, matching the persisted transcript entry. Absent on command dispatches, which can produce zero or many messages. Requires Claude Code v2.1.214 or later @@ -673,7 +674,7 @@ * All standard attributes * `event.name`: `"assistant_response"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `response_length`: Length of the response text in characters * `response`: Response text, truncated at the content limit (60 KB by default). Redacted to `<REDACTED>` by default. Set `OTEL_LOG_ASSISTANT_RESPONSES=1` to include it. When `OTEL_LOG_ASSISTANT_RESPONSES` is unset, `OTEL_LOG_USER_PROMPTS` controls it instead, so set `OTEL_LOG_ASSISTANT_RESPONSES=0` to keep responses redacted while prompt logging is on * `model`: Model identifier (for example, “claude-sonnet-5”) @@ -692,7 +693,7 @@ * All standard attributes * `event.name`: `"tool_result"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `tool_name`: Name of the tool * `tool_use_id`: Unique identifier for this tool invocation. Matches the `tool_use_id` passed to hooks, allowing correlation between OTel events and hook-captured data. * `success`: `"true"` or `"false"` @@ -724,7 +725,7 @@ * All standard attributes * `event.name`: `"api_request"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `model`: Model used (for example, “claude-sonnet-5”) * `cost_usd`: Estimated cost in USD * `cost_usd_micros`: Estimated cost in millionths of a US dollar, emitted as an integer @@ -751,7 +752,7 @@ * All standard attributes * `event.name`: `"api_error"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `model`: Model used (for example, “claude-sonnet-5”) * `error`: Error message * `status_code`: HTTP status code as a number. Absent for non-HTTP errors such as connection failures. @@ -775,7 +776,7 @@ * All standard attributes * `event.name`: `"api_refusal"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `model`: Model identifier from the request * `request_id`: Anthropic API request ID from the response’s `request-id` header, such as `"req_011..."`. Present only when the API returns one. * `query_source`: Subsystem that issued the request, such as `"repl_main_thread"`, `"compact"`, or a subagent name. See `api_request` for definitions. @@ -799,7 +800,7 @@ * All standard attributes * `event.name`: `"api_request_body"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `body`: JSON-serialized Messages API request parameters, such as the system prompt, messages, and tools, truncated at the content limit (60 KB by default). Extended-thinking content in prior assistant turns is redacted. Emitted only in inline mode (`OTEL_LOG_RAW_API_BODIES=1`). * `body_ref`: Absolute path to a `<dir>/<uuid>.request.json` file containing the untruncated body. Emitted only in file mode (`OTEL_LOG_RAW_API_BODIES=file:<dir>`). * `body_length`: Untruncated body length. UTF-8 bytes when `OTEL_LOG_RAW_API_BODIES=file:<dir>`, or UTF-16 code units when `=1` @@ -818,7 +819,7 @@ * All standard attributes * `event.name`: `"api_response_body"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `body`: JSON-serialized Messages API response, including the id, content blocks, usage, and stop reason, truncated at the content limit (60 KB by default). Extended-thinking content is redacted. Emitted only in inline mode (`OTEL_LOG_RAW_API_BODIES=1`). * `body_ref`: Absolute path to a `<dir>/<request_id>.response.json` file containing the untruncated body. Emitted only in file mode (`OTEL_LOG_RAW_API_BODIES=file:<dir>`). * `body_length`: Untruncated body length. UTF-8 bytes when `OTEL_LOG_RAW_API_BODIES=file:<dir>`, or UTF-16 code units when `=1` @@ -838,7 +839,7 @@ * All standard attributes * `event.name`: `"tool_decision"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `tool_name`: Name of the tool (for example, “Read”, “Edit”, “Write”, “NotebookEdit”) * `tool_use_id`: Unique identifier for this tool invocation. Matches the `tool_use_id` passed to hooks, allowing correlation between OTel events and hook-captured data. * `decision`: Either `"accept"` or `"reject"` @@ -871,7 +872,7 @@ * All standard attributes * `event.name`: `"permission_mode_changed"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `from_mode`: The previous permission mode, for example `"default"`, `"plan"`, `"acceptEdits"`, `"auto"`, or `"bypassPermissions"` * `to_mode`: The new permission mode * `trigger`: What caused the change. One of `"shift_tab"`, `"exit_plan_mode"`, `"auto_gate_denied"`, or `"auto_opt_in"`. Absent when the transition originates from the SDK or bridge @@ -887,7 +888,7 @@ * All standard attributes * `event.name`: `"auth"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `action`: `"login"` or `"logout"` * `success`: `"true"` or `"false"` * `auth_method`: Authentication method, such as `"oauth"` @@ -905,7 +906,7 @@ * All standard attributes * `event.name`: `"mcp_server_connection"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `status`: `"connected"`, `"failed"`, or `"disconnected"` * `transport_type`: Server transport, such as `"stdio"`, `"sse"`, or `"http"` * `server_scope`: Scope the server is configured at, such as `"user"`, `"project"`, or `"local"` @@ -928,7 +929,7 @@ * All standard attributes * `event.name`: `"internal_error"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `error_name`: Error class name, such as `"TypeError"` or `"SyntaxError"` * `error_code`: Node.js errno code such as `"ENOENT"` when present on the error @@ -943,7 +944,7 @@ * All standard attributes * `event.name`: `"plugin_installed"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `marketplace.is_official`: `"true"` if the marketplace is an official Anthropic marketplace, `"false"` otherwise * `install.trigger`: `"cli"` or `"ui"` * `plugin.name`: Name of the installed plugin. For third-party marketplaces this is included only when `OTEL_LOG_TOOL_DETAILS=1` @@ -961,7 +962,7 @@ * All standard attributes * `event.name`: `"plugin_loaded"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `plugin.name`: name of the plugin. For plugins outside the official marketplace and built-in bundle the value is `"third-party"` unless `OTEL_LOG_TOOL_DETAILS=1` * `marketplace.name`: marketplace the plugin was installed from, when known. Redacted to `"third-party"` under the same condition as `plugin.name` * `plugin.version`: version from the plugin manifest. Included only when the name is not redacted and the manifest declares a version @@ -987,7 +988,7 @@ * All standard attributes * `event.name`: `"skill_activated"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `skill.name`: Name of the skill. For user-defined and third-party plugin skills the value is the placeholder `"custom_skill"` unless `OTEL_LOG_TOOL_DETAILS=1` * `invocation_trigger`: How the skill was triggered (`"user-slash"`, `"claude-proactive"`, or `"nested-skill"`) * `skill.source`: Where the skill was loaded from (for example, `"bundled"`, `"userSettings"`, `"projectSettings"`, `"plugin"`) @@ -1006,7 +1007,7 @@ * All standard attributes * `event.name`: `"at_mention"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `mention_type`: Type of mention (`"file"`, `"directory"`, `"agent"`, `"mcp_resource"`, `"peer"`). The `"peer"` value means you mentioned [one of your other Claude Code sessions](</docs/en/cross-session-messaging>). Requires Claude Code v2.1.232 or later * `success`: Whether the mention resolved successfully (`"true"` or `"false"`) @@ -1021,7 +1022,7 @@ * All standard attributes * `event.name`: `"api_retries_exhausted"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `model`: Model used * `error`: Final error message * `status_code`: HTTP status code as a number. Absent for non-HTTP errors. @@ -1040,7 +1041,7 @@ * All standard attributes * `event.name`: `"hook_registered"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `hook_event`: hook event type, such as `"PreToolUse"` or `"PostToolUse"` * `hook_type`: hook implementation type: `"command"`, `"prompt"`, `"mcp_tool"`, `"http"`, or `"agent"` * `hook_source`: where the hook is defined: `"userSettings"`, `"projectSettings"`, `"localSettings"`, `"flagSettings"`, `"policySettings"`, or `"pluginHook"` @@ -1060,7 +1061,7 @@ * All standard attributes * `event.name`: `"hook_execution_start"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `hook_event`: Hook event type, such as `"PreToolUse"` or `"PostToolUse"` * `hook_name`: Full hook name including matcher, such as `"PreToolUse:Write"` * `num_hooks`: Number of matching hook commands @@ -1080,7 +1081,7 @@ * All standard attributes * `event.name`: `"hook_execution_complete"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `hook_event`: Hook event type * `hook_name`: Full hook name including matcher * `num_hooks`: Number of matching hook commands @@ -1105,7 +1106,7 @@ * All standard attributes * `event.name`: `"hook_plugin_metrics"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `plugin_id`: plugin identifier in `<name>@<marketplace>` form * `hook_event`: hook event type that emitted the metrics * Up to 20 plugin-emitted metric keys. Names match `^[a-z][a-z0-9_]{0,39}$`. Values are boolean or number. @@ -1121,7 +1122,7 @@ * All standard attributes * `event.name`: `"compaction"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `trigger`: `"auto"` or `"manual"` * `success`: `"true"` or `"false"` * `duration_ms`: Compaction duration @@ -1141,7 +1142,7 @@ * All standard attributes * `event.name`: `"subagent_completed"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `agent_type`: The subagent type. Built-in agent names and agents from official-marketplace plugins appear verbatim; other agent names are replaced with `"custom"` unless `OTEL_LOG_TOOL_DETAILS=1` is set * `agent.source`: Where the agent definition came from: `built-in`, `plugin`, or the settings source that defined a custom agent, such as `userSettings` or `projectSettings` * `is_built_in`: Whether the subagent is a built-in agent type @@ -1165,7 +1166,7 @@ * All standard attributes * `event.name`: `"feedback_survey"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `event_type`: Survey lifecycle event, for example `"appeared"`, `"responded"`, or `"transcript_prompt_appeared"` * `appearance_id`: Unique ID linking the events emitted for one survey instance * `survey_type`: Which survey produced the event. `"session"` is the “How is Claude doing?” rating prompt @@ -1183,7 +1184,7 @@ * All standard attributes * `event.name`: `"retention_sweep"` * `event.timestamp`: ISO 8601 timestamp - * `event.sequence`: monotonically increasing counter for ordering events within a session + * `event.sequence`: per-process counter for ordering events, described under Event correlation attributes * `result`: `"complete"` when the sweep ran, `"skipped"` when Claude Code paused it * `period_days`: The `cleanupPeriodDays` value from merged settings, in days, or `30` when no source sets it. On skipped events, the value the sweep would have used, computed from the settings sources Claude Code could read * `used_default`: `"true"` when no readable settings source sets `cleanupPeriodDays`, `"false"` otherwise. On complete events, `"true"` means the 30-day default applied
modified Create and distribute a plugin marketplace View current →
--- a/plugin-marketplaces.md +++ b/plugin-marketplaces.md @@ -572,7 +572,7 @@ How users accept a headersHelper command -A user accepts a plugin entry’s command each time they install or update that one plugin by itself, from the plugin’s own view in `/plugin` or with `claude plugin install` or `claude plugin update`. Claude Code shows the command and the archive URL, and runs the command only after the user accepts. In a non-interactive shell, pass [`--yes`](</docs/en/plugins-reference#plugin-install>) to accept it. Claude Code runs only the command it showed, for the archive URL it showed. If the entry’s command or archive URL changed in between, Claude Code refuses the install or update. A change in the query string alone doesn’t count. +A user accepts a plugin entry’s command each time they install or update that one plugin by itself, from the plugin’s own view in `/plugin` or with `claude plugin install` or `claude plugin update`. Claude Code shows the command and the archive URL, and runs the command only after the user accepts. In a non-interactive shell, pass [`--yes`](</docs/en/plugins-reference#plugin-install>) to accept the command. To accept only the command that a previous `--json` run displayed, pass [`--accept-command`](</docs/en/plugins-reference#plugin-install>) with the `sha256` the run reported. Claude Code runs only the command it showed, for the archive URL it showed. If the entry’s command or archive URL changed in between, Claude Code refuses the install or update. A change in the query string alone doesn’t count. ##### Installs and updates that refuse the command instead of asking @@ -639,7 +639,8 @@ Claude Code runs your command on the user’s machine, so it binds every run to the user’s explicit acceptance: - * When users install the plugin from its details screen in `/plugin`, or install or update it with `claude plugin install` or `claude plugin update` in an interactive terminal, Claude Code shows them the exact command string first and records the accepted command for that installation. A `claude plugin update` that can proceed on the recorded acceptance of the same command shows nothing. In a non-interactive shell, such as a provisioning script, pass `--yes` to `claude plugin install` or `claude plugin update` to accept the command it prints. + * When users install the plugin from its details screen in `/plugin`, or install or update it with `claude plugin install` or `claude plugin update` in an interactive terminal, Claude Code shows them the exact command string first and records the accepted command for that installation. A `claude plugin update` that can proceed on the recorded acceptance of the same command shows nothing. + * In a non-interactive shell, such as a provisioning script, pass `--yes` to `claude plugin install` or `claude plugin update` to accept the command it prints. To accept only the command that a previous `--json` run displayed, pass [`--accept-command`](</docs/en/plugins-reference#plugin-install>) with the `sha256` the run reported. * Every other path runs only the command the user already accepted. This includes updates started from `/plugin` and the background runs described in When Claude Code re-runs the command. When none was accepted, Claude Code refuses to run the command and tells the user how to review it. Claude Code never installs a command-sourced plugin as a dependency of another plugin, so users install it themselves first. * If you change the entry’s `command`, or switch its `mode`, users keep the version they already have and Claude Code stops re-running the command. In interactive sessions, the `/plugin` Errors tab shows the new command until the user reviews and accepts it by running `claude plugin update <plugin>@<marketplace>`.
modified Plugins reference View current →
--- a/plugins-reference.md +++ b/plugins-reference.md @@ -45,7 +45,7 @@ Detailed system prompt for the agent describing its role, expertise, and behavior. -Plugin agents support `name`, `description`, `model`, `effort`, `maxTurns`, `tools`, `disallowedTools`, `skills`, `memory`, `background`, and `isolation` frontmatter fields. The only valid `isolation` value is `"worktree"`. For security reasons, `hooks`, `mcpServers`, and `permissionMode` are not supported for plugin-shipped agents. Claude Code loads a plugin agent even when its frontmatter has no `name` or doesn’t parse: +Plugin agents support `name`, `description`, `model`, `effort`, `maxTurns`, `tools`, `disallowedTools`, `skills`, `memory`, `background`, [`omitClaudeMd`](</docs/en/sub-agents#supported-frontmatter-fields>), and `isolation` frontmatter fields. The only valid `isolation` value is `"worktree"`. For security reasons, plugin-shipped agents don’t support `hooks`, `mcpServers`, or `permissionMode`. Claude Code loads a plugin agent even when its frontmatter has no `name` or doesn’t parse: * No `name`: Claude Code names the agent after the file, so `agents/reviewer.md` in a plugin named `my-plugin` loads as `my-plugin:reviewer` * Frontmatter that doesn’t parse: Claude Code names the agent after the file, uses `Agent from my-plugin plugin` as its description, and ignores every field in the file @@ -366,7 +366,8 @@ In [Cowork](<https://claude.com/product/cowork>) and [cloud sessions](</docs/en/cloud-environments#what-carries-over-from-your-setup>), Claude Code downloads the plugins enabled for your claude.ai account into `~/.claude/plugins/synced/` in the session’s own environment and loads each one as `<name>@synced`, with no marketplace and no install record. Claude Code doesn’t load them in sessions you start in your own terminal. Inside that Cowork or cloud environment, `claude plugin list` shows the downloaded copies under a `Synced from claude.ai` heading. Before v2.1.239, Claude Code loaded these plugins as `<name>@inline`, the identity that `--plugin-dir` plugins use. Manage a synced plugin by the `<name>@synced` ID that `claude plugin list` prints: - * **Turn one off** : in the synced session, run `claude plugin disable <name>@synced`, or ask Claude to run it. Claude Code saves the choice as `"<name>@synced": false` in that environment’s user-level [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>). To turn the plugin back on, run `claude plugin enable <name>@synced` in the same session. To keep a plugin out of every synced session, [turn it off for your claude.ai account](</docs/en/desktop#extend-claude-code>). To keep it out of one project’s synced sessions in every environment, set `"<name>@synced": false` under `enabledPlugins` in that project’s committed `.claude/settings.json`. + * **Turn one off** : in the synced session, run `claude plugin disable <name>@synced`, or ask Claude to run it. Claude Code saves the choice as `"<name>@synced": false` in that environment’s user-level [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>). A synced plugin that your organization requires can’t be turned off this way. The command reports that the plugin is required by your organization and saves nothing. To turn the plugin back on, run `claude plugin enable <name>@synced` in the same session. + * **Keep one out of synced sessions** : to keep a plugin out of every synced session, [turn it off for your claude.ai account](</docs/en/desktop#extend-claude-code>). To keep it out of one project’s synced sessions in every environment, set `"<name>@synced": false` under `enabledPlugins` in that project’s committed `.claude/settings.json`. * **Manage the plugin itself on claude.ai** : `claude plugin install`, `update`, and `uninstall` don’t apply to a synced plugin. To remove one, turn the plugin off for your claude.ai account; the next synced session starts without it. When an enabled plugin from any other source, such as a marketplace install, a skills-directory plugin, or a `--plugin-dir` plugin, matches a synced plugin’s name, Claude Code loads that plugin and reports the synced copy as not loaded. To use the claude.ai copy instead, disable your own copy. Before v2.1.239, Claude Code loaded the synced copy instead of a same-named marketplace install. @@ -547,10 +548,11 @@ `sensitive`| No| If `true`, masks input and stores the value in secure storage instead of `settings.json` `required`| No| If `true`, validation fails when the field is empty `default`| No| Value used when the user provides nothing +`options`| No| For `string` type, the values the field accepts, shown in `/config` as a picker over them. Requires Claude Code v2.1.271 or later `multiple`| No| For `string` type, allow an array of strings `min` / `max`| No| Bounds for `number` type -Each value is available for substitution as `${user_config.KEY}` in MCP and LSP server configs and hook commands. Non-sensitive values can also be substituted in skill and agent content. All values are exported to hook processes as `CLAUDE_PLUGIN_OPTION_<KEY>` environment variables, where `<KEY>` is the option key uppercased. Fields that run in a shell reject `${user_config.*}`: substituting a configured value into a shell command would let the shell run whatever that value contains, so the component fails with an [error](</docs/en/errors#plugin-command-references-user-config>) instead. Each rejected field has an alternative way to pass the value: +Except `sensitive` fields and `multiple` lists, each field of each enabled plugin also appears as a row in the `/config` panel. The rows require Claude Code v2.1.269 or later. Each value is available for substitution as `${user_config.KEY}` in MCP and LSP server configs and hook commands. Non-sensitive values can also be substituted in skill and agent content. All values are exported to hook processes as `CLAUDE_PLUGIN_OPTION_<KEY>` environment variables, where `<KEY>` is the option key uppercased. Fields that run in a shell reject `${user_config.*}`: substituting a configured value into a shell command would let the shell run whatever that value contains, so the component fails with an [error](</docs/en/errors#plugin-command-references-user-config>) instead. Each rejected field has an alternative way to pass the value: Rejected field| How to pass the value ---|--- @@ -934,7 +936,8 @@ ---|---|--- `-s, --scope <scope>`| Installation scope: `user`, `project`, or `local`| `user` `--config <key=value>`| Set a `userConfig` option declared in the plugin’s manifest. Repeat the flag to set multiple options| -`-y, --yes`| Accept a command the plugin’s marketplace declares, without the confirmation prompt: the command that produces a plugin with a [`command` source](</docs/en/plugin-marketplaces#command-sources>), or the [`headersHelper`](</docs/en/plugin-marketplaces#authenticate-archive-downloads>) that authenticates an archive download. Accepting a `headersHelper` requires Claude Code v2.1.238 or later. Claude Code still prints the command first. Required when stdin or stdout isn’t a TTY. Has no effect inside a Claude Code session, so run the command from your own terminal| +`-y, --yes`| Accept a command the plugin’s marketplace declares, without the confirmation prompt: the command that produces a plugin with a [`command` source](</docs/en/plugin-marketplaces#command-sources>), or the [`headersHelper`](</docs/en/plugin-marketplaces#authenticate-archive-downloads>) that authenticates an archive download. Accepting a `headersHelper` requires Claude Code v2.1.238 or later. Claude Code still prints the command first. Required when stdin or stdout isn’t a TTY, unless you pass `--accept-command`. Has no effect inside a Claude Code session, so run the command from your own terminal| +`--accept-command <sha256>`| Accept the marketplace-declared command whose `sha256` a previous `--json` run reported in `shownCommand`, in place of `-y`. The acceptance counts for exactly that command, plugin, and marketplace catalog. If any of them changed since the command was displayed, including through the run’s own marketplace refresh, Claude Code doesn’t accept the digest and shows the command again. Can’t be combined with `-y`. Has no effect inside a Claude Code session, so run the command from your own terminal. Requires Claude Code v2.1.271 or later| `--json`| Print the result as one JSON object on the last line of stdout instead of the human-readable message, for use in scripts. See JSON result format. Requires Claude Code v2.1.268 or later| `-h, --help`| Display help for command| @@ -944,7 +947,7 @@ * `outcome`: `ok` or `failed` * `message`: a human-readable description of the result -Other fields, such as `pluginId`, `scope`, and `failureCode`, appear only when they apply. The `--json` option on `plugin uninstall`, `plugin update`, `plugin enable`, and `plugin disable` prints the same object with that subcommand’s own fields. A usage error, such as an invalid `--scope`, prints no result line and exits 1 with the reason on stderr. These examples show common invocations: +Other fields, such as `pluginId`, `scope`, and `failureCode`, appear only when they apply. The `--json` option on `plugin uninstall`, `plugin update`, `plugin enable`, and `plugin disable` prints the same object with that subcommand’s own fields. A usage error, such as an invalid `--scope`, prints no result line and exits 1 with the reason on stderr. When a run displays a marketplace-declared command and doesn’t run it, the `failed` result also carries a `shownCommand` object whose fields include the command as displayed, the plugin it belongs to, and the command’s `sha256`. To accept exactly that command, re-run with that `sha256` as `--accept-command`. Requires Claude Code v2.1.271 or later. If `shownCommand.acceptCommandMatched` is `false`, the digest you passed doesn’t match the command now displayed. Show that command to a person before passing its `sha256`. These examples show common invocations: # Install to user scope (default) claude plugin install formatter@my-marketplace @@ -1033,7 +1036,7 @@ plugin disable -Disable a plugin without uninstalling it. When the target is installed from a marketplace, the command fails if another enabled plugin [depends on](</docs/en/plugin-dependencies#enable-or-disable-a-plugin-with-dependencies>) it. The error message includes a chained command that disables every dependent first. +Disable a plugin without uninstalling it. When the target is installed from a marketplace, the command fails if another enabled plugin [depends on](</docs/en/plugin-dependencies#enable-or-disable-a-plugin-with-dependencies>) it. The error message includes a chained command that disables every dependent first. For a synced plugin that your organization requires, the command fails and saves nothing. claude plugin disable [plugin] [options] @@ -1069,7 +1072,8 @@ Option| Description| Default ---|---|--- `-s, --scope <scope>`| Scope to update: `user`, `project`, `local`, or `managed`| `user` -`-y, --yes`| Accept a command the plugin’s marketplace declares, without the confirmation prompt: the command that produces a plugin with a [`command` source](</docs/en/plugin-marketplaces#command-sources>), or the [`headersHelper`](</docs/en/plugin-marketplaces#authenticate-archive-downloads>) that authenticates an archive download. Accepting a `headersHelper` requires Claude Code v2.1.238 or later. Claude Code still prints the command first. Required when stdin or stdout isn’t a TTY. Has no effect inside a Claude Code session, so run the command from your own terminal| +`-y, --yes`| Accept a command the plugin’s marketplace declares, without the confirmation prompt: the command that produces a plugin with a [`command` source](</docs/en/plugin-marketplaces#command-sources>), or the [`headersHelper`](</docs/en/plugin-marketplaces#authenticate-archive-downloads>) that authenticates an archive download. Accepting a `headersHelper` requires Claude Code v2.1.238 or later. Claude Code still prints the command first. Required when stdin or stdout isn’t a TTY, unless you pass `--accept-command`. Has no effect inside a Claude Code session, so run the command from your own terminal| +`--accept-command <sha256>`| Accept the marketplace-declared command whose `sha256` a previous `--json` run reported in `shownCommand`, in place of `-y`. The acceptance counts for exactly that command, plugin, and marketplace catalog. If any of them changed since the command was displayed, including through the run’s own marketplace refresh, Claude Code doesn’t accept the digest and shows the command again. Can’t be combined with `-y`. Has no effect inside a Claude Code session, so run the command from your own terminal. Requires Claude Code v2.1.271 or later| `--json`| Print the result as one JSON object on the last line of stdout, in the same format as `plugin install --json`. Requires Claude Code v2.1.268 or later| `-h, --help`| Display help for command|
modified How Claude Code uses prompt caching View current →
--- a/prompt-caching.md +++ b/prompt-caching.md @@ -66,7 +66,7 @@ Switching models -Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the cache is still warm. The cache stays warm for one cache TTL after Claude Code last sent a request in this conversation or Claude last responded. Once that time passes, the cache has expired, so Claude Code switches without asking. Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. You can also require this confirmation or skip it with a [PreModelSwitch hook](</docs/en/hooks#premodelswitch-decision-control>). The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable models and Opus 5 is also a model switch. When a safety classifier flags a request in a category that has a fallback model, Claude Code re-runs the request on that model and the session continues there. When a skill or command’s frontmatter names a [`model`](</docs/en/skills#frontmatter-reference>) other than the session’s current model, that turn is also a model switch: the next request reads the entire conversation history with no cache hits. The session model resumes on your next prompt. A `context: fork` skill sets the [forked subagent’s model](</docs/en/skills#run-skills-in-a-subagent>) instead. +Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the cache is still warm and the new model isn’t the one that produced the last response. The cache stays warm for one cache TTL after Claude Code last sent a request in this conversation or Claude last responded. Once that time passes, the cache has expired, so Claude Code switches without asking. Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. You can also require this confirmation or skip it with a [PreModelSwitch hook](</docs/en/hooks#premodelswitch-decision-control>). The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable models and Opus 5 is also a model switch. When a safety classifier flags a request in a category that has a fallback model, Claude Code re-runs the request on that model and the session continues there. When a skill or command’s frontmatter names a [`model`](</docs/en/skills#frontmatter-reference>) other than the session’s current model, that turn is also a model switch: the next request reads the entire conversation history with no cache hits. The session model resumes on your next prompt. A `context: fork` skill sets the [forked subagent’s model](</docs/en/skills#run-skills-in-a-subagent>) instead. ### @@ -161,7 +161,7 @@ Denying an entire tool -Adding a bare tool name like `Bash` or `WebFetch` as a [deny rule](</docs/en/permissions#manage-permissions>) removes that tool from Claude’s context entirely. Claude Code loads built-in tool definitions into the system prompt layer, so adding or removing one of these rules mid-session invalidates the cache. Claude Code applies the change on the next request, whether you add the rule through `/permissions` or by [editing a settings file directly](</docs/en/settings#when-edits-take-effect>). That includes a rule you add through `/permissions` in the middle of a turn. Only a deny rule that matches in the tool-name position has this effect: a bare tool name, the equivalent `Bash(*)` form, or a [tool-name glob](</docs/en/permissions#tool-name-wildcards>) like `"*"`. A glob that matches only MCP tools, such as `"mcp__*"`, removes those tools the same way but leaves the cache intact when the matched tools are deferred, the default, since deferred definitions were never in the cached prefix. Scoped deny rules like `Bash(rm *)`, and all allow and ask rules, don’t change which tools Claude sees. Claude Code checks them when Claude attempts a call, leaving the prefix intact. +If you add a bare tool name like `Bash` or `WebFetch` as a [deny rule](</docs/en/permissions#manage-permissions>), Claude can’t call that tool from your next request on, whether you add the rule through `/permissions` or by [editing a settings file directly](</docs/en/settings#when-edits-take-effect>). That includes a rule you add through `/permissions` in the middle of a turn. When [tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is active, which is the default on supported models, the request’s tool definitions don’t change and the cached prefix survives. When tool search is unavailable or disabled, Claude Code removes the definition from the next request, which invalidates the cache, and so does removing the rule later. Only a deny rule that matches in the tool-name position blocks a tool this way: a bare tool name, the equivalent `Bash(*)` form, or a [tool-name glob](</docs/en/permissions#tool-name-wildcards>) like `"*"`. A glob that matches only MCP tools, such as `"mcp__*"`, blocks those tools the same way. Scoped deny rules like `Bash(rm *)`, and all allow and ask rules, don’t change which tools Claude sees. Claude Code checks them when Claude attempts a call, leaving the prefix intact. ###
modified Continue local sessions from any device with Remote Control View current →
--- a/remote-control.md +++ b/remote-control.md @@ -100,11 +100,11 @@ Check connection status -In an interactive terminal session, a `/rc active` indicator shows while the connection is up, and is hidden if the terminal is too narrow to fit it. With [fullscreen rendering](</docs/en/fullscreen>) it sits at the end of the working-directory line in the startup header, and without it, in the footer below the input box. The indicator text is a link to the session on claude.ai. Run `/remote-control` again to open a status panel with the session URL and a QR code for connecting from another device. When the indicator is in the footer, you can also open the panel by selecting the indicator with the down arrow key and pressing Enter. The panel also offers a disconnect option, which turns Remote Control off while your local session keeps running in the terminal. If the connection fails, Claude Code shows a notification with the failure reason, adds a warning line with the reason to the conversation, and switches the indicator to a failure state that stays in place. To reconnect, run `/remote-control`, unless the reason says the session was taken over or ended elsewhere, or that the server can’t find it. Read the reason before you reconnect. When the session was taken over or ended from another device, app, or Claude Code session, or the server can’t find it, the reason says which, and Claude Code leaves out its usual advice to run `/remote-control`: - - * **Another device or Claude Code session took the session over** : run `/remote-control` only if you want to take it back from that device. - * **You ended or archived the session from another device or app** : run `/remote-control` only if you want it back; Claude Code reopens an archived session. - * **The server can’t find the session** : it may have been deleted from another device or app. +In an interactive session, while Remote Control is connected, the terminal shows an `/rc active` indicator that links to the session on claude.ai. The indicator is hidden when the terminal is too narrow to fit it. To see the session URL and a QR code for connecting from another device, run `/remote-control` again to open the status panel. The panel also lets you disconnect Remote Control while your local session keeps running. If the connection fails in an interactive session, the indicator changes to show the failure, and Claude Code shows the reason in a notification and adds it to the conversation. Run `/remote-control` to reconnect, unless the reason says the session changed somewhere else: + + * **Another connection took over this session** : another device or Claude Code session has it now. Run `/remote-control` only if you want to take it back. + * **This session was ended or archived from another device or app** : run `/remote-control` only if you want the session back. Claude Code reopens an archived session. + * **The server no longer reports this session** : it may have been deleted from another device or app. ### @@ -138,7 +138,7 @@ 3. The last meaningful message in existing conversation history 4. An auto-generated name like `myhost-graceful-unicorn`, where `myhost` is your machine’s hostname or the prefix you set with `--remote-control-session-name-prefix` -If you didn’t set an explicit name, Claude Code updates the title to reflect your prompt once you send one. Claude Code matches auto-generated titles to the language of your conversation, or to the [`language`](</docs/en/settings-reference#language>) setting if one is configured; the language matching requires Claude Code v2.1.176 or later. When you rename a session from claude.ai or the Claude app, Claude Code also updates the local title shown in `claude --resume`. Claude Code applies the same rename to the session name shown on the prompt bar, and in the `claude agents` listing when the session [runs in the background](</docs/en/agent-view>). Before v2.1.221, renaming from the session list at claude.ai or in the Claude app updated only the title, and the CLI kept its previous session name; `/rename`, which runs in the CLI itself, set the name on any version. If you don’t have the Claude app yet, use the `/mobile` command inside Claude Code to display a download QR code for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) or [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>). +If you didn’t set an explicit name, Claude Code updates the title to reflect your prompt once you send one. Claude Code matches auto-generated titles to the language of your conversation, or to the [`language`](</docs/en/settings-reference#language>) setting if one is configured. When you rename a session from claude.ai or the Claude app, Claude Code also updates the local title shown in `claude --resume`. Claude Code applies the same rename to the session name shown on the prompt bar, and in the `claude agents` listing when the session [runs in the background](</docs/en/agent-view>). Before v2.1.221, renaming from the session list at claude.ai or in the Claude app updated only the title, and the CLI kept its previous session name; `/rename`, which runs in the CLI itself, set the name on any version. If you don’t have the Claude app yet, run `/mobile` inside Claude Code to show a QR code for [claude.ai/mobile](<https://claude.ai/mobile>), which opens the right app store for your phone. ### @@ -387,7 +387,7 @@ ”Couldn’t verify Remote Control eligibility” -Claude Code could not reach the feature-flag service to check whether Remote Control is enabled for your account, typically because you are offline or a proxy is blocking the request. Retry once you have network access, or run `claude doctor` for details. The related message “Couldn’t verify your organization’s Remote Control policy” has the same cause and the same fix. Both messages were added in v2.1.178. +Claude Code could not reach the feature-flag service to check whether Remote Control is enabled for your account, typically because you are offline or a proxy is blocking the request. Retry once you have network access, or run `claude doctor` for details. The related message “Couldn’t verify your organization’s Remote Control policy” means Claude Code couldn’t read that policy, and has the same fix. Both messages were added in v2.1.178. ###
modified Customize sessions in self-hosted environments View current →
--- a/self-hosted-environments-configuration.md +++ b/self-hosted-environments-configuration.md @@ -371,7 +371,7 @@ How each session’s config is assembled -The runner gives each session its own config directory, seeded from an in-memory snapshot of the host’s `~/.claude/` that the runner captures once at startup: `settings.json`, `CLAUDE.md`, hooks, agents, commands, and skills in your runner image apply to every session as the user-level baseline. Because the snapshot is taken at startup, config changes on a running host take effect only after a runner restart. Set `SELF_HOSTED_RUNNER_HOST_CONFIG_DIR` to seed from a different path, or point it at an empty directory to disable seeding. Repository-committed `.claude/settings.json` layers on top as project settings. Sessions also read [`managed-settings.json`](</docs/en/settings#where-settings-live>) from the standard system path in your runner image. Whether its keys apply alongside [server-managed settings](</docs/en/server-managed-settings>) follows [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>): by default, when your organization delivers any server-managed keys, sessions ignore the runner image’s file apart from the [keys Claude Code reads from every admin source](</docs/en/managed-settings#keys-read-from-every-admin-source>), such as the `env` block, the sandbox locks, the sandbox binary paths, and `forceRemoteSettingsRefresh`. See [settings precedence](</docs/en/settings#settings-precedence>). When Anthropic’s control plane supplies a session with [Claude Code hooks](</docs/en/hooks>), the runner installs them alongside, not over, your own configuration. Requires Claude Code v2.1.229 or later. +The runner gives each session its own config directory, seeded from a snapshot of the host’s `~/.claude/` that the runner captures once at startup: `settings.json`, `CLAUDE.md`, hooks, agents, commands, and skills in your runner image apply to every session as the user-level baseline. If you change config on a running host, the change takes effect only after you restart the runner. Set `SELF_HOSTED_RUNNER_HOST_CONFIG_DIR` to seed from a different path, or point it at an empty directory to disable seeding. Repository-committed `.claude/settings.json` layers on top as project settings. Sessions also read [`managed-settings.json`](</docs/en/settings#where-settings-live>) from the standard system path in your runner image. Whether its keys apply alongside [server-managed settings](</docs/en/server-managed-settings>) follows [how Claude Code combines managed sources](</docs/en/managed-settings#how-claude-code-combines-managed-sources>): by default, when your organization delivers any server-managed keys, sessions ignore the runner image’s file apart from the [keys Claude Code reads from every admin source](</docs/en/managed-settings#keys-read-from-every-admin-source>), such as the `env` block, the sandbox locks, the sandbox binary paths, and `forceRemoteSettingsRefresh`. See [settings precedence](</docs/en/settings#settings-precedence>). When Anthropic’s control plane supplies a session with [Claude Code hooks](</docs/en/hooks>), the runner installs them alongside, not over, your own configuration. Requires Claude Code v2.1.229 or later. * **Where they land** : the runner writes each supplied hook script to a reserved `hooks/.ccr-launcher/` subdirectory of the session’s config directory and registers the scripts in a separate settings file it passes to the session with `--settings`, leaving the seeded `settings.json` and your own scripts at `hooks/<name>` untouched. The runner recreates the reserved subdirectory for each session and doesn’t seed host content at `~/.claude/hooks/.ccr-launcher/` into sessions. * **Who authors them** : the control plane populates the scripts from fixed constants in its own deployment, never from per-session or third-party input.
modified Self-hosted environments reference View current →
--- a/self-hosted-environments-reference.md +++ b/self-hosted-environments-reference.md @@ -21,6 +21,7 @@ `--debug-token-dir <path>`| `SELF_HOSTED_RUNNER_DEBUG_TOKEN_DIR`| unset| Write live tokens to disk for inspection. Debug only; don’t use in production. `--defer-shutdown-max-min <n>`| `SELF_HOSTED_RUNNER_DEFER_SHUTDOWN_MAX_MS`| `0`| On the first `SIGTERM` or `SIGINT`, keep serving the sessions already attached instead of draining them, then release whatever is still attached N minutes later and exit. Raise your host’s stop timeout before you set this. See [Defer the drain past the first signal](</docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal>). `0` disables. Requires Claude Code v2.1.238 or later. `--drain-grace-sec <n>`| `SELF_HOSTED_RUNNER_DRAIN_GRACE_MS`| `0`| Until the runner receives a shutdown signal or reaches its retire time, controls when the runner exits after its active sessions finish: `0` exits immediately without polling for more, and a positive value keeps the runner alive and re-polling the locked owner’s queue for that many seconds first, at the cost of the per-session container isolation described in the [hardening section](</docs/en/self-hosted-environments-deploy#harden-your-deployment>). After a first signal you deferred with [`--defer-shutdown-max-min`](</docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal>), the runner exits as soon as it holds no sessions, whatever you set here. +`--drain-marker-file <path>`| `SELF_HOSTED_RUNNER_DRAIN_MARKER_FILE`| unset| Marker file that your host writes to announce a graceful drain before sending `SIGTERM`. When the file exists as the drain starts, the runner reports its exit to Anthropic as a host drain rather than a plain shutdown signal. The drain itself, including the `--drain-wait-sec` hold, runs the same as without the flag. Name a path on a local filesystem that sessions can’t write to. Requires Claude Code v2.1.271 or later. `--drain-wait-sec <n>`| `SELF_HOSTED_RUNNER_DRAIN_WAIT_MS`| `0`| Once the drain starts, which is on `SIGTERM` unless you set [`--defer-shutdown-max-min`](</docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal>), wait up to N seconds for each session’s in-flight turn and background tasks to finish before terminating the child. During this wait, the runner counts a background task that has just finished as still running until the follow-up turn that reads its result starts, for at most the `SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MS` window. `--environment-secret-file <path>`| `SELF_HOSTED_RUNNER_ENVIRONMENT_SECRET`| required| Path to a file containing the environment secret, or, for runners spawned by the [orchestrator](</docs/en/self-hosted-environments-configuration#on-demand-runners>), the single-use work-order JWT. `SELF_HOSTED_RUNNER_ENVIRONMENT_SECRET` carries the secret value directly, not a file path. The older `--pool-secret-file` flag and `SELF_HOSTED_RUNNER_POOL_SECRET` variable still work and print a deprecation notice to stderr; preview-program runner builds older than 2.1.216 only recognize those older names. `--exec-path <path>`| `SELF_HOSTED_RUNNER_EXEC_PATH`| own binary| Binary or wrapper script to spawn for each session. See [Wrapper scripts](</docs/en/self-hosted-environments-configuration#wrapper-scripts>). @@ -29,6 +30,7 @@ `--git-ssh-rewrite <host>`| none| unset| Rewrite `https://<host>/...` source URLs to `git@<host>:...` before cloning, for SSH-only git hosts. Repeatable; flag only. `--health-port <port>`| `SELF_HOSTED_RUNNER_HEALTH_PORT`| `8080`| Port for the `/healthz` and `/metrics` listener. Set `0` to disable. `--hooks-dir <path>`| `SELF_HOSTED_RUNNER_HOOKS_DIR`| unset| Directory of lifecycle hook scripts. See [Lifecycle hooks](</docs/en/self-hosted-environments-configuration#lifecycle-hooks>). +`--host-config-snapshot <mode>`| `SELF_HOSTED_RUNNER_HOST_CONFIG_SNAPSHOT`| `disk`| Where the runner keeps the startup snapshot of the host config directory that it seeds each session from. `disk` copies the snapshot into a runner-owned directory under `--base-dir` and, at each session start, verifies every file against an in-memory digest. If a file in the copy has been modified, the session fails and the runner refuses sessions until you restart it. `memory` holds the whole snapshot on the heap, capped at 64 MiB; over the cap, sessions start without host config and show a notice saying so. When the runner can’t write the disk snapshot, it logs the failure and uses `memory` for that run. Requires Claude Code v2.1.271 or later. `--kill-session-after-min <n>`| `SELF_HOSTED_RUNNER_MAX_LIFETIME_MS`| `0`| Limit a session to N minutes wall-clock, as a safety limit for stuck sessions. On v2.1.260 or later, the runner releases a session that reaches the limit so it can resume on its user’s next message, and terminates it only if it’s still on the runner when the `SELF_HOSTED_RUNNER_MAX_LIFETIME_GRACE_MS` grace window ends. Before v2.1.260, the runner terminated the session at the limit. See [Some sessions don’t count as idle](</docs/en/self-hosted-environments-deploy#some-sessions-don%E2%80%99t-count-as-idle>) for the details and how to choose a value. `0` disables. `--lock-to-account <id>`| `SELF_HOSTED_RUNNER_LOCK_TO_ACCOUNT`| unset| Pre-lock the runner to a specific account at startup instead of locking on first session. Accepts an email address or `user_...` ID in the environment’s organization. A pre-locked runner never picks up Claude Tag channel sessions, which have no account. `--log-file <path>`| `SELF_HOSTED_RUNNER_LOG_FILE`| unset| Mirror runner logs to a file in addition to stdout and stderr, created with `0600` permissions. Required for `self-hosted-runner doctor` to tail logs locally.
modified All settings View current →
--- a/settings-reference.md +++ b/settings-reference.md @@ -581,7 +581,7 @@ * **Type** : object with an optional `multiplier` and an optional `overrides` map * **Default** : unset, so Claude Code reports list price unless a host application supplies a table -This example sets contracted rates for Sonnet 4.6 and then reduces every figure, the Sonnet row included, by 15%. Set `multiplier` alone for a flat discount, `overrides` alone for per-model rates, or both: +Set `multiplier` alone for a flat discount or markup, `overrides` alone for per-model rates, or both. This example sets contracted rates for Sonnet 4.6 and then reduces every figure, the Sonnet row included, by 15%: managed-settings.json @@ -599,7 +599,7 @@ } } -For the steps, including how to confirm the rates are in effect, see [Report spend at your contracted rates](</docs/en/costs#report-spend-at-your-contracted-rates>). +Set `multiplier` above 1, up to 10, to mark every figure up. A markup requires Claude Code v2.1.271 or later. Earlier versions ignore a `multiplier` above 1 with a warning and keep the rest of the setting. For the steps, including how to confirm the rates are in effect, see [Report spend at your contracted rates](</docs/en/costs#report-spend-at-your-contracted-rates>). #### @@ -609,7 +609,7 @@ Field| Type| What it does ---|---|--- -`multiplier`| number greater than 0 and at most 1| Scales every cost Claude Code computes, whether or not an `overrides` row covers it +`multiplier`| number greater than 0 and at most 10| Scales every cost Claude Code computes, whether or not an `overrides` row covers it. Below 1 is a discount, above 1 a markup `overrides`| map of model ID to a rate object with `input`, `output`, `cacheRead`, and `cacheWrite`, each 0 to 10000| The USD-per-million-token rates for that model, all four required. `cacheWrite` covers both five-minute and one-hour cache writes. See Which models a row applies to Claude Code uses a row’s rates exactly as you wrote them, without adding the fast-mode surcharge or the [US-only-inference rate](<https://platform.claude.com/docs/en/about-claude/pricing>). If you also set `multiplier`, Claude Code applies it on top of the row’s rates. Claude Code drops a row with a rate it can’t parse, or a `multiplier` it can’t parse, and keeps the rest; see [Fix a broken settings file](</docs/en/settings#fix-a-broken-settings-file>). @@ -2851,7 +2851,7 @@ `footerLinksRegexes` -Render extra clickable badges in the footer below the input box when a regex matches turn output: tool results, including file contents and fetched pages, and Claude’s own responses. Use it to turn IDs printed by project CLIs, such as review tools and issue trackers, into session links. Requires Claude Code v2.1.176 or later. +Render extra clickable badges in the footer below the input box when a regex matches turn output: tool results, including file contents and fetched pages, and Claude’s own responses. Use it to turn IDs printed by project CLIs, such as review tools and issue trackers, into session links. * **Scope** : `User or managed` * **Type** : array of objects, each with `type` set to `"regex"`, a `pattern` regex, a `url` template, and an optional `label`; `{name}` placeholders in `url` and `label` are filled from named capture groups in `pattern` @@ -2872,7 +2872,7 @@ ] } -With this configured, when `PROJ-1234` appears in a tool result or in Claude’s reply, a `PROJ-1234` badge appears in the footer linking to `https://issues.example.com/browse/PROJ-1234`. Requires Claude Code v2.1.176 or later. +With this configured, when `PROJ-1234` appears in a tool result or in Claude’s reply, a `PROJ-1234` badge appears in the footer linking to `https://issues.example.com/browse/PROJ-1234`. #### @@ -3495,7 +3495,7 @@ `wheelScrollAccelerationEnabled` -Accelerate mouse-wheel scroll speed during fast scrolls in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Set it to `false` for a constant scroll rate per wheel notch. Requires Claude Code v2.1.174 or later. +Accelerate mouse-wheel scroll speed during fast scrolls in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Set it to `false` for a constant scroll rate per wheel notch. * **Scope** : `Any file` * **Type** : Boolean @@ -3508,8 +3508,6 @@ { "wheelScrollAccelerationEnabled": false } - -Requires Claude Code v2.1.174 or later. ## @@ -3908,15 +3906,15 @@ `workflowSizeGuideline` -Set the [agent count Claude aims for](</docs/en/workflows#set-a-size-guideline>) in the dynamic workflows it writes. Claude Code sends the value to Claude as advice, not an enforced cap: `"small"` asks for fewer than 5 agents, `"medium"` fewer than 15, and `"large"` fewer than 50. Choose `"small"` when you want to bound what a workflow spends. Requires Claude Code v2.1.219 or later. +Set the [agent count Claude aims for](</docs/en/workflows#set-a-size-guideline>) in the dynamic workflows it writes. Claude Code sends the value to Claude as advice, not an enforced cap: `"small"` asks for fewer than 5 agents, `"medium"` fewer than 10, and `"large"` fewer than 50. Choose `"small"` when you want to bound what a workflow spends. Requires Claude Code v2.1.219 or later. * **Scope** : `Any file`. A value there takes precedence over the **Dynamic workflow size** choice in `/config`, which Claude Code stores in `~/.claude.json`, and Claude Code hides that row while a settings file sets the key. * **Type** : string, one of: * `"unrestricted"`: no guideline, so Claude sizes the workflow to the task * `"small"`: Claude aims for fewer than 5 agents - * `"medium"`: Claude aims for fewer than 15 agents + * `"medium"`: Claude aims for fewer than 10 agents * `"large"`: Claude aims for fewer than 50 agents - * **Default** : `"medium"` + * **Default** : `"medium"`, or `"small"` when you’re signed in on a Pro plan with Claude Code v2.1.271 or later settings.json
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 permissions; most run with a restricted tool set. Explore and Plan skip your CLAUDE.md files and the parent session’s git status to keep research fast and inexpensive. Every other built-in and custom subagent loads both. 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 permissions; most run with a restricted tool set. Explore and Plan skip your CLAUDE.md files and the parent session’s git status 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. * Explore @@ -180,7 +180,7 @@ } '@ -The `--agents` flag accepts JSON with a `prompt` field plus these frontmatter fields: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. Each top-level key in the JSON is the agent’s name. Don’t start a name with `-`. For what Claude Code does with a value it can’t load, and the flags and environment variable that skip that check, see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>). **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents. +The `--agents` flag accepts JSON with a `prompt` field plus these frontmatter fields: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, `omitClaudeMd`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. Each top-level key in the JSON is the agent’s name. Don’t start a name with `-`. For what Claude Code does with a value it can’t load, and the flags and environment variable that skip that check, see [`Invalid --agents configuration`](</docs/en/errors#invalid-agents-configuration>). **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents. For security reasons, plugin subagents don’t support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](</docs/en/settings-reference#permissions-allow>) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not only the plugin subagent. @@ -241,6 +241,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 `effort`| No| Effort level when this subagent is active. Overrides the session effort level. Default: inherits from session. Options: `low`, `medium`, `high`, `xhigh`, `max`; available levels depend on the model `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` @@ -730,7 +731,7 @@ claude --agent code-reviewer -The subagent’s system prompt replaces the default Claude Code system prompt entirely, the same way [`--system-prompt`](</docs/en/cli-reference>) does. `CLAUDE.md` files and project memory still load through the normal message flow. The agent name appears as `@<name>` in the startup header so you can confirm it’s active. This works with built-in and custom subagents, and the choice persists when you resume the session: Claude Code restores the agent’s tool restrictions and model along with the conversation. If the agent no longer exists when you resume, the session continues with the default tools and shows a [warning naming the agent](</docs/en/errors#session-agent-no-longer-available>). For the system prompt in either case, see [System prompt flags in resumed conversations](</docs/en/cli-reference#system-prompt-flags-in-resumed-conversations>). For a plugin-provided subagent, you can pass only the agent name and Claude Code finds it: +The subagent’s system prompt replaces the default Claude Code system prompt entirely, the same way [`--system-prompt`](</docs/en/cli-reference>) does. `CLAUDE.md` files and project memory still load through the normal message flow, even when the agent’s definition sets `omitClaudeMd`. The agent name appears as `@<name>` in the startup header so you can confirm it’s active. This works with built-in and custom subagents, and the choice persists when you resume the session: Claude Code restores the agent’s tool restrictions and model along with the conversation. If the agent no longer exists when you resume, the session continues with the default tools and shows a [warning naming the agent](</docs/en/errors#session-agent-no-longer-available>). For the system prompt in either case, see [System prompt flags in resumed conversations](</docs/en/cli-reference#system-prompt-flags-in-resumed-conversations>). For a plugin-provided subagent, you can pass only the agent name and Claude Code finds it: claude --agent security-reviewer @@ -925,12 +926,12 @@ * **System prompt** : the agent’s own prompt plus environment details that Claude Code appends, not the Claude Code system prompt. Custom subagents define theirs in the markdown body or `prompt` field. Built-in agents have predefined prompts. * **Task message** : the delegation prompt Claude writes when it hands off the work. - * **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`, and managed policy files. The built-in Explore and Plan agents skip this. + * **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`, and managed policy files. 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 taken at the start of the parent session. Absent when the working directory isn’t a Git repository or when [`includeGitInstructions`](</docs/en/settings-reference#includegitinstructions>) is `false`. 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 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. -Explore and Plan are the only subagents that omit CLAUDE.md and git status. There is no frontmatter field or per-agent setting to change which agents skip them. The main conversation reads Explore and Plan results with full CLAUDE.md context, 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. Some main-conversation state never reaches a non-fork subagent: +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: * **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.
modified Subagents in the SDK View current →
--- a/subagents.md +++ b/subagents.md @@ -158,6 +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 `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 @@ -184,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>))| 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>)), unless the agent sets `omitClaudeMd`| 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 message as the Agent tool result, 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 Tools reference View current →
--- a/tools-reference.md +++ b/tools-reference.md @@ -309,7 +309,7 @@ * Track output from any long-running script you point it at * Connect to a WebSocket feed and report each message as it arrives -For most watches, Claude writes a small script, runs it in the background, and receives each output line as it arrives. For a server that already pushes events, Claude can open a WebSocket instead of running a script. You keep working in the same session and Claude interjects when an event arrives. Stop a monitor by asking Claude to cancel it or by ending the session. When you stop a [subagent](</docs/en/sub-agents>) that started monitors, for example from `/tasks`, those monitors stop with it. When Monitor runs a command, it uses the same [permission rules as Bash](</docs/en/permissions#tool-specific-permission-rules>), so `allow` and `deny` patterns you have set for Bash apply here too. While [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) is active, Claude Code sets aside allow rules that name `Monitor` itself, along with the other [broad allow rules it drops](</docs/en/permission-modes#how-the-classifier-evaluates-actions>), so the classifier reviews Monitor commands the same way it reviews Bash commands. The WebSocket source has its own approval prompt, which the classifier also decides in auto mode. The tool is not available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. It is also not available when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. Plugins can declare monitors that start automatically when the plugin is active, instead of asking Claude to start them. See [plugin monitors](</docs/en/plugins-reference#monitors>). +For most watches, Claude writes a small script, runs it in the background, and receives each output line as it arrives. For a server that already pushes events, Claude can open a WebSocket instead of running a script. You keep working in the same session and Claude interjects when an event arrives. Every watch Claude starts has a deadline: 5 minutes by default, at most 30 minutes, and at most 10 minutes in a [non-interactive](</docs/en/headless>) run given a single prompt with `-p`. At the deadline the watch ends. Claude gets one notice, so it can start the watch again if it’s still needed. Stop a monitor by asking Claude to cancel it or by ending the session. When you stop a [subagent](</docs/en/sub-agents>) that started monitors, for example from `/tasks`, those monitors stop with it. When Monitor runs a command, it uses the same [permission rules as Bash](</docs/en/permissions#tool-specific-permission-rules>), so `allow` and `deny` patterns you have set for Bash apply here too. While [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) is active, Claude Code sets aside allow rules that name `Monitor` itself, along with the other [broad allow rules it drops](</docs/en/permission-modes#how-the-classifier-evaluates-actions>), so the classifier reviews Monitor commands the same way it reviews Bash commands. The WebSocket source has its own approval prompt, which the classifier also decides in auto mode. The tool is not available on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. It is also not available when `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. Plugins can declare monitors that start automatically when the plugin is active, instead of asking Claude to start them. See [plugin monitors](</docs/en/plugins-reference#monitors>). ### @@ -333,7 +333,7 @@ `url`| Yes| The endpoint to connect to. Must be a `ws://` or `wss://` URL with no embedded credentials or whitespace, using ASCII characters only `protocols`| No| WebSocket subprotocol names to offer during the handshake. Each entry must be a valid subprotocol token, and the list can’t contain duplicates -The `timeout_ms` and `persistent` inputs behave the same as they do for a command: the watch ends at the deadline unless `persistent` is set, and `TaskStop` cancels it early. Opening a WebSocket prompts for approval; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) the classifier decides instead. The prompt doesn’t offer an option to skip future prompts for the same host. Claude Code denies URLs that point at a private, link-local, or cloud-metadata address, including hostnames that resolve to one. It also denies hosts in `sandbox.network.deniedDomains`, and when [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>) is set in managed settings, any host outside the managed allowlist. +The `timeout_ms` deadline applies to a WebSocket watch too: the watch ends at the deadline, and `TaskStop` cancels it early. Opening a WebSocket prompts for approval; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) the classifier decides instead. The prompt doesn’t offer an option to skip future prompts for the same host. Claude Code denies URLs that point at a private, link-local, or cloud-metadata address, including hostnames that resolve to one. It also denies hosts in `sandbox.network.deniedDomains`, and when [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>) is set in managed settings, any host outside the managed allowlist. ##
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -941,6 +941,7 @@ initialPrompt?: string; maxTurns?: number; background?: boolean; + omitClaudeMd?: boolean; memory?: "user" | "project" | "local"; effort?: "low" | "medium" | "high" | "xhigh" | "max" | number; permissionMode?: PermissionMode; @@ -959,6 +960,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 `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` @@ -2814,17 +2816,16 @@ **Tool name:** `Monitor` type MonitorInput = { + description: string; + timeout_ms: number; command?: string; ws?: { url: string; protocols?: string[]; }; - description: string; - timeout_ms: number; - persistent: boolean; - }; - -Runs a background source and delivers each event to Claude so it can react without polling: `command` runs a script and emits one event per stdout line, and `ws` opens a WebSocket and emits one event per text frame. Provide exactly one of `command` or `ws`. The `ws` source requires Claude Code v2.1.195 or later. Set `persistent: true` for session-length watches such as log tails. When Monitor runs a command, it follows the same permission rules as Bash; a WebSocket watch prompts for approval separately. See the [Monitor tool reference](</docs/en/tools-reference#monitor-tool>) for behavior and provider availability. The exported type marks `timeout_ms` and `persistent` as required because the schema fills in their defaults, 300000 and `false`; a call that omits them validates. + }; + +Runs a background source and delivers each event to Claude so it can react without polling: `command` runs a script and emits one event per stdout line, and `ws` opens a WebSocket and emits one event per text frame. Provide exactly one of `command` or `ws`. The `ws` source requires Claude Code v2.1.195 or later. `timeout_ms` is the watch’s deadline in milliseconds. It defaults to 300000, and the effective deadline is at most 1800000, which is 30 minutes. At the deadline the watch ends and Claude receives one notice so it can start a new watch if it still needs one. The exported type marks `timeout_ms` as required because the schema fills in the default; a call that omits it validates. When Monitor runs a command, it follows the same permission rules as Bash; a WebSocket watch prompts for approval separately. See the [Monitor tool reference](</docs/en/tools-reference#monitor-tool>) for behavior and provider availability. ###
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -44,7 +44,7 @@ * **Activity Bar** : click the Spark icon in the left sidebar to open the sessions list. Click any session to open it in your preferred location, or start a new one. This icon is always visible in the Activity Bar. * **Command Palette** : `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux), type “Claude Code”, and select an option like “Open in New Tab” - * **Status Bar** : if you’ve set `preferredLocation` to `sidebar`, or opened Claude with **Claude Code: Open in Side Bar** , click **✱ Claude Code** in the bottom-right corner of the window. This works even when no file is open. + * **Status Bar** : if you’ve set `preferredLocation` to `sidebar`, or opened Claude with **Claude Code: Open in Side Bar** , click **✻ Claude Code** in the bottom-right corner of the window. This works even when no file is open. You can drag the Claude panel to reposition it anywhere in VS Code. See Customize your workflow for details. @@ -101,6 +101,10 @@ * To report a bug, click **Report a problem** at the bottom of the menu, or type `/bug` or `/feedback` with an optional description that prefills the report. When you submit the report and you’re signed in to Anthropic on a first-party connection, Claude Code sends it to Anthropic. On a third-party provider, or without Anthropic credentials, the dialog still opens, but submitting shows an error and sends nothing: unlike the CLI’s `/bug`, the extension doesn’t write a local archive. Requires Claude Code v2.1.229 or later. * **Side questions** : type `/btw` followed by a question to ask about your session [without adding to the conversation](</docs/en/interactive-mode#side-questions-with-%2Fbtw>). The answer opens in a panel beside the chat, where you can ask follow-up questions. The thread survives window reloads. Claude Code keeps the newest 20 exchanges and expires stored threads on the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) schedule, as long as Claude Code can [safely determine the retention period](</docs/en/claude-directory#cleaned-up-automatically>). To clear a thread, click the trash icon in the panel. Requires Claude Code v2.1.227 or later. * **Context indicator** : the prompt box shows how much of Claude’s context window you’re using. Claude automatically compacts when needed, or you can run `/compact` manually. + * **Prompt cache clock** : a clock icon next to the context indicator estimates how much time the conversation’s [prompt cache](</docs/en/prompt-caching>) has left before it expires. It counts down from the cache’s five-minute or one-hour [lifetime](</docs/en/prompt-caching#cache-lifetime>), and each response that uses the cache restarts the countdown. Apart from compaction, the [actions that invalidate the cache](</docs/en/prompt-caching#actions-that-invalidate-the-cache>) don’t reset the clock, so it can still show minutes left after you switch models. + * Until the countdown runs out, the icon shows the minutes left, such as **12m**. + * When the countdown runs out, the minutes disappear and the icon turns red, or your theme’s error color, until the next response. The cache has likely expired, so expect a slower, more expensive response to your next message while the cache rebuilds. If the five-minute lifetime keeps running out between your messages, see [Choose the TTL yourself](</docs/en/prompt-caching#choose-the-ttl-yourself>). + * Right after the conversation is [compacted](</docs/en/prompt-caching#compacting-the-conversation>), the icon also turns red without minutes until the next response, because the cache doesn’t cover the compacted conversation yet. * **Agent map** : when the conversation includes [subagents](</docs/en/sub-agents>), an agent count such as **2 agents** appears at the bottom of the prompt box. Its dot shows whether any subagent is working or waiting for your permission. Click the agent count to open the agent map, which draws the conversation’s subagents as a tree under the main agent, each with its status, elapsed time, and token count. Click a subagent to see its prompt and tool calls, open its read-only transcript, or stop it while it runs. Requires Claude Code v2.1.269 or later. * **Extended thinking** : lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). Claude’s reasoning appears in the conversation as collapsed blocks: click a block to read it, or press `Ctrl+O` to expand or collapse every thinking block in the session. See [Extended thinking](</docs/en/model-config#extended-thinking>) for details. * **Multi-line input** : press `Shift+Enter` to add a new line without sending. This also works in the “Other” free-text input of question dialogs. @@ -116,7 +120,7 @@ Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts, etc.) What's in @src/components/ (include a trailing slash for folders) -For large PDFs, you can ask Claude to read specific pages instead of the whole file: a single page, a range like pages 1-10, or an open-ended range like page 3 onward. When you select text in the editor, Claude can see your highlighted code automatically. The prompt box footer shows how many lines are selected. Press `Option+K` (Mac) / `Alt+K` (Windows/Linux) to insert an @-mention with the file path and line numbers (e.g., `@app.ts#5-10`). Click the **X** on the selection indicator to remove it so Claude doesn’t receive the selection. The indicator comes back when you select other text or switch to a different file. To attach an image, paste it from your clipboard into the prompt box. You can also hold `Shift` while dragging files into the prompt box to add them as attachments. Click the X on any attachment to remove it from context. +For large PDFs, you can ask Claude to read specific pages instead of the whole file: a single page, a range like pages 1-10, or an open-ended range like page 3 onward. When you select text in the editor, Claude can see your highlighted code automatically. The prompt box footer shows how many lines are selected. Press `Option+K` (Mac) / `Alt+K` (Windows/Linux) to insert an @-mention with the file path and line numbers (e.g., `@app.ts#5-10`). Click the **X** on the selection indicator to remove it so Claude doesn’t receive the selection. The indicator comes back when you select other text. Claude also sees which file you have open in the editor, even when nothing is selected, and the prompt box shows its name. To add only your selected text, turn off the [Attach Open File setting](<vscode://settings/claudeCode.attachOpenFile>). The setting requires Claude Code v2.1.271 or later. To attach an image, paste it from your clipboard into the prompt box. You can also hold `Shift` while dragging files into the prompt box to add them as attachments. Click the X on any attachment to remove it from context. ### @@ -168,7 +172,7 @@ Check account and usage -Run `/usage` to open the Account & usage dialog. The dialog requires a claude.ai sign-in, so it isn’t offered on a third-party provider. It shows your signed-in account, your plan, and usage bars for your plan’s limits, such as the current session and the week. Each bar shows how long until its limit resets. The dialog also breaks down what is contributing to your plan limits. It flags behaviors that account for 10% or more of recent usage, such as cache misses, long context, and subagent-heavy or highly parallel sessions, each with a tip to reduce it. Attribution tables show how much usage came from each skill, subagent, plugin, and MCP server. Requires Claude Code v2.1.174 or later. Use the Day and Week toggle to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local sessions on this machine, so usage from other devices or claude.ai is not included. For more on tracking and reducing usage, see [Track your costs](</docs/en/costs#track-your-costs>). +Run `/usage` to open the Account & usage dialog. The dialog requires a claude.ai sign-in, so it isn’t offered on a third-party provider. It shows your signed-in account, your plan, and usage bars for your plan’s limits, such as the current session and the week. Each bar shows how long until its limit resets. The dialog also breaks down what is contributing to your plan limits. It flags behaviors that account for 10% or more of recent usage, such as cache misses, long context, and subagent-heavy or highly parallel sessions, each with a tip to reduce it. Attribution tables show how much usage came from each skill, subagent, plugin, and MCP server. Use the Day and Week toggle to switch between the last 24 hours and the last 7 days. The figures are approximate and computed from local sessions on this machine, so usage from other devices or claude.ai is not included. For more on tracking and reducing usage, see [Track your costs](</docs/en/costs#track-your-costs>). ## @@ -385,7 +389,7 @@ The extension has two types of settings: - * **Extension settings** in VS Code: control the extension’s behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General Config** to open settings. + * **Extension settings** in VS Code: control the extension’s behavior within VS Code. Open with `Cmd+,` (Mac) or `Ctrl+,` (Windows/Linux), then go to Extensions → Claude Code. You can also type `/` and select **General config…** to open settings. * **Claude Code settings** in `~/.claude/settings.json`: shared between the extension and CLI. Use it for allowed commands, environment variables, hooks, and MCP servers. On Pro, Max, and Team plans, it’s also one input to the permission mode conversations start in. [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>) lists the order. See [Settings](</docs/en/settings>) for details. Add `"$schema": "https://json.schemastore.org/claude-code-settings.json"` to your `settings.json` to get autocomplete and inline validation for all available settings directly in VS Code. @@ -404,6 +408,7 @@ `initialPermissionMode`| -| Controls approval prompts for new conversations: `default`, `plan`, `acceptEdits`, or `bypassPermissions`. `manual` is an alias for `default` and selects the mode labeled **Manual** in the mode indicator. When you leave it unset, the extension chooses the starting permission mode as described in [Switch permission modes](</docs/en/permission-modes#switch-permission-modes>). `preferredLocation`| `panel`| Where Claude opens: `sidebar` (right) or `panel` (new tab) `autosave`| `true`| Auto-save files before Claude reads or writes them +`attachOpenFile`| `true`| Add the file that is open in the editor to your messages and show it in the prompt box. When off, only your selected text is added. Requires Claude Code v2.1.271 or later `useCtrlEnterToSend`| `false`| Use Ctrl/Cmd+Enter instead of Enter to send prompts `enableNewConversationShortcut`| `false`| Enable Cmd/Ctrl+N to start a new conversation `enableReopenClosedSessionShortcut`| `true`| Use Cmd/Ctrl+Shift+T to reopen the most recently closed Claude session tab. When the last closed tab wasn’t a Claude session, the shortcut runs VS Code’s normal reopen-closed-editor command instead. @@ -575,7 +580,7 @@ The built-in IDE MCP server -When the extension is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in VS Code’s native diff viewer, reads your current selection for `@`-mentions, and — when you’re working in a Jupyter notebook — asks VS Code to execute cells. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a `PreToolUse` hook to allowlist MCP tools, though, you’ll need to know it exists. **Selection and open-file context.** While connected, the CLI includes your current editor selection and the path of the active file as context on each prompt you send. The transcript shows a `⧉ Selected N lines from <file>` line when this happens. To exclude a sensitive file such as `.env`, add a [`Read` deny rule](</docs/en/permissions#read-and-edit>) for its path. A matching deny rule prevents both the selected text and the open-file notice for that file from reaching Claude. **Transport and authentication.** The server binds to `127.0.0.1` on a random port in the range 10000–65535, and the port is not configurable. The transport is unencrypted `ws://`; because the socket is loopback-only, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection. Each extension activation generates a fresh random auth token, writes it to a lock file at `~/.claude/ide/<port>.lock`, and the CLI must present it as the `X-Claude-Code-Ide-Authorization` header to connect. The lock file has `0600` permissions in a `0700` directory, so only the user running VS Code can read it. If `CLAUDE_CONFIG_DIR` is set, the lock file is written to `$CLAUDE_CONFIG_DIR/ide/` instead. **Tools exposed to the model.** The server hosts a dozen tools, but only two are visible to the model. The rest are internal RPC the CLI uses for its own UI — opening diffs, reading selections, saving files — and are filtered out before the tool list reaches Claude. +When the extension is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in VS Code’s native diff viewer, reads your current selection for `@`-mentions, and — when you’re working in a Jupyter notebook — asks VS Code to execute cells. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a `PreToolUse` hook to allowlist MCP tools, though, you’ll need to know it exists. **Selection and open-file context.** While connected, the CLI includes your current editor selection and the path of the active file as context on each prompt you send. The transcript shows a `⧉ Selected N lines from <file>` line when this happens. To exclude a sensitive file such as `.env`, add a [`Read` deny rule](</docs/en/permissions#read-and-edit>) for its path. A matching deny rule prevents both the selected text and the open-file notice for that file from reaching Claude. If you turn off the Attach Open File setting, the CLI receives the active file’s path only while you have text selected in it. **Transport and authentication.** The server binds to `127.0.0.1` on a random port in the range 10000–65535, and the port is not configurable. The transport is unencrypted `ws://`; because the socket is loopback-only, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection. Each extension activation generates a fresh random auth token, writes it to a lock file at `~/.claude/ide/<port>.lock`, and the CLI must present it as the `X-Claude-Code-Ide-Authorization` header to connect. The lock file has `0600` permissions in a `0700` directory, so only the user running VS Code can read it. If `CLAUDE_CONFIG_DIR` is set, the lock file is written to `$CLAUDE_CONFIG_DIR/ide/` instead. **Tools exposed to the model.** The server hosts a dozen tools, but only two are visible to the model. The rest are internal RPC the CLI uses for its own UI — opening diffs, reading selections, saving files — and are filtered out before the tool list reaches Claude. Tool name (as seen by hooks)| What it does| Read-only ---|---|--- @@ -616,7 +621,7 @@ 4. **Disable conflicting extensions** : Temporarily disable other AI extensions (Cline, Continue, etc.) 5. **Check workspace trust** : The extension doesn’t work in Restricted Mode -Alternatively, if you’ve set `preferredLocation` to `sidebar`, or opened Claude with **Claude Code: Open in Side Bar** , click ”✱ Claude Code” in the **Status Bar** (bottom-right corner). This works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type “Claude Code”. +Alternatively, if you’ve set `preferredLocation` to `sidebar`, or opened Claude with **Claude Code: Open in Side Bar** , click ”✻ Claude Code” in the **Status Bar** (bottom-right corner). This works even without a file open. You can also use the **Command Palette** (`Cmd+Shift+P` / `Ctrl+Shift+P`) and type “Claude Code”. ###
modified Get started with Claude Code on the web View current →
--- a/web-quickstart.md +++ b/web-quickstart.md @@ -316,4 +316,4 @@ * [Configure cloud environments](</docs/en/cloud-environments>): network access levels, environment variables, and setup scripts for cloud sessions * [Routines](</docs/en/routines>): automate work on a schedule, via API call, or in response to GitHub events * [CLAUDE.md](</docs/en/memory>): give Claude persistent instructions and context that load at the start of every session - * Install the Claude mobile app for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) or [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>) to monitor sessions from your phone. From the Claude Code CLI, `/mobile` shows a QR code. + * Install the Claude mobile app for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) or [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>) to monitor sessions from your phone. From the Claude Code CLI, `/mobile` shows a QR code for [claude.ai/mobile](<https://claude.ai/mobile>) that opens the right app store for your phone.
modified Orchestrate subagents at scale with dynamic workflows View current →
--- a/workflows.md +++ b/workflows.md @@ -361,7 +361,7 @@ Constraint| Why ---|--- -No mid-run user input| Only agent permission prompts can pause a run. For sign-off between stages, run each stage as its own workflow +No mid-run user input| A run pauses on its own only for agent permission prompts and a usage-limit wait. For sign-off between stages, run each stage as its own workflow No direct filesystem or shell access from the workflow itself| Agents read, write, and run commands. The script coordinates the agents No module loading: a script that contains `import()` fails before the run starts| The script body is plain JavaScript. Put work that needs a library in an agent’s task Up to 16 concurrent agents, fewer when Claude Code has fewer CPUs available, including inside a CPU-limited container| Bounds local resource use @@ -400,9 +400,22 @@ ​ +When a run hits your usage limit + +When an agent hits your claude.ai [usage limit](</docs/en/interactive-mode#wait-for-a-usage-limit-to-reset>), the run pauses rather than failing that agent: the agents that hit the limit wait for the reset, and no new agents start. Shortly after the limit resets, the waiting agents run again and the run continues on its own. Requires Claude Code v2.1.271 or later; on earlier versions, the affected agents fail. While the run waits, its progress line in the task panel and the `/workflows` header show when the limit resets. The run pauses only when all of these hold; when one doesn’t, the affected agent fails instead: + + * The session is interactive and signed in with a claude.ai subscription. A run doesn’t pause in [non-interactive mode](</docs/en/headless>) with `claude -p` or the [Agent SDK](</docs/en/agent-sdk/overview>), in a [background session](</docs/en/agent-view>), or in a [Remote Control](</docs/en/remote-control>) or [agent team](</docs/en/agent-teams>) teammate session. + * [`autoContinueAtUsageLimit`](</docs/en/settings-reference#autocontinueatusagelimit>) is on, the same setting that lets the session itself [wait for a usage limit to reset](</docs/en/interactive-mode#wait-for-a-usage-limit-to-reset>). If you turn it off during a wait, the wait ends and the waiting agents fail. + * The limit resets within 24 hours. A weekly limit can reset further out. + * The run hasn’t already waited twice. When it hits the limit a third time, the agent fails. + +### + +​ + Cost -A workflow spawns many agents, so a single run can use meaningfully more tokens than working through the same task in conversation. Runs count toward your plan’s usage and rate limits like any other session. To gauge the spend before committing to a large task, run the workflow on a small slice first: one directory instead of the whole repo, or a narrow question instead of a broad one. The `/workflows` view shows each agent’s token usage as the run progresses, and you can stop the run there at any time, usually without losing completed work. Resume after a pause covers what a stopped run keeps. The runtime’s agent caps limit how many agents a single run can spawn, which bounds the cost of a runaway script. To keep runs to fewer agents, choose the `small` size guideline. Claude Code also flags a run that grows unusually large. When a workflow schedules more than 25 agents, or its projected token total passes 1.5 million, its progress line in the task panel below the input box shows a `Large workflow` warning. The warning points you to `/workflows`, where you can stop the run. The warning is advisory: it doesn’t pause or limit the run. Two settings change when you see it: +A workflow spawns many agents, so a single run can use meaningfully more tokens than working through the same task in conversation. Runs count toward your plan’s usage and rate limits. To gauge the spend before committing to a large task, run the workflow on a small slice first: one directory instead of the whole repo, or a narrow question instead of a broad one. The `/workflows` view shows each agent’s token usage as the run progresses, and you can stop the run there at any time, usually without losing completed work. Resume after a pause covers what a stopped run keeps. The runtime’s agent caps limit how many agents a single run can spawn, which bounds the cost of a runaway script. To keep runs to fewer agents, choose the `small` size guideline. Claude Code also flags a run that grows unusually large. When a workflow schedules more than 25 agents, or its projected token total passes 1.5 million, its progress line in the task panel below the input box shows a `Large workflow` warning. The warning points you to `/workflows`, where you can stop the run. The warning is advisory: it doesn’t pause or limit the run. Two settings change when you see it: * If you choose a size guideline yourself, its agent count replaces the 25-agent threshold. The built-in default guideline leaves the threshold at 25. * Sessions with ultracode on don’t show the warning, because turning ultracode on already opts you in to large runs. @@ -426,10 +439,10 @@ ---|--- `unrestricted`| No guideline: Claude sizes the workflow to the task `small`| Fewer than 5 agents -`medium`| Fewer than 15 agents +`medium`| Fewer than 10 agents `large`| Fewer than 50 agents -The default is `medium`. Until you choose a value, the `/config` row shows `medium (default)` and the workflow’s `Running in background` line shows `medium size (/config)`. Requires Claude Code v2.1.219 or later; earlier versions default to `unrestricted`. To change the guideline, pick a value for the Dynamic workflow size setting in `/config`, or run `/config workflowSizeGuideline=small`. On v2.1.219 and later, you can also set the [`workflowSizeGuideline` key](</docs/en/settings-reference#workflowsizeguideline>) in any settings file; that value takes precedence over `/config`, and Claude Code hides the `/config` row while a settings file provides one. Changes take effect on the next prompt. The runtime agent caps still apply regardless of the setting. +The default is `medium`, or `small` when you’re signed in on a Pro plan with Claude Code v2.1.271 or later. Until you choose a value, the `/config` row marks the value as the default, and the workflow’s `Running in background` line names the size in force. Requires Claude Code v2.1.219 or later; earlier versions default to `unrestricted`. To change the guideline, pick a value for the Dynamic workflow size setting in `/config`, or run `/config workflowSizeGuideline=small`. On v2.1.219 and later, you can also set the [`workflowSizeGuideline` key](</docs/en/settings-reference#workflowsizeguideline>) in any settings file; that value takes precedence over `/config`, and Claude Code hides the `/config` row while a settings file provides one. Changes take effect on the next prompt. The runtime agent caps still apply regardless of the setting. ###