modified Use the mods API View current →
--- a/api.md +++ b/api.md @@ -262,7 +262,7 @@ `$.session.send` to an [agent team](</docs/en/agent-teams>) teammate| Resolves with `{ isDelivered: false, reason: 'Teammate "<name>" was not messaged: <reason>.' }`, where `<name>` is the teammate’s name [`$.tool.call`](</docs/en/plugins/mods/reference#mods-api-methods>) of Bash with `run_in_background: true`, Monitor, or CronCreate| Resolves with `{ deny: '<tool> was not run: it starts background work, a schedule or a goal, and <reason>' }`, where `<tool>` is the tool’s name -When one of these `$.session.send` or `$.tool.call` calls is refused after an interruption in an interactive session, the user can see the [`Stopped:` toast](</docs/en/plugins/mods/troubleshoot#stopped-type-a-message-to-continue>). +When one of these `$.session.send` or `$.tool.call` calls is refused after an interruption in an interactive session, the user can see the [`type a message to continue` toast](</docs/en/plugins/mods/troubleshoot#stopped-type-a-message-to-continue>). #### Work your mod started before the interruption @@ -278,8 +278,6 @@ A subagent your mod spawned and later resumed with `$.session.send` that finishes before the user’s next input| Its finish notice waits, and reaches the conversation after that input| Nothing needed A foreground Bash or PowerShell command from `$.tool.call` that was already running when the user stopped the turn and reaches its timeout before their next input| Stopped at its timeout instead of [moving to the background](</docs/en/tools-reference#foreground-commands-that-move-to-the-background>). The call resolves with `isError` set, and the output includes the line `Ended instead of moving to the background: plugins' input is held, by a Stop or by the host's limits.`| Run it again after the user’s next input, as Retry a refused or dropped call shows -When a scheduled job comes due or a monitor raises an event before the user’s next input, the user can see the [`Stopped:` toast](</docs/en/plugins/mods/troubleshoot#stopped-type-a-message-to-continue>). - ### Calls refused in `claude -p` runs and Agent SDK sessions In a `claude -p` run or an [Agent SDK](</docs/en/agent-sdk/overview>) session, a result such as `{ drop: 'the run reached its --max-turns limit' }` means the run refused your mod’s call. A refused `$.prompt.submit` resolves with `{ drop: '<reason>' }`. Other refused calls, such as `$.command.run` and `$.agent.spawn`, give the results shown in What refused calls return with the reason in place of `<reason>`. Find your `<reason>` below for what to do about it:
modified Share session output as artifacts View current →
--- a/artifacts.md +++ b/artifacts.md @@ -44,7 +44,7 @@ ---|--- The session is in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>)| Asks before the first publish of each artifact The publish declares runtime capabilities for the page, such as connector calls or file downloads| Asks before that publish -You shared the artifact publicly| Asks once per conversation before changing it, and before each reply to a comment on it +You shared the artifact publicly| Asks at least once per conversation before changing it, and before each reply to a comment on it Claude publishes in a turn that a [session-scoped scheduled task](</docs/en/scheduled-tasks>) firing in your session started, rather than a prompt you typed| Asks before the first publish of each artifact Claude can’t read the file without your approval| Asks before publishing it. An allow rule for the `Artifact` tool doesn’t skip this prompt In [Manual](</docs/en/permission-modes>) or `acceptEdits` mode, Claude makes a small change to an artifact’s file it can’t edit without your approval, such as a project file in Manual mode| Asks before publishing the change. You’re asked even if an allow rule covers the `Artifact` tool, because the edit to the file needs your approval
modified Authentication View current →
--- a/authentication.md +++ b/authentication.md @@ -13,7 +13,7 @@ * **Claude for Teams or Enterprise** : log in with the claude.ai account your team admin invited you to. * **Claude Console** : log in with your Console credentials. Your admin must have invited you first. You can sign in with or without creating an API key. * **Cloud providers** : if your organization uses [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>), set the required environment variables before running `claude`, or select **3rd-party platform** at the login prompt, which launches an interactive setup wizard for Bedrock and Vertex AI. No browser login is needed. - * **Cloud gateway** : if your organization runs a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>), sign in with corporate SSO through `/login`. The gateway-issued token is the session’s only credential. + * **Cloud gateway** : if your organization runs a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>), sign in with corporate SSO through `/login` or [from VS Code](</docs/en/vs-code#sign-in-to-a-claude-apps-gateway>). The gateway-issued token is the session’s only credential. Admins can direct which login method developers use and require claude.ai logins to belong to a specific organization; see Restrict login to your organization. To log out and re-authenticate, type `/logout` at the Claude Code prompt. Logging out also resets your first-launch setup state, so the next time you run `claude` it walks you through login and setup again. If you’re having trouble logging in, see [authentication troubleshooting](</docs/en/troubleshoot-install#login-and-authentication>). @@ -240,15 +240,15 @@ #### Anthropic profiles and federation credentials -A profile is a named credential configuration file in your [Anthropic configuration directory](<https://platform.claude.com/docs/en/manage-claude/wif-reference#configuration-directory>), by default `~/.config/anthropic` on macOS and Linux or `%APPDATA%\Anthropic` on Windows. A profile’s auth mode is `oidc_federation` when you set it up for [Workload Identity Federation (WIF)](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>) or `user_oauth` when [`ant auth login`](<https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication>) wrote it or you signed in to a Console account without an API key. Claude Code doesn’t read profiles or federation variables in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), in Claude Desktop, or in cloud sessions. In those sessions, `/status` shows no `Profile` row. Claude Code checks three sources in this order and stops at the first one that is set. The table shows what sets each source and where it ranks against your `/login` credential. - -Source| Set by| Rank against `/login` +A profile is a named credential configuration file in your [Anthropic configuration directory](<https://platform.claude.com/docs/en/manage-claude/wif-reference#configuration-directory>), by default `~/.config/anthropic` on macOS and Linux or `%APPDATA%\Anthropic` on Windows. A profile’s auth mode is `oidc_federation` when you set it up for [Workload Identity Federation (WIF)](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>) or `user_oauth` when [`ant auth login`](<https://platform.claude.com/docs/en/cli-sdks-libraries/cli/authentication>) wrote it or you signed in to a Console account without an API key. Claude Code doesn’t read profiles or federation variables in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), in Claude Desktop, or in cloud sessions. In those sessions, `/status` shows no `Profile` row. Where it does read them, Claude Code checks three sources in this order and stops at the first one that is set. + +Source| Set by| Against a claude.ai login ---|---|--- Named profile| `ANTHROPIC_PROFILE`| Above, whichever auth mode the profile has Federation variables| `ANTHROPIC_FEDERATION_RULE_ID` and `ANTHROPIC_ORGANIZATION_ID`, both set| Above -Active profile| The [`active_config` file](<https://platform.claude.com/docs/en/manage-claude/wif-reference#active-profile>) in your configuration directory, or a profile named `default`| Above when its auth mode is `oidc_federation`; below a working `/login` credential when its auth mode is `user_oauth` - -For the federation variables, Claude Code also reads the other variables in the [WIF reference](<https://platform.claude.com/docs/en/manage-claude/wif-reference#environment-variables>), such as `ANTHROPIC_IDENTITY_TOKEN_FILE`, when it exchanges your identity token. For the profile file format, see the [WIF reference](<https://platform.claude.com/docs/en/manage-claude/wif-reference#profile-configuration-file>). To confirm which source Claude Code chose, run `/status`. A `Profile` row names the source in place of the `Login method` row. When the profile is the credential in use, `Organization` and `Email` rows show its account. When a `user_oauth` profile’s login has expired and Claude Code can’t renew it, requests fail with an [expired profile login error](</docs/en/errors#anthropic-profile-login-expired>). Features that need your claude.ai login, such as [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) and [`/schedule`](</docs/en/routines>), aren’t available while one of these sources is selected. To stop Claude Code from selecting a source: +Active profile| The [`active_config` file](<https://platform.claude.com/docs/en/manage-claude/wif-reference#active-profile>) in your configuration directory, or a profile named `default`| Above when its auth mode is `oidc_federation`; below a claude.ai login that still works when its auth mode is `user_oauth` + +If `/login` saved an API key and `CI` isn’t set, Claude Code uses that key instead of any of these sources. To remove it, [run `/logout`](</docs/en/troubleshoot-install#not-logged-in-or-token-expired>). For the federation variables, Claude Code also reads the other variables in the [WIF reference](<https://platform.claude.com/docs/en/manage-claude/wif-reference#environment-variables>), such as `ANTHROPIC_IDENTITY_TOKEN_FILE`, when it exchanges your identity token. For the profile file format, see the [WIF reference](<https://platform.claude.com/docs/en/manage-claude/wif-reference#profile-configuration-file>). To confirm which source Claude Code chose, run `/status`. A `Profile` row names the source in place of the `Login method` row. When the profile is the credential in use, `Organization` and `Email` rows show its account. When a `user_oauth` profile’s login has expired and Claude Code can’t renew it, requests fail with an [expired profile login error](</docs/en/errors#anthropic-profile-login-expired>). Features that need your claude.ai login, such as [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) and [`/schedule`](</docs/en/routines>), aren’t available while one of these sources is selected. To stop Claude Code from selecting a source: * **Named profile or federation variables** : unset `ANTHROPIC_PROFILE`, or unset either federation variable * **Active profile** : run `/logout` for a `user_oauth` profile whose current credential you wrote by signing in to a Console account without an API key, run `ant auth logout` for one whose current credential `ant auth login` wrote, or delete the profile’s file from `configs/` in your configuration directory for either auth mode
modified Configure auto mode View current →
--- a/auto-mode-config.md +++ b/auto-mode-config.md @@ -257,7 +257,8 @@ ... ], "soft_deny": [ - "Git Destructive [named+specifics — **must name:** the destructive operation and its target]: Force pushing (`git push --force`), deleting remote branches, tags, or releases, or rewriting remote history. Also `git commit --amend` when the commit being rewritten is not the agent's own unpushed work: either no prior `git commit` is visible (HEAD pre-dates the session), or a `git push` of the current branch is visible after the most recent commit (it has been pushed). Clears when the user asked to amend/reword/fixup, or when it is a message-only reword (`--amend -m …`, nothing newly staged) of a commit the agent visibly created this session.", + ... + "Production Deploy [named+specifics — **must name:** the production target]: Deploying to production/a production service or running production database migrations", ... ], "hard_deny": [...],
modified Claude Code changelog View current →
Show diff (167 lines)
--- a/changelog.md +++ b/changelog.md @@ -1,4 +1,164 @@ This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Longer releases are grouped by type of change, with long lists of improvements and bug fixes collapsed. Run `claude --version` to check your installed version. + +2.1.328 + +November 19, 2026 + +**Added** + + * Added auto mode for Claude Opus 4.6 and Sonnet 4.6 on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry and Claude apps gateway; interactive sessions with no permission mode start in it + * Added `"onFailure": "block"` for `mcp_tool` hooks, as for command and HTTP hooks: a hook whose call fails blocks the action + * Added a warning when a message from a session that skips permission prompts may be held and dropped by a cloud session + * Added a notice in `/status` and `claude doctor` when an OpenTelemetry exporter has no endpoint and its data would likely be lost + * Added `CLAUDE_CODE_DISABLE_DEFERRED_TOOL_RESUME`, which lets a host stop `claude -p --resume` and `--continue` from running a tool call that a hook deferred + * Added support for apps that embed Claude Code to switch on the policy plugin’s `allowManagedModsOnly` option; an admin’s managed settings still win + * Added a startup warning to the Claude apps gateway when a policy’s `maxEffortLevel` is not a valid effort level + * Self-hosted runner: Added `--repository-folder` to name the folder that sessions use for a repository at `--capacity 1`, in place of its path under the base folder, which can’t be a symbolic link + * Self-hosted runner: Added a start-up warning when the host’s settings.json sets a default permission mode that sessions ignore + * Self-hosted runner: Added `--hook-label` to `claude self-hosted-runner orchestrator`, to hand chosen session labels to the `spawn-runner` hook + * Self-hosted runner: Added `--metadata key=value` to `claude --environment`, to label a session for the `spawn-runner` hook + * Self-hosted runner: Added `claude_code_self_hosted_orchestrator_session_queue_wait_by_reason_seconds` to the orchestrator’s `/metrics`, so a re-opened session’s wait can be told from a new one’s + * Self-hosted runner: Added an orchestrator metric, `claude_code_self_hosted_orchestrator_sessions_given_up_total`, that counts by cause how often Anthropic gave up starting a runner for a session + * [VSCode] Added a notice when a message from another session is held, with a link to the settings file that can allow it + +**Changed** + + * Changed plan mode and Bash prompts for Opus 4.6 and Sonnet 4.6 on third-party providers to use and offer auto mode, as on newer models; `disableAutoMode` turns both off + * Changed Code Mode to no longer run UserPromptSubmit hooks, managed ones included, on scripts’ output; to redact that output, use a PostToolUse hook with `updatedToolOutput` + * Changed `/code-review` on most models to report only bugs and CLAUDE.md violations; run `/simplify` for reuse, simplification and efficiency cleanups + * Changed `/code-review` to mark each finding Important, Pre-existing or Nit on most models, and to end each summary with a suggested fix; a clean review’s list now reads “Code review found no issues.” + * Changed `deniedMcpServers` entries of the form `claude.ai <name>` to apply to that connector in cloud and self-hosted runner sessions too + * Changed managed `PostToolUse` hooks to no longer fire for calls refused before they ran: no log entry, rewrite, block or stop there; `PostToolBatch` gets most, not marked as refused + * Changed `/bug` to ask Yes or No before sending, so repeated Enters no longer send a report or open GitHub + * Changed subagents in `claude -p`, the Agent SDK, desktop and VS Code to wait for their own subagents by default when `CLAUDE_CODE_FORK_SUBAGENT=0` is set + * Changed `claude -p` with `CLAUDE_CODE_FORK_SUBAGENT=0` to count a background subagent and those it waits for against one 10-minute wait; raise `CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS` for longer chains + * Changed a shell command rewritten by a PermissionRequest hook to a sandbox-excluded command to run outside the sandbox + * Changed the Claude in Chrome welcome screen and `/chrome` to say that Claude Code asks before Claude acts on a site, unless your permission mode or a rule in `/permissions` answers + * Changed Claude Desktop and Agent SDK sessions on third-party providers or with telemetry or feature flags off to end the turn when closed with a question open, instead of continuing without an answer + * Changed pasted text to be marked for Claude as pasted, on third-party providers or with telemetry or feature flags turned off + * Changed subagent progress summaries in terminal sessions on the Anthropic API to be written by the default small fast model from short notes, also with telemetry off, using far fewer tokens + * Changed how a sandbox that can’t start is reported, unless `sandbox.failIfUnavailable` is set: the next sandboxed Bash command is refused and says that the sandbox is off for the session + * Changed `/list-agents` to show its list to you alone; Claude lists sessions itself when needed + * Self-hosted runner: Changed the built-in `gh api` to be off by default where settings guard Claude’s GitHub tools by name; `--use-anthropic-gh true` turns it on + * Self-hosted runner: Changed a `claude` that a wrapper script runs before the session’s own `claude` is up, or after it has ended, to have no Anthropic-managed git + * Self-hosted runner: Changed `CLAUDE_RUNNER_SESSION_UUID` and `CLAUDE_CODE_REMOTE_SESSION_UUID` to both be set for the session and its `checkout`, `post-session` and `spawn-runner` hooks + * Changed self-hosted runners at `--capacity 1` to refuse a session earlier when the path of a repository it pushes to is a symbolic link + +Show 19 improvements + + * Improved `claude -p` and SDK sessions to fetch managed-settings plugins that have their own git repository, in the background, for a later session + * Improved how soon managed-settings plugins from a git marketplace load on a fresh machine in `claude -p`, SDK and Claude Desktop sessions; a short run may exit up to 30 seconds later + * Improved the time to resume large sessions + * Improved memory use when resuming a session with many images + * Improved memory use and response time in long SDK and desktop sessions that run slow commands or tools + * Improved Code Mode’s speed in auto and bypass-permissions modes by removing a 0.75 second pause after most scripts + * Improved prompt caching for new Code Mode sessions that have MCP servers, and Claude is now told when a server is still connecting and when the list of servers changes + * Improved Code Mode’s token use with shorter tool descriptions + * Improved Code Mode to show the command a script is running, and its output, while it runs + * Improved Code Mode edits: an edit that changes nothing no longer stops a script, and Claude is told where a failed edit matches or comes closest + * Improved Code Mode: Claude is now told which tool calls were still running when a script failed + * Improved how Claude starts dev servers in Code Mode’s auto and bypass modes: Claude is told to run them as background tasks that show in `/tasks` + * Windows: Improved Code Mode by telling Claude that scripts’ shell commands run in Git Bash and that PowerShell aliases run instead of functions with the same name + * Improved starting several in-process teammates at once: far fewer now fail with “Lock file is already being held” + * Improved the computer use approval dialog: it now shows each app’s level of access and plainer warnings + * Improved cross-session messaging: Claude now explains that Remote Control is off when a cloud session or another computer is not listed + * Improved `claude -p` text output to say on stderr when a message from another session is held or dropped, and how to allow it + * Improved Claude’s answers on who can open an artifact it published: Claude is now told to check the artifact again instead of repeating the last publish’s answer + * Improved resumed self-hosted runner sessions: Claude now checks whether its earlier work is still there, and says what is missing + +Show 91 bug fixes + + * Fixed Bash commands in zsh stopping with a “not found” error at a word that starts with `=`, such as `echo ====` or `[ a == b ]`; `=cmd` no longer expands to a command’s path + * Fixed automatic compaction reusing the session’s earlier system prompt instead of rebuilding it the way `/compact` does + * Fixed markdown rendering freezing on some very long or malformed input + * Fixed rare screen freezes + * Fixed Esc often being lost at a permission prompt or question when you typed straight after it; in terminals that send Alt as Esc and a key, an unused Alt or Option key now declines there + * Fixed a paste or a terminal’s reply being typed into the prompt when a slow connection cut it in two + * Fixed saving a scheduled task erasing the project’s other saved tasks when the scheduled tasks file can’t be read, on third-party providers or with telemetry or feature flags turned off + * Fixed a scheduled task with a typo in the project’s scheduled tasks file being deleted the next time that file was saved + * Fixed a case where a resumed cloud session could lose its compaction summary or recent messages when a message was saved late + * Fixed the token counts on the spinner and for subagents counting a retried reply twice, missing replies that were not streamed, and standing still while Claude thinks + * Fixed the error shown when usage credits run out mid-response, which named a rate limit + * Fixed auto mode failing every turn outside Claude Desktop with `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` set behind a gateway rejecting betas, on Bedrock, Agent Platform, Foundry or Claude apps gateway + * Fixed `CLAUDE_STREAM_IDLE_TIMEOUT_MS` not lengthening the 5-minute connection limit on gateways, custom base URLs and cloud providers + * Fixed some Claude Desktop sessions on third-party providers, other than scheduled tasks, ending for good with “Prompt is too long” after large tool results; the largest are now left out + * Fixed MCP tools whose input schema starts with `anyOf`, `oneOf` or `allOf` going missing on third-party providers or with telemetry or feature flags turned off + * Fixed an MCP tool with an invalid input schema failing requests on third-party providers or with telemetry or feature flags turned off; the tool is now left out and Claude is told why + * Fixed effort being turned off for a subagent’s model for the session if Bedrock, Google Cloud’s Agent Platform or Foundry refused its progress summary’s effort setting (regression in 2.1.327) + * Fixed Code Mode stopping a script when a permission prompt outside auto or bypass mode, a plan approval or a question stayed open for ten minutes + * Fixed Code Mode scripts in auto and bypass-permissions modes failing to call an MCP server that had connected while the previous script was running + * Fixed Code Mode scripts not running in the background in auto or bypass permissions mode in a session chosen in the `claude --resume` picker + * Fixed Code Mode losing a loaded skill, hook context or a note typed with a permission approval when resuming a session in which one reply ran several scripts + * Fixed Claude not being told that a Code Mode script was cut off when the session was resumed from the picker or in a mode that asks for permission + * Fixed Code Mode silently using `undefined` for top-level variables that an earlier failed script never set + * Fixed Code Mode scripts not being told when a failing command’s long output was cut + * Fixed Code Mode refusing valid scripts that start with a `{` block + * Fixed Code Mode refusing scripts that use both a top-level `await` and a top-level `return` + * Fixed an @-mentioned small file not being attached in Code Mode after a script had read or written it + * Fixed Code Mode offering `write()` and `edit()` to read-only subagents that can’t call them + * Fixed Claude starting a turn by itself in Code Mode when Esc was followed by a command such as `/model` + * Fixed Claude in Code Mode not being told to run workflows only when you ask, or the workflow size you set in `/config` + * Fixed Remote Control repeating the same disconnect message, and telling you to retry a session that can’t reconnect + * Fixed a waiting permission prompt being lost, and its answer ignored, when a remote session restarted while the service was slow + * Fixed cloud sessions resuming a cleared conversation after a rewind followed by `/clear` + * Fixed a remote session losing a turn’s tool calls and results when its runner or worker was lost after a dropped model stream had been retried + * Fixed cloud and Remote Control sessions that just started, or have an @ in their title, being unreachable in cross-session messaging from a session with Remote Control on + * Fixed Claude being told that cloud sessions can never reply; it now learns when a reply can come and how else to get the result + * Fixed `/diff`, the Changes pane of Remote Control sessions and the diff beside an edit leaving out committed work after a command moved into another repository + * Fixed Remote Control not showing a running workflow’s agents when a session run by an IDE extension or other SDK app is opened over an hour after the workflow last made progress + * Remote Control: Fixed an idle Desktop or VS Code session showing as running after Remote Control is turned on + * Fixed the model saying background agents were still running after an SDK interrupt had stopped them + * Fixed Send now in the desktop app and SDK hosts telling Claude that a stopped web search found no results + * Fixed Cmd+letter being typed into the prompt in terminals that report Cmd + * Fixed Ctrl+click opening a link twice in GNOME Terminal, side mouse buttons acting as clicks, and the first wheel notch in the other direction being ignored after a pause, in fullscreen mode + * Fixed Shift+Enter in Konsole outside tmux and ssh, and Alt shortcuts on non-Latin keyboard layouts in terminals that speak the kitty keyboard protocol + * Linux: Fixed pasting in other apps freezing while Claude Code is suspended with Ctrl+Z, when `xclip` or `wl-copy` is installed + * Linux: Fixed Ctrl+V missing the clipboard image, pasting an old one or hanging + * Fixed text copied in fullscreen mode including the quote bar, losing spaces at line wraps when a drag scrolled upward, or missing words under the “Jump to bottom” pill + * Fixed an image path pasted into a `!` command becoming an attachment + * Fixed Ctrl+C showing no exit warning while the `?` shortcuts list is open + * Fixed Ctrl+R search in fullscreen mode and the `/theme` color editor picking the wrong row when keys arrive together, and keys being dropped there and in the search of `/config` and `/plugin` + * Fixed wrong or missing colors inside GNU screen + * Fixed many background notifications cutting into the top border of open dialogs in fullscreen mode + * Fixed a message to a background agent showing a long file path in place of a pasted image + * Fixed `/goal` removing a skill’s Stop hook, or ending early on another hook’s result, when both had the same wording + * Fixed `/bug` saying cancelled after the report was sent + * Fixed Esc not dismissing the transcript share question for Pro and Max users + * Fixed `/hooks` losing your place when going back + * Fixed `/export` writing a file named `.txt` when the name was left empty + * Fixed `/terminal-setup` in Zed replacing a symlinked `keymap.json` with a plain file + * Fixed `/install-github-app` adding a code review workflow when asked to update the existing workflow file + * Fixed `/plugin` reopening a skill, or closing the open page, when a slow save or removal finished after you went back + * Fixed `/plugin` asking to uninstall the wrong plugin, or ignoring Esc, after leaving a plugin while a change was still running + * Fixed typing and arrow keys not working on the `/plugin` Installed tab after a search with no results or a click on the tab row + * Fixed holding Enter in `/plugin` turning off several installed plugins + * Fixed the `/usage` plugin total stopping at 2,000 tokens on 1M context models, and low token estimates in `/usage` and `/plugin` when no model is picked + * Fixed Esc on the Bedrock access keys step closing `/login` instead of going back + * Fixed `/exit` and Ctrl+D describing running work differently, and `/exit` warning about a workflow that had stopped + * Fixed Claude calling an artifact private after reading one in a shared folder or publishing to another organization’s, and saying only named people can open one when its folder’s people can too + * Fixed a plugin’s toast sometimes showing another plugin’s text + * Fixed a mod saved just after a turn began sometimes reloading mid-turn instead of at the turn’s end + * Fixed one malformed `OTEL_RESOURCE_ATTRIBUTES` entry dropping the variable’s other labels from metric points, events, and spans. Now only that entry is left off + * Fixed agent hooks running past their timeout while compacting after a request was refused as too large + * Fixed a crash at startup when `FORCE_COLOR` is set to a negative number + * Fixed a crash in secret masking when the machine is almost out of memory + * Fixed the Bash sandbox on Linux renaming `.git/HEAD` after each command when the branch name is not valid UTF-8 + * Self-hosted runner: Fixed all running sessions being stopped when a proxy or web filter answered a poll with HTTP 200 and a body such as `{}`; the runner now retries such a poll + * Self-hosted runner: Fixed deletion of a kept clone’s objects or refs, and of commits that existed only there, after a temporary disk error; that start now fails instead + * Fixed self-hosted runners stopping when their token ran out on a host whose clock is slow or was set back + * Self-hosted runner: Fixed sessions with Anthropic-managed git losing git access to GitHub after a script or hook in the session ran `claude` again + * Fixed self-hosted runners with Anthropic-managed git being unable to fetch or push where the machine’s git config sets `http.proactiveAuth` + * Self-hosted runner: Fixed a runner that exited without telling the server when setup failed after it had registered; it now deregisters with a reason, and an on-demand runner reports the failed start + * Self-hosted runner: Fixed archiving or requeueing a session not taking effect while it waited for another session to prepare the same repository (`--capacity` above 1) + * Self-hosted runner: Fixed a session with a damaged `.claude.json` failing every later start under `--trust-workspace false`; it now starts on defaults, with MCP servers turned off there on again + * Self-hosted runner: Fixed a failed start’s message losing the words that say what failed when a checkout hook or git printed a lot + * Fixed the self-hosted runner skipping its post-session hook when a disk stalled for a few seconds; on a dead disk a session’s end can take 25 seconds longer by default + * Fixed self-hosted runners: a session that resumes in a new Claude config directory no longer loses its task list + * Fixed Claude not being told when a self-hosted session starts without one of its repositories, and why + * Self-hosted runner: Fixed `--correlation-id` of `claude --environment` not reaching the `spawn-runner` hook + * Fixed the self-hosted runner setup wizard’s key rotation advice, which now warns that revoking a key stops the sessions running under it + * [VSCode] Fixed the permission prompt cutting off its No button, reply field or title when the panel is low or a command, URL or description is long + * [VSCode] Fixed failed or blocked tool calls showing no reason or a reason cut short, and Glob and Grep counting an error as results 2.1.327
modified Use Claude Code with Chrome View current →
--- a/chrome.md +++ b/chrome.md @@ -58,7 +58,7 @@ If Claude Code asks for permission before a browser action, approve it. The dialog starts with `Claude in Chrome wants to` and offers an option to allow all actions on that site for the session. Claude opens a new tab and starts the task. -Run `/chrome` at any time to check the connection status, manage permissions, reconnect the extension, or choose which connected browser to use. The integration is working when the status panel shows “Status: Enabled” and “Extension: Installed”. If more than one browser is connected, you choose which one Claude uses. When a browser action starts before you’ve chosen, Claude prompts you to pick one. To switch browsers later, run `/chrome` and select **Select browser…**. Claude keeps using your choice even when another browser connects. For VS Code, see [browser automation in VS Code](</docs/en/vs-code#automate-browser-tasks-with-chrome>). +Run `/chrome` at any time to check the connection status, manage permissions, reconnect the extension, or choose which connected browser to use. The integration is working when the status panel shows “Status: Enabled” and “Extension: Installed”. If more than one browser is connected, you choose which one Claude uses. When a browser action starts before you’ve chosen, Claude prompts you to pick one. To switch browsers later, run `/chrome` and choose another browser. Claude keeps using your choice even when another browser connects. For VS Code, see [browser automation in VS Code](</docs/en/vs-code#automate-browser-tasks-with-chrome>). ### Install the extension when Claude asks @@ -75,7 +75,7 @@ ### Enable Chrome by default -To connect Chrome without passing `--chrome` each time, run `/chrome` in a CLI session and select **Enabled by default**. In the [VS Code extension](</docs/en/vs-code#automate-browser-tasks-with-chrome>), type `/chrome` in the prompt box and turn on the **Enabled by default** switch. The two share one setting, so turning it on in either place turns it on for both the CLI and VS Code. With the setting on and Claude Code v2.1.287 or later, each VS Code session connects to your browser as it starts, so Claude can use it before you type `@browser`. On earlier versions, or with the setting off, a VS Code session connects when you type `@browser`. Claude Code starts normally when Chrome isn’t running. +To connect Chrome without passing `--chrome` each time, run `/chrome` in a CLI session and select the option that turns Chrome on by default. In the [VS Code extension](</docs/en/vs-code#automate-browser-tasks-with-chrome>), type `/chrome` in the prompt box and turn on the **Enabled by default** switch. The CLI and VS Code share one setting, so turning it on in either place turns it on for both. With the setting on and Claude Code v2.1.287 or later, each VS Code session connects to your browser as it starts, so Claude can use it before you type `@browser`. On earlier versions, or with the setting off, a VS Code session connects when you type `@browser`. Claude Code starts normally when Chrome isn’t running. Enabling Chrome by default increases context usage since the browser tools and their instructions are always loaded. If you notice increased context consumption, turn the setting off and connect only when needed, with `--chrome` in the CLI or by typing [`@browser`](</docs/en/vs-code#automate-browser-tasks-with-chrome>) in the VS Code prompt box. @@ -227,7 +227,7 @@ The project’s `.claude/settings.json` or `.claude/settings.local.json` sets [`CLAUDE_CODE_ENABLE_CFC`](</docs/en/env-vars#variables>) to `1` in its `env` block to turn Chrome integration on. Claude Code didn’t apply that setting, so Chrome integration is off in this session and Claude has no browser tools. Claude Code skips the setting because those files are stored in the project directory, and a repository you check out must not be able to connect Claude to your browser. You can keep working as you are. If you want browser tools, or want the warning gone, do one of these: * **To get browser tools now** : exit and start again with `claude --chrome` in your shell. - * **To get browser tools in later sessions** : run `/chrome` at the Claude Code prompt and select **Enabled by default**. This applies to sessions you start afterward, not the one that’s running. + * **To get browser tools in later sessions** : run `/chrome` at the Claude Code prompt and turn Chrome on by default. * **To stop the warning without browser tools** : remove the `CLAUDE_CODE_ENABLE_CFC` line from the project’s settings file. ### Browser not responding
modified Claude apps gateway for Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry View current →
--- a/claude-apps-gateway.md +++ b/claude-apps-gateway.md @@ -221,7 +221,7 @@ "parentSettingsBehavior": "merge" } -The developer presses Enter to connect. The first-connect TLS fingerprint prompt still appears. Once the file is on a machine, a developer who hasn’t completed the gateway sign-in sees one of the messages described under [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>). Developers who select a cloud provider through an environment variable such as `CLAUDE_CODE_USE_BEDROCK` don’t need the gateway sign-in. The login picker has no gateway option, and in managed settings `forceLoginMethod` alone, without a URL, leaves the developer at a “Contact your IT administrator” message. The login keys belong in the file you push to machines, not in the gateway’s `managed.policies[].cli` block, which only reaches clients that are already connected. +The developer presses Enter to connect. The first-connect TLS fingerprint prompt still appears. Once the file is on a machine, a developer who hasn’t completed the gateway sign-in sees one of the messages described under [Administrator policy requires a Cloud gateway sign-in](</docs/en/errors#administrator-policy-requires-a-cloud-gateway-sign-in>). Developers who select a cloud provider through an environment variable such as `CLAUDE_CODE_USE_BEDROCK` don’t need the gateway sign-in. The terminal’s login picker has no gateway option, and in managed settings `forceLoginMethod` alone, without a URL, leaves the developer at a “Contact your IT administrator” message. The login keys belong in the file you push to machines, because the gateway’s `managed.policies[].cli` block only reaches clients that are already connected. #### Set the gateway URL in user settings
modified Explore the .claude directory View current →
--- a/claude-directory.md +++ b/claude-directory.md @@ -114,7 +114,7 @@ `dev-mods/<session>/`| [Mods that Claude wrote](</docs/en/plugins/mods/create#ask-claude-for-a-mod>) during the session `session-env/`| Per-session environment metadata `tasks/`| Task lists written by the task tools, one directory per list -`shell-snapshots/`| Aliases, functions, and shell options captured at startup and applied by the [Bash tool](</docs/en/tools-reference#bash-tool-behavior>) to each command. Removed on clean exit. The sweep clears any left after a crash. +`shell-snapshots/`| Aliases, functions, and shell options applied by the [Bash tool](</docs/en/tools-reference#bash-tool-behavior>) to each command. Removed on clean exit. The sweep clears any left after a crash. `backups/`| Earlier versions of `~/.claude.json`, copied when Claude Code rewrites the file. Claude Code keeps the five newest copies, plus a copy of any version it couldn’t parse. Past the age cutoff, the last copy that holds your configuration is deleted too. If the current file parses, holds your configuration, and is under 8 MiB, you’re left with a new copy of it. `feedback-bundles/`| Redacted transcript archives written by `/feedback` on third-party providers or when no Anthropic credentials are configured, for sending to your Anthropic account team `feedback/drafts/`| Queued [Claude-drafted feedback](</docs/en/tools-reference#sendfeedback-tool-behavior>) awaiting your review in `/feedback`. Swept after `cleanupPeriodDays` or 30 days, whichever is shorter. When the queue is at its 10-draft limit, Claude Code deletes the oldest draft to make room.
modified CLI reference View current →
--- a/cli-reference.md +++ b/cli-reference.md @@ -14,7 +14,7 @@ `claude update`| Update to latest version| `claude update` `claude gateway`| Start the self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) server, for administrators deploying SSO and policy in front of Claude Code on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Requires `--config` pointing at a [`gateway.yaml`](</docs/en/claude-apps-gateway-config>).| `claude gateway --config gateway.yaml` `claude install [version]`| Install or reinstall the native binary. Accepts a version like `2.1.118`, or `stable` or `latest`. See [Install a specific version](</docs/en/setup#install-a-specific-version>)| `claude install stable` -`claude auth login`| Sign in to your Anthropic account. Use `--email` to pre-fill your email address, `--sso` to force SSO authentication, and `--console` to sign in with Anthropic Console for API usage billing instead of a Claude subscription| `claude auth login --console` +`claude auth login`| Sign in to your Anthropic account. Use `--email` to pre-fill your email address, `--sso` to force SSO authentication, and `--console` to sign in with Anthropic Console for API usage billing instead of a Claude subscription. If managed settings require a [Claude apps gateway](</docs/en/claude-apps-gateway>) sign-in, run the command with no flags in a terminal, on v2.1.316 or later. If the command points you to `/login`, run that inside `claude`| `claude auth login --console` `claude auth logout`| Log out from your Anthropic account| `claude auth logout` `claude auth status`| Show authentication status as JSON. Use `--text` for human-readable output. Exits with code 0 if logged in, 1 if not. The JSON includes a `configDirectory` field naming the [configuration directory](</docs/en/claude-directory>) the CLI uses. The field requires Claude Code v2.1.268 or later. The JSON’s `authMethod` field is one of `none`, `claude.ai`, `oauth_token`, `api_key`, `api_key_helper`, or `third_party`| `claude auth status` `claude agents`| Open [agent view](</docs/en/agent-view>) to monitor and dispatch parallel background sessions. Use `--cwd <path>` to show only sessions started under that directory, or `--json` to print active sessions as a JSON array for scripting (`--json --all` also includes completed background sessions). Pass `--permission-mode`, `--model`, `--effort`, or `--agent` to set [defaults for dispatched sessions](</docs/en/agent-view#permission-mode-model-and-effort>). Accepts `--settings`, `--add-dir`, `--plugin-dir`, and `--mcp-config` like the top-level `claude` command. Opening agent view requires an interactive terminal| `claude agents --json`
modified Read and request reviews on a pull request View current →
--- a/code-review-pull-requests.md +++ b/code-review-pull-requests.md @@ -4,7 +4,7 @@ ## Severity levels -Claude posts each finding as an inline comment on the lines concerned and marks it with one of three severity levels: +Claude marks each finding with one of three severity levels: Marker| Severity| Meaning ---|---|--- @@ -12,7 +12,7 @@ 🟡| Nit| A minor issue, worth fixing but not blocking 🟣| Pre-existing| A bug that exists in the codebase but wasn’t introduced by this PR -When the review recorded its reasoning, the finding has a collapsed **Why this was flagged** section. Expand it to read why Claude flagged the issue and how it verified the problem. To change what Claude flags in your repository or how it ranks severity, see [Customize Code Review](</docs/en/code-review-customize>). +When the review recorded its reasoning, a finding has a collapsed **Why this was flagged** section. Expand it to read why Claude flagged the issue and how it verified the problem. To change what Claude flags in your repository or how it ranks severity, see [Customize Code Review](</docs/en/code-review-customize>). ## Respond to findings
modified Troubleshoot Code Review View current →
--- a/code-review-troubleshooting.md +++ b/code-review-troubleshooting.md @@ -51,7 +51,8 @@ * **Check run Details** : click **Details** next to the **Claude Code Review** check in the **Checks** tab. The severity table lists findings with their file, line, and summary regardless of whether the inline comment was accepted. * **Files changed annotations** : open the **Files changed** tab on the PR. A finding that has a line but wasn’t posted as an inline comment appears there as an annotation on the lines concerned. - * **Review body** : findings that have no inline location, or that fall outside the current diff, appear under an **Additional findings** heading in the review body. + * **Whole-file comments** : open the **Conversation** tab on the PR and look for a comment from Claude on a whole file instead of on a line + * **Review body** : in the **Conversation** tab, look for an **Additional findings** heading in Claude’s review ## The check run mentions REVIEW.md
modified Commands View current →
--- a/commands.md +++ b/commands.md @@ -125,7 +125,7 @@ `/teleport`| Pull a [cloud session](</docs/en/claude-code-on-the-web#from-cloud-to-terminal>) into this terminal. Opens a picker, then fetches the branch and conversation. Also available as `/tp`. Requires a claude.ai subscription `/terminal-setup`| [Install a Shift+Enter keybinding for newlines](</docs/en/terminal-config#enter-multiline-prompts>) in VS Code, Cursor, Devin Desktop, Alacritty, or Zed. In Apple Terminal, [enable Option+Enter for newlines and turn off the audible bell](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) instead. In iTerm2, [turn on clipboard access so that `/copy` works](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) `/theme`| Change the color theme. Includes an `auto` option that matches your terminal’s light or dark background, light and dark variants, colorblind-accessible (daltonized) themes, ANSI themes that use your terminal’s color palette, and any [custom themes](</docs/en/terminal-config#create-a-custom-theme>) from `~/.claude/themes/` or plugins. Select **New custom theme…** to create one -`/tui [default|fullscreen]`| Set the terminal UI renderer and relaunch into it with your conversation intact. `fullscreen` enables the [flicker-free alt-screen renderer](</docs/en/fullscreen>). With no argument, prints the active renderer +`/tui [classic|fullscreen]`| Set the terminal UI renderer and relaunch into it. `fullscreen` enables the [flicker-free alt-screen renderer](</docs/en/fullscreen>). `default`, or `classic` on v2.1.327 or later, selects the classic renderer. With no argument, prints the active renderer `/ultraplan <prompt>`| Removed. Use [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) instead. Previously sent a planning task to a [cloud session](</docs/en/claude-code-on-the-web>) for review in your browser `/ultrareview [PR or branch]`| Run a deep, multi-agent code review in a cloud sandbox with [ultrareview](</docs/en/ultrareview>). Pass a PR reference to review that pull request, or a base branch or commit to change the comparison base. The preferred invocation is `/code-review ultra`, and `/ultrareview` is an alias. Includes 3 free runs on Pro, Max, and Ultra, then requires [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) `/update-config [request]`| **[Skill](</docs/en/skills#bundled-skills>).** Describe a settings change, such as allowing a command, setting an environment variable, or adding a [hook](</docs/en/hooks>), and Claude edits the matching [`settings.json`](</docs/en/settings>) file. For options such as theme and model, use `/config` instead
modified Message your other Claude Code sessions View current →
--- a/cross-session-messaging.md +++ b/cross-session-messaging.md @@ -243,6 +243,7 @@ * **Other-machine session missing** : a session on another of your machines appears only when it runs with [Remote Control](</docs/en/remote-control>) and this session is connected as well. * **Other-machine session`offline`**: a message to a session listed as `offline` goes through, but arrives only after that session’s machine reconnects. * **Cloud or other-machine session`can't receive cross-session messages`**: a message to a session listed with this condition doesn’t leave this machine, and the result under `SendMessage` begins `Not sent`. + * **Long exchange between sessions** : if an exchange paused or stopped after many replies, type a prompt in the sending session to resume it. * **Older cloud or other-machine session missing** : Claude Code reads those session lists newest first and stops after a bounded number of pages, so Claude can’t message a session that fell past them by name. In a session with messaging, `/status` also shows a `Peer address` row with the session’s own inbox address, or `unavailable` and the reason when Claude Code couldn’t set up an inbox. @@ -254,7 +255,10 @@ * **Plain text only** : Claude sends only plain text across sessions. Structured [agent team](</docs/en/agent-teams>) protocol messages stay within a team. * **Same-machine message size is capped** : Claude Code refuses a message to a session on this machine once its serialized form passes about a million characters. The refusal [names the exact sizes](</docs/en/errors#message-too-large-for-cross-session-delivery>). Nothing reaches the receiving session. * **Rapid bursts to one session are refused at the sender** : once a rapid burst of messages to a session on this machine reaches what that session’s inbox accepts, Claude Code refuses further sends in the sending session. The [refusal names the burst](</docs/en/errors#too-many-messages-to-this-session-just-now>) and tells Claude to batch the rest into one message or wait. - * **Message loops are throttled** : in the receiving session, Claude Code rate-limits repeated messages per sender, drops identical repeats arriving within a short window, and queues at most 50 accepted messages for Claude to read. A message loop between two sessions therefore stops on its own. + * **Message loops are throttled** : in the receiving session, Claude Code rate-limits repeated messages per sender, drops identical repeats arriving within a short window, and queues at most 50 accepted messages for Claude to read. + * **Slower loops on this machine can continue** : two sessions that answer each other slowly enough not to be throttled can exchange thousands of messages without a prompt from you, and each delivered message counts toward usage. To stop the exchange, end one of the sessions or stop it from receiving messages. To end a [background session](</docs/en/agent-view#attach-to-a-session>), attach to it and run `/stop`. + * **Sending can pause after a long exchange** : if a session’s `SendMessage` result begins `Not delivered: this session keeps answering other sessions`, type a prompt in that session to resume sending. + * **Some long reply chains can be cut off** : when a chain of replies grows long, delivery can stop, for example in a chain that includes a session beyond this machine. To continue the exchange, type a prompt in one of the sessions in the chain. ## Related resources
modified Environment variables View current →
--- a/env-vars.md +++ b/env-vars.md @@ -125,7 +125,7 @@ `ANTHROPIC_DEFAULT_SONNET_MODEL_DESCRIPTION`| Display description for the pinned Sonnet model in the `/model` picker. When not set, the row shows a default description that begins `Custom Sonnet model`. See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) `ANTHROPIC_DEFAULT_SONNET_MODEL_NAME`| Display name for the pinned Sonnet model in the `/model` picker. When not set, the row shows the model’s name if Claude Code recognizes the pinned ID, and the pinned ID otherwise. See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) `ANTHROPIC_DEFAULT_SONNET_MODEL_SUPPORTED_CAPABILITIES`| Comma-separated list of [capabilities](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) the pinned Sonnet model supports, for example `effort,thinking`. See [Model configuration](</docs/en/model-config#customize-pinned-model-display-and-capabilities>) -`ANTHROPIC_FEDERATION_RULE_ID`| Federation rule ID for [Workload Identity Federation](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>). When you set it together with `ANTHROPIC_ORGANIZATION_ID`, Claude Code selects federation credentials, which rank above your `/login` credential. See [authentication precedence](</docs/en/authentication#authentication-precedence>) +`ANTHROPIC_FEDERATION_RULE_ID`| Federation rule ID for [Workload Identity Federation](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>). Set it together with `ANTHROPIC_ORGANIZATION_ID`. See [authentication precedence](</docs/en/authentication#authentication-precedence>) `ANTHROPIC_FOUNDRY_API_KEY`| API key for Microsoft Foundry authentication (see [Microsoft Foundry](</docs/en/microsoft-foundry>)) `ANTHROPIC_FOUNDRY_AUTH_TOKEN`| Bearer token for Microsoft Foundry authentication, such as a Microsoft Entra access token. Claude Code sends it as the `Authorization: Bearer` header. Takes precedence over `ANTHROPIC_FOUNDRY_API_KEY` and over the Azure default credential chain. See [Microsoft Foundry](</docs/en/microsoft-foundry>). Requires Claude Code v2.1.203 or later `ANTHROPIC_FOUNDRY_BASE_URL`| Full base URL for the Microsoft Foundry resource (for example, `https://my-resource.services.ai.azure.com/anthropic`). Alternative to `ANTHROPIC_FOUNDRY_RESOURCE` (see [Microsoft Foundry](</docs/en/microsoft-foundry>)) @@ -173,7 +173,7 @@ `CLAUDE_CODE_ARTIFACT_PUBLISH_EDITS`| Set to `0` to stop Claude from [applying small changes](</docs/en/artifacts#turn-off-one-step-artifact-updates>) to an artifact’s file as part of publishing it. Claude then edits the file with its file-editing tools and publishes it as a separate step. Requires Claude Code v2.1.300 or later `CLAUDE_CODE_ATTRIBUTION_HEADER`| Set to `0` to omit the [attribution block](</docs/en/llm-gateway-protocol#system-prompt-attribution-block>), which carries the client version and a prompt fingerprint, from the start of the system prompt. Caching on a direct connection to the Anthropic API is unaffected either way. In some direct-connection setups, Claude Code keeps the block on [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier requests even when you set `0`. In [System prompt attribution block](</docs/en/llm-gateway-protocol#system-prompt-attribution-block>), check which connections and credentials this covers. Before v2.1.181 the block included a per-request token on custom base URLs and Microsoft Foundry connections, so on those versions set it to `0` when your LLM gateway caches on the request body or forwards requests to a third-party provider, or when you connect to Microsoft Foundry directly `CLAUDE_CODE_AUTO_BACKGROUND_WORKER_CHECKIN_SECONDS`| Removed in v2.1.283. Use `CLAUDE_CODE_WORKER_CHECKIN_SCHEDULE` instead -`CLAUDE_CODE_AUTO_COMPACT_WINDOW`| Set the auto-compact window, how full the context gets before compaction, from `100000` to `1000000` tokens. Suffixed values such as `200k` require v2.1.304 or later. For precedence over the other ways to set the window and the effect on the status line’s `used_percentage`, see [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) +`CLAUDE_CODE_AUTO_COMPACT_WINDOW`| Set the auto-compact window, which is how full the context gets before compaction, to a token count of `100000` or more. Suffixed values such as `200k` require v2.1.304 or later. For precedence over the other ways to set the window and the effect on the status line’s `used_percentage`, see [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) `CLAUDE_CODE_AUTO_CONNECT_IDE`| Override automatic [IDE connection](</docs/en/vs-code>). By default, Claude Code connects automatically when launched inside a supported IDE’s integrated terminal. Set to `false` to prevent this. Set to `true` to force a connection attempt when auto-detection fails, such as when tmux obscures the parent terminal. Takes precedence over the [`autoConnectIde`](</docs/en/settings-reference#autoconnectide>) global config setting `CLAUDE_CODE_AUTO_MODE_MODEL`| Sets the model for the classifier requests Claude Code sends in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>). Use a full model ID such as `claude-sonnet-4-6`. For the cases where Claude Code ignores it, see [Choose the classifier model](</docs/en/permission-modes#choose-the-classifier-model>). Requires Claude Code v2.1.302 or later `CLAUDE_CODE_AUTO_MODE_SERVER`| Controls whether Claude Code asks the server to [review auto mode actions](</docs/en/permission-modes#server-side-classifier-review>). Set to `0` to use Claude Code’s own classifier requests instead. On a direct connection to the Anthropic API, requires v2.1.281 or later. The linked section lists which sessions ask the server when the variable is unset, and from which version. Requires Claude Code v2.1.271 or later @@ -235,12 +235,13 @@ `CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS`| Set to `1` to stop Claude Code from running your [`Notification` hooks for unanswered permission requests](</docs/en/hooks#notification>) in sessions where Claude Code sends them to the Agent SDK’s `canUseTool` callback, which is how Claude Desktop and the VS Code extension host Claude Code. Has no effect in terminal sessions. Requires Claude Code v2.1.233 or later `CLAUDE_CODE_DISABLE_POLICY_SKILLS`| Set to `1` to skip loading skills from the system-wide managed skills directory. Useful for container or CI sessions that should not load operator-provisioned skills `CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY`| Set to `1` to turn off the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) check that denies the `cmd` built-ins `rd`, `rmdir`, `del`, and `erase` on a [system path](</docs/en/permission-modes#remove-item-in-powershell>), such as a drive root or your home directory. Claude Code ignores this variable in a settings file’s `env` block. Requires Claude Code v2.1.283 or later +`CLAUDE_CODE_DISABLE_PROXY_SCHEME_REPAIR`| Set to `1` to have Claude Code stop at startup on a plain `host:port` in `HTTPS_PROXY` or `https_proxy` even when it starts with no terminal. Claude Code ignores it in project and local settings. Requires Claude Code v2.1.327 or later `CLAUDE_CODE_DISABLE_REFUSAL_FALLBACK`| Set to `1` to turn off the [automatic model switch when a safety classifier flags a request](</docs/en/model-config#automatic-model-fallback>), the behavior the [`switchModelsOnFlag`](</docs/en/settings-reference#switchmodelsonflag>) setting controls `CLAUDE_CODE_DISABLE_STRUCTURED_OUTPUTS`| Set to `1` to stop Claude Code from sending the structured-output `output_config.format` field and the `anthropic-beta` value that pairs with it, for an [LLM gateway](</docs/en/llm-gateway-protocol#feature-pass-through>) whose upstream rejects them. This leaves on the other pre-release capabilities that [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) turns off. Requires Claude Code v2.1.288 or later `CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`| Set to `1` to turn off the [critical-path](</docs/en/permission-modes#critical-paths>) check for a recursive `rm` whose target is entirely the output of a command substitution, such as `rm -rf "$(pwd)"`. The other critical-path checks keep running. Set it in the environment that launches Claude Code, since Claude Code ignores a copy delivered through a settings `env` block. Requires Claude Code v2.1.281 or later `CLAUDE_CODE_DISABLE_TERMINAL_TITLE`| Set to `1` to disable automatic terminal title updates based on conversation context. This also skips the background small/fast-model request that [generates a session title](</docs/en/sessions#name-your-sessions>), and turns off [status reports to your terminal](</docs/en/terminal-config#see-session-status-in-your-terminal>) `CLAUDE_CODE_DISABLE_THINKING`| Set to `1` to omit the `thinking` parameter from API requests entirely. This is a compatibility option for proxies and gateways that reject the parameter. On models that think by default, omitting the parameter means the model may still think. To explicitly disable [extended thinking](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>) on the Anthropic API, use `MAX_THINKING_TOKENS=0` instead. Neither variable turns thinking off on Opus 5.5, Sonnet 5.5, Haiku 5.5, or the Fable models, which can’t have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `MAX_THINKING_TOKENS=0` likewise omits the parameter, so the two variables behave the same there -`CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK`| Set to `1` so that [`claude ultrareview`](</docs/en/ultrareview#trust-the-folder-before-the-review-runs>) doesn’t exit with `Error: Workspace not trusted` in a folder you haven’t trusted when it can’t ask you to trust it, such as in CI. Set it in the environment that launches Claude Code, not a settings `env` block, and only where every such run starts in a folder you trust. Runs that can ask still ask. Requires Claude Code v2.1.309 or later +`CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK`| Set to `1` so [`claude ultrareview`](</docs/en/ultrareview#trust-the-folder-before-the-review-runs>) doesn’t exit with `Error: Workspace not trusted` when run without a terminal or with `CI=true`. `claude ultrareview` still asks when it can. From v2.1.314, the variable also skips the trust check in `/ultrareview` and `/code-review ultra`. Set it in the launch environment, not a settings `env` block, and only where every review starts in a folder you trust. Requires Claude Code v2.1.309 or later `CLAUDE_CODE_DISABLE_ULTRATHINK`| Set to `1` to turn the [`ultrathink`](</docs/en/model-config#use-ultrathink-for-one-off-deep-reasoning>) keyword off. Requires Claude Code v2.1.316 or later `CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT`| Set to `1` to skip proactive [auto-compaction](</docs/en/costs#reduce-token-usage>) when Claude Code doesn’t recognize the model ID, such as an [LLM gateway](</docs/en/llm-gateway>) alias. Without this variable, Claude Code compacts at the context window it assumes for the ID. `CLAUDE_CODE_MAX_CONTEXT_TOKENS` can correct the assumed window instead; see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>) for when each variable applies. Requires Claude Code v2.1.223 or later `CLAUDE_CODE_DISABLE_VIRTUAL_SCROLL`| Set to `1` to disable virtual scrolling in [fullscreen rendering](</docs/en/fullscreen>) and render every message in the transcript. Use this if scrolling in fullscreen mode shows blank regions where messages should appear @@ -370,6 +371,7 @@ `CLAUDE_CODE_SKIP_VERTEX_AUTH`| Skip Google authentication for Google Cloud’s Agent Platform (for example, when using an LLM gateway) `CLAUDE_CODE_STARTUP_FAILURE_RESULTS`| Set to `1` to have a session started with `--output-format stream-json` write a [result message naming why Claude Code refused to start](</docs/en/agent-sdk/typescript#startup_failure_reason>) for startup failures that otherwise end with stderr alone. Requires Claude Code v2.1.274 or later `CLAUDE_CODE_STOP_HOOK_BLOCK_CAP`| Maximum number of consecutive times a [Stop](</docs/en/hooks#stop>) or [SubagentStop](</docs/en/hooks#subagentstop>) hook may block the turn from ending before Claude Code overrides it and ends the turn anyway (default: 8). Set to `0` to disable the cap. Raise this if your hook legitimately needs more iterations to resolve +`CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT`| Set to `1` to flag more of the [`-c` scripts](</docs/en/permission-modes#removals-inside-nested-commands-and-inline-scripts>) that Claude Code can’t check, including ones that name neither `rm` nor `rmdir`. Set it in the environment that launches Claude Code, not a settings `env` block. Has no effect when `CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT` is `1`. Requires Claude Code v2.1.299 or later `CLAUDE_CODE_SUBAGENT_MODEL`| The default model for [subagents](</docs/en/sub-agents#choose-a-model>), [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates, and [workflow](</docs/en/workflows>) agents that aren’t assigned a model another way. Accepts an alias such as `haiku` or a full model name. Two sources take precedence over it: a model Claude passes when it spawns the agent, and a `model` field in the agent’s definition, including `inherit`. To change that, set [`CLAUDE_CODE_SUBAGENT_MODEL_FORCE`](</docs/en/sub-agents#run-every-subagent-on-one-model>). See [Choose a model](</docs/en/sub-agents#choose-a-model>) for the full order. Setting it to `inherit` is the same as leaving it unset. Before v2.1.251, this variable overrode both the per-invocation model and the definition’s `model` field `CLAUDE_CODE_SUBAGENT_MODEL_FORCE`| Set to `1` to force one model onto subagents, teammates, and workflow agents. [Run every subagent on one model](</docs/en/sub-agents#run-every-subagent-on-one-model>) says which model that is. Requires Claude Code v2.1.257 or later `CLAUDE_CODE_SUBAGENT_PROMPT_CACHE_TTL`| Set `5m` or `1h`, the only values Claude Code accepts, to choose the [prompt cache TTL](</docs/en/prompt-caching#cache-lifetime>) for requests outside the main conversation, such as [subagents](</docs/en/sub-agents>), workflows, and background work. Takes precedence over the `subagentPromptCacheTtl` setting and over `ENABLE_PROMPT_CACHING_1H`, and `FORCE_PROMPT_CACHING_5M` overrides it. The API bills 1-hour cache writes at a higher rate. Requires Claude Code v2.1.242 or later @@ -481,6 +483,7 @@ `OTEL_METRICS_INCLUDE_RESOURCE_ATTRIBUTES`| As of v2.1.161, Claude Code attaches `OTEL_RESOURCE_ATTRIBUTES` keys to metric datapoint labels. Set to `false` to exclude them (default: included). See [Monitoring](</docs/en/monitoring-usage#multi-team-organization-support>) `OTEL_METRICS_INCLUDE_SESSION_ID`| Set to `false` to exclude session ID from metric and event attributes (default: included). See [Monitoring](</docs/en/monitoring-usage>) `OTEL_METRICS_INCLUDE_VERSION`| Set to `true` to include Claude Code version in metric and event attributes (default: excluded). See [Monitoring](</docs/en/monitoring-usage>) +`OTEL_RESOURCE_INCLUDE_HOST`| Set to `1` to add the machine’s name and ID to OpenTelemetry resource attributes as `host.name` and `host.id` (default: excluded). Set it in your shell, user settings, or managed settings. Ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). Requires Claude Code v2.1.326 or later. See [Identify the machine a session ran on](</docs/en/monitoring-usage#identify-the-machine-a-session-ran-on>) `SLASH_COMMAND_TOOL_CHAR_BUDGET`| Override the character budget for skill metadata shown to the [Skill tool](</docs/en/skills#control-who-invokes-a-skill>). The budget scales dynamically at 1% of the context window, with a fallback of 8,000 characters. Legacy name kept for backwards compatibility `TASK_MAX_OUTPUT_LENGTH`| Removed in v2.1.277 and now a no-op, together with the `TaskOutput` tool it sized. Previously set the maximum number of characters of a [background task’s](</docs/en/tools-reference#background-commands>) output that the `TaskOutput` tool kept. Claude reads a background task’s output file with `Read` instead `USE_BUILTIN_RIPGREP`| Set to `0` to use system-installed `rg` instead of `rg` included with Claude Code
modified Error reference View current →
Show diff (154 lines)
--- a/errors.md +++ b/errors.md @@ -40,7 +40,7 @@ `Request rejected (429)`| Usage limits `Credit balance is too low`| Usage limits `You've hit your monthly spend limit` / `You've hit your individual spend limit` / `You've hit your org's monthly spend limit` / `You've hit your channel's monthly spend limit` / `You've hit your team's shared budget` / `You've hit your individual usage limit`| Usage limits -`Could not update your spend limit`| Usage limits +`Could not update your spend limit` / `Could not remove your spend limit`| Usage limits `spend limit reached` / `spend limit unavailable` / `This request exceeds your group's budget`| Usage limits `Not logged in · Please run /login`| Authentication `Couldn't save your login`| Authentication @@ -92,6 +92,7 @@ `Artifacts need a claude.ai login`| Authentication `Not signed in to the Cloud gateway — run /login.`| Authentication `Administrator policy requires a Cloud gateway sign-in on this machine`| Authentication +`Managed settings on this machine configure a Cloud gateway sign-in; run interactive /login to authenticate.`| [`claude auth login`](</docs/en/cli-reference#cli-commands>) `Failed to authenticate: OAuth session expired and could not be refreshed`| Authentication `Login reached its time limit · Please run /login` / `Failed to authenticate: this login reached its time limit`| Authentication `Failed to authenticate: your claude.ai login expired`| [After the login expires](</docs/en/authentication#after-the-login-expires>) @@ -225,6 +226,8 @@ `--bg and --print conflict`| Command-line errors `Couldn't tell whether --bg is a flag or text here, so nothing was started`| Command-line errors `Error: Cannot use both --append-subagent-system-prompt and --append-subagent-system-prompt-file. Please use only one.`| Command-line errors +`Error: bypassPermissions not supported in restricted mode`| [Restricted mode](</docs/en/permission-modes#restricted-mode-refuses-bypasspermissions>) +`Session was started with bypass permissions, so plan mode won't ask before most edits or commands`| [Plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) `Cloud sessions cannot be created from a --restricted session`| Command-line errors `Cloud sessions are disabled by your organization's policy`| Command-line errors `Cloud sessions use your claude.ai login`, at the end of a policy denial that names a credential| Command-line errors @@ -259,6 +262,7 @@ `Cannot add MCP server to scope: managed`| Command-line errors `Cannot add MCP server: your organization's managed settings allow only MCP servers that plugins provide`| Command-line errors `is Anthropic-hosted and doesn't support local OAuth`| Command-line errors +`Can't add to .mcp.json: it lists servers at the top level`| Move the servers under an `mcpServers` key, as in the [project-scope format](</docs/en/mcp#project-scope>). `Can't read .mcp.json: it isn't a regular file or is larger than 2097152 bytes`| Command-line errors `MCP server "<name>" was not saved to` / `was not removed from`| Command-line errors `MCP server "<name>" may not have been saved` / `may not have been removed`| Command-line errors @@ -297,7 +301,7 @@ `Windows reported an error (EBADF) when Claude Code read this session's transcript file`| Command-line errors `Cannot switch renderers in this session`| Command-line errors `Cannot switch renderers while work is running in the background`| Command-line errors -`Can't restart while work is running in the background — wait for it to finish (or stop it via /tasks), then try again.`| Command-line errors +`Can't restart while work is running in the background`| Command-line errors `Can't restart while Remote Control is connected. To use the installed version, exit and start Claude Code again, then run /resume.`| Command-line errors `Claude Code couldn't restart`| Command-line errors `Couldn't open Claude Desktop`| Command-line errors @@ -331,7 +335,7 @@ `path escapes plugin directory`| Plugin errors `path not read: <path> is absolute or has a ".." part`| Plugin errors `Plugin not loaded: its manifest <path> was not read`| Plugin errors -`path could not be checked`| Plugin errors +`path couldn't be checked` / `path could not be checked`| Plugin errors `its marketplace entry path does not stay inside the marketplace directory`| Plugin errors `Plugin source path refused`| Plugin errors `Failed to load marketplace configuration`| Plugin errors @@ -357,6 +361,7 @@ `cannot contain null bytes (\0)`| Tool errors `Path contains null bytes`| Tool errors `command contains the invisible character U+FEFF (byte order mark) or U+180E (Mongolian vowel separator), and was not run`| Tool errors +`This command's variables and substitutions expand to more text than the permission check reads, so it was not run`| Ask Claude to use fewer or shorter variables and substitutions. `This call was not run. Claude Code could not confirm that the shell is back in the directory`, from v2.1.323| Tool errors `File is too large to read as an image (the limit is 128MB)`| Tool errors `Cannot read this as an image: <path> is a pipe or a device`| Tool errors @@ -366,11 +371,12 @@ `Sandbox is required but failed to initialize: <reason>`| [Sandboxing troubleshooting](</docs/en/sandboxing#commands-refused-with-sandbox-is-required>) `Sandbox is required (sandbox.failIfUnavailable) and stopped being available in this session: <reason>`| [Sandboxing troubleshooting](</docs/en/sandboxing#commands-refused-with-sandbox-is-required>) `pkill: refusing to run`| Tool errors +`Sandbox settings can't be changed here` / `Sandbox settings are overridden by a higher-priority configuration`| [Sandboxing troubleshooting](</docs/en/sandboxing#sandbox-settings-overridden>) `Failed to write to <name>'s inbox — nothing was sent`| Tool errors `Failed to write the plan approval request to the lead's inbox — plan not submitted`| Tool errors `Its agent definition was not restored: the folder its definition file came from is not trusted`| Tool errors `Only a teammate can approve a shutdown request`| Tool errors -`A command-line deny rule cannot be handed to a teammate intact`| Tool errors +`cannot be handed to a teammate intact`| Tool errors `Message too large for cross-session delivery`| Tool errors `Too many messages to this session just now`| Tool errors `Cross-session message was dropped at the recipient session's inbox`| Tool errors @@ -441,6 +447,7 @@ `The Claude Code program for this computer, the <build> build, could not be found`| Wrapper and IDE errors `Restored the code, but skipped N files`| Rewind warnings and errors `No files were restored: N files failed (backup missing, or the file could not be updated)`| Rewind warnings and errors +`Couldn't restore N files: the backup is missing or the file can't be written`| Make the files that failed writable, then restore them from version control. `The file backups are still being copied. Nothing was changed. Try again in a moment.`| Select the same point in [`/rewind`](</docs/en/checkpointing>) again. When you restore code soon after [`/branch`](</docs/en/sessions#branch-a-session>), Claude Code can still be copying the file backups to the new session. `Transcript writes are failing (...)`| Session saving warnings `Transcript saving is off — CLAUDE_CODE_SKIP_PROMPT_HISTORY is set`| Session saving warnings @@ -455,6 +462,7 @@ `N skill or command names refused: run with --debug to see which ([names]), rename, then restart`| Configuration warnings `Ignoring N permissions.allow entries from ... this workspace has not been trusted`| Configuration warnings `Two Claude Code config files exist: this run uses <path>, not <path>`| Configuration warnings +`a settings change wasn't saved`| Make `~/.claude/settings.json` and the project’s `.claude/settings.local.json` writable, then make the change again. If another tool generates the file, see [A change is lost in new sessions](</docs/en/settings#a-change-you-made-in-claude-code-is-lost-in-new-sessions>). If a file isn’t valid, see [Fix a broken settings file](</docs/en/settings#fix-a-broken-settings-file>). `Make this change again later: <path> could not be updated, so it applies to this session only`| Configuration warnings `is a network path, which cannot be added as a working directory`| Configuration warnings `Remote managed settings failed to load (<cause>)`| Configuration warnings @@ -935,7 +943,7 @@ Could not update your spend limit: <reason from the server> -When the server explains the rejection, the message ends with that reason, and retrying the same value fails again. When the failure has no server-provided reason, such as a dropped connection, the message reads `Could not update your spend limit. Press Enter to retry.` and retrying can succeed. Before v2.1.216, Claude Code showed the generic form for every failure. **What to do:** +When the server explains the rejection, the message ends with that reason, and retrying the same value fails again. When the failure has no server-provided reason, such as a dropped connection, the message reads `Could not update your spend limit. Press Enter to retry.` and retrying can succeed. Before v2.1.216, Claude Code showed the generic form for every failure. If you remove the limit, the generic form starts `Could not remove your spend limit` on v2.1.327 or later. **What to do:** * If the message includes a reason, choose a limit that satisfies it, such as a lower amount * If the message shows only the generic form, retry; the failure may be transient @@ -2752,7 +2760,7 @@ If you answer `n` or press Enter at the [`Trust <directory>?` question](</docs/en/remote-control#requirements>), the command prints a `Remote Control did not start` message that names the directory and exits with code 1. Run `claude rc` again to answer `y`. **What to do:** - * Trust the directory from a terminal first: run `claude rc` there and answer `y`, or run `claude` there and accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>), then run your original command again + * Trust the directory from a terminal first: run `claude` there and accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>), then run your original command again * In your home directory, change to a project directory and start Remote Control there Before v2.1.284, the command never asked, even in a terminal. @@ -2768,7 +2776,7 @@ * In a script or CI job, append `--trust-workspace` to trust the folder for that run: `claude ultrareview --trust-workspace`. Append it only for code you trust, because git and Claude Code can then run programs named in the folder’s git configuration and project settings. For a pull request whose code you don’t trust, [run the review from a branch you trust](</docs/en/ultrareview#trust-the-folder-before-the-review-runs>). * On your own machine, run `claude` in that folder and accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>), then run your original command again -Each of these messages from `claude ultrareview` means that no review started and the exit code is 1: +In a session, `/ultrareview` and `/code-review ultra` can stop with `Ultrareview did not start: "<folder>" is not trusted, and this session started without asking whether you trust it`. Start `claude` in that folder without [`IS_DEMO`](</docs/en/env-vars#variables>) set, accept the workspace trust dialog, and run the command in the new session. Each of these messages from `claude ultrareview` means that no review started and the exit code is 1: * **`Error: Workspace not trusted. This terminal ...`** : the terminal reported no row and column count, or can’t fit the trust question and its warnings. Enlarge it or use a terminal that reports its size, then run `claude ultrareview` again. Outside your home directory, you can also run `claude` in that folder once and accept the trust dialog, so later runs there don’t ask. * **`Error: Workspace not trusted.<folder> is your home directory`**: because trust for your home directory is never saved, running `claude` there first can’t help. Run `claude ultrareview` from a project directory instead, after running `claude` there once to accept the trust dialog, or append `--trust-workspace`. @@ -3628,7 +3636,7 @@ You don’t see this error for a path that doesn’t exist at all. In `/plugin`, the error appears under the plugin and names the path and the code the operating system returned: - skills path could not be checked: /home/user/my-plugin/skills (ELOOP) + skills path couldn't be checked: /home/user/my-plugin/skills (ELOOP) In `claude plugin list`, the same error reads `Path not found: /home/user/my-plugin/skills (skills, ELOOP)`. Causes that produce this error include: @@ -3992,11 +4000,11 @@ This message means Claude Code didn’t start a [split-pane](</docs/en/agent-teams#choose-a-display-mode>) teammate in your [agent team](</docs/en/agent-teams>). Claude Code passes the lead’s command-line deny rules to a split-pane teammate on the teammate’s own command line, and stops when the teammate would read one of them differently: - A command-line deny rule cannot be handed to a teammate intact, so the teammate would not enforce it — spawn aborted - -**What to do:** - - * Run `/config` in the lead session and set **Teammate mode** to `in-process`, then ask Claude to start the teammate again. You don’t need to find the rule or restart the lead. An in-process teammate [runs under the lead’s live deny rules](</docs/en/agent-teams#permissions>). + The deny rule "<rule>" cannot be handed to a teammate intact, so the teammate was not started. Remove that rule or move it to permissions.deny in settings, then try again. + +**What to do:** + + * Run `/config` in the lead session and set **Teammate mode** to `in-process`. If the row says `overridden` and already shows `in-process`, cycle through the values back to it. Then ask Claude to start the teammate again. An in-process teammate [runs under the lead’s live deny rules](</docs/en/agent-teams#permissions>). * Later sessions that take [`teammateMode`](</docs/en/settings-reference#teammatemode>) from your user settings start teammates in-process too, because `/config` saves the choice there. To go back to split panes in a later session, set **Teammate mode** to `auto`, `tmux`, or `iterm2`, whichever you used before. ### Message too large for cross-session delivery @@ -4036,7 +4044,7 @@ * `its queue of undelivered peer messages was full`: the recipient already held as many undelivered messages from other sessions as its queue allows * `you sent faster than that session accepts`: the sending session’s messages arrived faster than the recipient accepts from one sender * `it repeated your previous message`: the message was identical to one the sending session sent this recipient shortly before - * `a relay loop between sessions was cut`: the message continued a chain of sessions messaging each other, and the chain had passed through the recipient too many times or grown too long + * `a relay loop between sessions was cut`: the message continued a long [chain of replies that can be cut off](</docs/en/cross-session-messaging#limitations>), such as one that includes a session beyond this machine **What to do:**
modified Fullscreen rendering View current →
--- a/fullscreen.md +++ b/fullscreen.md @@ -6,7 +6,7 @@ ## Enable fullscreen rendering -Run `/tui fullscreen` inside any Claude Code conversation. The CLI saves the [`tui` setting](</docs/en/settings-reference#tui>) and relaunches into fullscreen with your conversation intact, so you can switch mid-session without losing context. Run `/tui default` to switch back to the classic renderer, or `/tui` with no argument to print which renderer is active. In [screen reader mode](</docs/en/accessibility>), Claude Code always uses the classic renderer except in attached [background sessions](</docs/en/agent-view>), which still render fullscreen. If you run `/tui fullscreen` in any other session, Claude Code prints an explanation instead of switching and doesn’t change the saved `tui` setting. Claude Code carries these into the relaunched session: +Run `/tui fullscreen` inside any Claude Code conversation. The CLI saves the [`tui` setting](</docs/en/settings-reference#tui>) and relaunches into fullscreen. Run `/tui default` to switch back to the classic renderer, or `/tui` with no argument to print which renderer is active. In [screen reader mode](</docs/en/accessibility>), Claude Code always uses the classic renderer except in attached [background sessions](</docs/en/agent-view>), which still render fullscreen. If you run `/tui fullscreen` in any other session, Claude Code prints an explanation instead of switching and doesn’t change the saved `tui` setting. Claude Code carries these into the relaunched session: * The conversation as it appears on screen. After a [`/rewind`](</docs/en/checkpointing#rewind-and-summarize>), that means: * If you rewound earlier in the session, Claude Code relaunches from the rewound point, not from the longer transcript saved on disk. For example, if you rewound past your last three messages, the relaunched session opens without them
modified Claude Code GitHub Actions View current →
--- a/github-actions.md +++ b/github-actions.md @@ -9,24 +9,61 @@ You can set up the Claude Code GitHub Action in one of two ways: - * **Quick setup** : run `/install-github-app` from Claude Code. Claude Code installs the GitHub App, adds your authentication secret, and prepares the workflow pull request for you + * **Quick setup** : run `/install-github-app` from Claude Code, which sets up the authentication secret and workflow files for you * **Manual setup** : install the app, add the secret, and copy the workflow file into your repository yourself. Use this path when you don’t run Claude Code locally, when the command fails, or when you want full control of the workflow files For either path, you need admin access to the repository. ### Quick setup -`/install-github-app` works only with github.com repositories. If your repository’s git remote is on gitlab.com or bitbucket.org, the command prints a notice and exits instead of starting setup. To run Claude Code from GitLab pipelines, see [Claude Code GitLab CI/CD](</docs/en/gitlab-ci-cd>). Before you start, install the [GitHub CLI](<https://cli.github.com>) and authenticate it with `gh auth login`. Claude Code checks for it and warns you if it’s missing. Open `claude` in the repository you want to connect, run `/install-github-app`, and follow the prompts. Claude Code installs the Claude GitHub App, then sets up an authentication secret for the workflows: - - * If Claude Code already has an API key, it reuses that key, and offers to keep the repository’s existing `ANTHROPIC_API_KEY` secret if one is already set - * Otherwise, choose between creating a long-lived token with your Claude subscription and pasting in an API key - -Claude Code saves the credential as a repository secret, named `ANTHROPIC_API_KEY` for an API key or `CLAUDE_CODE_OAUTH_TOKEN` for a subscription token. Claude Code then pushes a branch with the workflow files you select, already set to use that secret, and opens GitHub in your browser with a pull request ready to create. Create and merge that pull request, and `@claude` works in the repository. To stop setup partway through, press Esc. A step already in progress finishes, and no later step starts. The closing message lists what already happened in the repository, such as a pushed branch or a saved secret. If you select the review workflow, Claude posts each review on the pull request itself, as an inline comment on each issue it finds or as one summary comment when it finds none. Claude skips some pull requests, such as drafts. The review workflow example uses the same skill and lists them. Before v2.1.229, Claude wrote its review only to the workflow run log. To update a review workflow that an earlier version generated, do one of the following: +`/install-github-app` works only with github.com repositories. If your repository’s git remote is on gitlab.com or bitbucket.org, the command prints a notice and exits instead of starting setup. To run Claude Code from GitLab pipelines, see [Claude Code GitLab CI/CD](</docs/en/gitlab-ci-cd>). During quick setup, you install the Claude GitHub App in your browser, then create and merge a pull request. + +1 + +Sign in to the GitHub CLI + +Install the [GitHub CLI](<https://cli.github.com>). If you aren’t signed in yet, run `gh auth login` in your shell. + +2 + +Start setup from Claude Code + +In your shell, run `claude` in the repository you want to connect. At the Claude Code prompt, run `/install-github-app`.If setup reports missing GitHub CLI permissions, run the command it prints and start again. + +3 + +Install the Claude GitHub App + +When the [Claude GitHub App](<https://github.com/apps/claude>) page opens in your browser, install the app and give it access to your repository. Then return to Claude Code and press Enter. + +4 + +Select the workflows + +Select **Set up GitHub Actions workflows**. To stop with only the app installed, decline the workflow setup and run `/install-github-app` again later.In the workflow list, deselect the `@claude` mentions workflow or the pull request review workflow if you don’t want both.If the repository already has a `claude.yml` workflow file, an update prompt replaces the workflow list. To keep your file, select **Skip workflow update (configure secrets only)** , then skip the pull request step. + +5 + +Choose a credential for the workflows + +When asked, choose between creating a long-lived token with your Claude subscription and pasting in an API key. If Claude Code already has an API key, you skip this question and use that key.By default, Claude Code saves the credential as a repository secret, named `ANTHROPIC_API_KEY` for an API key or `CLAUDE_CODE_OAUTH_TOKEN` for a subscription token. + +6 + +Confirm the changes + +When Claude Code lists the planned changes to your repository, select **Yes, make these changes**. + +7 + +Create and merge the pull request + +Claude Code pushes a branch with the workflow files, already set to use your secret, and opens GitHub with a pull request ready for you to create. Create and merge that pull request to turn on the workflows. To test mentions, tag `@claude` in an issue comment. + +To stop setup partway through, press Esc in Claude Code. Claude Code finishes any change it’s already writing to the repository and doesn’t start new ones. The closing message lists what already happened in the repository, such as a pushed branch or a saved secret. If you select the review workflow, Claude posts each review on the pull request itself, as an inline comment on each issue it finds or as one summary comment when it finds none. Claude skips some pull requests, such as drafts. The review workflow example uses the same skill and lists them. Before v2.1.229, Claude wrote its review only to the workflow run log. To update a review workflow that an earlier version generated, do one of the following: * Run `/install-github-app` again. When the repository already has a `claude.yml`, select **Update workflow file with latest version**. Claude Code pushes fresh copies of the workflow files to a new branch and opens the pull request, the same as a first install. * Add the `--comment` argument and the `claude_args` line from the review workflow example to the checked-in file yourself, which keeps any other edits you made to it. - -After installing the GitHub App, Claude Code asks whether to continue with GitHub Actions setup. Choose **Skip for now** to stop with only the GitHub App installed. Run `/install-github-app` again later to finish the workflow and secret steps. * When you install the GitHub App, you grant it several permissions. See GitHub App permissions for the full set * Quick setup works with the Claude API and Claude subscriptions. If you use Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry, see [Use Claude Code GitHub Actions with cloud providers](</docs/en/github-actions-cloud-providers>)
modified Use Claude Code GitHub Actions with cloud providers View current →
--- a/github-actions-cloud-providers.md +++ b/github-actions-cloud-providers.md @@ -31,7 +31,7 @@ Choose a GitHub identity -The Claude Code GitHub Action pushes commits and posts comments through a GitHub identity. The [quick setup](</docs/en/github-actions#quick-setup>) installs the official Claude GitHub App for this. With a cloud provider, you choose the identity yourself: +The Claude Code GitHub Action pushes commits and posts comments through a GitHub identity. With a cloud provider, you choose the identity: * **Official[Claude GitHub App](<https://github.com/apps/claude>)**: install it on the repository, or skip to the next step if it’s already installed * **Custom GitHub App** : create your own app when you want only the three permissions the Claude Code GitHub Action uses rather than the [official app’s full set](</docs/en/github-actions#github-app-permissions>)
modified Intercept and control agent behavior with hooks View current →
--- a/hooks.md +++ b/hooks.md @@ -800,6 +800,7 @@ * Check all `PreToolUse` hooks for `permissionDecision: 'deny'` returns * Add logging to your hooks to see what `permissionDecisionReason` they’re returning * Verify matcher patterns aren’t too broad: an empty matcher matches all tools + * If the tool result says a hook `returned updatedInput that failed schema validation` or `returned updatedInput that the tool refused`, fix that hook’s `updatedInput`. Include the unchanged `tool_input` fields, as in Modify tool input, because `updatedInput` replaces the whole input. ### Modified input not applied
modified Host and maintain a marketplace View current →
--- a/host-marketplace.md +++ b/host-marketplace.md @@ -18,7 +18,7 @@ A hosted `marketplace.json` URL| `/plugin marketplace add https://plugins.example.com/marketplace.json`| HTTPS access to the URL. Users don’t need `git` for the catalog itself A directory on a shared filesystem| `/plugin marketplace add /Volumes/shared/claude-plugins`| Read access to the path -To pin a branch or tag of a GitHub or git-URL marketplace, tell users to append `#<ref>`, as in `your-org/your-marketplace#stable`. The [plugin commands reference](</docs/en/plugins/cli-reference#plugin-marketplace-add>) lists every form the command accepts. A successful add prints `Successfully added marketplace: your-marketplace`. Claude Code takes that name from the `name` field in your `marketplace.json`, not from the repository name. Users then install a plugin by its entry’s `name` and the marketplace’s `name`, as in `/plugin install code-formatter@your-marketplace`. +To pin a branch or tag of a GitHub or git-URL marketplace, tell users to append `#<ref>`, as in `your-org/your-marketplace#stable`. The [plugin commands reference](</docs/en/plugins/cli-reference#plugin-marketplace-add>) lists every form the command accepts. Users install a plugin by its entry’s `name` and the top-level `name` in your `marketplace.json`, as in `/plugin install code-formatter@your-marketplace`. ### Register the marketplace for everyone in a repository @@ -142,7 +142,7 @@ Background auto-update is off for your marketplace by default, and `marketplace.json` has no field to turn it on. A user or an admin turns it on: - * **Tell users to turn it on** : each user goes to **Marketplaces** in `/plugin`, selects your marketplace, and selects **Enable auto-update**. + * **Tell users to turn it on** : each user goes to **Marketplaces** in `/plugin`, selects your marketplace, and turns on auto-update. * **Ask an admin to set it** : if an admin sets `"autoUpdate": true` on your marketplace’s `extraKnownMarketplaces` entry in managed settings, it’s on for everyone who receives those settings. See [Set update policy](</docs/en/plugins/org#set-update-policy>). Without auto-update, users receive your changes when they run `/plugin marketplace update <name>` in a session or `claude plugin update <plugin>@<name>` in the shell. For what users see when an update reaches them, see [When auto-update runs](</docs/en/plugins/loading#when-auto-update-runs>). @@ -231,7 +231,7 @@ 1. Compares what users installed from your marketplace against the entries and the `renames` map, and treats any plugin that is neither listed nor renamed as removed. 2. Uninstalls each removed plugin from the user, project, and local scopes. Plugins that only managed settings installed stay in place. - 3. Lists each removed plugin under a **Flagged** heading in `/plugin` with the status `Removed from marketplace`. + 3. Lists each uninstalled plugin under **Needs attention** on the **Installed** tab in `/plugin`. ## Authenticate archive downloads
modified Install and manage plugins View current →
--- a/install.md +++ b/install.md @@ -62,9 +62,9 @@ The last sentence of the summary tells you whether the plugin is usable in this session yet: * **Active now** : `Plugin is now active.` No reload is needed. - * **Active, but a server needs setup** : `Plugin is now active.` is followed by `Its bundled MCP server needs configuration before it can start`. The plugin’s [bundled MCP server](</docs/en/plugins/components#include-a-packaged-mcpb-server>) can’t start until you set its options. Select the plugin on the **Installed** tab in `/plugin` and choose **Configure** to set the server’s options. + * **Active, but a server needs setup** : `Plugin is now active.` is followed by a note that starts `Its bundled MCP server needs`. The plugin’s [bundled MCP server](</docs/en/plugins/components#include-a-packaged-mcpb-server>) can’t start until you set its options. Select the plugin on the **Installed** tab in `/plugin` and choose **Configure**. * **Reload needed** : `Run /reload-plugins to apply.` The panel closes and Claude Code runs that reload for you. If the reload would [invalidate the prompt cache](</docs/en/prompt-caching#enabling-or-disabling-a-plugin>), it warns and leaves the plugin pending instead. Run `/reload-plugins --force` to activate it anyway, which costs one uncached request. - * **Load failed** : `The plugin couldn't be loaded`. Open the **Errors** tab in `/plugin` for the reason, then see [After install: plugin not working](</docs/en/plugins/troubleshooting#plugin-installed-but-not-working>). + * **Load failed** : the summary includes `The plugin couldn't`. Open the **Errors** tab in `/plugin` for the reason, then see [After install: plugin not working](</docs/en/plugins/troubleshooting#plugin-installed-but-not-working>). 5 @@ -184,7 +184,7 @@ `/plugin market` also works as a shorter form of `/plugin marketplace`. -Include the `https://` prefix on every URL, or use the `git@host:path` form for SSH. If you type a bare `gitlab.example.com/your-group/your-marketplace.git`, Claude Code reads it as GitHub `owner/repo` shorthand and rejects it. When the command succeeds, it prints `Successfully added marketplace: <name>`, and the marketplace’s plugins appear on the **Discover** tab the next time you open `/plugin`, with no reload needed. If it fails, match the error message in [Troubleshoot plugins](</docs/en/plugins/troubleshooting#add-a-marketplace>). +Include the `https://` prefix on every URL, or use the `git@host:path` form for SSH. If you type a bare `gitlab.example.com/your-group/your-marketplace.git`, Claude Code reads it as GitHub `owner/repo` shorthand and rejects it. To confirm the add worked, run `/plugin` in a Claude Code session and look for the marketplace on the **Marketplaces** tab. If the add fails, match the error message in [Troubleshoot plugins](</docs/en/plugins/troubleshooting#add-a-marketplace>). ### Add a marketplace and install in one command @@ -266,7 +266,7 @@ ### Find plugins you no longer use -On the **Installed** tab in `/plugin`, plugins you installed yourself and haven’t used recently appear under a **Not used recently** header, and each plugin’s details show a **Last used** line. Use that header and that line to find plugins that still add startup and context cost, then disable or uninstall them. +On the **Installed** tab in `/plugin`, plugins you installed yourself and haven’t used recently appear under a **Not used recently** header. Use that header to find plugins that still add startup and context cost, then disable or uninstall them. ### Plugins with dependencies @@ -303,7 +303,7 @@ ### Turn auto-update on or off for a marketplace -In a Claude Code session, run `/plugin` and go to the **Marketplaces** tab. Select the marketplace, then select **Enable auto-update** or **Disable auto-update**. +In a Claude Code session, run `/plugin` and go to the **Marketplaces** tab. Select the marketplace to open its menu, then turn auto-update on or off. ### Update plugins now
modified Interactive mode View current →
--- a/interactive-mode.md +++ b/interactive-mode.md @@ -398,7 +398,7 @@ /plugin enable cc-plugin-you-should-know@builtin -Where `/plugin` doesn’t list the mod, the enable command answers `Plugin "cc-plugin-you-should-know@builtin" is not installed in this project`. +Where `/plugin` doesn’t list the mod, the enable command says the plugin isn’t installed in this project. ### Cost of checks
modified Plugin loading reference View current →
--- a/loading.md +++ b/loading.md @@ -157,9 +157,9 @@ ### Enabled in project settings but not installed -By default, a plugin enabled only in your project’s `.claude/settings.json` doesn’t load at session start until you install it on your machine. With the marketplace on your machine, the `/plugin` **Errors** tab shows [`Plugin "<name>" is enabled in project settings but isn't installed here`](</docs/en/plugins/troubleshooting#plugin-is-enabled-in-project-settings-but-isnt-installed-here>) or [`Plugin "<name>" not cached at <path>`](</docs/en/plugins/troubleshooting#plugin-not-cached-at>). - -If the tab shows neither message, [add the marketplace](</docs/en/plugins/install#add-a-marketplace>) before you install. Find its source in the `extraKnownMarketplaces` setting of `.claude/settings.json`, or ask your maintainer. +By default, a plugin enabled only in your project’s `.claude/settings.json` doesn’t load at session start until you install it on your machine. With the marketplace on your machine when the session starts, the `/plugin` **Errors** tab shows a line ending in [`isn't installed here`](</docs/en/plugins/troubleshooting#plugin-is-enabled-in-project-settings-but-isnt-installed-here>). + +If the marketplace isn’t on your machine yet, [add it](</docs/en/plugins/install#add-a-marketplace>) before you install. Find its source in the `extraKnownMarketplaces` setting of `.claude/settings.json`, or ask your maintainer. To install, run this in a shell from the project, using the plugin’s key in `enabledPlugins`: @@ -191,7 +191,7 @@ `synced/`| The plugins Claude Code synced from your claude.ai account `.trash/`| Plugins that the claude.ai sync removed, such as after you turn one off on claude.ai or stop syncing `installed_plugins.json` and `known_marketplaces.json`| The records of what Claude Code has installed and which marketplaces it has fetched, described under Check which stage a plugin reached. A [marketplace hosted on claude.ai](</docs/en/plugins/install#add-from-claude-ai>) is recorded in `known_marketplaces_claudeai.json` instead -`flagged-plugins.json`| Plugins Claude Code uninstalled because their marketplace delisted them. They appear in the **Flagged** section of `/plugin`; see [Host a marketplace](</docs/en/plugins/host-marketplace>) +`flagged-plugins.json`| Plugins Claude Code flagged as removed because their marketplace delisted them; see [Host a marketplace](</docs/en/plugins/host-marketplace>) `installed_plugins.set-aside.<date>.<hash>.json` and `installed_plugins.unreadable.<date>.<hash>.kept`| Dated copies Claude Code keeps before it drops install records that no version of Claude Code can use or rebuilds an unreadable `installed_plugins.json`. See [the recovery notes](</docs/en/plugins/troubleshooting#installed-plugins-json-could-not-be-read-and-was-rebuilt>). They age out on the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) schedule Because `${CLAUDE_PLUGIN_ROOT}` points at a version directory, a plugin’s root path changes with every version. Keep a plugin’s durable files in `${CLAUDE_PLUGIN_DATA}` instead. @@ -313,10 +313,10 @@ Whether a marketplace auto-updates follows the first of these that is set: 1. **`autoUpdate` on its `extraKnownMarketplaces` entry** in a settings file - 2. **`autoUpdate` on its `known_marketplaces.json` entry**, which the **Enable auto-update** toggle under `/plugin` **Marketplaces** writes. When a settings file also declares the marketplace under `extraKnownMarketplaces`, the toggle writes `autoUpdate` to that settings entry as well + 2. **`autoUpdate` on its `known_marketplaces.json` entry**, which the auto-update toggle under `/plugin` **Marketplaces** writes. When your user, project, or local settings also declare the marketplace under `extraKnownMarketplaces`, the toggle writes `autoUpdate` there as well 3. **The default** : on for Anthropic’s official marketplaces such as `claude-plugins-official`, off for `knowledge-work-plugins` and `first-party-plugins`, on for [marketplaces added from claude.ai](</docs/en/plugins/install#add-from-claude-ai>), and off for every other marketplace -If you set `DISABLE_UPDATES=1`, `DISABLE_AUTOUPDATER=1`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`, the whole pass is off and the **Enable auto-update** toggle is hidden, unless you also set `FORCE_AUTOUPDATE_PLUGINS=1`. The [environment variables reference](</docs/en/env-vars>) covers each variable’s wider effect. Auto-update also skips a plugin whose marketplace entry declares a `headersHelper`. [Installs and updates that refuse a command instead of asking](</docs/en/plugins/host-marketplace#installs-and-updates-that-refuse-the-command-instead-of-asking>) explains when such a plugin appears in the `/plugin` **Errors** tab and how you update it from there. When a copied plugin updates mid-session, hook commands, monitors, MCP servers, and LSP servers keep using the previous version’s path. Run `/reload-plugins` to switch hooks, MCP servers, and LSP servers to the new path. Monitors require a session restart. +If you set `DISABLE_UPDATES=1`, `DISABLE_AUTOUPDATER=1`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`, the whole pass is off and the auto-update toggle is hidden, unless you also set `FORCE_AUTOUPDATE_PLUGINS=1`. The [environment variables reference](</docs/en/env-vars>) covers each variable’s wider effect. Auto-update also skips a plugin whose marketplace entry declares a `headersHelper`. [Installs and updates that refuse a command instead of asking](</docs/en/plugins/host-marketplace#installs-and-updates-that-refuse-the-command-instead-of-asking>) explains when such a plugin appears in the `/plugin` **Errors** tab and how you update it from there. When a copied plugin updates mid-session, hook commands, monitors, MCP servers, and LSP servers keep using the previous version’s path. Run `/reload-plugins` to switch hooks, MCP servers, and LSP servers to the new path. Monitors require a session restart. ### When a command source re-runs
modified Connect to MCP servers View current →
--- a/mcp-quickstart.md +++ b/mcp-quickstart.md @@ -240,7 +240,7 @@ If a server doesn’t connect, check its status with `/mcp` inside a session or `claude mcp list` from your shell, then match the symptom below. The `/mcp` panel also lets you reconnect or authenticate without leaving the session. -/mcp shows No MCP servers configured +/mcp shows No MCP servers Claude Code didn’t find any servers for the current directory. The most common causes:
modified Measure plugin cost and usage View current →
--- a/measure.md +++ b/measure.md @@ -68,13 +68,13 @@ ### Not used recently in `/plugin` -On the **Installed** tab of `/plugin`, a plugin the user installed from a marketplace moves under a **Not used recently** header once it has gone unused for at least 14 days and 10 sessions. The plugin’s details also show a `Last used:` line. For what users do with that header and line, see [Find plugins you no longer use](</docs/en/plugins/install#find-plugins-you-no-longer-use>). The **Not used recently** header never appears for: +On the **Installed** tab of `/plugin`, an enabled marketplace plugin the user installed moves under a **Not used recently** header after at least 14 days and 10 sessions unused. The plugin’s details also show a last-used time. The **Not used recently** header never appears for: * Plugins loaded with `--plugin-dir` or from a skills directory * Plugins enabled through managed settings, or mounted from a [seed directory](</docs/en/plugins/org#seed-containers-and-ci>) * Plugins that include a theme, output style, monitor, or workflow, because those are in use without a tracked invocation -A plugin’s [language server](</docs/en/plugins/components#lsp-servers>) counts as used when it delivers diagnostics or answers a code navigation request, so an LSP plugin whose server is active in your sessions isn’t listed as unused. When the user’s organization sets [`strictKnownMarketplaces`](</docs/en/plugins/org#restrict-what-users-can-install>), neither the header nor the `Last used:` line appears. +A plugin’s [language server](</docs/en/plugins/components#lsp-servers>) counts as used when it delivers diagnostics or answers a code navigation request, so an LSP plugin whose server is active in your sessions isn’t listed as unused. When the user’s organization sets [`strictKnownMarketplaces`](</docs/en/plugins/org#restrict-what-users-can-install>), neither the header nor the last-used time appears. ### Find skills that never run
modified Model configuration View current →
--- a/model-config.md +++ b/model-config.md @@ -650,7 +650,7 @@ * **In scripts and cloud environments** : set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>) to a token count such as `200000`. Unless Claude Code ignores the value, the variable takes precedence over the command, the flag, and the `autoCompactWindow` setting. `/autocompact` then reports the override without saving. The status line’s `used_percentage` measures against the model’s full context window, so while the variable is set, that percentage doesn’t indicate when compaction will run. * **For one subagent** : see [Set the auto-compact window for one subagent](</docs/en/sub-agents#subagent-auto-compact-window>). -The command and the flag accept a window size from 100K to 1M tokens, in any of these forms: +The command and the flag accept a window size of 100K tokens or more, in any of these forms: * A plain token count, such as `200000` * A `k` or `M` suffix, such as `500k` or `1M` @@ -660,7 +660,7 @@ #### Values and warnings for `CLAUDE_CODE_AUTO_COMPACT_WINDOW` -A warning that quotes your `CLAUDE_CODE_AUTO_COMPACT_WINDOW` value means the value falls outside 100,000 to 1,000,000 or isn’t a token count. To stop the warning, set a number in that range, such as `CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000`. On Claude Code v2.1.304 or later, you can also write the number with `k` for thousands or `M` for millions, as in `200k` or `1M`. Find your warning’s wording in the first column, then read across for the window your session uses and what to change: +A warning that quotes your `CLAUDE_CODE_AUTO_COMPACT_WINDOW` value means your session isn’t using the value as you set it. To stop the warning, set a number such as `CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000`. On Claude Code v2.1.304 or later, you can also write the number with `k` for thousands or `M` for millions, as in `200k` or `1M`. Find your warning’s wording in the first column, then read across for the window your session uses and what to change: Your warning contains| Window the session uses| What to change ---|---|---
modified Monitoring View current →
--- a/monitoring-usage.md +++ b/monitoring-usage.md @@ -92,6 +92,7 @@ `OTEL_LOG_MANAGED_SETTINGS`| Add the redacted managed settings, and a SHA-256 digest of the settings before redaction, to managed settings resolved events (default: disabled). A value in project or local settings doesn’t turn it on. Requires Claude Code v2.1.274 or later| `1` to enable `OTEL_LOG_RAW_API_BODIES`| Emit the full Anthropic Messages API request and response JSON as `api_request_body` / `api_response_body` log events (default: disabled). Bodies include the entire conversation history. Enabling this implies consent to everything `OTEL_LOG_USER_PROMPTS`, `OTEL_LOG_TOOL_DETAILS`, and `OTEL_LOG_TOOL_CONTENT` would reveal| `1` for inline bodies truncated at the content limit (60 KB by default), or `file:<dir>` for untruncated bodies on disk with a `body_ref` pointer in the event `CLAUDE_CODE_OTEL_CONTENT_MAX_LENGTH`| Content limit: the maximum length of content-bearing attributes such as model responses, tool content, system prompts, and raw API bodies, truncation marker included, in UTF-16 code units (default: 61440, i.e. 60 KB). The default is sized for backends that cap attribute values at 64 KB; raise it only if your backend accepts larger values, or lower it to cut telemetry volume. When an OpenTelemetry SDK attribute limit, `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT` or one of its logrecord and span variants, is set lower, Claude Code truncates at that smaller value so the `[TRUNCATED ...]` marker stays within the SDK limit| `262144` +`OTEL_RESOURCE_INCLUDE_HOST`| Add the machine’s name and ID to the resource attributes of metrics, events, and traces (default: disabled). See Identify the machine a session ran on. Requires Claude Code v2.1.326 or later| `1` to enable `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE`| Metrics temporality preference (default: `delta`). Set to `cumulative` if your backend expects cumulative temporality| `delta`, `cumulative` `CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`| Interval for refreshing dynamic headers (default: 1740000ms / 29 minutes)| `900000` @@ -122,6 +123,37 @@ `OTEL_METRICS_INCLUDE_REPOSITORY`| Include `vcs.*` repository identity attributes on metrics and events. Requires Claude Code v2.1.269 or later| `false`| `true` Lower cardinality generally means better performance and lower storage costs but less granular data for analysis. + +### Identify the machine a session ran on + +To see which machine each session ran on, set `OTEL_RESOURCE_INCLUDE_HOST=1` on Claude Code v2.1.326 or later. Set it under `env` in [managed settings](</docs/en/managed-settings>) or user settings, or in the shell you start `claude` from, not in [project or local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). The following example sets it in a settings file: + + { + "env": { + "OTEL_RESOURCE_INCLUDE_HOST": "1" + } + } + +The attributes `host.name` and `host.id` then appear in the resource block of metrics, events, and traces, not on metric datapoints: + + * `host.name`: the machine’s host name + * `host.id`: the operating system’s machine ID, not hashed. That’s the contents of `/etc/machine-id` on Linux, `IOPlatformUUID` on macOS, and the `MachineGuid` registry value on Windows. It’s left out when Claude Code can’t read one, for example in a container whose image has no machine ID. + +Both attributes name the machine that Claude Code runs on. In a Desktop SSH session that’s the remote machine, so set the variable there: see Attribute telemetry to Desktop SSH sessions. In a container, `host.name` is the container’s own host name, so to name the machine that runs the container, declare the name yourself in `OTEL_RESOURCE_ATTRIBUTES`. + +#### Troubleshoot missing host attributes + +If `host.name` and `host.id` are missing, check where and when you set `OTEL_RESOURCE_INCLUDE_HOST` and what started the session. Then check your exporter and endpoint variables and how your backend shows resource attributes: + + * **The session’s Claude Code is older than v2.1.326** : update it + * **You set the variable only in project or local settings** : set it in managed settings, user settings, or your shell. Run `/status` to see which variables Claude Code ignored. + * **The variable is`0` in a managed or user settings file**: if you set `1` [in your shell or in a lower-precedence file](</docs/en/settings-reference#how-env-values-interact-with-your-shell>), the `0` still applies. Change the `0`, or ask your administrator if it’s in managed settings. + * **You set the variable after the session started** : start a new session, because Claude Code reads it once at startup + * **The desktop app started the session** : a local session gets some variables from your shell profile, but not this one, so set it in managed or user settings. For a Desktop SSH session, set it on the remote machine: see Attribute telemetry to Desktop SSH sessions. + * **The session is a cloud session in an Anthropic-hosted environment** : the attributes aren’t added there. To tell cloud sessions apart, see Attribute telemetry to cloud sessions. + * **Any exporter variable lists`console`**: remove `console` from `OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER`, and `OTEL_TRACES_EXPORTER`, and the attributes arrive at your other exporters + * **A per-signal endpoint variable, such as`OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`, isn’t a URL**: write a bare `10.0.0.1:4317` as a URL, such as `http://10.0.0.1:4317` + * **Your metrics backend doesn’t surface resource attributes** : with the `prometheus` exporter, look for the `host_name` and `host_id` labels of the `target_info` metric. Otherwise, look in the resource block of events and traces, or declare the name yourself in `OTEL_RESOURCE_ATTRIBUTES`, which by default also reaches metric datapoints. ### Traces (beta) @@ -360,7 +392,11 @@ ### Attribute telemetry to Desktop SSH sessions -To see which remote machine a [Desktop SSH session](</docs/en/desktop#ssh-sessions>) ran on, name each machine in a custom attribute. Metrics and events don’t name the machine a session ran on. On each remote machine, add `OTEL_RESOURCE_ATTRIBUTES` to the `env` block that turns telemetry on, in the [managed settings file the session reads](</docs/en/desktop#managed-settings>). Write the name out in each machine’s file. Claude Code doesn’t expand the value, so `host.name=$(hostname)` arrives as those characters. The following example names the machine `build-7`: +To see which remote machine a [Desktop SSH session](</docs/en/desktop#ssh-sessions>) ran on, either set `OTEL_RESOURCE_INCLUDE_HOST=1` or name each machine in a custom attribute. Choose the custom attribute if you need the name on metric datapoints: with `OTEL_RESOURCE_INCLUDE_HOST=1`, `host.name` appears in the resource block only. Set `OTEL_RESOURCE_INCLUDE_HOST` on the remote machine, in the `env` block that turns telemetry on, in the [managed settings file the session reads](</docs/en/desktop#managed-settings>). The [copy of Claude Code that the session runs](</docs/en/desktop#files-and-processes-on-the-remote-machine>) must be v2.1.326 or later. If `host.name` and `host.id` don’t arrive, see Troubleshoot missing host attributes. + +#### Name each remote machine in a custom attribute + +On each remote machine, add `OTEL_RESOURCE_ATTRIBUTES` to the `env` block that turns telemetry on, in the [managed settings file the session reads](</docs/en/desktop#managed-settings>). Write the name out in each machine’s file. Claude Code doesn’t expand the value, so `host.name=$(hostname)` arrives as those characters. The following example names the machine `build-7`: { "env": { @@ -373,7 +409,7 @@ } } -When nothing else sets the variable, `host.name` arrives in the resource block, in Desktop SSH sessions and in the CLI on that machine. For where else custom attributes appear, see Multi-team organization support. If the name doesn’t arrive, check for one of these causes: +`host.name` arrives in the resource block and, by default, on metric datapoints and events. Desktop SSH sessions and the CLI on that machine both send it. To keep it off datapoints, see Multi-team organization support. If the name that you set in `OTEL_RESOURCE_ATTRIBUTES` doesn’t arrive, check for one of these causes: * **You set it on the computer that runs Desktop** : Desktop doesn’t pass a value you set there to the SSH session * **You exported it in`/etc/profile` or another file that only login shells read**: the name arrives when you run `claude` from a login shell, but not in a Desktop SSH session. Desktop doesn’t start Claude Code through a login shell. Set the variable under `env` in the [managed settings file](</docs/en/desktop#managed-settings>) on the remote machine instead. @@ -1240,7 +1276,7 @@ * `managed_settings.helper.applied`: `"output"` while the helper’s own output serves as the managed settings, `"none"` when it doesn’t * `managed_settings.helper.entry`: `"policyHelper"` when Claude Code selected a [`policyHelper`](</docs/en/settings-reference#policyhelper>). Absent when it selected no helper * `managed_settings.helper.path`: the helper’s configured [`path`](</docs/en/settings-reference#policyhelper-path>). Present whenever Claude Code selected a helper, whether or not `OTEL_LOG_MANAGED_SETTINGS` is set - * `managed_settings.resolved_sha256` (when `OTEL_LOG_MANAGED_SETTINGS=1`): SHA-256 of the resolved managed settings before redaction, serialized as JSON with keys sorted recursively and no whitespace. Machines with the same digest run the same policy. Claude Code sends the digest only with the opt-in because a short policy can be recovered by hashing guesses. Absent when no managed settings resolved, and on `refused` events + * `managed_settings.resolved_sha256` (when `OTEL_LOG_MANAGED_SETTINGS=1`): SHA-256 of the resolved managed settings before redaction, serialized as JSON with keys sorted recursively and no whitespace. Machines with the same digest resolved the same managed settings. The event carries the digest only with the opt-in because a short policy can be recovered by hashing guesses. Absent when no managed settings resolved, and on `refused` events * `managed_settings.settings` (when `OTEL_LOG_MANAGED_SETTINGS=1`): the names and shape of the resolved managed settings as a JSON string, with the values redacted. Absent on `refused` events. Claude Code builds it from its settings schema: * A setting name the schema declares is exported, and a key it doesn’t declare is left out * Booleans, numbers, and string values the schema restricts to a fixed set of options, such as `permissions.defaultMode`, are exported as-is. `sandbox.network.httpProxyPort` and `sandbox.network.socksProxyPort` are exported as `"[REDACTED]"` @@ -1463,6 +1499,7 @@ * `os.type`: Operating system type (for example, `linux`, `darwin`, `windows`) * `os.version`: Operating system version string * `host.arch`: Host architecture (for example, `amd64`, `arm64`) + * `host.name`, `host.id`: The machine’s name and ID, off by default. See Identify the machine a session ran on. * `wsl.version`: WSL version number (only present when running on Windows Subsystem for Linux) * Meter Name: `com.anthropic.claude_code` @@ -1501,6 +1538,7 @@ * Raw Anthropic Messages API request and response bodies are not logged by default. To include them, set `OTEL_LOG_RAW_API_BODIES` in your shell, user settings, or managed settings. It’s ignored in [project and local settings](</docs/en/settings-reference#variables-claude-code-ignores-in-env>). The bodies contain the full conversation history, including the system prompt, every prior user and assistant turn, and tool results, so enabling this implies consent to everything the other `OTEL_LOG_*` content flags would reveal. Claude Code always redacts Claude’s extended-thinking content from these bodies, regardless of other settings. The value you set determines how Claude Code delivers the bodies: * With `=1`, Claude Code emits `api_request_body` and `api_response_body` log events for each API call. The events’ `body` attribute carries the JSON-serialized payload, truncated at the content limit (60 KB by default) * With `=file:<dir>`, Claude Code writes untruncated bodies to `.request.json` and `.response.json` files under that directory, and the events carry a `body_ref` path instead of the inline body. Ship the directory with a log collector or sidecar rather than through the telemetry stream. For each successful response, Claude Code also appends one line to `index.jsonl` in that directory, linking the response file to the request file that produced it and to the transcript message it became. Each line holds no message content, and the API response body event section lists its fields. The index file requires Claude Code v2.1.274 or later + * The machine’s name and ID aren’t included by default. To include them as `host.name` and `host.id`, set `OTEL_RESOURCE_INCLUDE_HOST=1`. A host name often contains a person’s name, and `host.id` is a lasting identifier for the machine. If you set the variable in managed settings, tell the people who use those machines, because Claude Code shows them no notice. ## Monitor Claude Code on Amazon Bedrock
modified Enterprise network configuration View current →
--- a/network-config.md +++ b/network-config.md @@ -96,7 +96,7 @@ ## Verify your configuration -You usually find out about a wrong proxy address or a bad certificate path from a [connection or certificate error](</docs/en/errors#network-and-connection-errors>) on a later request, since Claude Code doesn’t validate most of these settings when it reads them. The one setting it checks at startup is the proxy URL: when it can’t parse the value, such as one missing the `http://` scheme, Claude Code stops launch with an error naming the variable to fix. To confirm your configuration loaded before you send a request, start Claude Code with debug logging: +You usually find out about a wrong proxy address or a bad certificate path from a [connection or certificate error](</docs/en/errors#network-and-connection-errors>) on a later request, since Claude Code doesn’t validate most of these settings when it reads them. The one setting it checks at startup is the proxy URL: when it can’t parse the value, such as one missing the `http://` scheme, Claude Code stops launch with an error naming the variable to fix. With Claude Code v2.1.327 or later, some starts go ahead on an `HTTPS_PROXY` value that lacks `http://`, where neither standard input nor standard output is a terminal. That is so when Claude Desktop, an SDK, or cron starts Claude Code. Write the proxy value as a complete URL, such as `http://proxy.example.com:8080`, even if a plain `host:port` works in some of your sessions. To confirm your configuration loaded before you send a request, start Claude Code with debug logging: claude --debug
modified Manage Claude Code plugins for your organization View current →
--- a/org.md +++ b/org.md @@ -63,7 +63,7 @@ * **Interactive sessions** : Claude Code registers the marketplace only after the contributor accepts the [workspace trust dialog](</docs/en/permissions#what-runs-before-you-trust-a-folder>) for that folder. * **[Non-interactive`-p` runs](</docs/en/headless>)**: the entries apply only in a folder whose trust the user already accepted interactively, or whose `hasTrustDialogAccepted` flag you set in `~/.claude.json`. -Setting `enabledPlugins` in the repository doesn’t install the plugin. Once the marketplace is registered, ask each contributor to run `claude plugin install <name>@<marketplace> --scope project`. Until they do, the `/plugin` **Errors** tab can show `Plugin "<name>" is enabled in project settings but isn't installed here` or [`not cached`](</docs/en/plugins/troubleshooting#plugin-not-cached-at>). Contributors don’t need the install when a local `directory` or `file` marketplace lists the plugin with a [relative-path `source`](</docs/en/plugins/marketplace-reference#plugin-sources>). If you use a local `directory` or `file` source with a relative path, the path resolves against your repository’s main checkout. When you run Claude Code from a git worktree, the path still points at the main checkout, so all worktrees share the same marketplace location. To roll out a bundle of plugins with dependencies, put the bundle plugin in `enabledPlugins`, as [Plugin dependencies](</docs/en/plugins/dependencies>) describes. +Setting `enabledPlugins` in the repository doesn’t install the plugin. Once the marketplace is registered, ask each contributor to run `claude plugin install <name>@<marketplace> --scope project`. Until they do, the `/plugin` **Errors** tab can show a line ending in [`isn't installed here`](</docs/en/plugins/troubleshooting#plugin-is-enabled-in-project-settings-but-isnt-installed-here>). Contributors don’t need the install when a local `directory` or `file` marketplace lists the plugin with a [relative-path `source`](</docs/en/plugins/marketplace-reference#plugin-sources>). If you use a local `directory` or `file` source with a relative path, the path resolves against your repository’s main checkout. When you run Claude Code from a git worktree, the path still points at the main checkout, so all worktrees share the same marketplace location. To roll out a bundle of plugins with dependencies, put the bundle plugin in `enabledPlugins`, as [Plugin dependencies](</docs/en/plugins/dependencies>) describes. ### When each surface applies the plugin keys
modified Choose a permission mode View current →
--- a/permission-modes.md +++ b/permission-modes.md @@ -468,7 +468,7 @@ * `Agent` allow rules * [`Monitor`](</docs/en/tools-reference#monitor-tool>) allow rules, because Claude Code runs Monitor commands through the shell -Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code also runs `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and shows the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>). +Narrow rules like `Bash(npm test)` stay in effect. Claude Code restores the dropped rules when you leave auto mode. Before v2.1.236, Claude Code left `Monitor` allow rules in effect in auto mode, so a rule that matched the whole tool approved Monitor commands without classifier review.Claude Code can also run `git status` itself before a command that would discard uncommitted work, such as `git reset --hard` or `rm -rf`, and show the classifier whether staged, modified, or untracked work is present. Claude Code reports untracked files in that check even when the repository’s git configuration sets `status.showUntrackedFiles=no`.Under server-side classifier review, `git reset --hard` can be blocked on a clean working tree, because Claude Code can skip `git status` unless auto mode recently blocked an action. After the block, the classifier can see the clean status and allow Claude’s retry.In the classifier requests sent by Claude Code itself, the classifier sees user messages, tool calls other than read-only lookups such as file reads and searches, and your CLAUDE.md content. Tool results are stripped from those requests, so hostile content in a file or web page can’t manipulate the classifier directly.You can annotate a call’s result with a [PostToolUse hook’s `classifierContext` field](</docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier>), which the classifier reads as application-provided context. The field requires Claude Code v2.1.236 or later.A separate server-side probe scans incoming tool results and flags suspicious content before Claude reads it. For more on how these layers work together, see the [auto mode announcement](<https://claude.com/blog/auto-mode>) and the [engineering deep dive](<https://www.anthropic.com/engineering/claude-code-auto-mode>). How auto mode handles subagents @@ -508,7 +508,7 @@ claude --permission-mode bypassPermissions -The `--dangerously-skip-permissions` flag is equivalent. Claude Code refuses `bypassPermissions` in a session you start with [`--restricted`](</docs/en/cli-reference#cli-flags>). `--restricted` requires Claude Code v2.1.248 or later. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks: +The `--dangerously-skip-permissions` flag is equivalent. The first time you start an interactive session with this mode enabled, Claude Code shows a warning dialog asking you to accept responsibility for actions taken without permission checks: * **If you accept** : Claude Code sets `skipDangerousModePermissionPrompt` to `true` in `~/.claude/settings.json`, so later sessions skip the dialog. To see the dialog again, remove the key from that file or set it to `false`. The [`skipDangerousModePermissionPrompt` reference](</docs/en/settings-reference#skipdangerousmodepermissionprompt>) lists the other settings files where you or your organization can set it. * **If you decline** : Claude Code exits. @@ -528,6 +528,10 @@ The check is skipped automatically inside a recognized sandbox. To run autonomously in a container, use the [dev container](</docs/en/devcontainer>) configuration, which runs Claude Code as a non-root user. [Cloud sessions](</docs/en/claude-code-on-the-web>) don’t honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings can’t start a cloud session in bypass-permissions mode. The setting is ignored silently and the session starts in the permission mode shown in the mode dropdown instead. See Switch permission modes for which modes cloud sessions offer. `bypassPermissions` offers no protection against prompt injection or unintended actions. For background safety checks with far fewer permission prompts, use auto mode instead. Administrators can block this mode by setting `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). + +### Restricted mode refuses bypassPermissions + +Claude Code refuses `bypassPermissions` in a session you start with [`--restricted`](</docs/en/cli-reference#cli-flags>). `--restricted` requires Claude Code v2.1.248 or later. If you see `Error: bypassPermissions not supported in restricted mode`, remove the flag or setting that enables `bypassPermissions`, such as `--dangerously-skip-permissions`. To keep `bypassPermissions`, start without `--restricted` or [`CLAUDE_CODE_RESTRICTED`](</docs/en/env-vars#variables>) instead. ### Bypass permissions ignored in a background session @@ -646,6 +650,7 @@ * **Inline scripts** : a script passed to `sh`, `bash`, `zsh`, or a similar POSIX shell with `-c`, as in `bash -c 'rm -rf ~'`. * When the script is double-quoted, the invoking shell expands its variables before the inner shell receives the script. In `find . -name '*.tmp' -exec sh -c "rm -rf \"$1\"/*" _ {} \;`, the command expands to a removal from the filesystem root once per match, and Claude Code treats it as a critical-path removal. * A single-quoted script that binds `$1` to a real value, as `sh -c 'rm -rf "$1"/*' _ {}` does, isn’t flagged. + * If you see `This shell -c script runs rm and could not be checked`, read the script before you approve it. The command counts as a critical-path removal. To turn off the check on a critical path typed directly in a `-c` script, such as `~`, set [`CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT=1`](</docs/en/env-vars#variables>) in the environment that launches Claude Code.
modified Test plugins with evals View current →
--- a/plugin-evals.md +++ b/plugin-evals.md @@ -272,7 +272,7 @@ #### Shell grants refused on a managed machine -When shell-granting runs are refused on a machine your organization manages, a `sandbox` key in its [managed settings](</docs/en/managed-settings>) can be the cause. The error begins `A shell tool (Bash or PowerShell) was granted but this machine cannot confine it (no sandbox backend on this platform, or it is not installed)`. It names a missing backend even where one is installed. When a managed key is the cause, the message ends with `this machine's managed settings:` and the key, which the per-run progress line cuts off: +When shell-granting runs are refused on a machine your organization manages, a `sandbox` key in its [managed settings](</docs/en/managed-settings>) can be the cause. The error begins `A shell tool (Bash or PowerShell) was granted but this machine cannot confine it (no sandbox backend on this platform, or it is not installed)`. When a managed key is the cause, the message ends with `this machine's managed settings:` and the key, which the per-run progress line cuts off: * **Without`--json`**: read it from the summary table’s `NOTES` column, as in `sandbox.enabled is false` * **Under`--json`**: read it from the JSON result, in the run’s `error` field
modified Continue local sessions from any device with Remote Control View current →
--- a/remote-control.md +++ b/remote-control.md @@ -193,7 +193,7 @@ ## Trusted Devices -Trusted Devices is currently in beta. Features and functionality may evolve as the experience is refined.Trusted Devices is available on Pro, Max, Ultra, Team, and Enterprise plans and is off by default. On Team and Enterprise plans, an Owner turns it on for the organization. On Pro, Max, and Ultra plans, you turn on **Require trusted devices** yourself in your settings, on the Cowork or Account page. +Trusted Devices is available on Pro, Max, Ultra, Team, and Enterprise plans and is off by default. On Team and Enterprise plans, an Owner turns it on for the organization. On Pro, Max, and Ultra plans, you turn on **Require trusted devices** yourself in your settings, on the Cowork or Account page. Trusted Devices requires a verified device before you can view or steer Remote Control sessions from claude.ai, the Claude mobile apps, or Claude Desktop. The requirement applies to each member of your organization, or you alone on a Pro, Max, or Ultra plan. It ties Remote Control access to a known device and a recent authentication, not just a signed-in account. When the setting is on, interacting with a Remote Control session requires both of the following: @@ -338,7 +338,7 @@ /mcp reconnect claude.ai Slack -In the terminal, Claude Code prints `Successfully reconnected to claude.ai Slack`. From the mobile app or the web, the reply is `Reconnected "claude.ai Slack".` +In the terminal, Claude Code says it reconnected to `claude.ai Slack`. From the mobile app or the web, the reply is `Reconnected "claude.ai Slack".` ## Troubleshooting
modified Configure the sandboxed Bash tool View current →
--- a/sandboxing.md +++ b/sandboxing.md @@ -113,7 +113,7 @@ WSL2 notes -Check your WSL version with `wsl -l -v` from PowerShell. If you see `Sandboxing requires WSL2`, your distribution is running WSL1. Upgrade it to WSL2 or run Claude Code without sandboxing.On WSL2, WSL hands a launch of a Windows binary such as `cmd.exe`, `powershell.exe`, or anything under `/mnt/c/` to the Windows host over a Unix socket, so whether a sandboxed command can launch one follows the sandbox’s [Unix-socket settings](</docs/en/settings-reference#sandbox-network-allowunixsockets>): the optional seccomp filter has to be installed to block the socket in the first place. To allow these launches, set `allowAllUnixSockets`, which opens every Unix socket to sandboxed commands. +Check your WSL version with `wsl -l -v` from PowerShell. If you see `Sandboxing needs WSL2` or `Sandboxing requires WSL2`, your distribution is running WSL1. Upgrade it to WSL2 or run Claude Code without sandboxing.On WSL2, WSL hands a launch of a Windows binary such as `cmd.exe`, `powershell.exe`, or anything under `/mnt/c/` to the Windows host over a Unix socket, so whether a sandboxed command can launch one follows the sandbox’s [Unix-socket settings](</docs/en/settings-reference#sandbox-network-allowunixsockets>): the optional seccomp filter has to be installed to block the socket in the first place. To allow these launches, set `allowAllUnixSockets`, which opens every Unix socket to sandboxed commands. #### Add an AppArmor profile for bubblewrap @@ -835,9 +835,9 @@ In a Linux session with `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` set, every command runs sandboxed, so excluded commands and commands you type are refused too. -### `/sandbox` fails with `Sandbox settings are overridden by a higher-priority configuration` - -`/sandbox` prints `Error: Sandbox settings are overridden by a higher-priority configuration and cannot be changed locally.` instead of opening its panel when a higher [settings level](</docs/en/settings#settings-precedence>) sets `sandbox.enabled`, `sandbox.autoAllowBashIfSandboxed`, or `sandbox.allowUnsandboxedCommands`. The panel saves your choices to `.claude/settings.local.json`, and a value saved there can’t override those levels. Managed settings and `--settings` rank above local settings. To see which of them this session loaded, run `/status` and read the `Setting sources` line: +### `/sandbox` fails with `Sandbox settings can't be changed here` + +When `sandbox.enabled`, `sandbox.autoAllowBashIfSandboxed`, or `sandbox.allowUnsandboxedCommands` is set above the local [settings level](</docs/en/settings#settings-precedence>), `/sandbox` prints `Sandbox settings can't be changed here. Higher-priority settings override them.` and its panel stays closed. The panel saves your choices to `.claude/settings.local.json`, and a value saved there can’t override higher levels. Managed settings and `--settings` rank above local settings. To see which of them this session loaded, run `/status` and read the `Setting sources` line: * **`Command line arguments`** : if you started Claude Code with [`--settings`](</docs/en/settings#change-a-setting-for-one-session>), check whether the file or JSON you passed sets one of those keys. If it does, change the value there, or start Claude Code again without those keys. * **`Enterprise managed settings`** : your organization’s managed settings are loaded. If they set one of those keys, you can’t change that key from `/sandbox` or from any settings file you control, so ask your administrator. @@ -846,7 +846,7 @@ This line means `/sandbox` couldn’t save the choice you made in its panel to your project’s `.claude/settings.local.json`: - ✗ Sandbox settings not changed: /home/you/project/.claude/settings.local.json couldn't be updated (EACCES). Start Claude Code in a project folder you can write to. + ✗ Sandbox settings not changed: /home/you/project/.claude/settings.local.json couldn't be updated (EACCES). Start Claude Code in a project directory you can write to. If the reason in parentheses is `EACCES`, `EPERM`, or `EROFS`, start Claude Code in a project folder you can write to, then run `/sandbox` again in that session. If the reason begins with `Invalid JSON syntax in settings file`, correct the JSON in your project’s `.claude/settings.local.json`, then run `/sandbox` again. If no writable project folder is available to you, turn the sandbox on from your user settings instead. Add this to `~/.claude/settings.json`:
modified Catch security issues as Claude writes code View current →
--- a/security-guidance.md +++ b/security-guidance.md @@ -161,7 +161,7 @@ /plugin uninstall security-guidance@claude-plugins-official -If the plugin was enabled through a project’s `.claude/settings.json`, uninstalling it from `/plugin` writes an override to your `.claude/settings.local.json` rather than editing the checked-in file, so the plugin stays off for you while teammates are unaffected. The same dialog also offers to uninstall the plugin for everyone by removing it from the shared `.claude/settings.json`. If it was enabled through [managed settings](</docs/en/admin-setup>), only an administrator can disable it. +If the plugin was enabled through a project’s `.claude/settings.json`, uninstalling it from `/plugin` writes an override to your `.claude/settings.local.json` rather than editing the checked-in file. The plugin stays off for you while teammates are unaffected. The same dialog also offers to uninstall the plugin for everyone by removing it from the shared `.claude/settings.json`. If it was enabled through [managed settings](</docs/en/admin-setup>), `/plugin` refuses **Disable plugin** and **Uninstall**. ## How the plugin integrates with Claude Code
modified All settings View current →
--- a/settings-reference.md +++ b/settings-reference.md @@ -133,7 +133,7 @@ `permissions`| Set allow, ask, and deny rules and the default [permission mode](</docs/en/permission-modes>)| Permission settings| Any file `permissions.additionalDirectories`| Give Claude file access to [directories outside the current one](</docs/en/permissions#working-directories>)| Permission settings| Any file `permissions.allow`| Approve listed [tool uses](</docs/en/permissions#permission-rule-syntax>) without a prompt| Permission settings| Any file -`permissions.ask`| Always prompt before listed [tool uses](</docs/en/permissions#permission-rule-syntax>)| Permission settings| Any file +`permissions.ask`| Prompt before listed [tool uses](</docs/en/permissions#permission-rule-syntax>)| Permission settings| Any file `permissions.blockReadsOutsideWorkingDirectories`| Make the file tools refuse reads outside the [working directories](</docs/en/permissions#working-directories>) in every permission mode| Permission settings| Any file `permissions.blockWritesOutsideWorkingDirectories`| Make the `Write`, `Edit`, and `NotebookEdit` tools refuse paths outside the [working directories](</docs/en/permissions#working-directories>) in every permission mode, apart from some of Claude Code’s own files| Permission settings| Any file `permissions.defaultMode`| Set the default [permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) for new sessions| Permission settings| Any file @@ -622,7 +622,7 @@ * **Type** : object mapping a model name to an object with any of these fields: * `effortLevel`: one of `"low"`, `"medium"`, `"high"`, or `"xhigh"` * `maxEffortLevel`: the highest effort level the model may run at - * `autoCompactWindow`: a number of tokens from `100000` to `1000000`, or `"auto"` for the window tuned for the model. [`/autocompact`](</docs/en/model-config#set-the-auto-compact-window>) saves here. For that model, the value takes precedence over a top-level `autoCompactWindow` in the same settings file. Requires Claude Code v2.1.288 or later + * `autoCompactWindow`: a token count of `100000` or more, or `"auto"` for the window tuned for the model. [`/autocompact`](</docs/en/model-config#set-the-auto-compact-window>) saves here. For that model, the value takes precedence over a top-level `autoCompactWindow` in the same settings file. Requires Claude Code v2.1.288 or later * **Default** : unset Claude Code writes each entry under the model’s canonical name, such as `claude-opus-5-5`, and matches that model’s alias, date-suffixed, `[1m]`, and recognized provider-specific IDs to the same entry. This example keeps Opus 5.5 at `high` while other models use their own saved or default levels: @@ -916,7 +916,7 @@ ### `permissions.ask` -List the tool uses that prompt you for confirmation even in a permission mode that would otherwise approve them, such as `acceptEdits` or `bypassPermissions`. In `dontAsk` mode Claude Code denies a matching tool use instead of prompting. +List the tool uses that prompt you for confirmation even in a permission mode that would otherwise approve them, such as `acceptEdits` or `bypassPermissions`. In `dontAsk` mode Claude Code denies a matching tool use instead of prompting. A matching tool use can still run without your approval if a [`PermissionRequest` hook](</docs/en/hooks#permissionrequest>) or a [mod](</docs/en/plugins/mods/overview#what-a-mod-can-reach>) allows it. With [sandbox auto-allow](</docs/en/permissions#how-permissions-interact-with-sandboxing>), sandboxed commands can skip a bare `Bash` ask rule. * **Scope** : `Any file` * **Type** : array of permission rule strings @@ -2208,7 +2208,7 @@ Set how full the context window gets before Claude Code [compacts automatically](</docs/en/context-window#when-your-context-fills-up>). * **Scope** : `Any file` - * **Type** : number of tokens, from `100000` to `1000000`. Claude Code caps the value at your model’s context window; the [models overview](<https://platform.claude.com/docs/en/about-claude/models/overview>) lists each model’s window + * **Type** : number of tokens, at least `100000`. Claude Code caps the value at your model’s context window; the [models overview](<https://platform.claude.com/docs/en/about-claude/models/overview>) lists each model’s window * **Default** : unset, so Claude Code picks a window tuned for your model * **Per-session overrides** : [`--autocompact`](</docs/en/cli-reference#cli-flags>) takes precedence over this key for one session, and [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>) takes precedence over both unless Claude Code [ignores the variable’s value](</docs/en/model-config#claude_code_auto_compact_window-values>) @@ -2349,6 +2349,7 @@ * The content variables `OTEL_LOG_USER_PROMPTS`, `OTEL_LOG_ASSISTANT_RESPONSES`, `OTEL_LOG_TOOL_CONTENT`, and `OTEL_LOG_TOOL_DETAILS` * `OTEL_EXPORTER_OTLP_*` variables whose names end in `_ENDPOINT`, `_HEADERS`, `_PROTOCOL`, `_CERTIFICATE`, `_CLIENT_KEY`, or `_INSECURE`, in the generic and per-signal forms, such as `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` * `OTEL_EXPORTER_PROMETHEUS_HOST` and `OTEL_EXPORTER_PROMETHEUS_PORT` + * `OTEL_RESOURCE_INCLUDE_HOST`, which [adds the machine’s name and ID](</docs/en/monitoring-usage#identify-the-machine-a-session-ran-on>) Only these values still apply from project and local settings, because they turn something off: `none` for the three exporter selectors, and an off value such as `0` for `OTEL_LOG_USER_PROMPTS`, `OTEL_LOG_TOOL_CONTENT`, and `OTEL_LOG_TOOL_DETAILS`. Such a value overrides the same variable in your user settings, but not one that the environment you start Claude Code from, a `--settings` file, or managed settings sets. When a project or local settings file sets a variable in this group, a local interactive session shows a notice at startup. Run `/status` or `claude doctor` to see which ones Claude Code ignored and which turned telemetry off; both list names, never values. A non-interactive run with `-p` or an Agent SDK session shows no notice, so check that your collector still receives data after you upgrade. If it doesn’t, set the variables in your user settings, managed settings, the job’s environment, or a file you pass with `--settings`. Ignoring this group in project and local settings requires Claude Code v2.1.282 or later. * Variables that change how Claude Code starts or syncs, such as `CLAUDE_CODE_PROCESS_WRAPPER`, `CLAUDE_CODE_SYNC_SKILLS`, `CLAUDE_CODE_SYNC_PLUGINS`, `CLAUDE_CODE_PLUGIN_CACHE_DIR`, and `CLAUDE_CODE_PLUGIN_SEED_DIR`. * Variables that set your claude.ai sign-in, such as [`CLAUDE_CODE_OAUTH_TOKEN`, `CLAUDE_CODE_OAUTH_REFRESH_TOKEN`, and `CLAUDE_CODE_OAUTH_SCOPES`](</docs/en/env-vars#variables>). @@ -2363,7 +2364,7 @@ * [`CLAUDE_CODE_PROJECT_DIR_NAME`](</docs/en/sessions#name-the-project-directory-yourself>), which Claude Code reads from the launch environment only, is ignored from every file; requires v2.1.234 or later. * [`CLAUDE_CODE_RESTRICTED`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file. * [`CLAUDE_CODE_DISABLE_POWERSHELL_CMD_RM_DENY`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file. The variable requires Claude Code v2.1.283 or later. - * [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`, `CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`, `CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT`, and `CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, are ignored from every file. + * [`CLAUDE_CODE_DISABLE_DANGEROUS_RM_TIMEOUT`, `CLAUDE_CODE_DISABLE_SUBSTITUTION_RM_PROMPT`, `CLAUDE_CODE_DISABLE_INLINE_SHELL_RM_PROMPT`, `CLAUDE_CODE_STRICT_INLINE_SHELL_RM_PROMPT`, `CLAUDE_CODE_DISABLE_MOUNTED_DRIVE_RM_PROMPT`, and `CLAUDE_CODE_DISABLE_ULTRAREVIEW_TRUST_CHECK`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, are ignored from every file. * [`CLAUDE_CODE_EVEN_MORE_DANGEROUSLY_SKIP_PERMISSIONS`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, is ignored from every file. * [`CLAUDE_CODE_WARN_DISK_FREE_GIB` and `CLAUDE_CODE_WARN_MEMORY_FREE_GIB`](</docs/en/env-vars#variables>), which Claude Code reads from the launch environment only, are ignored from every file. The variables require Claude Code v2.1.304 or later. @@ -3843,7 +3844,7 @@ Source| Example entry| Fields ---|---|--- -`github`| `{ "source": "github", "repo": "acme-corp/plugins", "ref": "main", "path": "marketplace" }`| `repo` required; `ref` is a branch, tag, or commit SHA; `path` is a subdirectory +`github`| `{ "source": "github", "repo": "acme-corp/plugins", "ref": "main", "path": ".claude-plugin/marketplace.json" }`| `repo` required; `ref` is a branch, tag, or commit SHA; `path` is the [marketplace file’s path](</docs/en/plugins/marketplace-reference#fields-by-type>) in the repository `git`| `{ "source": "git", "url": "https://gitlab.example.com/tools/plugins.git", "ref": "production" }`| `url` required; `ref` and `path` as for `github` `url`| `{ "source": "url", "url": "https://plugins.example.com/marketplace.json", "headers": { "Authorization": "Bearer ${TOKEN}" } }`| `url` required; `headers` adds HTTP headers for authenticated access `file`| `{ "source": "file", "path": "/opt/acme-corp/plugins/marketplace.json" }`| `path` required, the absolute path to a `marketplace.json` file @@ -3895,7 +3896,7 @@ For example, Claude Code treats each pair below as two different sources: * `{ "source": "github", "repo": "acme-corp/plugins" }` and `{ "source": "github", "repo": "acme-corp/plugins", "ref": "main" }` - * `{ "source": "github", "repo": "acme-corp/plugins", "path": "marketplace" }` and `{ "source": "github", "repo": "acme-corp/plugins" }` + * `{ "source": "github", "repo": "acme-corp/plugins", "path": ".claude-plugin/marketplace.json" }` and `{ "source": "github", "repo": "acme-corp/plugins" }` #### Allow only the official marketplace @@ -5607,7 +5608,7 @@ ### `claudeInChromeDefaultEnabled` -Start every interactive CLI session with [Chrome integration](</docs/en/chrome>) on, without passing `--chrome` each time. If you run [`claude remote-control`](</docs/en/remote-control>), a session it starts for one of your [project](</docs/en/claude-projects>) threads follows this key too, except in `bypassPermissions` mode. With Claude Code v2.1.287 or later, this key also applies to sessions in the [VS Code extension](</docs/en/vs-code#automate-browser-tasks-with-chrome>): see [Enable Chrome by default](</docs/en/chrome#enable-chrome-by-default>). Running `/chrome` and selecting **Enabled by default** sets this key for you, as does answering the [“Claude in Chrome extension detected” dialog](</docs/en/chrome#answer-the-startup-dialog>). Appears in `/config` as **Claude in Chrome enabled by default**. +Start every interactive CLI session with [Chrome integration](</docs/en/chrome>) on, without passing `--chrome` each time. If you run [`claude remote-control`](</docs/en/remote-control>), a session it starts for one of your [project](</docs/en/claude-projects>) threads follows this key too, except in `bypassPermissions` mode. With Claude Code v2.1.287 or later, this key also applies to sessions in the [VS Code extension](</docs/en/vs-code#automate-browser-tasks-with-chrome>): see [Enable Chrome by default](</docs/en/chrome#enable-chrome-by-default>). You set this key when you turn Chrome on by default from `/chrome` or answer the [“Claude in Chrome extension detected” dialog](</docs/en/chrome#answer-the-startup-dialog>). Appears in `/config` as **Claude in Chrome enabled by default**. * **Scope** : `Global config` * **Type** : Boolean
modified Create custom subagents View current →
--- a/sub-agents.md +++ b/sub-agents.md @@ -223,7 +223,7 @@ `model`| No| Model to use: `sonnet`, `opus`, `haiku`, `fable`, a full model ID such as `claude-opus-5-5`, or `inherit`. When you omit it, Claude Code picks the model in the subagent model order `permissionMode`| No| Permission mode: `default`, `acceptEdits`, `auto`, `dontAsk`, `bypassPermissions`, `plan`, or `manual` as an alias for `default`. Ignored for plugin subagents `maxTurns`| No| Maximum number of agentic turns before the subagent stops. When the subagent reaches the limit, Claude Code returns its output marked as partial, and Claude can resume it to continue. The partial marking requires Claude Code v2.1.246 or later -`autoCompactWindow`| No| Lower the auto-compact window for this subagent to a token count from `100000` to `1000000`. Requires Claude Code v2.1.296 or later +`autoCompactWindow`| No| Lower the auto-compact window for this subagent to a token count of `100000` or more. Requires Claude Code v2.1.296 or later `skills`| No| [Skills](</docs/en/skills>) to preload into the subagent’s context at startup. The full skill content is injected, not only the description. Subagents can still invoke unlisted project, user, and plugin skills through the Skill tool `mcpServers`| No| [MCP servers](</docs/en/mcp>) available to this subagent. Each entry is either a server name referencing an already-configured server (e.g., `"slack"`) or an inline definition with the server name as key and a full [MCP server config](</docs/en/mcp#installing-mcp-servers>) as value. Ignored for plugin subagents `hooks`| No| Lifecycle hooks scoped to this subagent. Ignored for plugin subagents @@ -247,7 +247,7 @@ #### Subagent files Claude Code skips -Claude Code skips a file in a project, user, or managed `agents` directory, or in one under a directory you add with `--add-dir`, without reporting it in the session, when the frontmatter has any of these problems: +Claude Code skips a file in a project, user, or managed `agents` directory, or in one under a directory you add with `--add-dir`, when the frontmatter has any of these problems: * **No`name`**: Claude Code treats the file as documentation kept beside your agents. * **An opening`---` that isn’t the file’s first line**: Claude Code reads the file as having no frontmatter and treats it as documentation. @@ -922,7 +922,7 @@ ##### Set the auto-compact window for one subagent -To make one subagent compact earlier than it otherwise would, set `autoCompactWindow` in its frontmatter to a token count from `100000` to `1000000`. If you set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars#variables>), the subagent uses that variable’s window instead and the field has no effect, unless Claude Code [ignores the variable’s value](</docs/en/model-config#claude_code_auto_compact_window-values>). Requires Claude Code v2.1.296 or later. This frontmatter sets `autoCompactWindow` to 200,000 tokens for a subagent that reads long log files: +To make one subagent compact earlier than it otherwise would, set `autoCompactWindow` in its frontmatter to a token count of `100000` or more. Requires Claude Code v2.1.296 or later. This frontmatter sets `autoCompactWindow` to 200,000 tokens for a subagent that reads long log files: --- name: log-reader @@ -930,10 +930,12 @@ autoCompactWindow: 200000 --- -Write the value as a plain integer such as `200000`, because in frontmatter Claude Code reads `200k` as 200, which is outside the allowed range. The subagent still loads and compacts as if the field were absent. To check whether Claude Code ignored your value, run `claude --debug` in your shell and search the debug log for `invalid autoCompactWindow`. If the value is in range and you still see no change, check for these causes: +Write the value as a plain integer such as `200000`, because in frontmatter Claude Code reads `200k` as 200, which is below the minimum. The subagent still loads and compacts as if the field were absent. To check whether Claude Code ignored your value, run `claude --debug` in your shell and search the debug log for `invalid autoCompactWindow`. If the value is `100000` or more and you still see no change, check for these causes: * **The value isn’t below the[auto-compact window](</docs/en/model-config#context-window-and-auto-compaction>) the subagent would otherwise inherit**: to compact earlier, set a value below that window. * **You run the whole session as this subagent with`--agent` or the `agent` setting**: the field has no effect there. To set the session’s window, see [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>). + +If you also set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars#variables>), the subagent uses the lowest of the `autoCompactWindow` value, the model’s context window, and the window the variable sets. Before v2.1.312, the field had no effect while the variable set the window. ## Fork the current conversation
modified Subagents in the SDK View current →
--- a/subagents.md +++ b/subagents.md @@ -137,7 +137,7 @@ `mcpServers`| `(string | object)[]`| No| MCP servers available to this agent, by name or inline config `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 -`autoCompactWindow`| `number`| No| Lower the [auto-compact window](</docs/en/sub-agents#subagent-auto-compact-window>) for this agent when it runs as a subagent, to a token count from `100000` to `1000000`. Requires TypeScript Agent SDK v0.3.296 or later. The Python SDK’s [`AgentDefinition`](</docs/en/agent-sdk/python#agentdefinition>) doesn’t have this field +`autoCompactWindow`| `number`| No| Lower the [auto-compact window](</docs/en/sub-agents#subagent-auto-compact-window>) for this agent when it runs as a subagent, to a token count of `100000` or more. Requires TypeScript Agent SDK v0.3.296 or later. The Python SDK’s [`AgentDefinition`](</docs/en/agent-sdk/python#agentdefinition>) doesn’t have this field `background`| `boolean`| No| Run this agent as a non-blocking background task when invoked `omitClaudeMd`| `boolean`| No| Leave the user, project, and local CLAUDE.md files out of this agent’s initial context; managed policy files still load. Ignored when the agent runs as the main thread agent. Requires TypeScript Agent SDK v0.3.271 or later. The Python SDK’s [`AgentDefinition`](</docs/en/agent-sdk/python#agentdefinition>) doesn’t have this field `effort`| `'low' | 'medium' | 'high' | 'xhigh' | 'max' | number`| No| Reasoning effort level for this agent
modified Tools reference View current →
--- a/tools-reference.md +++ b/tools-reference.md @@ -116,7 +116,7 @@ * If `cd` lands outside those directories, Claude Code resets to the project directory and appends `Shell cwd was reset to <dir>` to the tool result. * To disable this carry-over so every Bash command starts in the project directory, set `CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1`. * Environment variables don’t persist. An `export` in one command won’t be available in the next. - * Aliases and shell functions defined in your shell startup file are available. At session start, Claude Code sources `~/.zshrc`, `~/.bashrc`, or `~/.profile` depending on your shell, captures the resulting aliases, functions, and shell options, and applies them to every Bash command. + * Claude Code starts a non-interactive shell, sources `~/.zshrc` for Zsh or `~/.bashrc` for Bash, and applies the aliases, functions, and shell options it captures to Bash commands. Activate your virtualenv or conda environment before launching Claude Code. To make environment variables persist across Bash commands, set [`CLAUDE_ENV_FILE`](</docs/en/env-vars>) to a shell script before launching Claude Code, or use a [SessionStart hook](</docs/en/hooks#persist-environment-variables>) to populate it dynamically.
modified Troubleshoot a mod View current →
--- a/troubleshoot.md +++ b/troubleshoot.md @@ -166,7 +166,7 @@ ## A toast appears after a turn is stopped -### `Stopped: type a message to continue; a mod cannot resume work after Stop` +### `stopped · type a message to continue` This toast means that after you stopped the turn, for example with Esc, a mod tried to start work on its own and Claude Code didn’t let it. Nothing needs fixing. After your next message, mods can start work again and [some of that work comes back](</docs/en/plugins/mods/api#work-your-mod-started-before-the-interruption>) on its own. If what you expected from the mod doesn’t come back, ask for it again or run the mod’s command again. If you wrote the mod, see [Calls and background work after the user interrupts a turn](</docs/en/plugins/mods/api#calls-and-background-work-after-the-user-interrupts-a-turn>).
modified Agent SDK reference - TypeScript View current →
--- a/typescript.md +++ b/typescript.md @@ -1123,7 +1123,7 @@ `skills`| No| Array of skill names to preload into the agent context `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 -`autoCompactWindow`| No| Lower the [auto-compact window](</docs/en/sub-agents#subagent-auto-compact-window>) for this agent when it runs as a subagent, to a token count from `100000` to `1000000`. Requires TypeScript Agent SDK v0.3.296 or later +`autoCompactWindow`| No| Lower the [auto-compact window](</docs/en/sub-agents#subagent-auto-compact-window>) for this agent when it runs as a subagent, to a token count of `100000` or more. Requires TypeScript Agent SDK v0.3.296 or later `background`| No| Run this agent as a non-blocking background task when invoked `omitClaudeMd`| No| Leave the user, project, and local CLAUDE.md files out of this agent’s initial context; managed policy files still load. Use it for agents that take everything they need from the Agent tool prompt. Ignored when this agent runs as the main thread agent. Requires TypeScript Agent SDK v0.3.271 or later `memory`| No| Memory source for this agent: `'user'`, `'project'`, or `'local'`
modified Voice dictation View current →
--- a/voice-dictation.md +++ b/voice-dictation.md @@ -15,7 +15,7 @@ Run `/voice` to enable dictation. When you enable it, Claude Code runs a microphone check. On macOS, this triggers the system microphone permission prompt for your terminal if it has never been granted. /voice - Voice mode enabled (hold). Hold space to record. Dictation language: en (/config to change). + Turned on voice mode (hold). Hold space to record. Dictation language: en (/config to change). `/voice` accepts an optional mode argument:
modified Use Claude Code in VS Code View current →
--- a/vs-code.md +++ b/vs-code.md @@ -11,7 +11,7 @@ Before installing, make sure you have: * VS Code 1.94.0 or later - * An Anthropic account: any paid Claude subscription (Pro, Max, Ultra, Team, or Enterprise) or a Claude Console account works, and no API key is required. You’ll [sign in](</docs/en/authentication#log-in-to-claude-code>) with this account when you first open the extension. If you access Claude through a third-party provider like Amazon Bedrock or Google Cloud’s Agent Platform, see Use third-party providers for setup instructions. + * An Anthropic account: any paid Claude subscription (Pro, Max, Ultra, Team, or Enterprise) or a Claude Console account works, and no API key is required. You’ll [sign in](</docs/en/authentication#log-in-to-claude-code>) with this account when you first open the extension. For a provider like Amazon Bedrock or Google Cloud’s Agent Platform, see Use third-party providers. For a Claude apps gateway, see Sign in to a Claude apps gateway. The extension bundles its own copy of the CLI (command-line interface) for the chat panel. To run `claude` in VS Code’s integrated terminal, you also need the [standalone CLI install](</docs/en/setup>). See VS Code extension vs. Claude Code CLI for details. @@ -138,6 +138,8 @@ Explain the logic in @auth (fuzzy matches auth.js, AuthService.ts, etc.) What's in @src/components/ (include a trailing slash for folders) +To @-mention files or folders from the Explorer, right-click them and select **Claude Code: Add to Chat**. Requires Claude Code v2.1.327 or later. + ### Read specific pages of a PDF For large PDFs, you can ask Claude to read specific pages instead of the whole file. Ask for a single page, a range like pages 1-10, or an open-ended range like page 3 onward. Reading specific pages requires [poppler-utils](</docs/en/tools-reference#read-tool-behavior>) on the machine where Claude Code runs. @@ -642,6 +644,17 @@ On a third-party provider, the extension doesn’t offer features that require a claude.ai account, such as plan usage bars, [voice dictation](</docs/en/voice-dictation>), and the Web tab for cloud sessions. For what the Account & usage dialog shows on these sign-ins, see Check account and usage. A claude.ai sign-in left over from an earlier `/login` stays unused: the extension doesn’t send it with any request. +## Sign in to a Claude apps gateway + +Once your machine’s settings [name the gateway](</docs/en/claude-apps-gateway#set-the-gateway-url>), you can sign in to a [Claude apps gateway](</docs/en/claude-apps-gateway>) from the Claude Code panel. Requires Claude Code v2.1.316 or later. + + 1. If the panel opens on a chat, type `/` in the prompt box and select **Sign in to Cloud gateway**. If that isn’t listed, select **Switch account**. + 2. On the sign-in screen, click **Cloud gateway**. + 3. Compare the gateway URL and any certificate fingerprint you’re shown with what your administrator published. If either differs, click **Cancel sign-in** and tell your administrator. Otherwise, click **Sign in** for the URL and **Yes, trust this gateway** for the fingerprint. + 4. On the page that opens in your browser, check that the code matches the one in the panel. If it does, continue and sign in with your work account. If it doesn’t, close the page and tell your administrator. + +If the screen says `Login is managed by your organization and must be completed in the terminal.`, update the extension. To sign in without updating, [install the CLI](</docs/en/setup>), click **Run`claude` in terminal**, and run `/login` there. + ## Use a screen reader The extension’s chat panel works with screen readers. You don’t need to turn anything on: the extension announces conversation activity for every user, with no visual change. This is separate from the CLI’s opt-in [screen reader mode](</docs/en/accessibility>), which adapts the terminal interface. Screen reader support in the chat panel requires Claude Code v2.1.236 or later. During a conversation, the extension announces: @@ -733,7 +746,7 @@ * **Auth token** : each extension activation generates a fresh random auth token and writes it to a lock file at `~/.claude/ide/<port>.lock`. The CLI must present the token as the `X-Claude-Code-Ide-Authorization` header to connect. * **Lock file permissions** : 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, such as opening diffs, reading selections, and saving files. They are filtered out before the tool list reaches Claude. +**Tools exposed to the model.** Only two of the server’s tools are visible to the model. The CLI filters out the rest before the tool list reaches Claude. Tool name (as seen by hooks)| What it does| Read-only ---|---|--- @@ -769,6 +782,7 @@ ---|--- `API Error: 403 Request not allowed` after you sign in| [403 Forbidden after login](</docs/en/troubleshoot-install#403-forbidden-after-login>) You’re asked to sign in again after you already signed in| [Not logged in or token expired](</docs/en/troubleshoot-install#not-logged-in-or-token-expired>) +`Login is managed by your organization and must be completed in the terminal.`| Sign in to a Claude apps gateway Cloud provider credentials work in your terminal but not in the extension| [Bedrock, Agent Platform, or Foundry credentials not loading](</docs/en/troubleshoot-install#bedrock-agent-platform-or-foundry-credentials-not-loading>) `SSL certificate verification failed` or `Self-signed certificate detected`| [SSL certificate errors](</docs/en/errors#ssl-certificate-errors>) `Dictation error: WebSocket error:` followed by a certificate error such as `unable to get local issuer certificate`, or `Remote server is not connected` on the Web tab| Dictation or the Web tab fails behind a TLS-inspecting proxy
modified Run parallel sessions with worktrees View current →
--- a/worktrees.md +++ b/worktrees.md @@ -286,7 +286,7 @@ * **Says`it cannot be resumed or re-entered`**: nothing in this session vouches for the worktree from where you launched. Recreate it; the directory and its work remain on disk for manual recovery, and when the worktree has a parent checkout, resuming from there also works. * **Says`it contains the protected checkout`**: the refused directory is a parent of your main checkout, such as your home directory. Don’t delete it. Change the worktree path, such as the path your `WorktreeCreate` hook returns or the `EnterWorktree` target, so the worktree doesn’t contain the checkout. * **Says`the protected checkout <path> has a .git entry that could not be examined` or `has git metadata that could not be resolved`**: the problem is the main checkout’s git metadata, not the worktree’s. Don’t delete the worktree, and ignore the message’s trailing advice to recreate it, which doesn’t apply to these two endings. Repair the main checkout, for example a permissions problem or a git `dubious ownership` refusal on its `.git`, and retry. Before v2.1.302, with git 2.56 or later, the `could not be resolved` ending also appeared when the `<path>` after `the protected checkout` held a stray `.git` file. Stray here means the path on that file’s `gitdir:` line doesn’t lead to a valid git repository. To recover, [update Claude Code](</docs/en/setup#update-claude-code>) and retry. When that `gitdir:` path no longer exists, you can also delete the `.git` file and retry. - * **Says`its recorded path has a network spelling`**: Claude Code never resumes into a worktree at a network path. Recreate the worktree at a local path. + * **Says`its recorded path`**: if you can’t open a folder on that path, restore your access to it. Otherwise recreate the worktree at a local path. Claude Code doesn’t resume into a worktree at a network path. * **Any other ending** : the message names the problem and its fix, such as removing a `core.worktree` redirect or recreating the worktree; follow it. Before deleting a directory whose message says its git identity could not be verified, address the named cause first, for example a symbolic link in the worktree’s path or git itself failing to run, since the directory may be healthy. When you do recreate, salvage any changes you need from the old directory first; it stays on disk. ### The session resumes outside its worktree