Changes on
102 changes detected
--- a/accessibility.md
+++ b/accessibility.md
@@ -12,7 +12,7 @@
* For sessions started from one shell: set the `CLAUDE_AX_SCREEN_READER` environment variable to `1`. In Bash or Zsh, run `export CLAUDE_AX_SCREEN_READER=1`. In PowerShell, run `$env:CLAUDE_AX_SCREEN_READER = "1"`. Add that line to your shell profile to keep it for future shells.
* For every session on the machine: add `"axScreenReader": true` to your user [settings file](</docs/en/settings>). The setting applies in any terminal, including the VS Code integrated terminal.
-If you combine methods, Claude Code applies the [`--ax-screen-reader`](</docs/en/cli-reference#cli-flags>) flag over the [`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars#variables>) environment variable, and the variable over the [`axScreenReader`](</docs/en/settings#available-settings>) setting. If you use Claude Code over SSH, set the environment variable or setting on the remote machine where Claude Code runs. The first line Claude Code prints confirms the mode: `[Screen Reader Mode: on via flag]`, `[Screen Reader Mode: on via env]`, or `[Screen Reader Mode: on via settings]`.
+If you combine methods, Claude Code applies the [`--ax-screen-reader`](</docs/en/cli-reference#cli-flags>) flag over the [`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars#variables>) environment variable, and the variable over the [`axScreenReader`](</docs/en/settings-reference#axscreenreader>) setting. If you use Claude Code over SSH, set the environment variable or setting on the remote machine where Claude Code runs. The first line Claude Code prints confirms the mode: `[Screen Reader Mode: on via flag]`, `[Screen Reader Mode: on via env]`, or `[Screen Reader Mode: on via settings]`.
##
@@ -34,13 +34,13 @@
---|---|---
[`--ax-screen-reader`](</docs/en/cli-reference#cli-flags>)| Flag| Screen reader mode for one session.
[`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars#variables>)| Environment variable| Screen reader mode for sessions started from the shell where you set it.
-[`axScreenReader`](</docs/en/settings#available-settings>)| Setting| Screen reader mode for every session when `true`.
+[`axScreenReader`](</docs/en/settings-reference#axscreenreader>)| Setting| Screen reader mode for every session when `true`.
[`CLAUDE_AX_STARTUP_QUIET_MS`](</docs/en/env-vars#variables>)| Environment variable| How long Claude Code waits after the confirmation line before it draws the first prompt in screen reader mode. Requires Claude Code v2.1.217 or later.
[`CLAUDE_AX_PREPARK_MS`](</docs/en/env-vars#variables>)| Environment variable| How long Claude Code waits, with the cursor at the start of the line, before it writes a new or changed line in screen reader mode. Requires Claude Code v2.1.233 or later.
[`CLAUDE_CODE_ACCESSIBILITY`](</docs/en/env-vars#variables>)| Environment variable| A terminal cursor that stays visible for screen magnifiers such as macOS Zoom when you set it to `1`. The cursor follows the input caret and, on Claude Code v2.1.218 or later, the highlighted row in menus and panels such as `/config` and `/plugin`.
-[`prefersReducedMotion`](</docs/en/settings#available-settings>)| Setting| Reduced or no spinners, shimmer, and other animations when `true`.
-[`theme`](</docs/en/settings#available-settings>)| Setting| The interface colors, including the colorblind-friendly `dark-daltonized` and `light-daltonized` themes. You can also pick one with [`/theme`](</docs/en/commands#all-commands>).
-[`preferredNotifChannel`](</docs/en/settings#available-settings>)| Setting| With the value `"terminal_bell"`, a terminal bell outside screen reader mode when Claude is waiting on you.
+[`prefersReducedMotion`](</docs/en/settings-reference#prefersreducedmotion>)| Setting| Reduced or no spinners, shimmer, and other animations when `true`.
+[`theme`](</docs/en/settings-reference#theme>)| Setting| The interface colors, including the colorblind-friendly `dark-daltonized` and `light-daltonized` themes. You can also pick one with [`/theme`](</docs/en/commands#all-commands>).
+[`preferredNotifChannel`](</docs/en/settings-reference#preferrednotifchannel>)| Setting| With the value `"terminal_bell"`, a terminal bell outside screen reader mode when Claude is waiting on you.
##
@@ -55,7 +55,7 @@
* No redraws of content that hasn’t changed. Progress spinners render as static text
* Tables in Claude’s replies read as `Header: value` sentences instead of a box-character grid
-Claude Code leaves everything it prints in your terminal’s scrollback, so you can re-read earlier turns with your screen reader’s review commands or your terminal’s search. Claude Code ignores the [`tui` setting](</docs/en/settings#available-settings>) in screen reader mode. Apart from the attached background sessions listed under Known limitations, it prints scrolling text instead of [fullscreen rendering](</docs/en/fullscreen>). Claude Code also waits at two points so your screen reader can keep up:
+Claude Code leaves everything it prints in your terminal’s scrollback, so you can re-read earlier turns with your screen reader’s review commands or your terminal’s search. Claude Code ignores the [`tui` setting](</docs/en/settings-reference#tui>) in screen reader mode. Apart from the attached background sessions listed under Known limitations, it prints scrolling text instead of [fullscreen rendering](</docs/en/fullscreen>). Claude Code also waits at two points so your screen reader can keep up:
* After Claude Code prints the confirmation line, it waits 3 seconds before it draws the prompt, so your screen reader can finish the line. Press any key to end the wait. To change the length of the wait, set [`CLAUDE_AX_STARTUP_QUIET_MS`](</docs/en/env-vars#variables>).
* Before Claude Code writes a new or changed line, such as a hint or more of Claude’s reply, it moves the cursor to the start of the line and waits 50 milliseconds. Your screen reader then reads the line from its first character. Characters you type or delete at the end of the input line appear immediately. To change the length of the wait, set [`CLAUDE_AX_PREPARK_MS`](</docs/en/env-vars#variables>).
@@ -122,7 +122,7 @@
* A prompt or dialog needs your answer, such as a permission prompt
* A tool that ran longer than 5 seconds finishes
-The bell is your terminal’s standard alert. To silence it, change the bell setting in your terminal application. Outside screen reader mode, set [`preferredNotifChannel`](</docs/en/settings#available-settings>) to `"terminal_bell"` to get a [similar bell](</docs/en/terminal-config#get-a-terminal-bell-or-notification>) when Claude is waiting on you.
+The bell is your terminal’s standard alert. To silence it, change the bell setting in your terminal application. Outside screen reader mode, set [`preferredNotifChannel`](</docs/en/settings-reference#preferrednotifchannel>) to `"terminal_bell"` to get a [similar bell](</docs/en/terminal-config#get-a-terminal-bell-or-notification>) when Claude is waiting on you.
##
--- a/admin-setup.md
+++ b/admin-setup.md
@@ -5,7 +5,7 @@
Decision| What you’re choosing| Reference
---|---|---
Choose your API provider| Where Claude Code authenticates and how it’s billed| [Authentication](</docs/en/authentication>), [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>)
-Decide how settings reach devices| How managed policy reaches developer machines| [Server-managed settings](</docs/en/server-managed-settings>), [Settings files](</docs/en/settings#settings-files>)
+Decide how settings reach devices| How managed policy reaches developer machines| [Server-managed settings](</docs/en/server-managed-settings>), [Delivery mechanisms](</docs/en/managed-settings#delivery-mechanisms>)
Decide what to enforce| Which tools, commands, and integrations are allowed| [Permissions](</docs/en/permissions>), [Sandboxing](</docs/en/sandboxing>)
Set up usage visibility| How you track spend and adoption| [Analytics](</docs/en/analytics>), [Monitoring](</docs/en/monitoring-usage>), [Costs](</docs/en/costs>)
Review data handling| Data retention and compliance posture| [Data usage](</docs/en/data-usage>), [Security](</docs/en/security>)
@@ -34,12 +34,7 @@
Decide how settings reach devices
-Managed settings define organization policy. Claude Code checks the four sources in the table below in priority order and applies the first one that returns a non-empty configuration, with two exceptions:
-
- * Claude Code honors a small set of [cross-source lock keys](</docs/en/settings#precedence-within-the-managed-tier>), such as the sandbox allowlist locks, when any admin-controlled source sets them.
- * Claude Code [merges the `env` block per key across the admin-controlled sources](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>), apart from the telemetry-unit and credential-paired routing exceptions covered there. Only admin-controlled sources contribute to the merge, developer-writable settings can’t, and [`CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION=1`](</docs/en/env-vars>) restores the winner-only composition. Requires Claude Code v2.1.223 or later.
-
-When an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), the helper’s output is the only managed configuration Claude Code reads: the lock-key checks read it alone, and no per-key `env` merge happens.
+Managed settings define organization policy. Claude Code checks the four sources in the table below in priority order and applies the first one that delivers at least one policy key. [Which managed source Claude Code uses](</docs/en/managed-settings#precedence-within-the-managed-tier>) covers what still applies from the other sources and what a policy helper changes; the table is the decision map.
Mechanism| Delivery| Priority| Platforms
---|---|---|---
@@ -51,7 +46,7 @@
Windows: `C:\Program Files\ClaudeCode\managed-settings.json`| Medium| All
Windows user registry| `HKCU\SOFTWARE\Policies\ClaudeCode`| Lowest| Windows only
-Server-managed settings reach devices at authentication time and refresh hourly during active sessions, with no endpoint infrastructure. Delivery through the claude.ai admin console requires a Claude for Teams or Enterprise plan. Deployments on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry can get the same remote delivery by running a [Claude apps gateway](</docs/en/claude-apps-gateway>), or use one of the file-based or OS-level mechanisms instead. If your organization mixes providers, configure [server-managed settings](</docs/en/server-managed-settings>) for claude.ai users plus a [file-based or plist/registry fallback](</docs/en/settings#settings-files>) so other users still receive managed policy. The plist and HKLM registry locations work with any provider and resist tampering because they require admin privileges to write. The Windows user registry at HKCU is writable without elevation, so treat it as a convenience default rather than an enforcement channel. By default, WSL reads only the Linux file path at `/etc/claude-code`. To extend your Windows registry and `C:\Program Files\ClaudeCode` policy to WSL on the same machine, set [`wslInheritsWindowsSettings: true`](</docs/en/settings#available-settings>) in either of those admin-only Windows sources. Whichever mechanism you choose, managed values take precedence over user and project settings, apart from a few security-sensitive [exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>). Array settings such as `permissions.allow` and `permissions.deny` merge entries from all sources, so developers can extend managed lists but not remove from them. For `fallbackModel` and `availableModels`, the managed value replaces lower layers rather than merging.
+Server-managed settings reach devices at authentication time and refresh hourly during active sessions, with no endpoint infrastructure. Delivery through the claude.ai admin console requires a Claude for Teams or Enterprise plan. Deployments on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry can get the same remote delivery by running a [Claude apps gateway](</docs/en/claude-apps-gateway>), or use one of the file-based or OS-level mechanisms instead. If your organization mixes providers, configure [server-managed settings](</docs/en/server-managed-settings>) for claude.ai users plus a [file-based or plist/registry fallback](</docs/en/managed-settings#delivery-mechanisms>) so other users still receive managed policy. The plist and HKLM registry locations work with any provider and resist tampering because they require admin privileges to write. The Windows user registry at HKCU is writable without elevation, so treat it as a convenience default rather than an enforcement channel. By default, WSL reads only the Linux file path at `/etc/claude-code`. To extend your Windows registry and `C:\Program Files\ClaudeCode` policy to WSL on the same machine, set [`wslInheritsWindowsSettings: true`](</docs/en/settings-reference#wslinheritswindowssettings>) in either of those admin-only Windows sources. Whichever mechanism you choose, managed values take precedence over user and project settings, apart from a few security-sensitive [exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>). Array settings such as `permissions.allow` and `permissions.deny` merge entries from all sources, so developers can extend managed lists but not remove from them. For `fallbackModel` and `availableModels`, the managed value replaces lower layers rather than merging.
###
@@ -83,14 +78,15 @@
[Managed policy CLAUDE.md](</docs/en/memory#deploy-organization-wide-claude-md>)| Org-wide instructions loaded in every session, can’t be excluded| File at the managed policy path
[MCP server control](</docs/en/managed-mcp>)| Restrict which MCP servers users can add or connect to, or deploy a fixed set| `allowedMcpServers`, `deniedMcpServers`, `allowManagedMcpServersOnly`, or a deployed `managed-mcp.json` file
[Plugin marketplace control](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)| Restrict which marketplace sources users can add and install from, reject the CLI flags that sideload plugins, agents, and MCP servers for a single run, block [`command` plugin sources](</docs/en/plugin-marketplaces#command-sources>), and allowlist which marketplaces’ plugins can be suggested| `strictKnownMarketplaces`, `blockedMarketplaces`, `disableSideloadFlags`, `disableCommandPluginSources`, `pluginSuggestionMarketplaces`
-[Customization lockdown](</docs/en/settings#strictpluginonlycustomization>)| Block skills, agents, hooks, and MCP servers from user and project sources, so they can only come from plugins or managed settings| `strictPluginOnlyCustomization`
-[Hook restrictions](</docs/en/settings#hook-configuration>)| Restrict which hooks run and restrict HTTP hook URLs; see [Hook configuration](</docs/en/settings#hook-configuration>) for the full effect list| `allowManagedHooksOnly`, `allowedHttpHookUrls`
-[Login enforcement](</docs/en/settings#available-settings>)| Restrict login to a specific method or Anthropic organization. The method restriction applies across the terminal, VS Code extension, Agent SDK, `claude setup-token`, and `/install-github-app`; Claude Code verifies the organization for claude.ai account logins in the terminal, VS Code extension, and Agent SDK, and doesn’t check it for Claude Console logins or for [gateway](</docs/en/claude-apps-gateway>) sign-in. Before v2.1.212, only terminal logins applied either key. When set, sessions authenticated by `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` are blocked at startup; cloud provider sessions aren’t affected| `forceLoginMethod`, `forceLoginOrgUUID`
+[Customization lockdown](</docs/en/settings-reference#strictpluginonlycustomization>)| Block skills, agents, hooks, and MCP servers from user and project sources, so they can only come from plugins or managed settings| `strictPluginOnlyCustomization`
+[Hook restrictions](</docs/en/settings-reference#allowmanagedhooksonly>)| Restrict which hooks run and restrict HTTP hook URLs; see [what runs under `allowManagedHooksOnly`](</docs/en/settings-reference#what-runs-under-allowmanagedhooksonly>) for the full effect list| `allowManagedHooksOnly`, `allowedHttpHookUrls`
+[Login enforcement](</docs/en/settings-reference#forceloginmethod>)| Restrict login to a specific method or Anthropic organization. The method restriction applies across the VS Code extension, Agent SDK, `claude setup-token`, and `/install-github-app`, and the terminal’s interactive login screen, reached by `/login` or first-run onboarding, pre-selects the method without enforcing it; Claude Code verifies the organization for claude.ai account logins in the terminal, VS Code extension, and Agent SDK, and doesn’t check it for Claude Console logins or for [gateway](</docs/en/claude-apps-gateway>) sign-in. Before v2.1.212, only terminal logins applied either key. When set, sessions authenticated by `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` are blocked at startup; cloud provider sessions aren’t affected| `forceLoginMethod`, `forceLoginOrgUUID`
[Disable agent view](</docs/en/agent-view#how-background-sessions-are-hosted>)| Turn off `claude agents`, `--bg`, `/background`, and the on-demand supervisor| `disableAgentView`
[Configure the corporate launcher](</docs/en/corporate-launcher>)| Prefix the [background-agent supervisor](</docs/en/agent-view#how-background-sessions-are-hosted>), its workers, and the [other covered background processes](</docs/en/corporate-launcher#what-the-launcher-covers>) with a required corporate launcher instead of turning agent view off| `processWrapper`
[Model restrictions](</docs/en/model-config#restrict-model-selection>)| `availableModels` filters which models appear in the picker. Adding `enforceAvailableModels` also constrains the auto-selected default model. See [surface coverage](</docs/en/model-config#surface-coverage>) for how this setting reaches the CLI, web, and IDE| `availableModels`, `enforceAvailableModels`
-[Version floor](</docs/en/settings>)| Prevent auto-update from installing below an org-wide minimum| `minimumVersion`
-[Required version range](</docs/en/settings>)| Refuse to start at all when the running version is outside an org-approved range. Stronger than `minimumVersion`, which only blocks downgrades| `requiredMinimumVersion`, `requiredMaximumVersion`
+[Version floor](</docs/en/settings-reference#minimumversion>)| Prevent auto-update from installing below an org-wide minimum| `minimumVersion`
+[Required version range](</docs/en/settings-reference#requiredminimumversion>)| Refuse to start at all when the running version is outside an org-approved range. Stronger than `minimumVersion`, which only blocks downgrades| `requiredMinimumVersion`, `requiredMaximumVersion`
+[Telemetry opt-out](</docs/en/data-usage#telemetry-services>)| Turn off Anthropic-bound usage metrics, error reports, and surveys on every device| `env` with `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` set to `1`; the linked section lists the per-category variables
Organizations whose members authenticate through claude.ai or the Anthropic API can also govern models without deploying settings: [organization model restrictions](</docs/en/model-config#organization-model-restrictions>) disable individual models, an [organization default model](</docs/en/model-config#organization-default-model>) sets which model new sessions start on, and [organization effort limits](</docs/en/model-config#organization-effort-limits>) cap effort levels per role. All three controls require a Claude Enterprise plan. Model restrictions and effort limits are enforced server-side; the default model is a starting point that users can change, unless the organization enforces it. Enforcement is available to a limited set of organizations; ask your Anthropic account team about availability. None of these controls reach sessions on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or [Claude Platform on AWS](</docs/en/claude-platform-on-aws>); on those providers, use `availableModels` above for restrictions and the `model` key in managed settings for a default. [Claude Code on the web](</docs/en/claude-code-on-the-web>) has its own admin surface: on the Cloud environments page in admin settings, owners and admins create [organization-shared environments](</docs/en/cloud-environments#organization-shared-environments>) that set the [network access level](</docs/en/cloud-environments#network-access>), environment variables, and setup script for members’ cloud sessions. Owners and admins choose the organization’s default environment separately, at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>). Permission rules and sandboxing cover different layers. Denying WebFetch blocks Claude’s fetch tool, but if Bash is allowed, `curl` and `wget` can still reach any URL. Sandboxing closes that gap with a network domain allowlist enforced at the OS level. For the threat model these controls defend against, see [Security](</docs/en/security>).
@@ -133,7 +129,7 @@
Verify and onboard
-After configuring managed settings, have a developer run `/status` inside Claude Code. On the **Status** tab, the `Setting sources` line shows `Enterprise managed settings` followed by the source in parentheses, one of `(remote)`, `(plist)`, `(HKLM)`, `(HKCU)`, or `(file)`. See [Verify active settings](</docs/en/settings#verify-active-settings>). Share these resources to help developers get started:
+After configuring managed settings, have a developer run `/status` inside Claude Code. On the **Status** tab, the `Setting sources` line shows `Enterprise managed settings` followed by the source that won in parentheses; [Verify enforcement](</docs/en/managed-settings#verify-enforcement>) lists the labels. Share these resources to help developers get started:
* [Quickstart](</docs/en/quickstart>): first-session walkthrough from install to working with a project
* [Common workflows](</docs/en/common-workflows>): patterns for everyday tasks like code review, refactoring, and debugging
@@ -156,7 +152,8 @@
With provider and delivery mechanism chosen, move on to detailed configuration:
* [Server-managed settings](</docs/en/server-managed-settings>): deliver managed policy from the Claude admin console
- * [Settings reference](</docs/en/settings>): every setting key, file location, and precedence rule
+ * [Settings reference](</docs/en/settings-reference>): every setting key, with where it goes and an example
+ * [Which value Claude Code uses](</docs/en/settings#which-value-claude-code-uses>): the precedence rules across managed, project, local, and user settings
* [Monorepos and large repos](</docs/en/large-codebases>): per-directory configuration patterns for organizations deploying into a monorepo
* [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>): provider-specific deployment
* [Claude Enterprise Administrator Guide](<https://claude.com/resources/tutorials/claude-enterprise-administrator-guide>): SSO, SCIM, seat management, and rollout playbook
--- a/agent-loop.md
+++ b/agent-loop.md
@@ -227,9 +227,9 @@
`"default"`| Tools not covered by allow rules trigger your `canUseTool` callback; no callback means deny| Interactive applications with a custom approval callback
`"acceptEdits"`| Auto-approves file edits and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.); other Bash commands follow default rules| You trust Claude’s edits and want faster iteration, such as during prototyping or when working in an isolated directory
`"plan"`| Claude explores and plans without editing your source files; file edits are never auto-approved and prompt through your `canUseTool` callback| You want Claude to propose changes without executing them, such as during code review or when you need to approve changes before they’re made
-`"dontAsk"`| Never prompts. Tools pre-approved by [permission rules](</docs/en/settings#permission-settings>) run; everything else is denied. `AskUserQuestion`, connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) are denied even if you’ve allowed them| You want a fixed, explicit tool surface for a headless agent and prefer a hard deny over silent reliance on `canUseTool` being absent
+`"dontAsk"`| Never prompts. Tools pre-approved by [permission rules](</docs/en/settings-reference#permission-settings>) run; everything else is denied. `AskUserQuestion`, connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>) are denied even if you’ve allowed them| You want a fixed, explicit tool surface for a headless agent and prefer a hard deny over silent reliance on `canUseTool` being absent
`"auto"`| Uses a model classifier to approve or deny permission prompts. See [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) for availability and behavior| Autonomous agents that still want safety guardrails on tool use
-`"bypassPermissions"`| Runs all allowed tools without asking, except tools matched by an explicit [`ask` rule](</docs/en/settings#permission-settings>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and tools that require user interaction. The [cross-session messaging safeguards](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) still apply. See [How permissions are evaluated](</docs/en/agent-sdk/permissions#how-permissions-are-evaluated>) for the precedence order. In the TypeScript SDK, also requires `allowDangerouslySkipPermissions: true` in `options`. Can’t be used when running as root on Unix. Use only in isolated environments where the agent’s actions can’t affect systems you care about| CI, containers, or other isolated environments
+`"bypassPermissions"`| Runs all allowed tools without asking, except tools matched by an explicit [`ask` rule](</docs/en/settings-reference#permission-settings>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), and tools that require user interaction. The [cross-session messaging safeguards](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) still apply. See [How permissions are evaluated](</docs/en/agent-sdk/permissions#how-permissions-are-evaluated>) for the precedence order. In the TypeScript SDK, also requires `allowDangerouslySkipPermissions: true` in `options`. Can’t be used when running as root on Unix. Use only in isolated environments where the agent’s actions can’t affect systems you care about| CI, containers, or other isolated environments
For interactive applications, use `"default"` with a tool approval callback to surface approval prompts. For autonomous agents on a dev machine, `"acceptEdits"` auto-approves file edits and common filesystem commands (`mkdir`, `touch`, `mv`, `cp`, etc.) while still gating other `Bash` commands behind allow rules. Reserve `"bypassPermissions"` for CI, containers, or other isolated environments. See [Permissions](</docs/en/agent-sdk/permissions>) for full details.
--- a/agent-teams.md
+++ b/agent-teams.md
@@ -1,6 +1,6 @@
Agent teams are experimental and disabled by default. Enable them by setting `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in your [settings.json](</docs/en/settings>) or environment. Without that variable, no team is set up at session start, no team directories are written, and Claude does not spawn or propose teammates. Agent teams have known limitations around session resumption, task coordination, and shutdown behavior.
-Agent teams let you coordinate multiple Claude Code instances working together. One session acts as the team lead, coordinating work, assigning tasks, and synthesizing results. Teammates work independently, each in its own context window, and communicate directly with each other. Unlike [subagents](</docs/en/sub-agents>), which run within a single session and can only report back to the main agent, you can also interact with individual teammates directly without going through the lead.
+Agent teams let you coordinate multiple Claude Code instances working together. One session acts as the team lead, coordinating work, assigning tasks, and synthesizing results. Teammates work independently, each in its own context window, and communicate directly with each other. Unlike [subagents](</docs/en/sub-agents>), which run within a single session, you can also interact with individual teammates directly without going through the lead.
This page describes agent teams as of v2.1.178. With `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` set, spawning a teammate no longer needs a setup step, and cleanup happens automatically when the session exits. Before v2.1.178, you asked Claude to create and name a team first, and Claude used the `TeamCreate` and `TeamDelete` tools to set it up and remove it. Both tools no longer exist. The `team_name` input on the Agent tool is accepted but ignored, and the `team_name` field in `TaskCreated`, `TaskCompleted`, and `TeammateIdle` [hook payloads](</docs/en/hooks#taskcreated>) carries the session-derived name and is deprecated.
@@ -25,14 +25,14 @@
Compare with subagents
-Both agent teams and [subagents](</docs/en/sub-agents>) let you parallelize work, but they operate differently. Choose based on whether your workers need to communicate with each other. For separate sessions that pass messages to each other without a team, see [cross-session messaging](</docs/en/cross-session-messaging>).
-
-Subagents only report results back to the main agent and never talk to each other. In agent teams, teammates share a task list, claim work, and communicate directly with each other.
+Both agent teams and [subagents](</docs/en/sub-agents>) let you parallelize work, but they operate differently. For separate sessions that pass messages to each other without a team, see [cross-session messaging](</docs/en/cross-session-messaging>).
+
+Subagents report results back to the main agent. In agent teams, teammates share a task list, claim work, and communicate directly with each other.
| Subagents| Agent teams
---|---|---
**Context**| Own context window; results return to the caller| Own context window; fully independent
-**Communication**| Report results back to the main agent only| Teammates message each other directly
+**Communication**| Return a result to the caller. Subagents that Claude named when it spawned them can also [message each other](</docs/en/sub-agents#what-loads-at-startup>)| Teammates message each other directly
**Coordination**| Main agent manages all work| Self-coordination through messages, plus a shared task list for [agents that have the Task tools](</docs/en/tools-reference#task-tool-availability>)
**Best for**| Focused tasks where only the result matters| Complex work requiring discussion and collaboration
**Token cost**| Lower: results summarized back to main context| Higher: each teammate is a separate Claude instance
@@ -98,7 +98,7 @@
`tmux` has known limitations on certain operating systems and traditionally works best on macOS. Using `tmux -CC` in iTerm2 is the suggested entrypoint into `tmux`.
-The default is `"in-process"`. Before v2.1.179 the default was `"auto"`, so upgraded sessions that previously opened split panes now stay in one terminal unless you set the mode explicitly. Set `"auto"` to enable split panes when you’re already running inside a tmux session, or when your terminal is iTerm2 with the `it2` CLI installed, falling back to in-process otherwise. The `"tmux"` setting enables split-pane mode and auto-detects whether to use tmux or iTerm2 based on your terminal. As of v2.1.186, set `"iterm2"` to use iTerm2 native split panes explicitly. This mode requires the [`it2` CLI](<https://github.com/mkusaka/it2>) and shows an error with the install command if `it2` is missing. The setup prompt that offers to install `it2` or switch to tmux appears under `"auto"` or `"tmux"` when your terminal is iTerm2 and tmux is available as a fallback. To override the default, set [`teammateMode`](</docs/en/settings#available-settings>) in `~/.claude/settings.json`:
+The default is `"in-process"`. Before v2.1.179 the default was `"auto"`, so upgraded sessions that previously opened split panes now stay in one terminal unless you set the mode explicitly. Set `"auto"` to enable split panes when you’re already running inside a tmux session, or when your terminal is iTerm2 with the `it2` CLI installed, falling back to in-process otherwise. The `"tmux"` setting enables split-pane mode and auto-detects whether to use tmux or iTerm2 based on your terminal. As of v2.1.186, set `"iterm2"` to use iTerm2 native split panes explicitly. This mode requires the [`it2` CLI](<https://github.com/mkusaka/it2>) and shows an error with the install command if `it2` is missing. The setup prompt that offers to install `it2` or switch to tmux appears under `"auto"` or `"tmux"` when your terminal is iTerm2 and tmux is available as a fallback. To override the default, set [`teammateMode`](</docs/en/settings-reference#teammatemode>) in `~/.claude/settings.json`:
{
"teammateMode": "auto"
@@ -234,7 +234,7 @@
* **Team config** : `~/.claude/teams/{team-name}/config.json`
* **Task list** : `~/.claude/tasks/{team-name}/`
-Claude Code generates both of these automatically at session startup and updates them as teammates join, go idle, or leave. The team config directory is removed when the session ends. The task list directory persists locally and is never uploaded, so resumed sessions keep their tasks. Retention is governed by the same [`cleanupPeriodDays`](</docs/en/settings#available-settings>) you already control for session transcripts, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>). The team config holds runtime state such as session IDs and tmux pane IDs, so don’t edit it by hand or pre-author it: your changes are overwritten on the next state update. To define reusable teammate roles, use subagent definitions instead. The team config contains a `members` array with each member’s name and agent ID. The lead’s entry always carries the agent type `team-lead`. A teammate’s entry carries whatever agent type the lead named when spawning it, whether a [built-in type](</docs/en/sub-agents#built-in-subagents>) or a subagent definition, and omits the field when the lead named none. Teammates can read this file to discover other team members. There is no project-level equivalent of the team config. A file like `.claude/teams/teams.json` in your project directory is not recognized as configuration; Claude treats it as an ordinary file.
+Claude Code generates both of these automatically at session startup and updates them as teammates join, go idle, or leave. The team config directory is removed when the session ends. The task list directory persists locally and is never uploaded, so resumed sessions keep their tasks. Retention is governed by the same [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) you already control for session transcripts, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>). The team config holds runtime state such as session IDs and tmux pane IDs, so don’t edit it by hand or pre-author it: your changes are overwritten on the next state update. To define reusable teammate roles, use subagent definitions instead. The team config contains a `members` array with each member’s name and agent ID. The lead’s entry always carries the agent type `team-lead`. A teammate’s entry carries whatever agent type the lead named when spawning it, whether a [built-in type](</docs/en/sub-agents#built-in-subagents>) or a subagent definition, and omits the field when the lead named none. Teammates can read this file to discover other team members. There is no project-level equivalent of the team config. A file like `.claude/teams/teams.json` in your project directory is not recognized as configuration; Claude treats it as an ordinary file.
###
@@ -521,4 +521,3 @@
* **Lightweight delegation** : [subagents](</docs/en/sub-agents>) spawn helper agents for research or verification within your session, better for tasks that don’t need inter-agent coordination
* **Manual parallel sessions** : [Git worktrees](</docs/en/worktrees>) let you run multiple Claude Code sessions yourself without automated team coordination
- * **Compare approaches** : see the [subagent vs agent team](</docs/en/features-overview#compare-similar-features>) comparison for a side-by-side breakdown
Show diff (118 lines)
--- a/agent-view.md
+++ b/agent-view.md
@@ -18,7 +18,7 @@
claude agents
-If you haven’t yet accepted the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for the directory, Claude Code shows it before agent view opens, the same dialog `claude` shows. Accept to save trust for the workspace and continue. If you decline, Claude Code exits without opening agent view.Agent view opens with an input at the bottom and a table that fills in as sessions start. Press `Esc` at any time to return to your shell; if you opened agent view by backgrounding a session with `←`, `Esc` returns to that conversation instead. Your sessions keep running while you’re away and reappear the next time you open agent view.
+If you haven’t yet accepted the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for the directory, Claude Code shows it before agent view opens, the same dialog `claude` shows. Accept to save trust for the workspace and continue. If you decline, Claude Code exits without opening agent view.Agent view opens with an input at the bottom and a table that fills in as sessions start. Press `Esc` to return to your shell; if you opened agent view by backgrounding a session with `←`, `Esc` returns to that conversation instead. Your sessions keep running while you’re away and reappear the next time you open agent view.
2
@@ -44,7 +44,7 @@
This step needs a running session. If you followed the earlier steps you don’t have one open in this terminal, so open a regular `claude` session in another terminal and send it a message first.To move a session you already have open into agent view, run `/bg` inside it, or press `←` on an empty prompt to background it and open agent view in one step. In a fresh session with no messages yet, `/bg` asks you to send a message first, while `←` works right away. The session keeps running and appears as a row alongside the ones you dispatched.
-You can use `claude agents` as your primary entry point instead of `claude`: dispatch every task from agent view, attach when you want the full conversation, and press `←` to return to the table. Inside a regular `claude` session, the prompt footer’s `←` hint counts the background agents that are waiting on you, such as `← 2 agents`, and returns to `← for agents` when none need input. Counts above 99 show as `99+`. The count refreshes about every ten seconds while the terminal is focused and immediately when focus returns. It briefly changes color when it moves and when an agent completes, and when a background session finishes while none need your input it briefly shows the number completed, such as `← 2 done`. Both flashes are off when the [`prefersReducedMotion` setting](</docs/en/settings#available-settings>) is on, and the hint is hidden in [screen reader mode](</docs/en/accessibility>).
+You can use `claude agents` as your primary entry point instead of `claude`: dispatch every task from agent view, attach when you want the full conversation, and press `←` to return to the table. Inside a regular `claude` session, the prompt footer’s `←` hint counts the background agents that are waiting on you, such as `← 2 agents`, and returns to `← for agents` when none need input. Counts above 99 show as `99+`. The count refreshes about every ten seconds while the terminal is focused and immediately when focus returns. It briefly changes color when it moves and when an agent completes, and when a background session finishes while none need your input it briefly shows the number completed, such as `← 2 done`. Both flashes are off when the [`prefersReducedMotion` setting](</docs/en/settings-reference#prefersreducedmotion>) is on, and the hint is hidden in [screen reader mode](</docs/en/accessibility>).
##
@@ -101,7 +101,7 @@
`∙`| The process has exited. You can still peek, reply, or attach, and Claude restarts from where it left off
`✢`| A [`/loop`](</docs/en/scheduled-tasks>) session sleeping between iterations. The row shows its run count and a countdown
-The `#N` or `!N` label that can appear at the right edge of a row is a link to the session’s pull request or merge request, not part of the state icon. The terminal tab title shows the awaiting-input count while agent view is open: `2 awaiting input · claude agents` when sessions need input, or `claude agents` when none do. While agent view is open, Claude Code also sends a notification through your configured [terminal notification channel](</docs/en/terminal-config#get-a-terminal-bell-or-notification>) when a local background session starts needing your input, finishes, or fails. Sessions that run on a schedule, such as [`/loop`](</docs/en/scheduled-tasks>) sessions, notify only when they need your input. Notifications use the same [`preferredNotifChannel` setting](</docs/en/settings#available-settings>) as the rest of Claude Code and fire the [`Notification` hook](</docs/en/hooks#notification>) with the `agent_needs_input` or `agent_completed` type. Background sessions don’t need any terminal open to keep working. A separate supervisor process runs them, so you can close agent view, close your shell, or start a new interactive session and your dispatched work keeps going. Session state persists on disk through auto-updates and supervisor restarts. Sessions are also preserved when your machine sleeps. Their processes resume on wake and the supervisor reconnects to them instead of treating the time gap as idle. Shutting down still stops running sessions; see Sessions show as failed after shutdown for how to recover them. A session that was mid-response when the machine slept can come back unresponsive. When you open a session that has stopped responding, the supervisor restarts its process and the session continues the interrupted response from where it left off.
+The `#N` or `!N` label that can appear at the right edge of a row is a link to the session’s pull request or merge request, not part of the state icon. The terminal tab title shows the awaiting-input count while agent view is open: `2 awaiting input · claude agents` when sessions need input, or `claude agents` when none do. While agent view is open, Claude Code also sends a notification through your configured [terminal notification channel](</docs/en/terminal-config#get-a-terminal-bell-or-notification>) when a local background session starts needing your input, finishes, or fails. Sessions that run on a schedule, such as [`/loop`](</docs/en/scheduled-tasks>) sessions, notify only when they need your input. Notifications use the same [`preferredNotifChannel` setting](</docs/en/settings-reference#preferrednotifchannel>) as the rest of Claude Code and fire the [`Notification` hook](</docs/en/hooks#notification>) with the `agent_needs_input` or `agent_completed` type. Background sessions don’t need any terminal open to keep working. A separate supervisor process runs them, so you can close agent view, close your shell, or start a new interactive session and your dispatched work keeps going. Session state persists on disk through auto-updates and supervisor restarts. Sessions are also preserved when your machine sleeps. Their processes resume on wake and the supervisor reconnects to them instead of treating the time gap as idle. Shutting down still stops running sessions; see Sessions show as failed after shutdown for how to recover them. A session that was mid-response when the machine slept can come back unresponsive. When you open a session that has stopped responding, the supervisor restarts its process and the session continues the interrupted response from where it left off.
###
@@ -237,7 +237,7 @@
`Ctrl+J`| Insert a newline in the dispatch input
`Ctrl+X`| Stop the session; press again within two seconds to delete it
`Shift+↑` / `Shift+↓`| Reorder the selected session
-`Esc`| Close the peek panel, clear the input, or exit. When you opened agent view by backgrounding your session with `←`, the final `Esc` returns to that conversation instead of exiting
+`Esc`| Close the peek panel, clear the input, or exit. When you opened agent view by backgrounding your session with `←`, the final `Esc` returns to that conversation instead of exiting. With [vim editor mode](</docs/en/interactive-mode#vim-editor-mode>) on, pressing `Esc` in the input switches from INSERT to NORMAL mode and keeps your text, as in the main prompt
`Ctrl+C`| Clear the input; press twice to exit
`?`| Show all shortcuts
@@ -255,7 +255,7 @@
From agent view
-Type a prompt in the input at the bottom of agent view and press `Enter` to start a new background session. The session is named automatically from the prompt; rename it later with `Ctrl+R`. The automatic name is a short label written by a [Haiku-class model](</docs/en/model-config>). A name the session gets later also appears on its row, including the name Claude derives when you [accept a plan](</docs/en/permission-modes#review-and-approve-a-plan>) in that session. Paste an image into the prompt to include a screenshot or diagram with the task. Pasted text longer than 800 characters or more than two lines collapses to a `[Pasted text #N]` placeholder so the input stays on one line; the full text is sent when you dispatch. To review or edit the collapsed text before dispatching, paste the same text again and the placeholder expands back into the input. Prefix or mention parts of the prompt to control how the session starts:
+Type a prompt in the input at the bottom of agent view and press `Enter` to start a new background session. The session is named automatically from the prompt; rename it later with `Ctrl+R`. The automatic name is a short label written by a [Haiku-class model](</docs/en/model-config>). A name the session gets later also appears on its row, including the [generated title](</docs/en/sessions#name-your-sessions>) the session gets when you [accept a plan](</docs/en/permission-modes#review-and-approve-a-plan>) in that session. Paste an image into the prompt to include a screenshot or diagram with the task. Pasted text longer than 800 characters or more than two lines collapses to a `[Pasted text #N]` placeholder so the input stays on one line; the full text is sent when you dispatch. To review or edit the collapsed text before dispatching, paste the same text again and the placeholder expands back into the input. Prefix or mention parts of the prompt to control how the session starts:
Input| Effect
---|---
@@ -393,7 +393,7 @@
* The working directory isn’t a git repository and no [`WorktreeCreate` hook](</docs/en/hooks#worktreecreate>) is configured
* The write is outside the working directory
-To turn off worktree isolation for a repository where git worktrees are impractical, set [`worktree.bgIsolation`](</docs/en/settings#worktree-settings>) to `"none"`. Background sessions then edit your working copy directly without moving into a worktree first. Add the setting to the project’s `.claude/settings.json`:
+To turn off worktree isolation for a repository where git worktrees are impractical, set [`worktree.bgIsolation`](</docs/en/settings-reference#worktree-bgisolation>) to `"none"`. Background sessions then edit your working copy directly without moving into a worktree first. Add the setting to the project’s `.claude/settings.json`:
{
"worktree": {
@@ -436,7 +436,7 @@
Set the model
-The model name shown in the agent view header is the dispatch default. New sessions you start from the input use this model, which comes from the [`model` setting](</docs/en/settings#available-settings>) in your user settings. Set it by selecting a model in the [`/model` picker](</docs/en/model-config>), or edit the setting directly. To override the dispatch default for the whole agent view session, pass `--model` when opening agent view. See Permission mode, model, and effort. To change the dispatch default from inside agent view, type `/model` followed by a model name in the dispatch input and press `Enter`. The header updates to show that model with a `(session)` marker, and sessions you dispatch afterward use it. Type `/model default` to clear the override and return to the dispatch default. This override lasts for the rest of the current `claude agents` run and doesn’t write to your settings file. The following example dispatches one session on Opus and the next on Sonnet:
+The model name shown in the agent view header is the dispatch default. New sessions you start from the input use this model, which comes from the [`model` setting](</docs/en/settings-reference#model>) in your user settings. Set it by selecting a model in the [`/model` picker](</docs/en/model-config>), or edit the setting directly. To override the dispatch default for the whole agent view session, pass `--model` when opening agent view. See Permission mode, model, and effort. To change the dispatch default from inside agent view, type `/model` followed by a model name in the dispatch input and press `Enter`. The header updates to show that model with a `(session)` marker, and sessions you dispatch afterward use it. Type `/model default` to clear the override and return to the dispatch default. This override lasts for the rest of the current `claude agents` run and doesn’t write to your settings file. The following example dispatches one session on Opus and the next on Sonnet:
/model opus
refactor auth
@@ -463,7 +463,7 @@
Settings and provider
-A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there. This includes [`env` values](</docs/en/settings#available-settings>) in project settings, so an `ANTHROPIC_MODEL` or provider variable set there applies to background sessions in that directory. Cloud provider selection, such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, and `ANTHROPIC_DEFAULT_*_MODEL` aliases follow the shell that dispatched the session. If you export a [`CLAUDE_CODE_EXTRA_BODY`](</docs/en/env-vars>) request-body override in that shell, it reaches the session the same way. A gateway `ANTHROPIC_BASE_URL` exported in that shell can reach the session too; see the supervisor process for the conditions and for how background sessions source provider settings and credentials.
+A background session reads its [settings](</docs/en/settings>) from the directory it runs in, the same as if you had started `claude` there. This includes [`env` values](</docs/en/settings-reference#env>) in project settings, so an `ANTHROPIC_MODEL` or provider variable set there applies to background sessions in that directory. Cloud provider selection, such as `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX`, and `ANTHROPIC_DEFAULT_*_MODEL` aliases follow the shell that dispatched the session. If you export a [`CLAUDE_CODE_EXTRA_BODY`](</docs/en/env-vars>) request-body override in that shell, it reaches the session the same way. A gateway `ANTHROPIC_BASE_URL` exported in that shell can reach the session too; see the supervisor process for the conditions and for how background sessions source provider settings and credentials.
####
@@ -487,7 +487,7 @@
claude agents --permission-mode plan --model opus --effort high
-`--effort` here accepts the same values as the [top-level `--effort` flag](</docs/en/cli-reference#cli-flags>), including `ultracode`. `--agent` sets the [subagent](</docs/en/sub-agents>) used when a dispatch prompt doesn’t name one, either with `@name` or as the first word. It defaults to the [`agent` setting](</docs/en/settings#available-settings>) if one is set, otherwise the built-in catch-all `claude` agent. Naming a subagent in the dispatch input overrides both. `claude agents` also accepts `--dangerously-skip-permissions` as shorthand for `--permission-mode bypassPermissions`, and `--allow-dangerously-skip-permissions` to make `bypassPermissions` available in each dispatched session’s `Shift+Tab` cycle without starting in that mode. Both match the [top-level CLI flags](</docs/en/cli-reference>). The active defaults appear in the footer below the dispatch input. Claude Code refuses `claude --bg --permission-mode bypassPermissions` until you’ve accepted the bypass disclaimer by running `claude --dangerously-skip-permissions` once interactively, since that mode lets a session you aren’t watching act without approval. Passing `--dangerously-skip-permissions` or `--permission-mode bypassPermissions` to `claude agents` shows the same disclaimer when you haven’t accepted it before, and accepting applies `bypassPermissions` to the sessions you launch from the view. Passing `--allow-dangerously-skip-permissions` shows the same disclaimer too, and accepting makes `bypassPermissions` available in the `Shift+Tab` cycle of those sessions without starting them in it.
+`--effort` here accepts the same values as the [top-level `--effort` flag](</docs/en/cli-reference#cli-flags>), including `ultracode`. `--agent` sets the [subagent](</docs/en/sub-agents>) used when a dispatch prompt doesn’t name one, either with `@name` or as the first word. It defaults to the [`agent` setting](</docs/en/settings-reference#agent>) if one is set, otherwise the built-in catch-all `claude` agent. Naming a subagent in the dispatch input overrides both. `claude agents` also accepts `--dangerously-skip-permissions` as shorthand for `--permission-mode bypassPermissions`, and `--allow-dangerously-skip-permissions` to make `bypassPermissions` available in each dispatched session’s `Shift+Tab` cycle without starting in that mode. Both match the [top-level CLI flags](</docs/en/cli-reference>). The active defaults appear in the footer below the dispatch input. Claude Code refuses `claude --bg --permission-mode bypassPermissions` until you’ve accepted the bypass disclaimer by running `claude --dangerously-skip-permissions` once interactively, since that mode lets a session you aren’t watching act without approval. Passing `--dangerously-skip-permissions` or `--permission-mode bypassPermissions` to `claude agents` shows the same disclaimer when you haven’t accepted it before, and accepting applies `bypassPermissions` to the sessions you launch from the view. Passing `--allow-dangerously-skip-permissions` shows the same disclaimer too, and accepting makes `bypassPermissions` available in the `Shift+Tab` cycle of those sessions without starting them in it.
####
@@ -495,7 +495,7 @@
What persists across restarts
-The permission mode, model, and effort you chose for a background session, along with the configuration flags it carries, all persist when the supervisor later stops and restarts its process. A session you launched with `claude --bg --dangerously-skip-permissions` or `claude --bg --permission-mode bypassPermissions` stays in `bypassPermissions` after that restart. A model or effort you changed mid-session with `/model` or `/effort` is kept too. If the session took its effort from the [`effortLevel` setting](</docs/en/settings#available-settings>) rather than from `--effort` or `/effort`, Claude Code reads the setting again each time it starts a process for the session. So when you edit `effortLevel` in `settings.json`, the change reaches sessions you background with `←` or `/bg`, and their later restarts. Claude Code also keeps a name you set with [`/rename`](</docs/en/commands>) or `Ctrl+R` across that restart, so you can still run [`claude --resume <name>`](</docs/en/sessions#name-your-sessions>) to reach the session.
+The permission mode, model, and effort you chose for a background session, along with the configuration flags it carries, all persist when the supervisor later stops and restarts its process. A session you launched with `claude --bg --dangerously-skip-permissions` or `claude --bg --permission-mode bypassPermissions` stays in `bypassPermissions` after that restart. A model or effort you changed mid-session with `/model` or `/effort` is kept too. If the session took its effort from the [`effortLevel` setting](</docs/en/settings-reference#effortlevel>) rather than from `--effort` or `/effort`, Claude Code reads the setting again each time it starts a process for the session. So when you edit `effortLevel` in `settings.json`, the change reaches sessions you background with `←` or `/bg`, and their later restarts. Claude Code also keeps a name you set with [`/rename`](</docs/en/commands>) or `Ctrl+R` across that restart, so you can still run [`claude --resume <name>`](</docs/en/sessions#name-your-sessions>) to reach the session.
###
@@ -556,7 +556,7 @@
`state`| Background sessions| One of `working`, `blocked`, `done`, `failed`, or `stopped`
`pid`, `status`| While the process is alive| Process ID and current status
`waitingFor`| When `status` is `waiting`| What the session is blocked on: `permission prompt` for an approval, `input needed` for a question from Claude or an MCP server’s input request, `sandbox request`, `worker request`, or `dialog open`
-`sessionId`, `name`| When set| `sessionId` is the full session UUID, usable with [`claude --resume`](</docs/en/sessions>). An interactive session you never named carries a default `name` built from its working directory’s name plus a two-character suffix, such as `my-app-3f`
+`sessionId`, `name`| When set| `sessionId` is the full session UUID, usable with [`claude --resume`](</docs/en/sessions>). An interactive session’s `name` is its [default display name](</docs/en/sessions#name-your-sessions>) until you name the session or accept a plan in it
##
@@ -614,7 +614,7 @@
Turn off agent view
-To turn off background agents and agent view entirely, set the `disableAgentView` [setting](</docs/en/settings>) to `true` or set the `CLAUDE_CODE_DISABLE_AGENT_VIEW` environment variable. Administrators can enforce this through [managed settings](</docs/en/permissions#managed-settings>).
+To turn off background agents and agent view entirely, set the `disableAgentView` [setting](</docs/en/settings>) to `true` or set the `CLAUDE_CODE_DISABLE_AGENT_VIEW` environment variable. Administrators can enforce this through [managed settings](</docs/en/managed-settings>).
##
@@ -776,6 +776,7 @@
Version| Change
---|---
+v2.1.239| With [vim editor mode](</docs/en/interactive-mode#vim-editor-mode>) on, pressing `Esc` in agent view’s input switches from INSERT to NORMAL mode and keeps your text, matching the main prompt; in NORMAL mode with text still in the input, pressing `Esc` clears it, and pressing `Esc` on an empty input exits, as the `Esc` shortcut describes. Before this release, `Esc` cleared the input.
v2.1.233| For a session linked to a GitLab merge request, Claude Code writes the row’s label in GitLab’s `!1234` reference syntax. You can also paste the merge request’s URL into the dispatch input to select that session. Before this release, the label rendered as `#1234`, and a pasted merge request URL matched a session only when its first prompt contained the URL.
v2.1.227| Deleting a session keeps the session and its worktree while another live Claude Code session is running inside that worktree directory. Agent view shows `not deleted` on the row and the reason in the footer, and `claude rm` prints `kept <id>` with the reason, which names the other session’s process ID. Before this release, deleting the session removed the worktree while the other session was still working in it.
v2.1.225| `claude agents` in a directory you haven’t trusted shows the same [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) that `claude` shows on startup, before agent view opens. Accepting saves trust for that workspace; declining exits without opening agent view. Before this release, `claude agents` opened without asking, so sessions you dispatched from it ran in a directory you’d never been asked to trust.
--- a/amazon-bedrock.md
+++ b/amazon-bedrock.md
@@ -31,7 +31,7 @@
Start Claude Code and choose Amazon Bedrock
-Run `claude`. At the login prompt, select **3rd-party platform** , then **Amazon Bedrock**. If you’re already signed in and see the chat prompt instead, run `/setup-bedrock` to open the wizard. The command works when typed even though it isn’t listed in the command menu until Bedrock is configured.
+Run `claude`. At the login prompt, select **3rd-party platform** , then **Amazon Bedrock**. If you’re already signed in and see the chat prompt instead, run `/setup-bedrock` to open the wizard. Until `CLAUDE_CODE_USE_BEDROCK=1` is set, Claude Code [hides the command from the command menu](</docs/en/commands#how-the-command-menu-matches-what-you-type>); type it in full.
3
@@ -231,7 +231,7 @@
Map each model version to an inference profile
-The `ANTHROPIC_DEFAULT_*_MODEL` environment variables configure one inference profile per model family. If your organization needs to expose several versions of the same family in the `/model` picker, each routed to its own application inference profile ARN, use the `modelOverrides` setting in your [settings file](</docs/en/settings#settings-files>) instead. This example maps four Opus versions to distinct ARNs so users can switch between them without bypassing your organization’s inference profiles:
+The `ANTHROPIC_DEFAULT_*_MODEL` environment variables configure one inference profile per model family. If your organization needs to expose several versions of the same family in the `/model` picker, each routed to its own application inference profile ARN, use the `modelOverrides` setting in your [settings file](</docs/en/settings#where-settings-live>) instead. This example maps four Opus versions to distinct ARNs so users can switch between them without bypassing your organization’s inference profiles:
{
"modelOverrides": {
@@ -250,7 +250,7 @@
Startup model checks
-When Claude Code starts with Amazon Bedrock configured, it verifies that the models it intends to use are accessible in your account. If you have pinned a model version that is older than the current Claude Code default, and your account can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. Pins that point to an application inference profile ARN are skipped, since those are managed by your administrator. If you have not pinned a model and the current default is unavailable in your account, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in your Amazon Bedrock account or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize, such as an application inference profile ARN.
+When Claude Code starts with Amazon Bedrock configured, it verifies that the models it intends to use are accessible in your account. If you have pinned a model version that is older than the current Claude Code default, and your account can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. Pins that point to an application inference profile ARN are skipped, since those are managed by your administrator. If you have not pinned a model and the current default is unavailable in your account, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in your Amazon Bedrock account or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings-reference#model>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize, such as an application inference profile ARN.
##
--- a/artifacts.md
+++ b/artifacts.md
@@ -51,9 +51,17 @@
Add a per-region breakdown below the summary chart and republish.
-Anyone with the page open sees the update in place. Each publish becomes a version, and from the **Share** control in the page header you can choose which version viewers see. To update an artifact from a different session, give Claude the artifact’s URL and ask it to revise. Without the URL, a new session always creates a new artifact rather than updating an existing one.
+Anyone with the page open sees the update in place. Each publish becomes a version, and from the **Share** control in the page header you can choose which version viewers see. To update an artifact from a different session, give Claude its URL, or attach it with `/artifacts`. Without either, a new session creates a new artifact instead of updating one.
Update https://claude.ai/code/artifact/5fbea6f3-... with today's numbers.
+
+##
+
+
+
+Find an artifact again
+
+Run `/artifacts` in Claude Code to list every artifact you own and every artifact shared with you. Select one and press `o` to open it in your browser or `c` to copy its link. Press `Enter` to attach it to the current session; before v2.1.216, `Enter` opened it in your browser. Claude Code reads the list from your claude.ai account, so it works in a new session and after `/clear`, when the link has scrolled out of the terminal. Requires Claude Code v2.1.208 or later.
##
@@ -72,7 +80,7 @@
Let someone edit with you
-People you share with are viewers by default: they see each version you publish but can’t change the page. On Team and Enterprise plans, you can also make someone an editor. In the share dialog, add a person and switch their role from **viewer** to **editor**. An editor publishes new versions the same way you update the artifact from another session: they give Claude the artifact’s URL in their own session, and Claude pulls the current content and republishes with their changes. Everyone with the page open sees each update live.
+People you share with are viewers by default: they see each version you publish but can’t change the page. On Team and Enterprise plans, you can also make someone an editor. In the share dialog, add a person and switch their role from **viewer** to **editor**. An editor publishes new versions the same way you update the artifact from another session: they give Claude the artifact’s URL, or attach it from `/artifacts`, and Claude pulls the current content and republishes with their changes. Everyone with the page open sees each update live.
##
--- a/authentication.md
+++ b/authentication.md
@@ -135,7 +135,7 @@
Restrict login to your organization
-To require that developers’ claude.ai logins belong to a specific Anthropic organization, set [`forceLoginMethod` and `forceLoginOrgUUID`](</docs/en/settings#available-settings>) in [managed settings](</docs/en/settings#settings-files>). Set `forceLoginOrgUUID` to your organization ID, shown in [claude.ai admin settings](<https://claude.ai/admin-settings/organization>) for Claude for Teams or Enterprise organizations. Claude Code reports an error for a claude.ai login to any other organization and exits at startup if the claude.ai credential in use belongs to an organization that isn’t listed. For Claude Console logins, Claude Code uses `forceLoginOrgUUID` only to pre-select the organization on the Console sign-in page when you set it to a single Console organization ID, shown at [platform.claude.com/settings/organization](<https://platform.claude.com/settings/organization>). It doesn’t check which organization the resulting Console credential belongs to, at login or at startup, and a developer who logged in with a Console account before you deployed the keys stays logged in. To direct developers to claude.ai sign-in instead, set `forceLoginMethod` to `"claudeai"`. Developers can log in from several paths: the terminal `/login` flow, the [VS Code extension](</docs/en/vs-code>), the Agent SDK, `claude setup-token`, `/install-github-app`, and [gateway](</docs/en/claude-apps-gateway>) sign-in for organizations that route through a cloud gateway. On Claude Code v2.1.212 or later, every path applies `forceLoginMethod`; before v2.1.212, only terminal logins applied either key. In the interactive `/login` flow, Claude Code pre-selects a `claudeai` or `console` method without enforcing it, so even with `forceLoginMethod` set to `"claudeai"`, a developer can still complete a Console login there. The paths differ on `forceLoginOrgUUID`:
+To require that developers’ claude.ai logins belong to a specific Anthropic organization, set [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>) and [`forceLoginOrgUUID`](</docs/en/settings-reference#forceloginorguuid>) in [managed settings](</docs/en/managed-settings>). Set `forceLoginOrgUUID` to your organization ID, shown in [claude.ai admin settings](<https://claude.ai/admin-settings/organization>) for Claude for Teams or Enterprise organizations. Claude Code reports an error for a claude.ai login to any other organization and exits at startup if the claude.ai credential in use belongs to an organization that isn’t listed. For Claude Console logins, Claude Code uses `forceLoginOrgUUID` only to pre-select the organization on the Console sign-in page when you set it to a single Console organization ID, shown at [platform.claude.com/settings/organization](<https://platform.claude.com/settings/organization>). It doesn’t check which organization the resulting Console credential belongs to, at login or at startup, and a developer who logged in with a Console account before you deployed the keys stays logged in. To direct developers to claude.ai sign-in instead, set `forceLoginMethod` to `"claudeai"`. Developers can log in from several paths: the terminal `/login` flow, the [VS Code extension](</docs/en/vs-code>), the Agent SDK, `claude setup-token`, `/install-github-app`, and [gateway](</docs/en/claude-apps-gateway>) sign-in for organizations that route through a cloud gateway. On Claude Code v2.1.212 or later, every path applies `forceLoginMethod`; before v2.1.212, only terminal logins applied either key. On the terminal’s interactive login screen, reached by `/login` or first-run onboarding, Claude Code pre-selects a `claudeai` or `console` method without enforcing it, so even with `forceLoginMethod` set to `"claudeai"`, a developer can still complete a Console login there. The paths differ on `forceLoginOrgUUID`:
* **Terminal, VS Code extension, and Agent SDK logins** : verify `forceLoginOrgUUID` for claude.ai account logins
* **`claude setup-token` and `/install-github-app`**: enforce only `forceLoginMethod`, so they can mint a token in a different organization
@@ -146,7 +146,7 @@
* **The`env` block**: [merges per key](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>) in Claude Code v2.1.223 or later
* **The[cross-source lock keys](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>)**: honored from any admin source
-`forceLoginMethod` and `forceLoginOrgUUID` are neither, so keep them in both places. The keys also decide whether a session that doesn’t use a login credential can start. See [`forceLoginOrgUUID`](</docs/en/settings#available-settings>) in the settings reference for the full behavior.
+`forceLoginMethod` and `forceLoginOrgUUID` are neither, so keep them in both places. The keys also decide whether a session that doesn’t use a login credential can start. See [`forceLoginOrgUUID`](</docs/en/settings-reference#forceloginorguuid>) in the settings reference for the full behavior.
* **`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper`**: blocked at startup, since organization membership can’t be verified for an environment credential
* **Cloud provider sessions such as Amazon Bedrock** : not blocked, because they authenticate against your cloud provider. Restrict those through your cloud IAM policies
@@ -167,7 +167,7 @@
* If you’ve set the `CLAUDE_CONFIG_DIR` environment variable on Linux or Windows, the `.credentials.json` file lives under that directory instead.
* Claude Code manages `.credentials.json` through `/login` and `/logout`. To route requests through a custom API endpoint, set the [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) environment variable instead.
* **Supported authentication types** : Claude.ai credentials, Claude API credentials, Microsoft Foundry Auth, Bedrock Auth, Vertex Auth, Anthropic profile and [Workload Identity Federation](<https://platform.claude.com/docs/en/manage-claude/workload-identity-federation>) credentials, and [Claude apps gateway](</docs/en/claude-apps-gateway>) session tokens.
- * **Custom credential scripts** : configure the [`apiKeyHelper`](</docs/en/settings#available-settings>) setting to run a shell script that returns an API key.
+ * **Custom credential scripts** : configure the [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) setting to run a shell script that returns an API key.
* **Refresh intervals** : by default, `apiKeyHelper` is called after 5 minutes or on HTTP 401 response. Set `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` environment variable for custom refresh intervals.
* **Slow helper notice** : if `apiKeyHelper` takes longer than 10 seconds to return a key, Claude Code displays a warning notice in the prompt bar showing the elapsed time. If you see this notice regularly, check whether your credential script can be optimized.
* **Helper failures** : when the script exits with an error, times out, or prints nothing, requests fail with [`Your apiKeyHelper script is failing`](</docs/en/errors#your-apikeyhelper-script-is-failing>) within three attempts. Before v2.1.208, helper failures surfaced as a generic 401 after about ten silent retries.
@@ -193,7 +193,7 @@
1. Cloud provider credentials, when `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_VERTEX`, or `CLAUDE_CODE_USE_FOUNDRY` is set. See [third-party integrations](</docs/en/third-party-integrations>) for setup.
2. `ANTHROPIC_AUTH_TOKEN` environment variable. Sent as the `Authorization: Bearer` header. Use this when routing through an [LLM gateway or proxy](</docs/en/llm-gateway>) that authenticates with bearer tokens rather than Anthropic API keys.
3. `ANTHROPIC_API_KEY` environment variable. Sent as the `X-Api-Key` header. Use this for direct Anthropic API access with a key from the [Claude Console](<https://platform.claude.com>). In interactive mode, you are prompted once to approve or decline the key, and your choice is remembered. To change it later, use the “Use custom API key” toggle in `/config`. The toggle only appears while `ANTHROPIC_API_KEY` is set in your environment. In non-interactive mode (`-p`), the key is always used when present.
- 4. [`apiKeyHelper`](</docs/en/settings#available-settings>) script output. Use this for dynamic or rotating credentials, such as short-lived tokens fetched from a vault.
+ 4. [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) script output. Use this for dynamic or rotating credentials, such as short-lived tokens fetched from a vault.
5. `CLAUDE_CODE_OAUTH_TOKEN` environment variable. A long-lived OAuth token generated by `claude setup-token`. Use this for CI pipelines and scripts where browser login isn’t available. If you run `/login` while the variable is set, Claude Code switches the current session to the new login, but reads the variable again in every new session until you remove it from your shell profile or the `env` block of a [settings file](</docs/en/settings>).
6. Anthropic profile and federation credentials, the credentials that the `ant` CLI and Workload Identity Federation use. A profile that `ant auth login` wrote ranks here only when you name it in `ANTHROPIC_PROFILE`; otherwise it ranks below `/login`. See Anthropic profiles and federation credentials.
7. Subscription OAuth credentials from `/login`. This is the default for Claude Pro, Max, Team, and Enterprise users.
--- a/auto-mode-config.md
+++ b/auto-mode-config.md
@@ -30,7 +30,7 @@
Add a human checkpoint
-The most direct mechanism is [`permissions.ask`](</docs/en/permissions#permission-rule-syntax>). Content-scoped ask rules like the ones below are evaluated before the classifier and always force a permission prompt, even in auto mode, because an explicit ask rule is your stated intent to be prompted for that action. Add the rules in your [settings](</docs/en/settings#settings-files>):
+The most direct mechanism is [`permissions.ask`](</docs/en/permissions#permission-rule-syntax>). Content-scoped ask rules like the ones below are evaluated before the classifier and always force a permission prompt, even in auto mode, because an explicit ask rule is your stated intent to be prompted for that action. Add the rules in your [settings](</docs/en/settings#where-settings-live>):
{
"permissions": {
@@ -290,4 +290,4 @@
* [Permission modes](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>): what auto mode is, what it blocks by default, and which sessions start in it
* [Managed settings](</docs/en/server-managed-settings>): deploy `autoMode` configuration across your organization
* [Permissions](</docs/en/permissions>): allow, ask, and deny rules that apply before the classifier runs
- * [Settings](</docs/en/settings>): the full settings reference, including the `autoMode` key
+ * [Settings reference](</docs/en/settings-reference#automode>): every settings key, including `autoMode`
--- a/best-practices.md
+++ b/best-practices.md
@@ -14,7 +14,7 @@
Give Claude a check it can run: tests, a build, a screenshot to compare. It’s the difference between a session you watch and one you walk away from.
-Claude stops when the work looks done. Without a check it can run, “looks done” is the only signal available, and you become the verification loop: every mistake waits for you to notice it. Give Claude something that produces a pass or fail, and the loop closes on its own. Claude does the work, runs the check, reads the result, and iterates until the check passes. The check is anything that returns a signal Claude can read in the conversation: a test suite, a build exit code, a linter, a script that diffs output against a fixture, or a [browser screenshot](</docs/en/chrome>) compared against a design.
+Claude stops when the work looks done. Without a check it can run, “looks done” is the only signal available, and you become the verification loop: every mistake waits for you to notice it. Give Claude something that produces a pass or fail, and the loop closes on its own. Claude does the work, runs the check, reads the result, and iterates until the check passes. The check is anything that returns a signal Claude can read in the conversation: a test suite, a build exit code, a linter, a script that diffs output against a fixture, or a [browser screenshot](</docs/en/chrome>) compared against a design. Run [`/verify`](</docs/en/skills#run-and-verify-your-app>) yourself after Claude’s check passes to confirm the change against the running app.
Strategy| Before| After
---|---|---
@@ -169,7 +169,7 @@
Developer environment quirks (required env vars)| File-by-file descriptions of the codebase
Common gotchas or non-obvious behaviors| Self-evident practices like “write clean code”
-If Claude keeps doing something you don’t want despite having a rule against it, the file is probably too long and the rule is getting lost. If Claude asks you questions that are answered in CLAUDE.md, the phrasing might be ambiguous. Treat CLAUDE.md like code: review it when things go wrong, prune it regularly, and test changes by observing whether Claude’s behavior actually shifts. You can tune instructions by adding emphasis (e.g., “IMPORTANT” or “YOU MUST”) to improve adherence. Check CLAUDE.md into git so your team can contribute. The file compounds in value over time. CLAUDE.md files can import additional files using `@path/to/import` syntax. For import rules and where CLAUDE.md files can live, see [CLAUDE.md files](</docs/en/memory#claude-md-files>).
+If Claude keeps doing something you don’t want despite having a rule against it, the file is probably too long and the rule is getting lost. If Claude asks you questions that are answered in CLAUDE.md, the phrasing might be ambiguous. Treat CLAUDE.md like code: review it when things go wrong, prune it regularly, and test changes by observing whether Claude’s behavior actually shifts. For a checked-in CLAUDE.md, run [`/doctor`](</docs/en/commands#all-commands>) and Claude proposes cuts for content it can derive from the codebase. If Claude keeps skipping one instruction, add emphasis such as “IMPORTANT” to that line alone. If you emphasize many lines, none of them stands out. Check CLAUDE.md into git so your team can contribute. The file compounds in value over time. CLAUDE.md files can import additional files using `@path/to/import` syntax. For import rules and where CLAUDE.md files can live, see [CLAUDE.md files](</docs/en/memory#claude-md-files>).
###
@@ -423,7 +423,7 @@
Name sessions with `/rename` and treat them like branches: each workstream gets its own persistent context.
-Claude Code saves conversations locally, so when a task spans multiple sittings you don’t have to re-explain the context. Run `claude --continue` to pick up the most recent session, or `claude --resume` to choose from a list. Give sessions descriptive names like `oauth-migration` so you can find them later. See [Manage sessions](</docs/en/sessions>) for the full set of resume, branch, and naming controls.
+Claude Code saves conversations locally, so when a task spans multiple sittings you don’t have to re-explain the context. Run [`claude --continue`](</docs/en/sessions#resume-a-session>) to pick up where you left off, or `claude --resume` to choose from a list. Give sessions descriptive names like `oauth-migration` so you can find them later. See [Manage sessions](</docs/en/sessions>) for the full set of resume, branch, and naming controls.
* * *
@@ -469,7 +469,8 @@
* [Worktrees](</docs/en/worktrees>): run separate CLI sessions in isolated git checkouts so edits don’t collide
* [Desktop app](</docs/en/desktop#work-in-parallel-with-sessions>): manage multiple local sessions visually, each in its own worktree
* [Claude Code on the web](</docs/en/claude-code-on-the-web>): run sessions in the cloud, on Anthropic-managed infrastructure by default
- * [Agent teams](</docs/en/agent-teams>): automated coordination of multiple sessions with shared tasks, messaging, and a team lead
+ * [Agent view](</docs/en/agent-view>): research preview. Run `claude agents` to dispatch sessions that keep running in the background and watch them from one screen
+ * [Agent teams](</docs/en/agent-teams>): experimental and disabled by default. Automated coordination of multiple sessions with shared tasks, messaging, and a team lead
Beyond parallelizing work, multiple sessions enable quality-focused workflows. A fresh context improves code review since Claude won’t be biased toward code it just wrote. For example, use a Writer/Reviewer pattern:
@@ -489,7 +490,7 @@
Loop through tasks calling `claude -p` for each. Use `--allowedTools` to scope permissions for batch operations.
-For large migrations or analyses, you can distribute work across many parallel Claude invocations:
+For large migrations or analyses, you can distribute work across many parallel Claude invocations. In a git repository, run [`/batch <instruction>`](</docs/en/commands#all-commands>) to have Claude split the change across 5 to 30 subagents. Each subagent works in its own worktree and opens a pull request. To drive the fan-out from your own script instead, loop over `claude -p`:
1
@@ -544,7 +545,7 @@
every requirement is implemented, the listed edge cases have tests, and
nothing outside the task's scope changed. Report gaps, not style preferences.
-Because the reviewer runs as a subagent, the implementing session receives the gaps directly and can fix them and re-review without you copying findings between windows. For longer autonomous runs, an [agent team](</docs/en/agent-teams>) can keep this loop going across many tasks while you spot-check the recorded findings.
+Because the reviewer runs as a subagent, the implementing session receives the gaps directly and can fix them and re-review without you copying findings between windows.
A reviewer prompted to find gaps will usually report some, even when the work is sound, because that is what it was asked to do. Chasing every finding leads to over-engineering: extra abstraction layers, defensive code, and tests for cases that can’t happen. Tell the reviewer to flag only gaps that affect correctness or the stated requirements, and treat the rest as optional.
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,70 @@
This page is generated from the [CHANGELOG.md on GitHub](<https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md>). Run `claude --version` to check your installed version.
+
+
+
+2.1.239
+
+August 21, 2026
+
+ * Cost estimates (`/cost`, status line, `--max-budget-usd`) now include the 1.1× US-only-inference premium for data-residency workspaces
+ * Added the one-time fullscreen renderer offer on Bedrock, Vertex, Foundry and other previously excluded setups; new installs there now start in fullscreen
+ * Added `/claude-api upgrade` to migrate Python projects from `anthropic` 0.x to 1.x, and updated the skill’s Python reference for 1.x (timeouts use `anthropic.Timeout`, not `httpx.Timeout`)
+ * Cloud sessions: plugins synced from claude.ai now show as `name@synced`, work with `claude plugin enable/disable <name>@synced`, and never override a same-named plugin you installed
+ * Alpine/musl builds: native image paste, clipboard, and audio-capture add-ons now load (musl-built binaries instead of glibc ones refused by the runtime)
+ * The usage-limit message shown when your monthly spend limit is already used up now also says when your session or weekly limit resets
+ * Fixed Bedrock streaming behind proxies that strip the response Content-Type header, which silently doubled billed API calls by re-running every turn non-streaming
+ * Fixed Claude Code hanging at startup behind an HTTPS proxy when using Bedrock with an SSO profile and `awsAuthRefresh` — the credential pre-check now honors `HTTPS_PROXY`
+ * Fixed a raw crash dump when starting Claude Code from a directory that no longer exists; it now prints a clear message
+ * Fixed Edit and Write calls pausing for about 5 seconds in JetBrains IDE terminals when the Claude Code plugin is connected
+ * Fixed a race where pressing Esc with a prompt queued could let the next turn finish early, leaving the session idle while Claude was still working and letting a later resubmit repeat actions
+ * Fixed WebFetch retaining expired page content in memory for the whole session instead of the intended 15 minutes
+ * Fixed cloud sessions (Claude Code on the web, desktop and mobile apps) resuming out of plan mode after an idle worker restart
+ * Fixed MCP elicitation forms taller than the terminal being clipped in fullscreen mode: the form now fits the window, with hidden fields reachable by scrolling and Accept/Decline always visible
+ * Fixed remote MCP servers staying failed after a transient 5xx on a mid-session reconnect in cloud sessions or via SDK `setMcpServers()`
+ * Fixed custom session titles disappearing from `/resume` after more than ~64 KB of conversation was written following the rename
+ * Fixed `claude -c`/resume picking up sessions from a different directory whose path differed only by characters like `_`, `-`, or `.`
+ * Fixed `/resume` and the agents view showing a session as recently changed (and reordering it) when only its file was touched or it was merely reopened
+ * Fixed `/resume` in all-projects mode telling you to `cd` into a deleted directory (e.g. a removed worktree); such sessions now resume in the current directory
+ * Fixed the `dark-ansi` theme rendering expanded tool results in fullscreen mode with text the same color as the background
+ * Fixed the fullscreen renderer prompt reappearing on every launch when it could never be answered; it now stops after being shown on three launches
+ * Fixed `.worktreeinclude` patterns starting with `**/` silently matching nothing when the target lived in a gitignored directory
+ * Fixed agents, skills, and commands whose `.md` file starts with a UTF-8 BOM being silently ignored
+ * Fixed `/insights` echoing literal `<message>` tags in its response on some models
+ * Fixed marketplace `metadata.pluginRoot` having no effect: bare plugin source names now resolve under it as the docs describe
+ * Fixed mouse movement in browser-based terminals inserting text like `"35;150;7M"` into the prompt when a mouse report arrived split across writes
+ * Fixed custom theme overrides for the effort/ultracode status badge colors being ignored
+ * Fixed OpenTelemetry trace fragmentation: tool executions deferred by a `PreToolUse` hook now resume in the original turn’s trace instead of starting a new trace
+ * Fixed vim mode in the agent view: Escape now switches to NORMAL mode and keeps your text instead of clearing the prompt
+ * Fixed the `selection:copy` keybinding silently dropping a text selection that had been extended with Shift+Arrow keys
+ * Fixed the `/voice` startup tip still appearing after voice dictation was enabled via the `voice.enabled` setting
+ * Fixed shell-mode (`!`) Tab completion dropping the `./` from a `./script` path, which left a command the shell couldn’t run
+ * Fixed fullscreen mode answering a permission prompt or pressing a button when you clicked the terminal window only to bring it back into focus
+ * Fixed slash-command panels (e.g. `/config`, `/model`) in fullscreen mode covering the latest messages; the conversation now stays pinned above the panel
+ * Fixed the `/workflows` detail dialog overflowing the terminal and losing its header off-screen when opened while Claude is still responding
+ * Fixed the Linux sandbox making a nonexistent `.git/config.worktree` unreadable, which broke every sandboxed git command in repos with `extensions.worktreeConfig` set
+ * Fixed hooks failing with “posix_spawn ENOENT” after the session’s working directory was deleted; they now run from the project root or home directory instead
+ * Fixed `claudeMdExcludes` not excluding a symlinked `.claude/rules` file when the pattern names the rules directory or the symlink rather than its target
+ * Fixed runaway session-title syncing to Remote Control when two Claude Code processes shared one background job’s state (2.1.232 regression); title updates are now deduplicated and rate-limited
+ * Fixed sessions whose title starts with `/` being unaddressable by `SendMessage` and shown as “(untitled)” in `ListAgents`
+ * Fixed Ctrl+W, Ctrl+U, Ctrl+K, Option+Backspace, Option+D and vim `df`/`dt` leaving a broken `[Pasted text #N]` placeholder when the cursor was inside it
+ * Fixed masked (password-style) inputs such as the login code field letting their text be pasted back with Ctrl+Y elsewhere or saved to prompt history when cleared with double Esc
+ * Fixed Ctrl+Backspace deleting one character instead of a word in search boxes
+ * Fixed a request rejected by an organization policy check being re-sent before the rejection was shown
+ * Improved the reminder shown after compaction so a skill’s original arguments are not re-run as a new request
+ * Long file paths on tool-use rows now truncate in the middle to stay on one line
+ * Remote sessions keep sending keep-alives while a long `SessionStart` or `Setup` hook runs, so the container is not idle-reaped mid-hook
+ * `/goal`: repeat check-ins on long-running background work now back off (30 min, then 1 h, then every 2 h) instead of repeating every 30 minutes
+ * `/goal`: resuming a session from the `claude --resume` picker now restores its active goal
+ * `ListAgents` now tells a session its own name (the one peers use to message it), and `SendMessage` to your own name says so instead of “no agent named …”
+ * `ListAgents` and `/list-agents` now list your live teammates (previously only subagents and other sessions appeared, so a reachable teammate looked absent)
+ * `keybindingFlavor: "readline"` now also matches Bash for word keys: Alt+F and Ctrl/Option+→ stop at the end of the word, Alt+D deletes to it (Ctrl+Y pastes it back), and punctuation separates words
+ * Persistent retry mode (`CLAUDE_CODE_RETRY_WATCHDOG`) now fails immediately on organization spend-limit and out-of-credits errors instead of waiting indefinitely for a reset
+ * Claude in Chrome: `/clear` now closes the session’s Chrome tab group, and empty groups are closed on `/resume` and when Claude Code exits
+ * Remote sessions: images uploaded from mobile now include their saved file path, so Claude can copy them into files it creates
+ * Claude Code on the web: requests from Bash and other tools to non-API anthropic.com hosts (e.g. www, docs) now go through the session’s network proxy, so your environment’s allowed domains apply
+ * Remote Control: clearer message and `claude doctor` wording when Remote Control isn’t enabled for your account
+ * Windows: cross-session messaging is now available, so Claude Code sessions across your machines can message each other with `SendMessage` and find each other with `ListAgents`, as on macOS and Linux
+ * [VSCode] “View usage” in the usage-limit banner now sits inline with the warning text instead of floating mid-banner
--- a/channels.md
+++ b/channels.md
@@ -311,7 +311,7 @@
]
}
-If you set an empty array, you block all channel plugins from the allowlist, but `--dangerously-load-development-channels` can still bypass that block for local testing. To block channels entirely including the development flag, leave `channelsEnabled` unset instead. This setting requires `channelsEnabled: true`. If a user passes a plugin to `--channels` that isn’t on your list, Claude Code starts normally but the channel doesn’t register, and the startup notice explains that the plugin isn’t on the organization’s approved list.
+If you set an empty array, you block all channel plugins from the allowlist, but `--dangerously-load-development-channels` can still bypass that block for local testing. To block channels entirely including the development flag, leave `channelsEnabled` unset instead. This setting requires `channelsEnabled: true`. If a user passes a plugin to `--channels` that isn’t on your list, Claude Code starts normally but the channel doesn’t register, and the startup notice explains that the plugin isn’t on the organization’s approved list. If you set `MCP_PROTOCOL_NEGOTIATION` to `auto` on the v2 MCP client runtime, a channel can also fail to register because Claude Code [doesn’t register a channel server that negotiates protocol revision 2026-07-28](</docs/en/mcp#push-messages-with-channels>).
##
--- a/checkpointing.md
+++ b/checkpointing.md
@@ -19,7 +19,7 @@
* Every user prompt creates a new checkpoint
* Claude Code keeps file snapshots for the 100 most recent checkpoints in a session. Discarding an older checkpoint deletes the snapshot files that no remaining checkpoint references, except each file’s first snapshot, which the VS Code extension uses as the baseline for its session diffs.
* Claude Code saves checkpoints with the conversation, so you can still run `/rewind` after you resume a session
- * Claude Code deletes checkpoints along with sessions after 30 days, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>); change the period with [`cleanupPeriodDays`](</docs/en/settings#available-settings>)
+ * Claude Code deletes checkpoints along with sessions after 30 days, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>); change the period with [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>)
###
--- a/chrome.md
+++ b/chrome.md
@@ -172,7 +172,7 @@
Three restrictions apply to uploads:
- * **Permissions** : Claude can upload a file only when the session is allowed to read it, so [permission rules](</docs/en/settings#permission-settings>) that deny `Read` access to a file also block uploading it.
+ * **Permissions** : Claude can upload a file only when the session is allowed to read it, so [permission rules](</docs/en/settings-reference#permission-settings>) that deny `Read` access to a file also block uploading it.
* **Size** : a single upload can include up to 10 MB of files in total.
* **Hard links** : Claude refuses files that have multiple hard links, which is common inside package-manager stores like `node_modules`. Copy the file and upload the copy.
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
@@ -1,6 +1,6 @@
The Claude apps gateway is designed for organizations that must, or prefer to, route inference through their own cloud provider, for example to meet [data residency](</docs/en/claude-apps-gateway-deploy#compliance-posture>) requirements. If you don’t have this requirement, and want access to other features such as SCIM provisioning or Claude Code on web and mobile, Claude Enterprise may be a better fit. See the [feature availability](</docs/en/feature-availability>) page for a full comparison of all deployment methods.
-Claude apps gateway is a self-hosted service that sits between your developers’ Claude Code clients and your model provider. Developers sign in with your corporate identity provider (IdP) instead of holding API keys or cloud credentials. The gateway holds the upstream credential, enforces model access and [managed settings](</docs/en/permissions#managed-settings>) by IdP group, and relays usage telemetry to your own observability stack. It is included in the `claude` binary, so the same executable that runs Claude Code on a laptop runs the gateway server with `claude gateway --config gateway.yaml`. This page covers:
+Claude apps gateway is a self-hosted service that sits between your developers’ Claude Code clients and your model provider. Developers sign in with your corporate identity provider (IdP) instead of holding API keys or cloud credentials. The gateway holds the upstream credential, enforces model access and [managed settings](</docs/en/managed-settings>) by IdP group, and relays usage telemetry to your own observability stack. It is included in the `claude` binary, so the same executable that runs Claude Code on a laptop runs the gateway server with `claude gateway --config gateway.yaml`. This page covers:
* Why Claude apps gateway, what it adds over running your own, and when something else fits better
* A quickstart with prerequisites that takes a gateway from zero to a signed-in developer
@@ -18,7 +18,7 @@
The [gateway overview](</docs/en/gateways>) covers what a gateway does and why you’d run one. Claude apps gateway is Anthropic’s own gateway, built into the `claude` binary and tested alongside each Claude Code release, so it forwards the headers and request fields Claude Code sends without operators maintaining a separate allowlist. Once deployed it gives you:
* **Credentials** : the upstream API key or cloud credential lives only in your infrastructure. Developers authenticate with corporate SSO and receive short-lived bearer tokens, so offboarding happens in your IdP. Deprovision a user and their gateway access expires within the session lifetime, one hour by default.
- * **Access control** : your IdP groups map to model allowlists and [managed settings](</docs/en/permissions#managed-settings>) policies. The gateway enforces model access server-side, rejecting requests for non-granted models, and selects each group’s managed settings policy, which the CLI applies at the [managed settings tier](</docs/en/settings#settings-precedence>). Different teams get different models, tools, and permissions, and a developer can’t override what their policy locks.
+ * **Access control** : your IdP groups map to model allowlists and [managed settings](</docs/en/managed-settings>) policies. The gateway enforces model access server-side, rejecting requests for non-granted models, and selects each group’s managed settings policy, which the CLI applies at the [managed settings tier](</docs/en/settings#settings-precedence>). Different teams get different models, tools, and permissions, and a developer can’t override what their policy locks.
* **Settings delivery** : the gateway delivers managed settings to signed-in clients itself, taking the place of [server-managed settings](</docs/en/server-managed-settings>) from the claude.ai admin console.
* **Telemetry** : each configured destination, such as Datadog, Splunk, or ClickHouse, receives [OpenTelemetry Protocol (OTLP) metrics](</docs/en/monitoring-usage>) with token counts, model, user identity, and latency by default, with logs and traces as per-destination opt-ins.
* **Upstream routing** : clients speak the Anthropic Messages API to the gateway, and the gateway translates for each upstream, whether Amazon Bedrock, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Google Cloud’s Agent Platform, Microsoft Foundry, or the Anthropic API, with failover between them. You can change regions, providers, or failover order without developers noticing or reconfiguring.
@@ -217,7 +217,7 @@
Log a developer in
-This last step happens on a developer machine, not the server. Set `forceLoginMethod` to `"gateway"` and `forceLoginGatewayUrl` to your gateway’s `public_url` in that machine’s [managed settings file](</docs/en/settings#settings-files>), then run `/login`, press Enter on the **Cloud gateway** screen, and complete the browser sign-in. Set the gateway URL below covers distributing both keys at scale.
+This last step happens on a developer machine, not the server. Set `forceLoginMethod` to `"gateway"` and `forceLoginGatewayUrl` to your gateway’s `public_url` in that machine’s [managed settings file](</docs/en/managed-settings#delivery-mechanisms>), then run `/login`, press Enter on the **Cloud gateway** screen, and complete the browser sign-in. Set the gateway URL below covers distributing both keys at scale.
##
@@ -233,7 +233,7 @@
Set the gateway URL
-Three keys go in the per-OS [managed settings file](</docs/en/settings#settings-files>) you deploy via MDM or directly on disk. `forceLoginMethod` and `forceLoginGatewayUrl` open `/login` directly on the **Cloud gateway** screen with the URL filled in, and `parentSettingsBehavior: "merge"` lets Claude Desktop deliver the gateway’s egress allowlist to the Claude Code sessions it launches, explained in Deliver policy to Claude Desktop sessions:
+Three keys go in the per-OS [managed settings file](</docs/en/managed-settings#delivery-mechanisms>) you deploy via MDM or directly on disk. `forceLoginMethod` and `forceLoginGatewayUrl` open `/login` directly on the **Cloud gateway** screen with the URL filled in, and `parentSettingsBehavior: "merge"` lets Claude Desktop deliver the gateway’s egress allowlist to the Claude Code sessions it launches, explained in Deliver policy to Claude Desktop sessions:
{
"forceLoginMethod": "gateway",
@@ -257,7 +257,7 @@
Which machines need the opt-in
-Machines that only run Claude Desktop need it. Claude Desktop applies the model list and the disabled-tools list to embedded sessions itself, but the egress allowlist reaches them only as parent settings, in the form of `WebFetch` domain rules and sandbox network rules. Without the opt-in, those sessions run without the egress restriction, and nothing warns you. The gateway still rejects inference requests for models the policy doesn’t grant. Machines where developers sign in through `/login` don’t need it; every Claude Code invocation fetches its policy from the gateway directly. Machines where an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>) can’t use it, because Claude Code never merges parent settings into the helper’s output.
+Machines that only run Claude Desktop need it. Claude Desktop applies the model list and the disabled-tools list to embedded sessions itself, but the egress allowlist reaches them only as parent settings, in the form of `WebFetch` domain rules and sandbox network rules. Without the opt-in, those sessions run without the egress restriction, and nothing warns you. The gateway still rejects inference requests for models the policy doesn’t grant. Machines where developers sign in through `/login` don’t need it; every Claude Code invocation fetches its policy from the gateway directly. Fleets whose [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings can’t use it: parent settings are never merged then, because the helper’s output replaces the other managed sources.
####
@@ -283,7 +283,7 @@
Check which source won
-Call the Agent SDK’s [`resolveSettings()`](</docs/en/agent-sdk/typescript#resolvesettings>). Its result includes a `sources` list; the managed policy entry there carries a `policyOrigin` field naming the active source. `resolveSettings()` doesn’t execute a configured `policyHelper`, so on helper fleets its answer doesn’t reflect the live session.
+Call the Agent SDK’s [`resolveSettings()`](</docs/en/agent-sdk/typescript#resolvesettings>). Its result includes a `sources` list; the managed policy entry there carries a `policyOrigin` field naming the active source. `resolveSettings()` doesn’t execute a configured `policyHelper`, so its result doesn’t reflect the live session on machines where a helper supplies the managed settings.
###
@@ -291,7 +291,7 @@
Restrict parent settings
-Once you deploy `parentSettingsBehavior: "merge"`, any host process that launches Claude Code can supply parent settings, not only Claude Desktop but also an Agent SDK application or an IDE extension. Claude Code filters parent settings against an allowlist of restrictive keys, but some allowed keys can grant access rather than restrict it. Unless you set the `allowManaged*Only` locks, permission allow rules and sandbox allowlists supplied by the host still apply. Your policy’s deny and ask rules stay in force either way; [they’re evaluated before any allow rule](</docs/en/permissions#manage-permissions>). Claude Code forwards parent-supplied [`sandbox.credentials`](</docs/en/settings#sandbox-settings>) entries in stripped form:
+Once you deploy `parentSettingsBehavior: "merge"`, any host process that launches Claude Code can supply parent settings, not only Claude Desktop but also an Agent SDK application or an IDE extension. Claude Code filters parent settings against an allowlist of restrictive keys, but some allowed keys can grant access rather than restrict it. Unless you set the `allowManaged*Only` locks, permission allow rules and sandbox allowlists supplied by the host still apply. Your policy’s deny and ask rules stay in force either way; [they’re evaluated before any allow rule](</docs/en/permissions#manage-permissions>). Claude Code forwards parent-supplied [`sandbox.credentials`](</docs/en/settings-reference#sandbox-credentials>) entries in stripped form:
* **`deny` entries**: forwarded with only their `path` or `name` and the mode.
* **File entries with[`mode: mask`](</docs/en/sandboxing#mask-credential-files>)**: forwarded sentinel-only, as a whole-file mask whose `injectHosts` is the empty list, so the proxy never substitutes the real value for a parent-supplied entry on any platform. All structured-masking fields are dropped too, so a parent-supplied extract pattern can’t displace a stricter mask another source sets for the same path.
@@ -335,7 +335,7 @@
Lock behavior across sources
-Setting one lock doesn’t restrict the others; each key is documented in the [settings reference](</docs/en/settings#available-settings>). From an admin source below the winner, the two sandbox locks still apply, and `allowManagedPermissionRulesOnly` still blocks parent-supplied allow rules and `additionalDirectories`. The hooks and MCP server locks, and `allowManagedPermissionRulesOnly`’s effect on the developer’s own rules, need the winning source. When an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), Claude Code reads the locks from the helper’s output alone. Each lock makes Claude Code ignore the developer’s own entries for that setting, so include your organization’s allowlists next to the locks. Locking network domains with an empty managed domain list blocks all sandboxed outbound traffic, and locking MCP servers with no managed or parent-supplied `allowedMcpServers` loads every server that `deniedMcpServers` doesn’t block. `allowRead` entries only re-allow paths inside `denyRead` regions, so pair them with a managed `denyRead`.
+Setting one lock doesn’t restrict the others; each key is documented in the [settings reference](</docs/en/settings-reference#all-settings>). From an admin source below the winner, the two sandbox locks still apply, and `allowManagedPermissionRulesOnly` still blocks parent-supplied allow rules and `additionalDirectories`. The hooks and MCP server locks, and `allowManagedPermissionRulesOnly`’s effect on the developer’s own rules, need the winning source. On [`policyHelper`](</docs/en/settings-reference#policyhelper>) fleets, the locks are read from the helper’s output alone. Each lock makes Claude Code ignore the developer’s own entries for that setting, so include your organization’s allowlists next to the locks. Locking network domains with an empty managed domain list blocks all sandboxed outbound traffic, and locking MCP servers with no managed or parent-supplied `allowedMcpServers` loads every server that `deniedMcpServers` doesn’t block. `allowRead` entries only re-allow paths inside `denyRead` regions, so pair them with a managed `denyRead`.
####
@@ -406,7 +406,8 @@
OIDC identity providers| Available| Any OIDC-compliant IdP; the gateway runs standard OIDC discovery and the authorization-code flow. See [Identity provider setup](</docs/en/claude-apps-gateway-deploy#identity-provider-setup>) for per-IdP configuration
Per-user and per-group spend limits| Available| See [Spend limits](</docs/en/claude-apps-gateway-spend-limits>)
Server-side web search| Not available| The CLI can’t see which upstream provider the gateway routes to, so it can’t verify web search support and disables WebSearch on gateway sessions
-Standard prompt caching| Available| `cache_control` breakpoints are forwarded to every upstream
+[Remote Control](</docs/en/remote-control>)| Not available| The CLI shows [an error naming the gateway](</docs/en/errors#remote-control-requires-the-anthropic-api>)
+Standard prompt caching| Available| The gateway forwards `cache_control` breakpoints to every upstream. On gateway sessions, the CLI doesn’t mark the [system context it appends mid-conversation](</docs/en/prompt-caching#where-the-cache-lives>) for caching, so that block shows up as uncached input.
1-hour cache TTL| Not available| The CLI omits the extended-cache-ttl beta on gateway sessions, because not every upstream the gateway can route to supports the 1-hour TTL, so prompt caching through the gateway uses the 5-minute TTL; see the beta-header note above
Auto mode| Available| Follows the [third-party provider rules](</docs/en/permission-modes#enable-auto-mode-on-bedrock-agent-platform-or-foundry>): only the models eligible on third-party providers can use it. Before v2.1.207, auto mode on gateway sessions required setting `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, deliverable through the managed policy `env` block
First-party-only optimizations such as global cache scope and token-efficient tools| Not available| The CLI doesn’t enable them on gateway sessions; see the beta-header note above
--- a/claude-apps-gateway-config.md
+++ b/claude-apps-gateway-config.md
@@ -134,6 +134,25 @@
`upstreams`
`upstreams` is an ordered list. The gateway forwards inference to the first upstream that resolves the requested model. On `5xx`, `429`, `401`, `403`, `404`, or timeout it fails over to the next; other `4xx` doesn’t, because those errors are attributable to the request rather than the upstream. A `401` or `403` means the gateway’s own credential failed against that upstream, and a `404` means that upstream doesn’t serve the requested model, so a later upstream in the list still can. Failover on `404` requires gateway v2.1.198 or later. Earlier releases returned the first `404` to the client even when a later upstream in the list served the model. Multiple upstreams of the same provider must set a distinct `name:`. Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry clients are built once at startup, and their SDKs refresh credentials internally, so rotating cloud credentials doesn’t require a restart. Static Anthropic API keys and bearers are read at startup; see Anthropic API.
+
+####
+
+
+
+Upstream error messages
+
+The gateway returns one upstream’s error response, or its own `502`, depending on how the upstreams answered:
+
+ * **An upstream returned a status the gateway doesn’tfail over on**: that upstream’s response. The gateway tries no further upstreams.
+ * **Every upstream the gateway tried failed in a way itfails over on**: the last `429`. When none returned a `429`, the gateway prefers, in order, the last `401` or `403`, the last `404`, and the last `501`. When none returned any of those, the gateway’s own `502`, `all upstreams failed (N attempted)`, where N counts every entry in `upstreams`, including entries the gateway skipped because they don’t serve the requested model.
+
+When the gateway returns an upstream’s response, it keeps the upstream’s status code. Whether it keeps the upstream’s message depends on the provider. An Anthropic API upstream’s error body reaches the developer unchanged. The Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry upstreams can name your account IDs, role ARNs, and project IDs in their error text. The gateway records that full text in the [operational log](</docs/en/claude-apps-gateway-deploy#logs>). What the developer sees from those upstreams depends on the rejection:
+
+ * `400` or `413` in Anthropic’s standard error envelope: the upstream’s own message, such as `prompt is too long`. Claude Platform on AWS, Agent Platform, and Microsoft Foundry return this envelope for model API rejections.
+ * `400` or `413` in the provider’s own shape: a `capability_rejected:` token. When the gateway can’t classify the rejection, `upstream rejected the request` on a `400` or `request too large for this upstream` on a `413`.
+ * Any other status: generic per-status copy, such as `upstream rate limit exceeded` on a `429`.
+
+For example, the gateway replaces Amazon Bedrock’s `Input is too long for requested model.` with `capability_rejected: prompt_too_long`. Claude Code [compacts automatically](</docs/en/errors#prompt-is-too-long>) on that token, as it does on `prompt is too long`. Keeping a cloud upstream’s `400` or `413` message, or replacing it with a `capability_rejected:` token, requires gateway v2.1.233 or later.
####
@@ -541,7 +560,7 @@
What goes in `cli`
-Each `cli` value is a complete Claude Code `managed-settings.json` document, the same schema you would deploy via MDM or `/etc/claude-code/managed-settings.json`, expressed here as YAML. The CLI applies the delivered document at the managed tier, above user and project settings. The gateway validates each document against the CLI’s settings schema at boot, so an unrecognized top-level key or a recognized key with a malformed value fails boot with an error naming every offending key. Deliberately open parts of the schema still accept arbitrary values, because newer clients may recognize entries the gateway’s schema doesn’t. These open keys are `env`, `pluginConfigs`, and keys nested under `permissions`. Because validation uses the schema bundled with the gateway’s installed version, putting a top-level settings key introduced by a newer Claude Code release into managed config requires upgrading the gateway first. Smoke-test a new policy on one client before rolling it out. The full key reference is in [Claude Code settings](</docs/en/settings#available-settings>). The keys most operators reach for first:
+Each `cli` value is a complete Claude Code `managed-settings.json` document, the same schema you would deploy via MDM or `/etc/claude-code/managed-settings.json`, expressed here as YAML. The CLI applies the delivered document at the managed tier, above user and project settings. The gateway validates each document against the CLI’s settings schema at boot, so an unrecognized top-level key or a recognized key with a malformed value fails boot with an error naming every offending key. Deliberately open parts of the schema still accept arbitrary values, because newer clients may recognize entries the gateway’s schema doesn’t. These open keys are `env`, `pluginConfigs`, and keys nested under `permissions`. Because validation uses the schema bundled with the gateway’s installed version, putting a top-level settings key introduced by a newer Claude Code release into managed config requires upgrading the gateway first. Smoke-test a new policy on one client before rolling it out. The full key reference is in [Claude Code settings](</docs/en/settings-reference#all-settings>). The keys most operators reach for first:
managed:
policies:
@@ -590,7 +609,7 @@
* the sandbox binary settings `sandbox.bwrapPath`, `sandbox.socatPath`, and `sandbox.ripgrep`
* managed CLAUDE.md content
-[Approval memory](</docs/en/server-managed-settings#approval-memory>) covers how long an approval lasts and when the dialog appears again. Claude Code applies some delivered `env` variables without showing the developer the approval dialog, such as model selection settings and numeric limits. Other delivered variables can require the developer’s approval before they take effect; a non-empty proxy, base-URL, or `OTEL_EXPORTER_OTLP_ENDPOINT` value always does. When a delivered variable needs approval, the dialog names it. [Environment variables and the approval dialog](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>) has the details, including four privacy toggles whose delivered value decides whether they need approval. Before v2.1.218, Claude Code applied fewer variables without asking the developer, so more delivered variables triggered the dialog. The gateway’s telemetry configuration pushes `OTEL_EXPORTER_OTLP_ENDPOINT`, so setting `telemetry.forward_to` triggers the dialog on each interactive client. The dialog protects the developer’s machine from a compromised or hostile gateway, not the organization from the developer. A non-interactive run with the `-p` flag can’t show the dialog. It applies the pushed settings for that run only and doesn’t record them as approved, so the developer’s next interactive session still shows the dialog. Before v2.1.207, a non-interactive run saved the settings as approved and no later interactive session showed the dialog for them. If a developer declines, Claude Code exits rather than applying the policy. Pushing a new hook, or any env var that triggers the dialog, to a broad policy therefore means an approval prompt on every matching developer’s next startup. The `cli` key was named `settings` in earlier releases. That spelling is still accepted as an alias, but new deployments should use `cli`.
+[Approval memory](</docs/en/server-managed-settings#approval-memory>) covers how long an approval lasts and when the dialog appears again. Claude Code applies some delivered `env` variables without showing the developer the approval dialog, such as model selection settings and numeric limits. Other delivered variables can require the developer’s approval before they take effect; a non-empty proxy, base-URL, or `OTEL_EXPORTER_OTLP_ENDPOINT` value always does. When a delivered variable needs approval, the dialog names it. [Environment variables and the approval dialog](</docs/en/server-managed-settings#environment-variables-and-the-approval-dialog>) has the details, including four privacy toggles whose delivered value decides whether they need approval. Before v2.1.218, Claude Code applied fewer variables without asking the developer, so more delivered variables triggered the dialog. The gateway’s telemetry configuration pushes `OTEL_EXPORTER_OTLP_ENDPOINT`, so setting `telemetry.forward_to` triggers the dialog on each interactive client. The dialog protects the developer’s machine from a compromised or hostile gateway, not the organization from the developer. A non-interactive run with the `-p` flag can’t show the dialog. It applies the pushed settings for that run only and doesn’t record them as approved, so the developer’s next interactive session still shows the dialog. Before v2.1.207, a non-interactive run saved the settings as approved and no later interactive session showed the dialog for them. If a developer declines, Claude Code exits that session rather than applying the policy. When you push a new hook, or any env var that triggers the dialog, to a broad policy, Claude Code therefore shows the dialog to every matching developer. It shows the dialog in a running session on the next hourly poll, and otherwise at the developer’s next startup. The `cli` key was named `settings` in earlier releases. That spelling is still accepted as an alias, but new deployments should use `cli`.
####
@@ -641,34 +660,7 @@
Precedence with other managed sources
-If a device also has a local `managed-settings.json` or MDM-delivered policy, the managed sources don’t merge, with two per-key exceptions:
-
- * The `env` block, in Claude Code v2.1.223 or later
- * The [cross-source lock keys](</docs/en/settings#precedence-within-the-managed-tier>)
-
-Both are covered in the list later in this section. The highest-priority source provides all policy settings, ranked in this order with highest priority first:
-
- 1. Gateway-delivered settings
- 2. MDM, via the HKLM registry on Windows or a plist on macOS
- 3. The `managed-settings.json` file
- 4. The HKCU registry, on Windows only
-
-When an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), the helper’s output replaces that source and neither per-key exception applies. A `policyHelper` in those sources doesn’t run while the gateway delivers a non-empty configuration. Embedding hosts such as [Claude Desktop](</docs/en/desktop>) can supply policy through the SDK `managedSettings` option. Whether it applies depends on the machine’s managed configuration:
-
- * On machines with an admin-deployed managed source, it is ignored unless the highest-priority source opts in with [`parentSettingsBehavior: "merge"`](</docs/en/settings#available-settings>).
- * It is never merged when an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>).
- * When merged, it passes through a restrictive-only allowlist. [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) lists which allow-direction settings still apply without the `allowManaged*Only` locks.
-
-The following keys are honored when any admin source above the user-writable HKCU tier sets them, regardless of which source provides the rest of the policy. When an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), the helper’s output is the only source these checks read:
-
- * `sandbox.network.allowManagedDomainsOnly` and `sandbox.filesystem.allowManagedReadPathsOnly`: when locked, the corresponding allowlists are unioned across sources
- * [`allowAllClaudeAiMcps`](</docs/en/settings#available-settings>): allow-only override for the claude.ai MCP server allowlist
- * `sandbox.bwrapPath` and `sandbox.socatPath`: filesystem paths to the [sandbox](</docs/en/sandboxing>) helper binaries
- * [`sandbox.ripgrep`](</docs/en/settings#sandbox-settings>): the `ripgrep` binary the sandbox uses
- * [`forceRemoteSettingsRefresh`](</docs/en/server-managed-settings>): blocks startup until remote managed settings are freshly fetched, so an MDM or file policy that sets it is honored even when a cached remote payload that lacks the key is the highest-priority source
- * `env`: each variable comes from the highest-priority admin source that defines it, and lower admin sources fill in variables the higher sources leave unset. The telemetry unit and credential-paired routing variables follow their own rules; see [Per-key exceptions across managed sources](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>). Requires Claude Code v2.1.223 or later
-
-Every other key, including `disableBypassPermissionsMode`, comes from the highest-priority source only. One [parent-settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) check reads every admin source: when any admin source sets `allowManagedPermissionRulesOnly`, Claude Code drops parent-supplied permission allow rules and `additionalDirectories`. The key’s effect on the developer’s own rules still follows the highest-priority source. A `forceLoginOrgUUID` or `allowedMcpServers` value in the highest-priority admin source blocks a parent-supplied one and is the value Claude Code enforces. A value in a non-winning admin source neither applies nor blocks the parent’s. Before v2.1.223, a value in any admin source blocked the parent’s. See [Settings precedence](</docs/en/settings#settings-precedence>) for the same rules on the settings page. Gateway policies apply to every Claude Code invocation on the machine, including non-interactive `claude -p` runs and sessions spawned by the Agent SDK. If the gateway is unreachable at startup, signed-in sessions exit with an error rather than running without their policy.
+If a device also has an MDM-delivered policy or a local `managed-settings.json`, Claude Code doesn’t merge the managed sources: gateway-delivered settings rank first, so the local sources supply the policy only when the gateway delivers no policy key. [Precedence within the managed tier](</docs/en/managed-settings#precedence-within-the-managed-tier>) on the managed settings page has the full ranking and the [keys Claude Code reads from every admin source](</docs/en/managed-settings#keys-read-from-every-admin-source>) regardless of which source it selected, such as the sandbox lock keys, `forceRemoteSettingsRefresh`, and the per-variable `env` merge. A [`policyHelper`](</docs/en/settings-reference#policyhelper>) configured in an MDM profile or the managed settings file runs only when the gateway delivers no settings; the entry says what its output replaces. Embedding hosts such as [Claude Desktop](</docs/en/desktop>) can supply policy through the SDK `managedSettings` option. [Parent settings from embedding hosts](</docs/en/managed-settings#parent-settings-from-embedding-hosts>) says when Claude Code applies it, and [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) lists which allow-direction settings still apply without the `allowManaged*Only` locks. Gateway policies apply to every Claude Code invocation on the machine, including non-interactive `claude -p` runs and sessions spawned by the Agent SDK. If the gateway is unreachable at startup, signed-in sessions exit with an error rather than running without their policy.
At boot, the gateway rejects `mcpServers` inside a policy’s `cli` block. You can’t distribute MCP servers per group to Claude Code clients; deploy MCP servers via the file-based `managed-mcp.json` on each device or let developers add them locally. You can deliver Claude Desktop’s `managedMcpServers` setting to Claude Desktop clients through a policy’s `desktop` block. To set it, you need Claude Code v2.1.232 or later on the gateway server.
@@ -888,7 +880,7 @@
Client-side managed settings
-Everything above configures the gateway server. You point developer machines at the gateway separately, on each device, through Claude Code’s [managed settings](</docs/en/settings#settings-files>). The gateway can’t push the login keys itself, because they’re what tell the client where the gateway is. For the CLI, set these keys in the per-OS `managed-settings.json`. The two login keys route each developer’s `/login` to your gateway:
+Everything above configures the gateway server. You point developer machines at the gateway separately, on each device, through Claude Code’s [managed settings](</docs/en/managed-settings>). The gateway can’t push the login keys itself, because they’re what tell the client where the gateway is. For the CLI, set these keys in the per-OS `managed-settings.json`. The two login keys route each developer’s `/login` to your gateway:
{
"forceLoginMethod": "gateway",
@@ -904,7 +896,7 @@
Linux and WSL| `/etc/claude-code/managed-settings.json`
Windows| `C:\Program Files\ClaudeCode\managed-settings.json`, or Group Policy via the HKLM registry
-A registry policy on Windows or a managed-preferences plist on macOS replaces the `managed-settings.json` file rather than merging with it, apart from the exception keys and cross-source checks above. All three keys in this snippet follow the highest-priority-source rule, so fleets that deliver policy through Group Policy or configuration profiles must put all three in that mechanism instead. For Claude Desktop, set the `bootstrapUrl` key in Claude Desktop’s own [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`. The sign-in flow and per-group policy then match the CLI’s once a policy opts in server-side with a `desktop` key; without the opt-in, `/user/bootstrap` returns 404. See Claude Desktop overlay for the server-side half. `forceLoginGatewayUrl`, and the `"gateway"` value of `forceLoginMethod`, are honored only from the admin-controlled managed tier. A developer setting them in their own `~/.claude/settings.json` has no effect.
+A registry policy on Windows or a managed-preferences plist on macOS replaces the `managed-settings.json` file rather than merging with it, apart from the exception keys and cross-source checks above. All three keys in this snippet follow the highest-priority-source rule, so fleets that deliver policy through Group Policy or configuration profiles must put all three in that mechanism instead. For Claude Desktop, set the `bootstrapUrl` key in Claude Desktop’s own [managed configuration](<https://claude.com/docs/third-party/claude-desktop/configuration>) to `<listen.public_url>/user/bootstrap`. The sign-in flow and per-group policy then match the CLI’s once a policy opts in server-side with a `desktop` key; without the opt-in, `/user/bootstrap` returns 404. See Claude Desktop overlay for the server-side half. [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>), and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>), are honored only from a managed source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. A developer setting them in their own `~/.claude/settings.json` has no effect, and neither does setting them in the gateway payload.
##
--- a/claude-code-on-the-web.md
+++ b/claude-code-on-the-web.md
@@ -20,7 +20,7 @@
Cloud environments
-Every cloud session runs in a [cloud environment](</docs/en/cloud-environments>), the saved configuration that controls network access, environment variables, and setup scripts. When you onboard, Claude Code sets up a **Default** environment with [**Trusted** network access](</docs/en/cloud-environments#access-levels>). See [The Default environment](</docs/en/cloud-environments#the-default-environment>) for how it’s created and how sessions choose an environment when you have more than one. The same environments apply wherever you start a cloud session: the web, the terminal, [Claude Tag](<https://claude.com/docs/claude-tag/overview>), [routines](</docs/en/routines>), and the mobile and Desktop apps. Claude Tag channel sessions use [organization-shared environments](</docs/en/cloud-environments#organization-shared-environments>) only. See [Configure cloud environments](</docs/en/cloud-environments>) to change what an environment allows, set variables, or add a setup script, and [Installed tools](</docs/en/cloud-environments#installed-tools>) for what sessions include without any configuration.
+Every cloud session runs in a [cloud environment](</docs/en/cloud-environments>), the saved configuration that controls network access, environment variables, and setup scripts. If you don’t have an environment yet when you onboard, Claude Code sets up a **Default** environment with [**Trusted** network access](</docs/en/cloud-environments#access-levels>). See [The Default environment](</docs/en/cloud-environments#the-default-environment>) for how it’s created and how sessions choose an environment when you have more than one. The same environments apply wherever you start a cloud session: the web, the terminal, [Claude Tag](<https://claude.com/docs/claude-tag/overview>), [routines](</docs/en/routines>), and the mobile and Desktop apps. Claude Tag channel sessions use [organization-shared environments](</docs/en/cloud-environments#organization-shared-environments>) only. See [Configure cloud environments](</docs/en/cloud-environments>) to change what an environment allows, set variables, or add a setup script, and [Installed tools](</docs/en/cloud-environments#installed-tools>) for what sessions include without any configuration.
##
@@ -382,7 +382,7 @@
* [Ultrareview](</docs/en/ultrareview>): run a deep multi-agent code review in a cloud sandbox
* [Routines](</docs/en/routines>): automate work on a schedule, via API call, or in response to GitHub events
* [Hooks configuration](</docs/en/hooks>): run scripts at session lifecycle events
- * [Settings reference](</docs/en/settings>): all configuration options
+ * [Settings reference](</docs/en/settings-reference>): all configuration options
* [Security](</docs/en/security>): isolation guarantees and data handling
* [Data usage](</docs/en/data-usage>): what Anthropic retains from cloud sessions
* [Claude Tag](<https://claude.com/docs/claude-tag/overview>): an organization-managed @Claude in Slack that runs on the same cloud infrastructure
--- a/claude-directory.md
+++ b/claude-directory.md
@@ -18,7 +18,7 @@
File| Location| Purpose
---|---|---
-`managed-settings.json`| System-level, varies by OS| Enterprise-enforced settings that you can’t override, apart from [narrow exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>). See [server-managed settings](</docs/en/server-managed-settings>).
+`managed-settings.json`| System-level, varies by OS| Enterprise-enforced settings that you can’t override, apart from [narrow exceptions](</docs/en/settings#security-keys-where-the-stricter-value-applies>). See [where to save the file](</docs/en/managed-settings#deploy-a-managed-settings-file>) and [which managed source Claude Code uses](</docs/en/managed-settings#precedence-within-the-managed-tier>).
`CLAUDE.local.md`| Project root| Your private preferences for this project, loaded alongside CLAUDE.md. Create it manually and add it to `.gitignore`.
Installed plugins| `~/.claude/plugins`| Cloned marketplaces, installed plugin versions, and per-plugin data, managed by `claude plugin` commands. For a plugin installed from a marketplace [`command` source](</docs/en/plugin-marketplaces#command-sources>) in link mode, Claude Code stores links here instead of a copy, and the plugin’s files stay in the directory the command prints. See [plugin caching](</docs/en/plugins-reference#plugin-caching-and-file-resolution>) for how orphaned versions are cleaned up.
@@ -37,8 +37,8 @@
Give Claude project context and conventions| `CLAUDE.md`| project or global| [Memory](</docs/en/memory>)
Allow or block specific tool calls| `settings.json` `permissions` or `hooks`| project or global| [Permissions](</docs/en/permissions>), [Hooks](</docs/en/hooks>)
Run a script before or after tool calls| `settings.json` `hooks`| project or global| [Hooks](</docs/en/hooks>)
-Set environment variables for the session| `settings.json` `env`| project or global| [Settings](</docs/en/settings#available-settings>)
-Keep personal overrides out of git| `settings.local.json`| project only| [Settings scopes](</docs/en/settings#settings-files>)
+Set environment variables for the session| `settings.json` `env`| project or global| [Settings](</docs/en/settings-reference#all-settings>)
+Keep personal overrides out of git| `settings.local.json`| project only| [Settings scopes](</docs/en/settings#where-settings-live>)
Add a prompt or capability you invoke with `/name`| `skills/<name>/SKILL.md`| project or global| [Skills](</docs/en/skills>)
Define a specialized subagent with its own tools| `agents/*.md`| project or global| [Subagents](</docs/en/sub-agents>)
Orchestrate many subagents from a script| `workflows/*.js`| project or global| [Dynamic workflows](</docs/en/workflows>)
@@ -68,7 +68,7 @@
`CLAUDE.md`| Project and global| ✓| Instructions loaded every session| [Memory](</docs/en/memory>)
`rules/*.md`| Project and global| ✓| Topic-scoped instructions, optionally path-gated| [Rules](</docs/en/memory#organize-rules-with-claude/rules/>)
`settings.json`| Project and global| ✓| Permissions, hooks, env vars, model defaults| [Settings](</docs/en/settings>)
-`settings.local.json`| Project only| | Your personal overrides, gitignored when Claude Code saves a setting to it| [Settings scopes](</docs/en/settings#settings-files>)
+`settings.local.json`| Project only| | Your personal overrides, gitignored when Claude Code saves a setting to it| [Settings scopes](</docs/en/settings#where-settings-live>)
`.mcp.json`| Project only| ✓| Team-shared MCP servers| [MCP scopes](</docs/en/mcp#mcp-installation-scopes>)
`.worktreeinclude`| Project only| ✓| Gitignored files to copy into new worktrees| [Worktrees](</docs/en/worktrees#copy-gitignored-files-into-worktrees>)
`skills/<name>/SKILL.md`| Project and global| ✓| Reusable prompts invoked with `/name` or auto-invoked| [Skills](</docs/en/skills>)
@@ -77,7 +77,7 @@
`agents/*.md`| Project and global| ✓| Subagent definitions with their own prompt and tools| [Subagents](</docs/en/sub-agents>)
`workflows/*.js`| Project and global| ✓| Dynamic workflow scripts written by Claude and saved from `/workflows`; each file becomes a `/<name>` command| [Dynamic workflows](</docs/en/workflows>)
`agent-memory/<name>/`| Project and global| ✓| Persistent memory for subagents| [Persistent memory](</docs/en/sub-agents#enable-persistent-memory>)
-`~/.claude.json`| Global only| | App state, OAuth, UI toggles, personal MCP servers| [Global config](</docs/en/settings#global-config-settings>)
+`~/.claude.json`| Global only| | App state, OAuth, UI toggles, personal MCP servers| [Global config](</docs/en/settings-reference#global-config-settings>)
`projects/<project>/memory/`| Global only| | Auto memory: Claude’s notes to itself across sessions| [Auto memory](</docs/en/memory#auto-memory>)
`keybindings.json`| Global only| | Custom keyboard shortcuts| [Keybindings](</docs/en/keybindings>)
`themes/*.json`| Global only| | Custom color themes| [Custom themes](</docs/en/terminal-config#create-a-custom-theme>)
@@ -104,7 +104,7 @@
Cleaned up automatically
-Claude Code deletes the files in the paths below once they’re older than [`cleanupPeriodDays`](</docs/en/settings#available-settings>), as long as it can safely determine the retention period. The default is 30 days and the minimum is 1; setting `0` fails with a validation error. The same age cutoff applies to automatic removal of [orphaned worktrees](</docs/en/worktrees#clean-up-subagent-and-background-session-worktrees>).
+Claude Code deletes the files in the paths below once they’re older than [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>), as long as it can safely determine the retention period. The default is 30 days and the minimum is 1; setting `0` fails with a validation error. The same age cutoff applies to automatic removal of [orphaned worktrees](</docs/en/worktrees#clean-up-subagent-and-background-session-worktrees>).
Path under `~/.claude/`| Contents
---|---
@@ -114,11 +114,13 @@
`file-history/<session>/`| Pre-edit snapshots of files Claude changed, used for [checkpoint restore](</docs/en/checkpointing>). Holds snapshots for the 100 most recent checkpoints; snapshot files that no retained checkpoint references are deleted, except each file’s first snapshot
`plans/`| Plan files written during [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>)
`debug/`| Per-session debug logs, written only when you start with `--debug` or run `/debug`
-`paste-cache/`, `image-cache/`| Contents of large pastes and attached images
+`paste-cache/`| Contents of large pastes
+`image-cache/<session>/`| Attached images. On each sweep, Claude Code removes the directories of all other sessions, whatever their age.
+`uploads/<session>/`| Files you attach from the web or mobile app, and photos you attach from the mobile app, when messaging a [Remote Control](</docs/en/remote-control>) session. An attachment to a [cloud session](</docs/en/claude-code-on-the-web>) is saved in that session’s own cloud environment instead, not on your machine.
`session-env/`| Per-session environment metadata
`tasks/`| Per-session task lists written by the task tools
`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.
-`backups/`| Timestamped copies of `~/.claude.json` taken before config migrations
+`backups/`| Earlier versions of `~/.claude.json`, copied when Claude Code rewrites the file. Claude Code keeps the five newest, plus a copy of any version it couldn’t parse.
`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
`usage-data/`| `report.html` and timestamped report copies written by [`/insights`](</docs/en/costs#analyze-your-usage-patterns>), plus cached per-session analysis data used to build them
`todos/`, `statsig/`, `logs/`| Legacy directories from older versions. No longer written. The sweep removes their contents and then the empty directory.
@@ -136,15 +138,15 @@
Kept until you delete them
-The following paths are not covered by automatic cleanup and persist indefinitely.
+The retention cleanup sweep doesn’t cover the following paths. Claude Code keeps them until you delete them, apart from the two caches whose rows say that logging out deletes them.
Path under `~/.claude/`| Contents
---|---
`history.jsonl`| Every prompt you’ve typed, with timestamp and project path. Used for up-arrow recall.
`stats-cache.json`| Aggregated token and cost counts shown by `/usage`
-`remote-settings.json`| Cached copy of [server-managed settings](</docs/en/server-managed-settings>) for your organization. Only present when your organization has configured them. Refreshed on each launch.
+`remote-settings.json`| Cached copy of [server-managed settings](</docs/en/server-managed-settings>) for your organization, or `{}` when your organization has configured none. Only present when the session [fetches them](</docs/en/server-managed-settings#platform-availability>). Claude Code checks for updates at startup and hourly during a session. Claude Code deletes it when you log out.
`cache/changelog.md`| Cached copy of the Claude Code changelog, used to show release notes after an update. Refreshed in the background.
-`policy-limits.json`| Cached feature policy settings for your organization. Only present for some account types. Refreshed automatically.
+`policy-limits.json`| Cached feature policy settings for your organization. Only present for some account types. Refreshed automatically. Claude Code deletes it when you log out.
Other small cache and lock files appear depending on which features you use and are safe to delete.
@@ -207,6 +209,7 @@
`~/.claude/projects/`| Resume, continue, and rewind for past sessions, and auto memory for every project
`~/.claude/history.jsonl`| Up-arrow prompt recall
`~/.claude/paste-cache/`| Pasted text in recalled prompts; see [paste large content](</docs/en/terminal-config#paste-large-content>)
+`~/.claude/uploads/`| Attachments that past [Remote Control](</docs/en/remote-control>) sessions refer to by path
`~/.claude/file-history/`| Checkpoint restore for past sessions
`~/.claude/stats-cache.json`| Historical totals shown by `/usage`
`~/.claude/usage-data/`| Past [`/insights`](</docs/en/costs#analyze-your-usage-patterns>) reports and the cached analysis data used to build them
--- a/claude-security.md
+++ b/claude-security.md
@@ -1,4 +1,4 @@
-The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session. A team of Claude agents maps your architecture, builds a threat model, hunts for vulnerabilities, and independently reviews every finding before writing the report. Use the plugin to scan a whole repository or only a set of changes, such as a branch’s diff, a pull request’s diff, or a single commit, then turn the findings you choose into patches that you review and apply yourself. The plugin runs locally in your session, and each scan counts against your plan’s usage limits. If you want a managed service that monitors your repositories, see the [Claude Security](<https://claude.com/product/claude-security>) product, available on the Enterprise plan. The plugin reaches code the managed product can’t reach, such as repositories hosted on GitLab or Bitbucket, or on networks that don’t allow inbound connections. The plugin is also distinct from the review tools already in Claude Code: the [security guidance plugin](</docs/en/security-guidance>) reviews code as Claude writes it, [`/security-review`](</docs/en/commands#all-commands>) runs a single pass over your branch, and [Code Review](</docs/en/code-review>) reviews pull requests. For how the layers stack, see How the plugin fits with other security tools.
+The Claude Security plugin runs a multi-agent vulnerability scan of your codebase inside a Claude Code session. A team of Claude agents maps your architecture, builds a threat model, hunts for vulnerabilities, and independently reviews every finding before writing the report. Use the plugin to scan a whole repository or only a set of changes, such as a branch’s diff, a pull request’s diff, or a single commit, then turn the findings you choose into patches that you review and apply yourself. The plugin runs locally in your session, uses whichever models you have access to in Claude Code, and each scan counts against your plan’s usage limits. If you want a managed service that monitors your repositories, or want to run scans on [Claude Mythos 5](<https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5>), see the [Claude Security](<https://claude.com/product/claude-security>) product, available on the Enterprise plan. The plugin reaches code the managed product can’t reach, such as repositories hosted on GitLab or Bitbucket, or on networks that don’t allow inbound connections. The plugin is also distinct from the review tools already in Claude Code: the [security guidance plugin](</docs/en/security-guidance>) reviews code as Claude writes it, [`/security-review`](</docs/en/commands#all-commands>) runs a single pass over your branch, and [Code Review](</docs/en/code-review>) reviews pull requests. For how the layers stack, see How the plugin fits with other security tools.
##
--- a/cli-reference.md
+++ b/cli-reference.md
@@ -55,36 +55,36 @@
Flag| Description| Example
---|---|---
-`--add-dir`| Add additional working directories for Claude to read and edit files. Grants file access; most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from these directories. Validates each path exists as a directory. To persist these directories across sessions, set [`permissions.additionalDirectories`](</docs/en/settings#permission-settings>) in settings| `claude --add-dir ../apps ../lib`
+`--add-dir`| Add additional working directories for Claude to read and edit files. Grants file access; most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from these directories. Validates each path exists as a directory. To persist these directories across sessions, set [`permissions.additionalDirectories`](</docs/en/settings-reference#permissions-additionaldirectories>) in settings| `claude --add-dir ../apps ../lib`
`--advisor <model>`| Enable the server-side [advisor tool](</docs/en/advisor>) for this session with a model alias, `fable`, `opus`, or `sonnet`, or a full model ID. Takes precedence over the `advisorModel` setting for the session. `fable` requires [Fable 5 access](</docs/en/advisor#choose-an-advisor-model>)| `claude --advisor opus`
`--agent`| Specify an agent for the current session (overrides the `agent` setting)| `claude --agent my-custom-agent`
`--agents`| Define custom subagents dynamically via JSON. Accepts the [fields listed for CLI-defined subagents](</docs/en/sub-agents#choose-the-subagent-scope>)| `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'`
`--allow-dangerously-skip-permissions`| Add `bypassPermissions` to the `Shift+Tab` mode cycle without starting in it. Lets you begin in a different mode like `plan` and switch to `bypassPermissions` later. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| `claude --permission-mode plan --allow-dangerously-skip-permissions`
-`--allowedTools`, `--allowed-tools`| Tools that execute without prompting for permission. See [permission rule syntax](</docs/en/settings#permission-rule-syntax>) for pattern matching. To restrict which tools are available, use `--tools` instead. If you name one of the [task-tracking tools](</docs/en/tools-reference#task-tool-availability>) here, Claude Code also opts the session in| `"Bash(git log *)" "Bash(git diff *)" "Read"`
+`--allowedTools`, `--allowed-tools`| Tools that execute without prompting for permission. See [permission rule syntax](</docs/en/settings-reference#permission-rule-syntax>) for pattern matching. To restrict which tools are available, use `--tools` instead. If you name one of the [task-tracking tools](</docs/en/tools-reference#task-tool-availability>) here, Claude Code also opts the session in| `"Bash(git log *)" "Bash(git diff *)" "Read"`
`--append-subagent-system-prompt`| Append custom text to the end of every [subagent](</docs/en/sub-agents>)’s system prompt, nested subagents included, apart from a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>), which reuses the conversation’s own prompt. Only applies in non-interactive mode with `-p`. Requires Claude Code v2.1.205 or later| `claude -p --append-subagent-system-prompt "Cite file paths in every answer" "query"`
`--append-system-prompt`| Append custom text to the end of the default system prompt| `claude --append-system-prompt "Always use TypeScript"`
`--append-system-prompt-file`| Load additional system prompt text from a file and append to the default prompt| `claude --append-system-prompt-file ./extra-rules.txt`
`--autocompact <auto|tokens>`| Set the [auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) for this session without changing your saved settings. Accepts the same values as `/autocompact`; that section covers the value forms and what overrides the flag. Requires Claude Code v2.1.221 or later| `claude --autocompact 500k`
-`--ax-screen-reader`| Render screen-reader friendly output: flat text without decorative borders or animations. Forces the classic renderer, so the [`tui`](</docs/en/settings#available-settings>) setting has no effect; attached [background sessions](</docs/en/agent-view>) still render fullscreen. Takes precedence over [`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars>) and the [`axScreenReader`](</docs/en/settings#available-settings>) setting. Requires Claude Code v2.1.181 or later| `claude --ax-screen-reader`
+`--ax-screen-reader`| Render screen-reader friendly output: flat text without decorative borders or animations. Forces the classic renderer, so the [`tui`](</docs/en/settings-reference#tui>) setting has no effect; attached [background sessions](</docs/en/agent-view>) still render fullscreen. Takes precedence over [`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars>) and the [`axScreenReader`](</docs/en/settings-reference#axscreenreader>) setting. Requires Claude Code v2.1.181 or later| `claude --ax-screen-reader`
`--bare`| Minimal mode: skip auto-discovery of hooks, skills, custom commands, subagents, plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Skills in a directory you pass with `--add-dir` still load. Claude has access to Bash, file read, and file edit tools. Sets [`CLAUDE_CODE_SIMPLE`](</docs/en/env-vars>). See [bare mode](</docs/en/headless#start-faster-with-bare-mode>)| `claude --bare -p "query"`
`--betas`| Beta headers to include in API requests (API key users only)| `claude --betas interleaved-thinking`
`--bg`, `--background`| Start the session as a [background agent](</docs/en/agent-view>) and return immediately. Prints the session ID and management commands. Combine with `--exec` to run a shell command as a background job instead of a Claude session, or with `--agent` to run a specific subagent. Cannot be combined with `-p`/`--print`; see the [error reference](</docs/en/errors#command-line-errors>)| `claude --bg "investigate the flaky test"`
`--channels`| (Research preview) MCP servers whose [channel](</docs/en/channels>) notifications Claude should listen for in this session. Space-separated list of `plugin:<name>@<marketplace>` entries. Requires Anthropic authentication through claude.ai or a Console API key| `claude --channels plugin:my-notifier@my-marketplace`
`--chrome`| Enable [Chrome browser integration](</docs/en/chrome>) for web automation and testing| `claude --chrome`
`--cloud`| With a task description, create a new [web session](</docs/en/claude-code-on-the-web>) on claude.ai. With a session ID (`session_...` or `cse_...`) or a claude.ai/code URL, target that existing session instead: `-p` queues the message into it, and no `-p` attaches your terminal. See [send a follow-up message](</docs/en/claude-code-on-the-web#send-follow-ups-from-the-cli>).| `claude --cloud "Fix the login bug"`
-`--continue`, `-c`| Load the most recent conversation in the current directory. Includes sessions that added this directory with `/add-dir`| `claude --continue`
+`--continue`, `-c`| Load the most recent conversation in the current directory, skipping [background sessions, sessions created with `claude -p` or the Agent SDK, and sessions whose first prompt was `/loop`](</docs/en/sessions#resume-a-session>). `claude -p --continue` includes `-p`, SDK, and `/loop` sessions. Includes sessions that added this directory with `/add-dir`| `claude --continue`
`--dangerously-load-development-channels`| Enable [channels](</docs/en/channels-reference#test-during-the-research-preview>) that are not on the approved allowlist, for local development. Accepts `plugin:<name>@<marketplace>` and `server:<name>` entries. Prompts for confirmation| `claude --dangerously-load-development-channels server:webhook`
`--dangerously-skip-permissions`| Skip permission prompts. Equivalent to `--permission-mode bypassPermissions`. See [permission modes](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) for what this does and does not skip. For sessions started with `--bg`, the mode [persists when the supervisor restarts the session](</docs/en/agent-view#permission-mode-model-and-effort>)| `claude --dangerously-skip-permissions`
`--debug`| Enable debug mode with optional category filtering, such as `--debug='mcp,startup'` or `--debug='!1p'`. The filter binds only in the `=` form; a space-separated filter enables debug mode without filtering| `claude --debug='mcp,startup'`
`--debug-file <path>`| Write debug logs to a specific file path. Implicitly enables debug mode. Takes precedence over `CLAUDE_CODE_DEBUG_LOGS_DIR`| `claude --debug-file /tmp/claude-debug.log`
`--disable-slash-commands`| Disable all skills and commands for this session| `claude --disable-slash-commands`
`--disallowedTools`, `--disallowed-tools`| Deny rules. A bare tool name removes the matching tools from Claude’s context: `"Edit"` removes Edit, `"*"` removes every tool, and `"mcp__*"` removes every MCP tool. A scoped rule such as `Bash(rm *)` leaves the tool available and denies only matching calls. A rule naming [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) can’t remove it while any other tool remains| `"Bash(git log *)" "Bash(git diff *)" "Edit"`
-`--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`. Available levels depend on the model. `ultracode` starts the session at `xhigh` effort with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) turned on, and requires Claude Code v2.1.203 or later. Overrides the [`effortLevel`](</docs/en/settings#available-settings>) setting for this session and does not persist| `claude --effort high`
+`--effort`| Set the [effort level](</docs/en/model-config#adjust-effort-level>) for the current session. Options: `low`, `medium`, `high`, `xhigh`, `max`, or `ultracode`. Available levels depend on the model. `ultracode` starts the session at `xhigh` effort with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) turned on, and requires Claude Code v2.1.203 or later. Overrides the [`effortLevel`](</docs/en/settings-reference#effortlevel>) setting for this session and does not persist| `claude --effort high`
`--enable-auto-mode`| Removed in v2.1.111. Auto mode is now in the `Shift+Tab` cycle by default; use `--permission-mode auto` to start in it| `claude --permission-mode auto`
`--environment <environment-id>`| Create a new cloud session that runs on the [self-hosted environment](</docs/en/self-hosted-environments>) with the given ID. Environment IDs start with `ccpool_`. See [`--environment` dispatch behavior](</docs/en/self-hosted-environments-testing#environment-dispatch-behavior>) for the interactive and non-interactive forms and the flag combinations it rejects. Requires Claude Code v2.1.224 or later| `claude -p "Fix the login bug" --environment ccpool_abc123`
`--exclude-dynamic-system-prompt-sections`| Move per-machine sections from the system prompt (working directory, environment info, memory paths, git-repo flag) into the first user message. Improves prompt-cache reuse across different users and machines running the same task. Only applies with the default system prompt; ignored when `--system-prompt` or `--system-prompt-file` is set. Use with `-p` for scripted, multi-user workloads| `claude -p --exclude-dynamic-system-prompt-sections "query"`
`--exec`| Run a shell command as a PTY-backed background job instead of starting a Claude session. Use with `--bg` to launch from the shell| `claude --bg --exec 'pytest -x'`
-`--fallback-model`| Enable automatic fallback to the specified model(s) when the primary model is overloaded or not available, for example a retired model. Accepts a comma-separated list tried in order. See [Fallback model chains](</docs/en/model-config#fallback-model-chains>). To persist a chain across sessions, use the [`fallbackModel` setting](</docs/en/settings#available-settings>), which this flag overrides| `claude --fallback-model sonnet,haiku`
+`--fallback-model`| Enable automatic fallback to the specified model(s) when the primary model is overloaded or not available, for example a retired model. Accepts a comma-separated list tried in order. See [Fallback model chains](</docs/en/model-config#fallback-model-chains>). To persist a chain across sessions, use the [`fallbackModel` setting](</docs/en/settings-reference#fallbackmodel>), which this flag overrides| `claude --fallback-model sonnet,haiku`
`--fork-session`| When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`)| `claude --resume abc123 --fork-session`
`--forward-subagent-text`| Emit [subagent](</docs/en/sub-agents>) text and thinking blocks in the output stream as `assistant` and `user` messages with `parent_tool_use_id` set, so you can reconstruct each subagent’s transcript. Without this flag, Claude Code emits only subagent `tool_use` and `tool_result` blocks. Requires `--print` and `--output-format stream-json`. Claude Code also forwards messages from [nested subagents](</docs/en/sub-agents#let-subagents-spawn-their-own-subagents>), setting `parent_tool_use_id` to the ID of the Agent tool call that spawned each one; this requires Claude Code v2.1.219 or later. The [`CLAUDE_CODE_FORWARD_SUBAGENT_TEXT`](</docs/en/env-vars>) environment variable enables the same behavior. Requires Claude Code v2.1.211 or later| `claude -p --output-format stream-json --verbose --forward-subagent-text "query"`
`--from-pr`| Open the session picker filtered to sessions linked to a specific pull request. Accepts a PR number, a GitHub or GitHub Enterprise PR URL, a GitLab merge request URL, or a Bitbucket pull request URL. Sessions are linked automatically when Claude creates the pull request| `claude --from-pr 123`
@@ -99,7 +99,7 @@
`--max-budget-usd`| Maximum dollar amount to spend on API calls before stopping (print mode only). Spend from [subagents](</docs/en/sub-agents>) counts toward the cap. Once spend reaches the cap, spawning another subagent fails with `Budget limit reached`, and Claude Code stops background subagents that are still running; the cap-enforcement behaviors require Claude Code v2.1.217 or later| `claude -p --max-budget-usd 5.00 "query"`
`--max-turns`| Limit the number of agentic turns (print mode only). Exits with an error when the limit is reached. No limit by default. With `--input-format stream-json`, a message sent while Claude is working stays queued and runs as its own turn, with its own limit, when the limit ends the current one| `claude -p --max-turns 3 "query"`
`--mcp-config`| Load MCP servers from JSON files or strings (space-separated). When you pass this flag with `-p`, Claude Code waits for still-pending servers to connect before running the first turn, up to the [`MCP_TIMEOUT`](</docs/en/env-vars>) startup timeout, 30 seconds by default; a server with a [cached tool list](</docs/en/mcp#managing-your-servers>) skips the wait and connects on first use. The wait requires Claude Code v2.1.221 or later| `claude --mcp-config ./mcp.json`
-`--model`| Sets the model for the current session with an alias for the latest model (`sonnet`, `opus`, `haiku`, or `fable`) or a model’s full name. Overrides the [`model`](</docs/en/settings#available-settings>) setting and [`ANTHROPIC_MODEL`](</docs/en/model-config#environment-variables>)| `claude --model claude-sonnet-5`
+`--model`| Sets the model for the current session with an alias for the latest model (`sonnet`, `opus`, `haiku`, or `fable`) or a model’s full name. Overrides the [`model`](</docs/en/settings-reference#model>) setting and [`ANTHROPIC_MODEL`](</docs/en/model-config#environment-variables>)| `claude --model claude-sonnet-5`
`--name`, `-n`| Set a display name for the session, shown in `/resume` and the terminal title. You can resume a named session with `claude --resume <name>`. In an interactive session, if another live session on this machine already uses the name, Claude Code applies [a variant of it](</docs/en/sessions#name-your-sessions>) instead.
[`/rename`](</docs/en/commands>) changes the name mid-session and also shows it on the prompt bar| `claude -n "my-feature-work"`
@@ -128,10 +128,10 @@
`--system-prompt`| Replace the entire system prompt with custom text| `claude --system-prompt "You are a Python expert"`
`--system-prompt-file`| Load system prompt from a file, replacing the default prompt| `claude --system-prompt-file ./custom-prompt.txt`
`--teleport`| Resume a [web session](</docs/en/claude-code-on-the-web>) in your local terminal| `claude --teleport`
-`--teammate-mode`| Set how [agent team](</docs/en/agent-teams>) teammates display: `in-process` (default), `auto`, `tmux`, or `iterm2` (added in v2.1.186). Overrides the [`teammateMode`](</docs/en/settings#available-settings>) setting for this session. See [Choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `claude --teammate-mode auto`
+`--teammate-mode`| Set how [agent team](</docs/en/agent-teams>) teammates display: `in-process` (default), `auto`, `tmux`, or `iterm2` (added in v2.1.186). Overrides the [`teammateMode`](</docs/en/settings-reference#teammatemode>) setting for this session. See [Choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `claude --teammate-mode auto`
`--tmux`| Create a tmux session for the worktree. Requires `--worktree`. Uses iTerm2 native panes when available; pass `--tmux=classic` for traditional tmux| `claude -w feature-auth --tmux`
`--tools`| Restrict which built-in tools Claude can use. Use `""` to disable all, `"default"` for all, or tool names like `"Bash,Edit,Read"`. If you name one of the [task-tracking tools](</docs/en/tools-reference#task-tool-availability>) here, Claude Code also opts the session in. The flag doesn’t affect MCP tools; to deny those too, use `--disallowedTools "mcp__*"`. A list that omits [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) doesn’t remove it; `""` removes it only when no MCP tools remain| `claude --tools "Bash,Edit,Read"`
-`--verbose`| Enable verbose logging, shows full turn-by-turn output. Overrides the [`viewMode`](</docs/en/settings#available-settings>) setting for this session| `claude --verbose`
+`--verbose`| Enable verbose logging, shows full turn-by-turn output. Overrides the [`viewMode`](</docs/en/settings-reference#viewmode>) setting for this session| `claude --verbose`
`--version`, `-v`| Output the version number| `claude -v`
`--worktree`, `-w`| Start Claude in an isolated [git worktree](</docs/en/worktrees>) at `<repo>/.claude/worktrees/<name>`. If you don’t give a name, Claude Code generates one. Pass `#<number>`, a GitHub pull request URL, or a GitLab merge request URL to [fetch that PR or MR from `origin` and branch the worktree from it](</docs/en/worktrees#branch-from-a-pull-request>). Branching from a GitLab merge request requires Claude Code v2.1.233 or later| `claude -w feature-auth`
--- a/cloud-environments.md
+++ b/cloud-environments.md
@@ -10,7 +10,7 @@
The Default environment
-Onboarding sets up the **Default** environment for you, whether you connect through [the web](</docs/en/web-quickstart#connect-github>) or a CLI flow such as `/web-setup`; if web onboarding shows an environment form instead of creating the environment, keep the form’s defaults to get the same **Default** environment. **Default** carries no configuration of its own:
+If you don’t have an environment yet, onboarding sets up the **Default** environment for you, whether you connect through [the web](</docs/en/web-quickstart#connect-github>) or a CLI flow such as `/web-setup`; if web onboarding shows an environment form instead of creating the environment, keep the form’s defaults to get the same **Default** environment. **Default** carries no configuration of its own:
* **Trusted** network access: sessions reach package registries and other allowlisted domains, and nothing else through the session’s network.
* No other configuration: **Default** defines no environment variables or setup script, so sessions start with just the pre-installed tools.
@@ -62,7 +62,7 @@
Select an environment from the CLI
-Run `/remote-env` in your terminal to choose the default environment for cloud sessions you create from the CLI, such as [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>). The command opens a picker of your existing environments and saves your choice to the `remote.defaultEnvironmentId` key in your [user settings](</docs/en/settings#settings-files>), so it applies in every project on your machine until you change it, unless the same key is set at a higher-precedence [settings layer](</docs/en/settings#settings-precedence>), such as a repo’s project settings. A [self-hosted environment](</docs/en/self-hosted-environments>) ID, which has the form `ccpool_...`, follows a stricter source rule. See [`remote.defaultEnvironmentId`](</docs/en/settings#available-settings>) for the settings layers Claude Code honors it from. `/remote-env` only sets the default: it doesn’t start a session, and it can’t add or edit environments. Manage them at [claude.ai/code](<https://claude.ai/code>).
+Run `/remote-env` in your terminal to choose the default environment for cloud sessions you create from the CLI, such as [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>). The command opens a picker of your existing environments and saves your choice to the `remote.defaultEnvironmentId` key in your [user settings](</docs/en/settings#where-settings-live>), so it applies in every project on your machine until you change it, unless the same key is set at a higher-precedence [settings layer](</docs/en/settings#settings-precedence>), such as a repo’s project settings. A [self-hosted environment](</docs/en/self-hosted-environments>) ID, which has the form `ccpool_...`, follows a stricter source rule. See [`remote.defaultEnvironmentId`](</docs/en/settings-reference#remote-defaultenvironmentid>) for the settings layers Claude Code honors it from. `/remote-env` only sets the default: it doesn’t start a session, and it can’t add or edit environments. Manage them at [claude.ai/code](<https://claude.ai/code>).
###
@@ -207,16 +207,16 @@
**Python**| Python 3.x with pip, poetry, uv, black, mypy, pytest, ruff
**Node.js**| 20, 21, and 22, with npm, yarn, pnpm, bun¹, eslint, prettier, chromedriver
**Ruby**| 3.1, 3.2, 3.3 with gem, bundler, rbenv
-**PHP**| 8.4 with Composer
+**PHP**| 8.3 with Composer
**Java**| OpenJDK 21 with Maven and Gradle
-**Go**| latest stable with module support
+**Go**| Go with module support
**Rust**| rustc and cargo
**C/C++**| GCC, Clang, cmake, ninja, conan
**Docker**| docker, dockerd, docker compose
**Databases**| PostgreSQL 16, Redis 7.0
-**Utilities**| git, jq, yq, ripgrep, tmux, vim, nano
-
-¹ Bun is installed but has known proxy compatibility issues for package fetching. For exact versions, ask Claude to run `check-tools` in a cloud session. It’s a shell command installed on the session VM, not a slash command; you ask Claude because Claude runs all VM commands for you. Node.js versions are installed at `/opt/node20`, `/opt/node21`, and `/opt/node22`, with 22 on `PATH` by default. To work with a different version, ask Claude to prepend that version’s `bin` directory, such as `/opt/node20/bin`, to `PATH`. Toolchains outside this list, such as the .NET SDK, aren’t pre-installed even when their package registries are on the default allowlist. Install them with a setup script.
+**Utilities**| git, gh, jq, yq, ripgrep, tmux, vim, nano
+
+¹ Bun is installed but has known proxy compatibility issues for package fetching. To get the versions of most of the tools in this table, ask Claude to run `check-tools` in a cloud session. It’s a shell command installed on the session VM, not a slash command; you ask Claude because Claude runs all VM commands for you. For a tool it doesn’t report, such as Ruby, PHP, bun, PostgreSQL, or Redis, ask Claude to run the tool’s own version command, for example `psql --version`. Node.js versions are installed at `/opt/node20`, `/opt/node21`, and `/opt/node22`, with 22 on `PATH` by default. To work with a different version, ask Claude to prepend that version’s `bin` directory, such as `/opt/node20/bin`, to `PATH`. Toolchains outside this list, such as the .NET SDK, aren’t pre-installed even when their package registries are on the default allowlist. Install them with a setup script.
###
@@ -226,22 +226,10 @@
Cloud sessions include built-in GitHub tools that let Claude read issues, list pull requests, fetch diffs, and post comments without any setup. These tools authenticate through the GitHub proxy using whichever method you configured under [GitHub authentication options](</docs/en/claude-code-on-the-web#github-authentication-options>), so your token never enters the container. You can set `GH_TOKEN` or `GITHUB_TOKEN` yourself in environment settings, or leave both unset and let the GitHub proxy authenticate for you:
- * If you set a token, it passes through to the container unchanged, so your scripts, and GitHub’s [`gh` CLI](<https://cli.github.com>) if you install it, use it directly.
+ * If you set a token, it passes through to the container unchanged, so your scripts and GitHub’s [`gh` CLI](<https://cli.github.com>) use it directly.
* If you set neither and the GitHub proxy is handling authentication for your session, both variables read as the placeholder string `proxy-injected` in the commands Claude runs, and the proxy substitutes your real credentials on outbound GitHub requests. `gh` works without a token of your own, but a script that reads `GITHUB_TOKEN` directly gets the placeholder, not a usable token.
-A token you set is an ordinary environment variable, so anyone who uses the environment can read it; the proxy path keeps the credential out of the environment configuration and the session VM. To check which case applies to your session, ask Claude to run `echo $GH_TOKEN`. GitHub’s [`gh` CLI](<https://cli.github.com>) isn’t pre-installed. If you need a `gh` command the built-in tools don’t cover, like `gh release` or `gh workflow run`, install and authenticate it yourself:
-
-1
-
-Install gh in your setup script
-
-Add `apt update && apt install -y gh` to your setup script.
-
-2
-
-Provide a token if the proxy is not handling authentication
-
-If `echo $GH_TOKEN` prints `proxy-injected`, the GitHub proxy authenticates `gh` for you and this step is unnecessary. Otherwise, add a `GH_TOKEN` environment variable to your environment settings with a GitHub personal access token; like any environment variable, it’s readable by anyone who uses the environment, so scope the token narrowly. `gh` reads `GH_TOKEN` automatically, so you don’t need to run `gh auth login`.
+A token you set is an ordinary environment variable, so anyone who uses the environment can read it; the proxy path keeps the credential out of the environment configuration and the session VM. To check which case applies to your session, ask Claude to run `echo $GH_TOKEN`. GitHub’s [`gh` CLI](<https://cli.github.com>) is pre-installed. If you need a `gh` command the built-in tools don’t cover, like `gh release` or `gh workflow run`, ask Claude to run it. `gh` reads `GH_TOKEN` automatically, so you don’t need to run `gh auth login`.
###
@@ -249,7 +237,7 @@
Link output back to the session
-Each cloud session has a transcript URL on claude.ai, and the session can read its own ID from the `CLAUDE_CODE_REMOTE_SESSION_ID` environment variable. Use this to put a traceable link in PR bodies, commit messages, Slack posts, or generated reports so a reviewer can open the run that produced them. Commits that Claude creates in a cloud session include a `Claude-Session: <url>` git trailer, and PR bodies include the session URL on its own line. This requires v2.1.179 or later. To omit the trailer and the PR-body link, set [`attribution.sessionUrl`](</docs/en/settings#attribution-settings>) to `false`. The setting requires v2.1.182 or later. To include the session link in something other than a commit or PR, such as a Slack message Claude posts or a report file it writes, have Claude run the following command and use its output. The command converts the `cse_` prefix in the environment variable’s value to the `session_` prefix that the transcript URL expects:
+Each cloud session has a transcript URL on claude.ai, and the session can read its own ID from the `CLAUDE_CODE_REMOTE_SESSION_ID` environment variable. Use this to put a traceable link in PR bodies, commit messages, Slack posts, or generated reports so a reviewer can open the run that produced them. Commits that Claude creates in a cloud session include a `Claude-Session: <url>` git trailer, and PR bodies include the session URL on its own line. This requires v2.1.179 or later. To omit the trailer and the PR-body link, set [`attribution.sessionUrl`](</docs/en/settings-reference#attribution-sessionurl>) to `false`. The setting requires v2.1.182 or later. To include the session link in something other than a commit or PR, such as a Slack message Claude posts or a report file it writes, have Claude run the following command and use its output. The command converts the `cse_` prefix in the environment variable’s value to the `session_` prefix that the transcript URL expects:
echo "https://claude.ai/code/${CLAUDE_CODE_REMOTE_SESSION_ID/#cse_/session_}"
@@ -311,10 +299,10 @@
Setup scripts
-A setup script is a Bash script that runs when a new cloud session starts, before Claude Code launches. Use setup scripts to install dependencies, configure tools, or fetch anything the session needs that isn’t pre-installed. Scripts run as root on Ubuntu 24.04, so `apt install` and most language package managers work. To add a setup script, open the environment settings dialog and enter your script in the **Setup script** field. This example installs GitHub’s [`gh` CLI](<https://cli.github.com>), which isn’t pre-installed.
+A setup script is a Bash script that runs when a new cloud session starts, before Claude Code launches. Use setup scripts to install dependencies, configure tools, or fetch anything the session needs that isn’t pre-installed. Scripts run as root on Ubuntu 24.04, so `apt install` and most language package managers work. To add a setup script, open the environment settings dialog and enter your script in the **Setup script** field. This example installs [ShellCheck](<https://www.shellcheck.net/>), which isn’t pre-installed.
#!/bin/bash
- apt update && apt install -y gh
+ apt update && apt install -y shellcheck
###
@@ -349,7 +337,7 @@
| Setup scripts| SessionStart hooks
---|---|---
-**Where you configure them**| The environment dialog at [claude.ai/code](<https://claude.ai/code>)| A [settings file](</docs/en/settings#settings-files>) such as your repo’s `.claude/settings.json`; see What carries over from your setup for which files reach a cloud session
+**Where you configure them**| The environment dialog at [claude.ai/code](<https://claude.ai/code>), or the **Cloud environments** admin page for shared environments| A [settings file](</docs/en/settings#where-settings-live>) such as your repo’s `.claude/settings.json`; see What carries over from your setup for which files reach a cloud session
**When they run**| Before Claude Code launches, skipped when a cached environment exists| After Claude Code launches, on every session including resumed
**Where they run**| Cloud sessions only| Local and cloud sessions
--- a/code-review.md
+++ b/code-review.md
@@ -374,7 +374,7 @@
* **Claude apps gateway** : sessions that connect through the [Claude apps gateway](</docs/en/claude-apps-gateway>)
* **Privacy environment variables** : sessions that opt out of telemetry or feature-flag fetching with [`DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars#variables>)
-A scheduled task never launches the cloud review, so schedule `/code-review` without the `ultra` argument. To stop both Claude and scheduled tasks from starting the review while keeping `/code-review` available for you to type, add a [`skillOverrides`](</docs/en/skills#override-skill-visibility-from-settings>) entry to a [settings file](</docs/en/settings#settings-files>) such as `~/.claude/settings.json`:
+A scheduled task never launches the cloud review, so schedule `/code-review` without the `ultra` argument. To stop both Claude and scheduled tasks from starting the review while keeping `/code-review` available for you to type, add a [`skillOverrides`](</docs/en/skills#override-skill-visibility-from-settings>) entry to a [settings file](</docs/en/settings#where-settings-live>) such as `~/.claude/settings.json`:
{
"skillOverrides": {
--- a/commands.md
+++ b/commands.md
@@ -1,4 +1,4 @@
-Commands control Claude Code from inside a session. They provide a quick way to switch models, manage permissions, clear context, run a workflow, and more. Type `/` to see the commands available to you, or type `/` followed by letters to filter. A command is only recognized at the start of your message. Text that follows the command name becomes its arguments. As of v2.1.199, [skills](</docs/en/skills#pass-arguments-to-skills>) are the exception: a skill invocation followed by more skills, such as `/skill-a /skill-b do XYZ`, loads every skill named at the start and passes the trailing text to each as arguments. Up to six skills can be chained. If you send a command while Claude is responding, Claude Code queues it and runs it after the current turn finishes. Claude Code runs some commands immediately without interrupting the response, such as `/status`, `/tasks`, and `/usage`. In [fullscreen rendering](</docs/en/fullscreen>), Claude Code also opens dialog commands such as `/theme` and `/help` immediately. Before v2.1.234, Claude Code queued those dialogs until the turn finished.
+Commands control Claude Code from inside a session. They provide a quick way to switch models, manage permissions, clear context, run a workflow, and more. Type `/` to see the commands available to you, or type `/` followed by letters to filter. How the command menu matches what you type covers highlighting, typos, and the few commands Claude Code hides from the menu until you type their full name. A command is only recognized at the start of your message. Text that follows the command name becomes its arguments. As of v2.1.199, [skills](</docs/en/skills#pass-arguments-to-skills>) are the exception: a skill invocation followed by more skills, such as `/skill-a /skill-b do XYZ`, loads every skill named at the start and passes the trailing text to each as arguments. Up to six skills can be chained. If you send a command while Claude is responding, Claude Code queues it and runs it after the current turn finishes. Claude Code runs some commands immediately without interrupting the response, such as `/status`, `/tasks`, and `/usage`. In [fullscreen rendering](</docs/en/fullscreen>), Claude Code also opens dialog commands such as `/theme` and `/help` immediately. Before v2.1.234, Claude Code queued those dialogs until the turn finished.
##
@@ -30,6 +30,7 @@
`/add-dir <path>`| Add a working directory for file access during the current session. Type a partial path to see matching directory suggestions; press `Tab` to accept one. Most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from the added directory. A successful add runs your [`DirectoryAdded` hooks](</docs/en/hooks#directoryadded>). When you run it while Claude is responding, Claude Code asks you to confirm the directory right away, and once you confirm, Claude’s next tool call in the same turn can access it. Before v2.1.234, Claude Code queued the command until the turn finished
`/advisor [model|off]`| Enable or disable the [advisor tool](</docs/en/advisor>), which consults a second model for guidance at key moments during a task. Accepts `fable`, `opus`, `sonnet`, or a full model ID. `fable` requires [Fable 5 access](</docs/en/advisor#choose-an-advisor-model>). Without an argument, opens a picker
`/agents`| As of v2.1.198, running `/agents` prints a reminder to ask Claude to create or manage [subagents](</docs/en/sub-agents>), or to edit `.claude/agents/` or `~/.claude/agents/` directly. On v2.1.197 and earlier, opens an interactive interface for creating and managing subagent configurations
+`/artifacts`| List the [artifacts](</docs/en/artifacts#find-an-artifact-again>) you own or that are shared with you, then attach one to the session, open it in your browser, or copy its link. Available where [artifacts](</docs/en/artifacts#availability>) are. Requires Claude Code v2.1.208 or later; attaching with `Enter` requires v2.1.216
`/autocompact [auto|<tokens>]`| Set the auto-compact window: how full the context window gets before Claude Code compacts automatically. Pass a size such as `500k`, or `auto` to return to the window tuned for your model. Claude Code saves the value to user settings and applies it to the current session. See [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) for accepted values and what overrides it. Without an argument, opens a dialog that shows the current window. Requires Claude Code v2.1.221 or later
`/autofix-pr [prompt]`| Spawn a [Claude Code on the web](</docs/en/claude-code-on-the-web#auto-fix-pull-requests>) session that watches the current branch’s PR and pushes fixes when CI fails or reviewers leave comments. Detects the open PR from your checked-out branch with `gh pr view`; to watch a different PR, check out its branch first. By default the cloud session is told to fix every CI failure and review comment; pass a prompt to give it different instructions, for example `/autofix-pr only fix lint and type errors`. Requires the `gh` CLI and access to [Claude Code on the web](</docs/en/claude-code-on-the-web>)
`/background [prompt]`| Detach the current session to run as a [background agent](</docs/en/agent-view>) and free this terminal. Pass a prompt to send one more instruction before detaching. Monitor the session with `claude agents`. To copy the conversation into a new background session while this one keeps running, use `/fork`. Alias: `/bg`
@@ -56,16 +57,16 @@
`/desktop`| Continue the current session in the Claude Code Desktop app. Requires macOS or x64 Windows and a Claude subscription. Alias: `/app`
`/diff`| Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Use left/right arrows to switch between the current git diff and individual Claude turns, and up/down to browse files. Press Enter to open the selected file’s diff, scroll it with up/down or PageUp/PageDown, and press Esc to return to the file list. Claude Code computes these diffs from raw git blob content, so diff drivers and `textconv` filters configured in `.gitattributes` or git config don’t apply. Before v2.1.222, workspace-configured drivers and filters could rewrite the viewer’s output. The open viewer also refreshes automatically when the repository’s git state changes outside the session, such as a branch switch or commit in another terminal; the auto-refresh requires Claude Code v2.1.198 or later
`/doctor`| **[Skill](</docs/en/skills#bundled-skills>).** Run a setup checkup that diagnoses issues and can fix them. Checks installation health, including duplicate or leftover installs, `PATH` problems, and unparseable settings files. Finds unused skills, MCP servers, and plugins versus their context cost, flags slow [hooks](</docs/en/hooks>), and checks for a newer version on your [release channel](</docs/en/setup#configure-release-channel>). Deduplicates local `CLAUDE.md` files against checked-in ones, trims checked-in [`CLAUDE.md`](</docs/en/memory#my-claude-md-is-too-large>) files by cutting content Claude could derive from the codebase, and migrates the always-loaded guidance that remains into [skills](</docs/en/skills>) and nested `CLAUDE.md` files that load on demand. Also offers to make [auto mode](</docs/en/permissions#permission-modes>) your default and to [pre-approve](</docs/en/permissions>) frequently denied read-only commands. Reports findings first and asks for confirmation before changing anything. From the terminal, `claude doctor` prints read-only installation diagnostics without starting a session. Alias: `/checkup`. The `CLAUDE.md` trim check requires Claude Code v2.1.206 or later. Before v2.1.205, `/doctor` opened a read-only diagnostics screen and pressing `f` sent the report to Claude
-`/effort [level|auto]`| Set the model [effort level](</docs/en/model-config#adjust-effort-level>). Accepts `low`, `medium`, `high`, `xhigh`, `max`, or [`ultracode`](</docs/en/workflows#let-claude-decide-with-ultracode>); available levels depend on the model, and `max` and `ultracode` are session-only. `auto` resets to the model default. Without an argument, opens an interactive slider. Takes effect immediately without waiting for the current response to finish. Also available in non-interactive mode (`-p`) with a level argument, where it applies to the current session only; requires Claude Code v2.1.205 or later. While the [model-default effort hold](</docs/en/model-config#adjust-effort-level>) is in force, a non-interactive `/effort` reports `Not applied`, so pass `--effort` at launch instead
+`/effort [level|auto|status]`| Set the [effort level](</docs/en/model-config#adjust-effort-level>): `low` to `xhigh`, `max`, [`ultracode`](</docs/en/workflows#let-claude-decide-with-ultracode>), or `auto`; `status` prints it. `max` and `ultracode` are session-only; the [`ultracode`](</docs/en/settings-reference#ultracode>) key persists. Works in `-p` outside the [effort hold](</docs/en/model-config#adjust-effort-level>)
`/exit`| Exit the CLI. In an attached [background session](</docs/en/agent-view#attach-to-a-session>), this detaches and the session keeps running. Alias: `/quit`
`/export [filename]`| Export the current conversation as plain text. With a filename, writes directly to that file. Without, opens a dialog to copy to clipboard or save to a file
`/fast [on|off]`| Toggle [fast mode](</docs/en/fast-mode>) on or off. Availability in non-interactive mode with `-p` is limited; see [Toggle fast mode](</docs/en/fast-mode#toggle-fast-mode>). Requires Claude Code v2.1.205 or later
`/feedback [report]`| Send product feedback about Claude Code. Opens the same dialog as `/bug`, with the same consent step, sending rules, and mid-turn behavior
`/fewer-permission-prompts`| **[Skill](</docs/en/skills#bundled-skills>).** Scan your transcripts for common read-only Bash and MCP tool calls, then add a prioritized allowlist to project `.claude/settings.json` to reduce permission prompts
-`/focus`| Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response. The tool-call summary also counts the subagents launched in the turn and collapses completed background-task notifications into a single count. The selection persists across sessions; set [`viewMode`](</docs/en/settings#available-settings>) in settings to override it. Only available in [fullscreen rendering](</docs/en/fullscreen>). The [VS Code extension](</docs/en/vs-code#use-the-prompt-box>) offers its own Focus view as a command-menu toggle, stored as an extension setting, independent of `viewMode`
+`/focus`| Toggle the focus view, which shows only your last prompt, a one-line tool-call summary with edit diffstats, and the final response. The tool-call summary also counts the subagents launched in the turn and collapses completed background-task notifications into a single count. The selection persists across sessions; set [`viewMode`](</docs/en/settings-reference#viewmode>) in settings to override it. Only available in [fullscreen rendering](</docs/en/fullscreen>). The [VS Code extension](</docs/en/vs-code#use-the-prompt-box>) offers its own Focus view as a command-menu toggle, stored as an extension setting, independent of `viewMode`
`/fork [prompt]`| [Copy the current conversation](</docs/en/agent-view#copy-the-session-with-%2Ffork>) into a new background session and keep working here. Pass a prompt and the copy starts working on it immediately; without one it waits in agent view for its first prompt. Except when the copy [edits in place](</docs/en/agent-view#how-file-edits-are-isolated>), Claude Code instructs it to create a worktree of its own before making code changes; the isolation instruction requires Claude Code v2.1.221 or later. To hand a side task to a subagent whose result comes back into this conversation, use `/subtask`; to switch into a copy yourself, use `/branch`. Requires Claude Code v2.1.212 or later; on v2.1.161 through v2.1.211, and whenever [agent view is turned off](</docs/en/agent-view#turn-off-agent-view>), `/fork` starts a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) instead
`/goal [condition|clear]`| Set a [goal](</docs/en/goal>): Claude keeps working across turns until the condition is met or the goal [clears for another reason](</docs/en/goal#how-evaluation-works>). With no argument, shows the current or most recently achieved goal. `clear`, `stop`, `off`, `reset`, `none`, or `cancel` removes an active goal early
-`/heapdump`| Write a JavaScript heap snapshot and a memory breakdown to `~/Desktop`, or your home directory on Linux without a Desktop folder, for diagnosing high memory usage. Attach only the `-diagnostics.json` file when reporting a memory issue; the `.heapsnapshot` contains your full conversation and credentials, so don’t share it. Doesn’t appear in the command menu; type it in full. See [what to do with the output](</docs/en/troubleshooting#high-cpu-or-memory-usage>)
+`/heapdump`| Write a JavaScript heap snapshot and a memory breakdown to `~/Desktop`, or your home directory on Linux without a Desktop folder, for diagnosing high memory usage. Attach only the `-diagnostics.json` file when reporting a memory issue; the `.heapsnapshot` contains your full conversation and credentials, so don’t share it. Hidden from the command menu; type it in full. See [what to do with the output](</docs/en/troubleshooting#high-cpu-or-memory-usage>)
`/help`| Show help and available commands
`/hooks`| View [hook](</docs/en/hooks>) configurations for tool events
`/ide`| Manage IDE integrations and show status
@@ -75,7 +76,7 @@
`/install-github-app`| Install the Claude GitHub App for a repository, with an optional step to set up [GitHub Actions](</docs/en/github-actions>) workflows and secrets. Walks you through selecting a repo and configuring the integration
`/install-slack-app`| Install the Claude Slack app. Opens a browser to complete the OAuth flow
`/keybindings`| Open your [keyboard shortcuts](</docs/en/keybindings>) file
-`/list-agents`| List the subagents and other Claude Code sessions Claude can message, with the name to use for each; [agent team](</docs/en/agent-teams>) teammates aren’t listed, since Claude reaches them through the team’s roster. See [cross-session messaging](</docs/en/cross-session-messaging>). Also available as `/peers`. Requires Claude Code v2.1.224 or later; earlier versions report `Unknown command: /list-agents`. Available only in sessions where [cross-session messaging is enabled](</docs/en/cross-session-messaging#availability>)
+`/list-agents`| List the subagents, [agent team](</docs/en/agent-teams>) teammates, and other Claude Code sessions Claude can message, with the name to use for each. See [cross-session messaging](</docs/en/cross-session-messaging>). Also available as `/peers`. Requires Claude Code v2.1.224 or later; earlier versions report `Unknown command: /list-agents`. Teammate rows and the first line showing this session’s own name require v2.1.239 or later. Available only in sessions where [cross-session messaging is enabled](</docs/en/cross-session-messaging#availability>)
`/login`| Sign in to your Anthropic account
`/logout`| Sign out from your Anthropic account
`/loop [interval] [prompt]`| **[Skill](</docs/en/skills#bundled-skills>).** Run a prompt repeatedly while the session stays open. Omit the interval and, [where available](</docs/en/scheduled-tasks#let-claude-choose-the-interval>), Claude self-paces between iterations. Omit the prompt and, [where available](</docs/en/scheduled-tasks#let-claude-choose-the-interval>), Claude runs an autonomous maintenance check or the prompt in `.claude/loop.md`. Example: `/loop 5m check if the deploy finished`. See [Run prompts on a schedule](</docs/en/scheduled-tasks>). Alias: `/proactive`
@@ -107,8 +108,8 @@
`/schedule [description]`| Create, update, list, or run [routines](</docs/en/routines>), which execute in the cloud. Claude walks you through the setup conversationally. You can also ask about a [routine’s recent runs](</docs/en/routines#manage-routines-from-the-cli>). Alias: `/routines`
`/scroll-speed`| Adjust mouse wheel [scroll speed](</docs/en/fullscreen#mouse-wheel-scrolling>) interactively, with a ruler you can scroll while the dialog is open to preview the change. Available in [fullscreen rendering](</docs/en/fullscreen>) only and not in the JetBrains IDE terminal
`/security-review`| Analyze the changes on your current branch for security vulnerabilities. Reviews the diff between your branch and origin’s default branch, identifying risks like injection, auth issues, and data exposure. Needs an `origin` remote; if the review fails with an `ambiguous argument` error, see the [error reference](</docs/en/errors#security-review-fails-without-origin-head>)
-`/setup-bedrock`| Configure [Amazon Bedrock](</docs/en/amazon-bedrock>) authentication, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_BEDROCK=1` is set. First-time Amazon Bedrock users can also access this wizard from the login screen
-`/setup-vertex`| Configure [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) authentication, project, region, and model pins through an interactive wizard. Only visible when `CLAUDE_CODE_USE_VERTEX=1` is set. First-time Google Cloud’s Agent Platform users can also access this wizard from the login screen
+`/setup-bedrock`| Configure [Amazon Bedrock](</docs/en/amazon-bedrock>) authentication, region, and model pins through an interactive wizard. Hidden from the command menu until `CLAUDE_CODE_USE_BEDROCK=1` is set; type it in full. First-time Amazon Bedrock users can also access this wizard from the login screen
+`/setup-vertex`| Configure [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) authentication, project, region, and model pins through an interactive wizard. Hidden from the command menu until `CLAUDE_CODE_USE_VERTEX=1` is set; type it in full. First-time Google Cloud’s Agent Platform users can also access this wizard from the login screen
`/simplify [target]`| **[Skill](</docs/en/skills#bundled-skills>).** Review the changed code for cleanup opportunities and apply the fixes. Four review [agents](</docs/en/sub-agents>) run in parallel, covering reuse of existing helpers, simplification, efficiency, and whether the change is at the right level of abstraction. From v2.1.154, the review doesn’t look for correctness bugs. Use `/code-review` to find bugs. On earlier versions, `/simplify` is equivalent to `/code-review --fix`. Pass a path or PR reference to review a specific target
`/skills`| List available [skills](</docs/en/skills>). Type to filter the list by name. Press `t` to sort by token count. Press `Space` to [cycle a skill’s visibility to Claude and the `/` menu](</docs/en/skills#override-skill-visibility-from-settings>), then `Enter` to save
`/stats`| Alias for `/usage`. Opens on the Stats tab
@@ -138,6 +139,19 @@
+How the command menu matches what you type
+
+Claude Code filters the `/` menu as you type. Each bullet below covers one thing you might notice while filtering:
+
+ * **Highlighting** : Claude Code highlights the top suggestion only when the letters after the `/` match a command’s name or alias, from the start of the name or from a word within it, ignoring the `:`, `_`, and `-` separators. Typing `/adddir` highlights `/add-dir`, and typing `/new` highlights `/clear` through its alias. Press `Enter` to run the highlighted suggestion.
+ * **After a typo** : Claude Code highlights nothing. The close matches stay listed, and you can pick one with `Tab` or the arrow keys, but `Enter` submits your text as typed and reports [Unknown command](</docs/en/errors#unknown-command>).
+ * **Commands that aren’t available to you** : Claude Code leaves them out of the menu. When nothing matches, Claude Code shows `No commands match "/name"`. Most unavailable commands return [Unknown command](</docs/en/errors#unknown-command>) when you submit them; a few, such as [`/schedule` on a Console API key](</docs/en/routines#schedule-returns-unknown-command>), answer with their own availability message instead.
+ * **Hidden commands** : Claude Code keeps a few available commands, such as `/heapdump`, out of the menu by design. A partial name never brings a hidden command into the menu: if the partial matches nothing visible, Claude Code shows the same no-match message. Claude Code lists the command only once you’ve typed its full name, and submitting the full name runs it.
+
+##
+
+
+
MCP prompts
MCP servers can expose prompts that appear as commands. These use the format `/mcp__<server>__<prompt>` and are dynamically discovered from connected servers. See [MCP prompts](</docs/en/mcp#use-mcp-prompts-as-commands>) for details.
--- a/common-workflows.md
+++ b/common-workflows.md
@@ -237,7 +237,7 @@
enhance the PR description with more context about the security improvements
-When you create a PR using `gh pr create`, the session is automatically linked to that PR. To find it later, run `claude --from-pr 1234` with your own PR number, which opens the session picker filtered to sessions linked to that PR, or paste the PR URL into the [`/resume` picker](</docs/en/sessions#use-the-session-picker>) search.
+To find the session later, run `claude --from-pr 1234` with your own PR number, which opens the session picker filtered to sessions linked to that PR, or paste the PR URL into the [`/resume` picker](</docs/en/sessions#use-the-session-picker>) search. Claude Code links the session to the PR when Claude creates it with `gh pr create` or `glab mr create`, and when Claude [works on an existing PR](</docs/en/agent-view#pull-request-status>).
Review Claude’s generated PR before submitting and ask Claude to highlight potential risks or considerations.
@@ -306,7 +306,7 @@
You can use any of these methods:
1. Drag and drop an image into the Claude Code window
- 2. Copy an image and paste it into the CLI with Ctrl+V. On macOS, Cmd+V also works in iTerm2.
+ 2. Copy an image and paste it into the CLI with `Ctrl+V`, or with [`Alt+V` on Windows and WSL](</docs/en/interactive-mode#general-controls>)
3. Provide an image path to Claude. E.g., “Analyze this image: /path/to/your/image.png”
2
@@ -366,8 +366,6 @@
Reference a directory
What's the structure of @src/components?
-
-This provides a directory listing with file information.
3
--- a/communications-kit.md
+++ b/communications-kit.md
@@ -410,7 +410,7 @@
Drag a screenshot straight into the terminal and Claude sees it: error
dialogs, UI mockups, whiteboard photos, Figma exports. *Ctrl+V* pastes from
- clipboard (Ctrl+V works on macOS too, and Cmd+V works in iTerm2).
+ the clipboard, or *Alt+V* on Windows and WSL.
*Try it now:* next time something visual breaks, screenshot it and paste it
right into the prompt. Then just type "what's wrong here?"
--- a/computer-use.md
+++ b/computer-use.md
@@ -106,7 +106,7 @@
One session at a time
-Only one session at a time can use your computer. Claude Code takes a machine-wide lock when a session performs its first computer use action. Claude Code releases it when that session exits, not when the task finishes. If another session is already using your computer, Claude Code rejects new attempts and tells you which session holds the lock. Exit that session first.
+Only one session at a time can use your computer. A session takes a machine-wide lock at its first computer use action and releases it when the session exits, not when the task finishes. A second session’s computer use fails with an error naming the session that holds the lock. Exit that session first.
###
--- a/corporate-launcher.md
+++ b/corporate-launcher.md
@@ -1,6 +1,6 @@
Some organizations require every process on a workstation to start through a mandatory launcher. The launcher applies the sandbox, network controls, or credential injection that the company’s security posture depends on, and a binary that starts without it is a policy violation. `CLAUDE_CODE_PROCESS_WRAPPER` starts every process Claude Code launches from its own binary through your launcher: the background service, every session it hosts in [agent view](</docs/en/agent-view>), and Claude Code’s relaunches after an update. Set it to your launcher’s absolute path, and Claude Code runs the launcher with the Claude Code command as its arguments. A launcher that wraps the `claude` command on your `PATH` can’t reach these processes, because they start from the binary’s direct path without looking up `claude`.
-`CLAUDE_CODE_PROCESS_WRAPPER` requires Claude Code v2.1.208 or later. Earlier versions ignore the variable and start every process unwrapped. The equivalent [`processWrapper` setting](</docs/en/settings#available-settings>) requires v2.1.210 or later. Earlier versions ignore it as an unknown key, apply no launcher, and report no error.After deploying either form, use the Verify step to confirm the running version applies it.
+`CLAUDE_CODE_PROCESS_WRAPPER` requires Claude Code v2.1.208 or later. Earlier versions ignore the variable and start every process unwrapped. The equivalent [`processWrapper` setting](</docs/en/settings-reference#processwrapper>) requires v2.1.210 or later. Earlier versions ignore it as an unknown key, apply no launcher, and report no error.After deploying either form, use the Verify step to confirm the running version applies it.
##
@@ -66,7 +66,7 @@
Set CLAUDE_CODE_PROCESS_WRAPPER in settings
-Set the variable in the `env` block of a settings file so the detached background service inherits it. A shell `export` isn’t enough: the background service starts on demand, outlives your shell, and never re-reads shell profiles.For one machine, add it to `~/.claude/settings.json`. To deploy it to every machine in your organization, put the same block in [managed settings](</docs/en/permissions#managed-settings>):
+Set the variable in the `env` block of a settings file so the detached background service inherits it. A shell `export` isn’t enough: the background service starts on demand, outlives your shell, and never re-reads shell profiles.For one machine, add it to `~/.claude/settings.json`. To deploy it to every machine in your organization, put the same block in [managed settings](</docs/en/managed-settings>):
{
"env": {
@@ -74,13 +74,13 @@
}
}
-When more than one source sets the variable, the managed settings value overrides both `~/.claude/settings.json` and a value exported in the shell, so users can’t point self-spawns at a different launcher.The [`processWrapper` setting](</docs/en/settings#available-settings>) carries the same value as a named, top-level settings key. Set it when your organization pushes settings as individual keys rather than an `env` block. The `processWrapper` setting requires Claude Code v2.1.210 or later. The following settings file sets the same launcher through the key:
+When more than one source sets the variable, the managed settings value overrides both `~/.claude/settings.json` and a value exported in the shell, so users can’t point self-spawns at a different launcher.The [`processWrapper` setting](</docs/en/settings-reference#processwrapper>) carries the same value as a named, top-level settings key. Set it when your organization pushes settings as individual keys rather than an `env` block. The `processWrapper` setting requires Claude Code v2.1.210 or later. The following settings file sets the same launcher through the key:
{
"processWrapper": "/opt/corp/launcher"
}
-`CLAUDE_CODE_PROCESS_WRAPPER` takes precedence when both are set.Because `processWrapper` is a named setting, an organization that delivers it through [remote managed settings](</docs/en/settings#settings-files>) sees it listed on the [security approval dialog](</docs/en/server-managed-settings#security-approval-dialogs>) alongside the other settings that run administrator-supplied executables.Project and local settings can’t configure the launcher. A file committed to a repository must not be able to put a binary in front of every Claude Code process on the machine, so Claude Code ignores `CLAUDE_CODE_PROCESS_WRAPPER` in `.claude/settings.json` or `.claude/settings.local.json` with a warning in the [debug log](</docs/en/troubleshooting>), and never reads the `processWrapper` key from those files.
+`CLAUDE_CODE_PROCESS_WRAPPER` takes precedence when both are set.Because `processWrapper` is a named setting, an organization that delivers it through [remote managed settings](</docs/en/managed-settings#delivery-mechanisms>) sees it listed on the [security approval dialog](</docs/en/server-managed-settings#security-approval-dialogs>) alongside the other settings that run administrator-supplied executables.Project and local settings can’t configure the launcher. A file committed to a repository must not be able to put a binary in front of every Claude Code process on the machine, so Claude Code ignores `CLAUDE_CODE_PROCESS_WRAPPER` in `.claude/settings.json` or `.claude/settings.local.json` with a warning in the [debug log](</docs/en/troubleshooting>), and never reads the `processWrapper` key from those files.
3
--- a/costs.md
+++ b/costs.md
@@ -212,7 +212,7 @@
Reduce MCP server overhead
-MCP tool definitions are [deferred by default](</docs/en/mcp#scale-with-mcp-tool-search>), so only tool names enter context until Claude uses a specific tool. Run `/context` to see what’s consuming space.
+MCP tool definitions are [deferred by default](</docs/en/mcp#scale-with-mcp-tool-search>), so only tool names and server instructions enter context until Claude uses a specific tool. Run `/context` to see what’s consuming space.
* **Prefer CLI tools when available** : Tools like `gh`, `aws`, `gcloud`, and `sentry-cli` are still more context-efficient than MCP servers because they don’t add any per-tool listing. Claude can run CLI commands directly.
* **Disable unused servers** : Run `/mcp` to see configured servers and disable any you’re not actively using.
@@ -237,7 +237,7 @@
* filter-test-output.sh
-Add this to your [settings.json](</docs/en/settings#settings-files>) to run the hook before every Bash command:
+Add this to your [settings.json](</docs/en/settings#where-settings-live>) to run the hook before every Bash command:
{
"hooks": {
@@ -348,7 +348,7 @@
* **Long context** : Claude Code sends your full conversation with every request, and each time Claude uses tools it sends another request carrying that batch of tool results. With [prompt caching](</docs/en/prompt-caching>), Claude Code re-reads that history at the [cached token rate](<https://platform.claude.com/docs/en/about-claude/pricing>), so a one-line question in a session that has been open all day still draws usage for the whole conversation. See Manage context proactively for ways to keep your context small
* **Cache misses** : your first message after a break longer than the [cache lifetime](</docs/en/prompt-caching#cache-lifetime>) misses the cache and reprocesses your full context. The lifetime is an hour on a subscription and drops to five minutes once you’re drawing on [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>); on an API key or cloud provider, it’s five minutes by default. You can keep the one-hour lifetime while drawing on usage credits by setting [`ENABLE_PROMPT_CACHING_1H=1`](</docs/en/env-vars>). On Pro and Max plans, when you resume a large session after a long break, Claude Code [offers to resume from a summary](</docs/en/sessions#resume-from-a-summary>) so later requests don’t carry the full history
* **Scheduled tasks** : a [scheduled task](</docs/en/scheduled-tasks>) fires on its interval even while the session is idle, sending your full context each time
- * **Cross-session messages** : Claude Code delivers a [message from another of your sessions](</docs/en/cross-session-messaging>) as a new turn when this session sits idle, sending your full context each time. To hold inbound messages instead of delivering them, set [`crossSessionInbound`](</docs/en/settings#available-settings>) to `hold`
+ * **Cross-session messages** : Claude Code delivers a [message from another of your sessions](</docs/en/cross-session-messaging>) as a new turn when this session sits idle, sending your full context each time. To hold inbound messages instead of delivering them, set [`crossSessionInbound`](</docs/en/settings-reference#crosssessioninbound>) to `hold`
* **Goal check-ins** : while background work keeps an active [goal](</docs/en/goal>) waiting, Claude Code [asks Claude to check on that work](</docs/en/goal#background-work-defers-evaluation>) even when the session sits idle, starting a new turn that sends your full context. To turn check-ins off, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](</docs/en/env-vars>) to `0`. Idle check-ins require Claude Code v2.1.236 or later
* **Agent teammates** : each active teammate keeps consuming tokens until it exits
* **Compaction** : `/compact` reads the conversation it summarizes, so [compacting a large context](</docs/en/prompt-caching#compacting-the-conversation>) is itself a large request. When you want a fresh start instead of continuity, `/clear` costs nothing
Show diff (159 lines)
--- a/cross-session-messaging.md
+++ b/cross-session-messaging.md
@@ -1,4 +1,4 @@
-Cross-session messaging requires Claude Code v2.1.224 or later and runs on macOS and Linux. When a session meets the requirements, messaging is on with nothing to enable. See Availability for provider requirements and how to confirm a session has it.
+Cross-session messaging requires Claude Code v2.1.224 or later on macOS and Linux, including Linux inside WSL 2. On native Windows, it requires Claude Code v2.1.234 or later. When a session meets the requirements, messaging is on with nothing to enable. See Availability for provider requirements and how to confirm a session has it.
Cross-session messaging lets Claude deliver a message from one of your Claude Code sessions to another. When a change in one session breaks what another is building on, Claude can warn that session before you notice. When one session settles a question another is blocked on, Claude can send the answer across. A message is a piece of text one Claude writes to another, never conversation history or files. To move a whole conversation or its context, [resume the session](</docs/en/sessions#resume-a-session>) instead. Claude uses two tools for this: `ListAgents` to discover which agents it can reach, and `SendMessage` to deliver a message to one of them by name. With the same `SendMessage` tool, Claude can also message [subagents](</docs/en/sub-agents#resume-subagents>) and [agent team](</docs/en/agent-teams>) teammates within a single session or team. This page covers messages between your independent sessions.
@@ -54,6 +54,7 @@
* The message is over the size cap. Claude Code refuses it in the sending session, before it leaves.
* A rapid burst to a session on this machine has reached what that session’s inbox accepts. Claude Code refuses further messages to that session.
* The reply target on this machine fails a safety check, such as a symlinked target or an endpoint that isn’t the expected process. [Refusing to send a cross-session message](</docs/en/errors#refusing-to-send-a-cross-session-message>) lists these checks.
+ * Claude addresses the message to this session’s own name, as described under See which sessions Claude can reach.
The receiving session checks each arriving message against its own inbound controls, and the check ends in one of three outcomes:
@@ -110,14 +111,15 @@
See which sessions Claude can reach
-Claude finds a message’s target on its own, so you don’t need to run anything before asking it to send. To see for yourself which sessions Claude can reach, run the `/list-agents` command. It lists each session with the name it answers to, and that name is where Claude addresses a message. The listing covers:
-
- * **Subagents** : agents running inside the current session. [Agent team](</docs/en/agent-teams>) teammates aren’t listed; Claude messages them through the team’s own roster.
+Claude finds a message’s target on its own, so you don’t need to run anything before asking it to send. To see for yourself which sessions Claude can reach, run the `/list-agents` command. The first line is this session’s own name, the one your other sessions use to message it. The rows below it are the sessions Claude can reach, each with the name it answers to:
+
+ * **Subagents** : agents running inside the current session.
+ * **Teammates** : this session’s own [agent team](</docs/en/agent-teams>) teammates. Before v2.1.239, teammates didn’t appear in the listing, though Claude could already message them by name.
* **Your other local sessions** : Claude Code sessions running on the same machine, including [background sessions](</docs/en/agent-view>). A session appears only when it binds an inbox socket. The worker process that the [supervisor process](</docs/en/agent-view#the-supervisor-process>) keeps ready for your next background session appears once you dispatch work to it.
* **Your cloud sessions** : your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions, shown while this session is connected to [Remote Control](</docs/en/remote-control>). Claude Code labels them `cloud` in the listing.
* **Your Remote Control sessions on other machines** : shown while this session is connected to [Remote Control](</docs/en/remote-control>), and labeled `Remote Control`. Claude Code shows `offline` as the status of a session whose Remote Control connection has dropped.
-Claude Code reads your cloud and Remote Control session lists newest first and stops after a bounded number of pages for each. If your account has more of those sessions than fit, Claude Code doesn’t list the older ones, and Claude can’t message them by name. When this happens, Claude Code says so in the listing, and Claude sees the same note when it sends a message. Claude addresses a session beyond this machine by name, the same as a local session. See Message sessions on other machines for how those messages travel. A session answers to the name you set with the [`/rename`](</docs/en/commands>) command or the [`--name`](</docs/en/cli-reference#cli-flags>) flag. When you don’t set one, Claude Code names the session itself. For an interactive session, Claude Code derives the name from the working directory’s folder name, such as `my-app-3f` in a `my-app` directory. When you rename a session, or start or resume an interactive one, with a name another live session on this machine already uses, Claude Code leaves the name with the session that already has it and [renames yours to a variant](</docs/en/sessions#name-your-sessions>). Sessions can still share a name, for example when one of them runs an earlier version of Claude Code or the shared name is one Claude Code generated. Claude Code shows each local session’s working directory in the `/list-agents` output, so you can tell same-named sessions apart when they run in different directories. Claude addresses the message in one of two ways, depending on how many live sessions answer to the name:
+This session isn’t one of the rows. If Claude addresses a message to this session’s own name, Claude Code refuses it and tells Claude the target is the current session. Before v2.1.239, the listing didn’t show this session’s name, and Claude Code reported a message sent to it as an agent it couldn’t find. Claude Code reads your cloud and Remote Control session lists newest first and stops after a bounded number of pages for each. If your account has more of those sessions than fit, Claude Code doesn’t list the older ones, and Claude can’t message them by name. When this happens, Claude Code says so in the listing, and Claude sees the same note when it sends a message. Claude addresses a session beyond this machine by name, the same as a local session. See Message sessions on other machines for how those messages travel. A session answers to the name you set with the [`/rename`](</docs/en/commands>) command or the [`--name`](</docs/en/cli-reference#cli-flags>) flag. When you don’t set one, Claude Code names the session itself. For an interactive session, that is the name shown in [listings of running sessions](</docs/en/sessions#name-your-sessions>). When you rename a session, or start or resume an interactive one, with a name another live session on this machine already uses, Claude Code leaves the name with the session that already has it and [renames yours to a variant](</docs/en/sessions#name-your-sessions>). Sessions can still share a name, for example when one of them runs an earlier version of Claude Code or the shared name is one Claude Code generated. Claude Code shows each local session’s working directory in the `/list-agents` output, so you can tell same-named sessions apart when they run in different directories. Claude addresses the message in one of two ways, depending on how many live sessions answer to the name:
* **One session answers to the name** : Claude Code delivers the message on the name alone.
* **Several sessions share the name, or Claude Code couldn’t check everywhere your sessions run** : Claude adds a short identifier to each row of its listing and uses the identifier in the address.
@@ -132,11 +134,11 @@
Where the other session runs| How the message travels
---|---
-On this machine| Over a per-session socket, never through Anthropic servers
+On this machine| Over a per-session socket on macOS and Linux, or a per-session named pipe on native Windows, never through Anthropic servers
On another of your machines| Through Anthropic servers, arriving over that machine’s [Remote Control](</docs/en/remote-control>) connection
On [Claude Code on the web](</docs/en/claude-code-on-the-web>)| Through Anthropic servers, straight to the cloud session
-Starting a conversation with a session on another of your machines requires Claude Code v2.1.225 or later and a target that appears in the listing. Before v2.1.225, Claude could only reply to a message that arrived from one. Same-machine delivery works wherever the feature is enabled. Each session registers itself in files on disk and binds its inbox socket there. When Claude lists or messages your local sessions, Claude Code reads those files to find them, so two sessions can reach each other only when they can see the same files. A container has its own filesystem, so a session inside it and a session on the host can’t reach each other. Two sessions inside the same container can still message each other, including on a [self-hosted runner](</docs/en/self-hosted-environments>). While this session is connected to Remote Control, when you message a session on another of your machines, Claude Code shows the message in that session’s conversation under this session’s Remote Control name. The Claude on that machine can reply to that name. For example, when this session is connected to Remote Control as `laptop-graceful-unicorn` and you message your desktop, you see the message in the desktop session under `laptop-graceful-unicorn`. If this session isn’t connected to Remote Control when Claude sends to a session beyond this machine, the message still goes through, but without a reply address, so the receiving Claude can’t answer it. Claude is told as much when it sends. To require your approval before any message goes beyond this machine, set `isolatePeerMachines`.
+Starting a conversation with a session on another of your machines requires Claude Code v2.1.225 or later and a target that appears in the listing. Before v2.1.225, Claude could only reply to a message that arrived from one. Same-machine delivery works wherever the feature is enabled. Each session registers itself in files on disk. When Claude lists or messages your local sessions, Claude Code reads those files to find the sessions, so two sessions can reach each other only when they can see the same files. A container has its own filesystem, so a session inside it and a session on the host can’t reach each other. Two sessions inside the same container can still message each other, including on a [self-hosted runner](</docs/en/self-hosted-environments>). A session inside WSL 2 and a native Windows session on the same computer can’t reach each other either, because they register under different home directories and listen on different socket types. While this session is connected to Remote Control, when you message a session on another of your machines, Claude Code shows the message in that session’s conversation under this session’s Remote Control name. The Claude on that machine can reply to that name. For example, when this session is connected to Remote Control as `laptop-graceful-unicorn` and you message your desktop, you see the message in the desktop session under `laptop-graceful-unicorn`. If this session isn’t connected to Remote Control when Claude sends to a session beyond this machine, the message still goes through, but without a reply address, so the receiving Claude can’t answer it. Claude is told as much when it sends. To require your approval before any message goes beyond this machine, set `isolatePeerMachines`.
##
@@ -167,15 +169,15 @@
Control inbound messages
-Set [`crossSessionInbound`](</docs/en/settings#available-settings>) to choose what a session does with messages arriving from your other sessions:
+Set [`crossSessionInbound`](</docs/en/settings-reference#crosssessioninbound>) to choose what a session does with messages arriving from your other sessions:
Value| Behavior
---|---
`accept`| Claude Code delivers each message to Claude
-`hold`| Claude Code shows a notice for each message and doesn’t deliver it. If an `accept` later applies, per the [precedence rules](</docs/en/settings#available-settings>), Claude Code releases the held messages
+`hold`| Claude Code shows a notice for each message and doesn’t deliver it. If an `accept` later applies, per the [precedence rules](</docs/en/settings-reference#crosssessioninbound>), Claude Code releases the held messages
`refuse`| Claude Code drops each message without delivering it
-Beyond editing a settings file, you can select the value in the `/config` row **Messages from your other sessions**. Claude Code writes the value you select to your user settings. The row requires Claude Code v2.1.232 or later and doesn’t appear while managed settings or the `--settings` flag sets the key, since a user-settings value wouldn’t apply then. Claude Code rejects the `/config crossSessionInbound=value` shorthand for this key. To see which value applies, follow the `crossSessionInbound` precedence rules in the [settings reference](</docs/en/settings#available-settings>). When no value applies, Claude Code decides per message from the two sessions’ permission modes. It groups sessions that [bypass permission prompts](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) into one class, and every other session into the other. Plan mode counts as bypassing in sessions with bypass permissions available, and [auto](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), `acceptEdits`, and `dontAsk` count as prompting:
+Beyond editing a settings file, you can select the value in the `/config` row **Messages from your other sessions**. Claude Code writes the value you select to your user settings. The row requires Claude Code v2.1.232 or later and doesn’t appear while managed settings or the `--settings` flag sets the key, since a user-settings value wouldn’t apply then. Claude Code rejects the `/config crossSessionInbound=value` shorthand for this key. To see which value applies, follow the `crossSessionInbound` precedence rules in the [settings reference](</docs/en/settings-reference#crosssessioninbound>). When no value applies, Claude Code decides per message from the two sessions’ permission modes. It groups sessions that [bypass permission prompts](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>) into one class, and every other session into the other. Plan mode counts as bypassing in sessions with bypass permissions available, and [auto](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>), `acceptEdits`, and `dontAsk` count as prompting:
* **The receiving session prompts for permissions** : Claude Code delivers each message. It holds one for your approval only when the sending session identifies itself as bypassing permission prompts.
* **The receiving session bypasses permission prompts** : Claude Code holds each message for your approval. It delivers one only when the sending session identifies itself as also bypassing.
@@ -184,7 +186,7 @@
* **Approve** delivers that one message to Claude.
* **Deny** , or dismissing the dialog, drops it.
- * When the dialog stays unanswered past the [`dialogExpiry`](</docs/en/settings#available-settings>) deadline, Claude Code closes it and drops the message. The deadline defaults to five minutes. While no terminal is attached to a [background session](</docs/en/agent-view>), Claude Code leaves the dialog open past the deadline. After you attach, Claude Code closes the dialog and drops the message only if it stays unanswered for a full deadline period.
+ * When the dialog stays unanswered past the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline, Claude Code closes it and drops the message. The deadline defaults to five minutes. While no terminal is attached to a [background session](</docs/en/agent-view>), Claude Code leaves the dialog open past the deadline. After you attach, Claude Code closes the dialog and drops the message only if it stays unanswered for a full deadline period.
* If this session’s permission-mode class changes while messages are held, Claude Code re-applies the inbound rules, delivers the messages they now accept, and shows a notice.
* If a settings change makes `refuse` apply while messages are held, Claude Code drops every held message and reports a refusal to each sender it can reach.
@@ -196,7 +198,7 @@
Non-interactive sessions
-Claude Code binds an inbox socket for a [`claude -p`](</docs/en/headless>) session like an interactive one, so a long-running `-p` worker can receive messages and appears in the listing. When you start a session in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), Claude Code doesn’t bind the socket, so that session can’t receive messages and doesn’t appear in the agent list. A `-p` session can’t show the approval dialog. When the inbound default holds a message there, Claude Code keeps it for the same [`dialogExpiry`](</docs/en/settings#available-settings>) deadline the dialog uses, five minutes by default:
+Claude Code binds an inbox socket for a [`claude -p`](</docs/en/headless>) session like an interactive one, so a long-running `-p` worker can receive messages and appears in the listing. When you start a session in [bare mode](</docs/en/headless#start-faster-with-bare-mode>), Claude Code doesn’t bind the socket, so that session can’t receive messages and doesn’t appear in the agent list. A `-p` session can’t show the approval dialog. When the inbound default holds a message there, Claude Code keeps it for the same [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline the dialog uses, five minutes by default:
* **Before the deadline** : if a mode or settings change allows the message, Claude Code delivers it.
* **Past the deadline** : Claude Code drops the message and reports it as expired to a sender it can reach.
@@ -209,7 +211,7 @@
The session’s inbox socket
-Read this section when a session you expect isn’t in the agent list, when you want a script or hook to post into a session, or when a sandboxed command can’t reach the socket. Claude Code binds an inbox socket for each session with cross-session messaging enabled, where other sessions on the machine deliver messages. It restricts the socket to your operating-system user, so on a shared machine another user’s sessions can’t reach it. For which session kinds bind one, see Non-interactive sessions. You can find the path in two places:
+Read this section when a session you expect isn’t in the agent list, when you want a script or hook to post into a session, or when a sandboxed command can’t reach the socket. Claude Code binds an inbox socket for each session with cross-session messaging enabled, where other sessions on the machine deliver messages. The socket is a Unix domain socket on macOS and Linux, including Linux inside WSL 2, and a named pipe on native Windows. For which session kinds bind one, see Non-interactive sessions. You can find the socket’s path in two places:
* `/status` shows it in the `Peer address` row. The path is prefixed with `uds:`.
* Claude Code exports it to [hooks](</docs/en/hooks>) and Bash commands as the [`CLAUDE_CODE_MESSAGING_SOCKET`](</docs/en/env-vars#variables>) environment variable:
@@ -217,13 +219,18 @@
* When a session starts before Claude Code has fetched the feature flag that turns messaging on, such as the first session after you install Claude Code or upgrade from a version without messaging, Claude Code binds the inbox and exports the variable as soon as the fetch completes. Hooks and processes that started before that point keep the variable unset, while later hooks and Bash commands see it.
* Each session exports its own socket, never one inherited from a parent session.
-Alongside the path, Claude Code exports a per-session token as [`CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>). A script posting to its own session’s socket can send `{"type":"auth","token":"<token>"}` as the first line of its connection. The own-child rules below say when Claude Code consults the token and how it treats a message it can’t verify. Claude Code runs messages arriving on the socket through the same inbound controls as any other peer message, with one exception and one prerequisite:
+On macOS and Linux, Claude Code restricts the socket to your operating-system user. On native Windows, it instead requires each connection to authenticate first with a key that only your operating-system user can read. Either way, on a shared machine another user’s sessions can’t deliver to it. Alongside the socket’s path, Claude Code exports a per-session token as [`CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>). A script posting to its own session’s socket can send `{"type":"auth","token":"<token>"}` as the first line of its connection, where `<token>` is the value of `CLAUDE_CODE_MESSAGING_TOKEN`. Whether Claude Code requires the line depends on the platform:
+
+ * **macOS and Linux, including WSL 2** : the line is optional. Claude Code accepts a connection with or without it.
+ * **Native Windows** : the line is required. Claude Code closes any connection whose first line isn’t a valid auth line and delivers nothing from that connection.
+
+The own-child rules below say when Claude Code consults the token and how it treats a message it can’t verify. Claude Code runs messages arriving on the socket through the same inbound controls as any other peer message, with one exception and one prerequisite:
* **Own-child messages** : when no `crossSessionInbound` value applies, Claude Code delivers a message it verifies came from the session’s own child processes, such as a hook or Bash command posting back to its own session’s socket.
- * On Linux, including inside WSL 2, Claude Code can verify by process evidence even for a child that has already exited. On macOS it can verify that way only while the posting process is still running, and in a container where Claude Code runs as process ID 1 it has no process evidence at all.
- * Where that process evidence is missing, on macOS after the posting process has exited and in containers where Claude Code runs as process ID 1, Claude Code verifies a child that sent the session’s exported [`CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>) as its first-line auth frame.
+ * On Linux, including inside WSL 2, Claude Code can verify by process evidence even for a child that has already exited. On macOS it can verify that way only while the posting process is still running, and in a container where Claude Code runs as process ID 1 it has no process evidence at all. On native Windows it also has none.
+ * On macOS after the posting process has exited and in containers where Claude Code runs as process ID 1, that process evidence is missing, and Claude Code instead verifies a child that sent the session’s exported [`CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>) in the auth line that opened its connection. On native Windows, that token is the only way Claude Code verifies an own-child message.
* When Claude Code can verify neither way, it treats the message like any other that asserts no permission class, so a session that bypasses permission prompts holds it for your approval.
- * **Sandboxed sessions** : control whether a Bash command can reach the socket from inside the [sandbox](</docs/en/sandboxing>) with the sandbox’s Unix-socket settings, [`sandbox.network.allowAllUnixSockets` and `sandbox.network.allowUnixSockets`](</docs/en/settings#sandbox-settings>).
+ * **Sandboxed sessions** : control whether a Bash command can reach the socket from inside the [sandbox](</docs/en/sandboxing>) with the sandbox’s Unix-socket settings, [`sandbox.network.allowAllUnixSockets` and `sandbox.network.allowUnixSockets`](</docs/en/settings-reference#sandbox-settings>).
##
@@ -239,7 +246,7 @@
Require approval for cross-machine messages
-Set [`isolatePeerMachines`](</docs/en/settings#available-settings>) to `true` to require your explicit approval before any `SendMessage` reaches a session beyond this machine:
+Set [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) to `true` to require your explicit approval before any `SendMessage` reaches a session beyond this machine:
{
"isolatePeerMachines": true
@@ -258,7 +265,7 @@
* **Stop receiving** : set `crossSessionInbound` to `refuse`, and Claude Code drops inbound peer messages without delivering them. From project or local settings, `refuse` applies over every other source, and from your user settings it applies unless managed settings or the `--settings` flag set a value.
* **Stop sending and listing** : add [permission deny rules](</docs/en/permissions#tool-specific-permission-rules>) naming `SendMessage` and `ListAgents`. Both take the bare tool name with no specifier.
-Administrators can turn both sides off for an organization in [managed settings](</docs/en/permissions#managed-settings>), combining the deny rules with the `refuse`:
+Administrators can turn both sides off for an organization in [managed settings](</docs/en/managed-settings>), combining the deny rules with the `refuse`:
{
"permissions": {
@@ -275,9 +282,9 @@
Availability
-Cross-session messaging requires Claude Code v2.1.224 or later. Availability also depends on your platform, provider, and configuration:
-
- * **Operating system** : available on macOS and Linux, including Linux inside WSL 2. Claude Code doesn’t offer cross-session messaging on native Windows.
+Cross-session messaging requires Claude Code v2.1.224 or later on macOS, Linux, and WSL 2, and v2.1.234 or later on native Windows. Availability also depends on your platform, provider, and configuration:
+
+ * **Operating system** : available on macOS, Windows, and Linux, including Linux inside WSL 2.
* **Provider** : not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, or Microsoft Foundry.
* **Feature-flag evaluation** : when any of [`CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars#variables>) turns off the feature-flag evaluation the feature depends on, cross-session messaging stays off. Each variable’s row says which values do that. Unset whichever applies. These variables can come from your shell, from a settings file’s `env` map, or from managed settings.
@@ -316,7 +323,7 @@
* [Subagents](</docs/en/sub-agents#resume-subagents>) and [agent teams](</docs/en/agent-teams#messages-between-agents>): messaging within a single session or team
* [Background agents](</docs/en/agent-view>): dispatch and monitor the parallel sessions you might message
* [Remote Control](</docs/en/remote-control>): connect this session to reach your sessions on other machines
- * [Settings](</docs/en/settings#available-settings>): `crossSessionInbound`, `isolatePeerMachines`, and `dialogExpiry`
+ * [Settings](</docs/en/settings-reference#all-settings>): `crossSessionInbound`, `isolatePeerMachines`, and `dialogExpiry`
* [Permission modes](</docs/en/permission-modes>): the modes behind the inbound default’s two classes
* [Tools reference](</docs/en/tools-reference>): the `ListAgents` and `SendMessage` rows in the tools table
* [Run agents in parallel](</docs/en/agents>): compare the ways Claude Code runs multiple agents
--- a/data-usage.md
+++ b/data-usage.md
@@ -40,7 +40,7 @@
* **No** : declines without sending anything
* **Don’t ask again** : declines and stops this follow-up from appearing in future sessions
-Nothing is uploaded unless you explicitly select **Yes**. Organizations with [zero data retention](</docs/en/zero-data-retention>), or where product feedback is disabled by organization policy, or where `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, never see this follow-up. Your responses to this survey, including session transcripts submitted after the rating prompt, do not impact your data training preferences and cannot be used to train our AI models. To disable these surveys, set `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1`. The survey is also disabled when `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. Organizations that block nonessential traffic but capture survey responses through their own [OpenTelemetry collector](</docs/en/monitoring-usage>) can opt the survey back in by setting `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL=1`. The survey then logs ratings to the configured collector only. The transcript-share follow-up and all other Anthropic-bound feedback traffic stay disabled. To control frequency instead of disabling, set [`feedbackSurveyRate`](</docs/en/settings#available-settings>) in your settings file to a probability between `0` and `1`.
+Nothing is uploaded unless you explicitly select **Yes**. Organizations with [zero data retention](</docs/en/zero-data-retention>), or where product feedback is disabled by organization policy, or where `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, never see this follow-up. Your responses to this survey, including session transcripts submitted after the rating prompt, do not impact your data training preferences and cannot be used to train our AI models. To disable these surveys, set `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY=1`. The survey is also disabled when `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set. Organizations that block nonessential traffic but capture survey responses through their own [OpenTelemetry collector](</docs/en/monitoring-usage>) can opt the survey back in by setting `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL=1`. The survey then logs ratings to the configured collector only. The transcript-share follow-up and all other Anthropic-bound feedback traffic stay disabled. To control frequency instead of disabling, set [`feedbackSurveyRate`](</docs/en/settings-reference#feedbacksurveyrate>) in your settings file to a probability between `0` and `1`.
###
@@ -158,7 +158,7 @@
`skipWebFetchPreflight: true` in [settings](</docs/en/settings>) to disable.| Default on.
`skipWebFetchPreflight: true` in [settings](</docs/en/settings>) to disable.
-All environment variables can be checked into `settings.json` (see [settings reference](</docs/en/settings>)). When a host platform sets `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`, metrics default to on for Google Cloud’s Agent Platform, Amazon Bedrock, Microsoft Foundry, and Claude Platform on AWS, and follow the standard `DISABLE_TELEMETRY` opt-out. Error reporting and `/feedback` reports remain off by default on those providers.
+All environment variables can be checked into `settings.json` (see [settings reference](</docs/en/settings-reference>)). When a host platform sets `CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`, metrics default to on for Google Cloud’s Agent Platform, Amazon Bedrock, Microsoft Foundry, and Claude Platform on AWS, and follow the standard `DISABLE_TELEMETRY` opt-out. Error reporting and `/feedback` reports remain off by default on those providers.
###
--- a/debug-your-config.md
+++ b/debug-your-config.md
@@ -29,7 +29,7 @@
Check resolved settings
-Settings merge across managed, user, project, and local scopes. Managed settings apply first when present. Among the rest, the closer scope overrides the broader one in the order local, then project, then user. Some settings can also be set by command-line flags or [environment variables](</docs/en/env-vars>), which act as another override layer. When a setting doesn’t seem to apply, the value you set is usually being overridden by another scope or an environment variable. Run [`/doctor`](</docs/en/commands#all-commands>) to find invalid settings files. From the terminal, `claude doctor` prints read-only installation and settings diagnostics without starting a session. Run `/status` to see which settings sources are active, including whether managed settings are in effect. To understand which scope wins for a given key, see [How scopes interact](</docs/en/settings#how-scopes-interact>).
+Settings merge across managed, user, project, and local scopes. Managed settings apply first when present. Among the rest, the closer scope overrides the broader one in the order local, then project, then user. Some settings can also be set by command-line flags or [environment variables](</docs/en/env-vars>), which act as another override layer. When a setting doesn’t seem to apply, the value you set is usually being overridden by another scope or an environment variable. Run [`/doctor`](</docs/en/commands#all-commands>) to find invalid settings files. From the terminal, `claude doctor` prints read-only installation and settings diagnostics without starting a session. Run `/status` to see which settings sources are active, including whether managed settings are in effect. To understand which scope Claude Code uses for a given key, see [Settings precedence](</docs/en/settings#settings-precedence>).
##
@@ -55,7 +55,7 @@
* The `matcher` field is a single string that uses `|` to match multiple tool names, for example `"Edit|Write"`. A `,` separator is equivalent, so `"Edit,Write"` matches the same tools. Before v2.1.191, a comma fell through to regex evaluation and the matcher never matched, so use `|` if you aren’t on v2.1.191 yet.
* A misspelled tool name produces a matcher that matches nothing, so the hook fails silently.
- * An array value is a schema error: Claude Code shows a settings error notice and rejects the whole user, project, or local settings file, `claude doctor` reports the validation failure, and no hook from that file appears in `/hooks`. In [managed settings](</docs/en/settings#settings-files>), only the invalid entry is stripped and the file’s other hooks still apply.
+ * An array value is a schema error: Claude Code shows a settings error notice and rejects the whole user, project, or local settings file, `claude doctor` reports the validation failure, and no hook from that file appears in `/hooks`. In [managed settings](</docs/en/managed-settings>), Claude Code drops the whole `hooks` key from the file that contains the array, so none of that file’s hooks apply. The file’s other settings still apply, and `claude doctor` lists the dropped key.
Edits to `settings.json` take effect in the running session after a brief file-stability delay. You don’t need to restart. If `/hooks` still shows the old definition a few seconds after saving, run `/hooks` again to refresh the view. If `/hooks` shows the hook but it still does not fire, the next step is to watch hook evaluation live. Start a session with `claude --debug` and trigger the tool call. The debug log records each event, which matchers were checked, and the hook’s exit code and output. See [Debug hooks](</docs/en/hooks#debug-hooks>) for the log format and [hooks troubleshooting](</docs/en/hooks-guide#limitations-and-troubleshooting>) for common failure patterns.
@@ -92,7 +92,7 @@
Hook never fires| `matcher` value is lowercase, for example `"bash"`| Matching is case-sensitive. Tool names are capitalized: `Bash`, `Edit`, `Write`, `Read`.
Hook never fires| Hooks are defined in a standalone file instead of `settings.json`| There is no standalone hooks file for project or user config. Define hooks under the `"hooks"` key in `settings.json`. Only [plugins](</docs/en/plugins-reference#hooks>) load a separate `hooks/hooks.json`. See [hook configuration](</docs/en/hooks>).
Permissions, hooks, or env set globally are ignored| Configuration was added to `~/.claude.json`| `~/.claude.json` holds app state and UI toggles. `permissions`, `hooks`, and `env` belong in `~/.claude/settings.json`. These are two different files.
-A `settings.json` value seems ignored| The same key is set in `settings.local.json`| `settings.local.json` overrides `settings.json`, and both override `~/.claude/settings.json`. See [settings precedence](</docs/en/settings#how-scopes-interact>).
+A `settings.json` value seems ignored| The same key is set in `settings.local.json`| `settings.local.json` overrides `settings.json`, and both override `~/.claude/settings.json`. See [settings precedence](</docs/en/settings#settings-precedence>).
Skill doesn’t appear in `/skills`| Skill file is at `.claude/skills/name.md` instead of in a folder| Use a folder with `SKILL.md` inside: `.claude/skills/name/SKILL.md`.
Skill appears in `/skills` but Claude never invokes it| Skill has `disable-model-invocation: true` in its frontmatter, or its description doesn’t match how you phrase the request| Check the badge in `/skills`: a “user-only” label means Claude won’t trigger it on its own. See [skill invocation](</docs/en/skills>).
Subdirectory `CLAUDE.md` instructions seem ignored| Subdirectory files load on demand, not at session start| They load when Claude reads a file in that directory with the Read tool, not at launch and not when writing or creating files there. See [how CLAUDE.md files load](</docs/en/memory#how-claude-md-files-load>).
@@ -114,7 +114,7 @@
For full reference on each configuration surface, see the dedicated page:
* **[`.claude` directory reference](</docs/en/claude-directory>)**: every config file location and what reads it
- * **[Settings](</docs/en/settings>)** : precedence order and the full key list
+ * **[Settings](</docs/en/settings>)** : which file to use and which value Claude Code uses; the [settings reference](</docs/en/settings-reference>) has the full key list
* **[Hooks reference](</docs/en/hooks>)** : event names, payloads, and `--debug` output format
* **[MCP](</docs/en/mcp>)** : server configuration, approval, and `/mcp` output
* **[Troubleshoot installation and login](</docs/en/troubleshoot-install>)** : `command not found`, PATH, and authentication problems
--- a/deep-links.md
+++ b/deep-links.md
@@ -67,8 +67,7 @@
Use `cwd` when everyone who clicks the link has the project at the same absolute path, such as a standardized devcontainer or VM image. Use `repo` when the link is shared and each person clones to a different location. Claude Code resolves the slug to a local path as follows:
- * Each time you run `claude` in a Git repository, Claude Code records that directory’s path against the repository’s GitHub `owner/name` slug.
- * When a deep link arrives, `repo` opens whichever matching path you used most recently. Claude Code tracks multiple clones and worktrees separately, so it picks the one you worked in last.
+ * `repo` opens the linked repository’s clone or worktree where you most recently ran `claude`. Each time you run `claude` in a Git repository, Claude Code records that directory’s path against the repository’s GitHub `owner/name` slug. Claude Code tracks clones and worktrees separately.
* The link does not change which branch is checked out. The session opens in whatever state that directory is currently in.
The welcome header shows which path it picked so you can confirm the right clone opened.
@@ -143,7 +142,7 @@
Linux| `claude-code-url-handler.desktop` under `$XDG_DATA_HOME/applications`, defaulting to `~/.local/share/applications`
Windows| `HKEY_CURRENT_USER\Software\Classes\claude-cli`
-The handler launches Claude Code in a detected terminal emulator. On macOS, Claude Code remembers the terminal from your most recent interactive session and reuses it, supporting iTerm2, Ghostty, kitty, Alacritty, WezTerm, and Terminal.app. On Linux it honors the `$TERMINAL` environment variable, then `x-terminal-emulator`, then a list of common emulators. On Windows it prefers Windows Terminal, then PowerShell, then `cmd.exe`. To prevent registration entirely, set [`disableDeepLinkRegistration`](</docs/en/settings>) to `"disable"` in `settings.json`. To enforce this across an organization so users cannot re-enable it, set it in [managed settings](</docs/en/server-managed-settings>) instead.
+The handler launches Claude Code in a detected terminal emulator. On macOS, Claude Code remembers the terminal from your most recent interactive session and reuses it, supporting iTerm2, Ghostty, kitty, Alacritty, WezTerm, and Terminal.app. On Linux it honors the `$TERMINAL` environment variable, then `x-terminal-emulator`, then a list of common emulators. On Windows it prefers Windows Terminal, then PowerShell, then `cmd.exe`. To prevent registration entirely, set [`disableDeepLinkRegistration`](</docs/en/settings-reference#disabledeeplinkregistration>) to `"disable"` in `settings.json`. To enforce this across an organization so users cannot re-enable it, set it in [managed settings](</docs/en/server-managed-settings>) instead.
##
--- a/desktop.md
+++ b/desktop.md
@@ -74,7 +74,7 @@
Choose a permission mode
-Permission modes control how much autonomy Claude has during a session: whether it asks before editing files, running commands, or both. You can switch permission modes at any time using the mode selector next to the send button. To approve each change yourself, switch to Manual. To set a default mode for new local sessions, add `permissions.defaultMode` to your [settings file](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI. A mode you pick in the selector is remembered per folder and takes precedence over `defaultMode` for that folder, except Plan, which applies to the current session only.
+Permission modes control how much autonomy Claude has during a session: whether it asks before editing files, running commands, or both. You can switch permission modes at any time using the mode selector next to the send button. To approve each change yourself, switch to Manual. To set a default mode for new local sessions, add `permissions.defaultMode` to your [settings file](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI. A mode you pick in the selector is remembered per folder and takes precedence over `defaultMode` for that folder, except Plan, which applies to the current session only.
Mode| Settings key| Behavior
---|---|---
@@ -396,7 +396,7 @@
* Before archiving any session, Claude asks you first. You see the approval card in every permission mode, including Auto and Bypass permissions.
* Through this surface, Claude can’t send cross-session messages from a session nobody is watching, such as a scheduled-task run, and can’t deliver messages into one.
- * Claude Code checks each message from this surface against the receiving session’s [inbound controls](</docs/en/cross-session-messaging#control-inbound-messages>), even when the receiving session doesn’t have [cross-session messaging](</docs/en/cross-session-messaging#availability>) itself. If you set [`crossSessionInbound`](</docs/en/settings#available-settings>) to `refuse` in the receiving session, Claude Code drops messages from this surface. Claude Code reports the refusal to the Claude desktop app. Before v2.1.234, Claude Code dropped every message from this surface to a receiving session without cross-session messaging.
+ * Claude Code checks each message from this surface against the receiving session’s [inbound controls](</docs/en/cross-session-messaging#control-inbound-messages>), even when the receiving session doesn’t have [cross-session messaging](</docs/en/cross-session-messaging#availability>) itself. If you set [`crossSessionInbound`](</docs/en/settings-reference#crosssessioninbound>) to `refuse` in the receiving session, Claude Code drops messages from this surface. Claude Code reports the refusal to the Claude desktop app. Before v2.1.234, Claude Code dropped every message from this surface to a receiving session without cross-session messaging.
* Claude Code quotes each incoming message and attributes it to the session that sent it, and Claude still follows the receiving session’s own permission settings when acting on one.
Claude can also suggest new sessions. When it notices something worth fixing that’s out of scope for the current task, it offers the work as a task chip in the chat. Click the chip to start that work in a new session with its own worktree; Claude continues your current session uninterrupted.
@@ -458,7 +458,7 @@
Install plugins
-[Plugins](</docs/en/plugins>) are reusable packages that add skills, agents, hooks, MCP servers, and LSP configurations to Claude Code. You can install plugins from the desktop app without using the terminal. For local and SSH sessions, click the **+** button next to the prompt box and select **Plugins** to see your installed plugins and their skills. To add a plugin, select **Add plugin** from the submenu to open the plugin browser, which shows available plugins from your configured [marketplaces](</docs/en/plugin-marketplaces>) including the official Anthropic marketplace. Select **Manage plugins** to enable, disable, or uninstall plugins. Plugins can be scoped to your user account, a specific project, or local-only. If your organization manages plugins centrally, those plugins are available in desktop sessions the same way they are in the CLI. The plugin browser is not available in cloud sessions, and plugins you install from the desktop app aren’t available for cloud sessions; to use a plugin in a cloud session, declare it in the repository’s `.claude/settings.json` under [`enabledPlugins`](</docs/en/settings#enabledplugins>) so it [installs at session start](</docs/en/cloud-environments#what-carries-over-from-your-setup>). Plugins aren’t available in WSL sessions. For the full plugin reference including creating your own plugins, see [plugins](</docs/en/plugins>).
+[Plugins](</docs/en/plugins>) are reusable packages that add skills, agents, hooks, MCP servers, and LSP configurations to Claude Code. You can install plugins from the desktop app without using the terminal. For local and SSH sessions, click the **+** button next to the prompt box and select **Plugins** to see your installed plugins and their skills. To add a plugin, select **Add plugin** from the submenu to open the plugin browser, which shows available plugins from your configured [marketplaces](</docs/en/plugin-marketplaces>) including the official Anthropic marketplace. Select **Manage plugins** to enable, disable, or uninstall plugins. Plugins can be scoped to your user account, a specific project, or local-only. If your organization manages plugins centrally, those plugins are available in desktop sessions the same way they are in the CLI. The plugin browser is not available in cloud sessions, and plugins you install from the desktop app aren’t available for cloud sessions; to use a plugin in a cloud session, declare it in the repository’s `.claude/settings.json` under [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>) so it [installs at session start](</docs/en/cloud-environments#what-carries-over-from-your-setup>). Plugins aren’t available in WSL sessions. For the full plugin reference including creating your own plugins, see [plugins](</docs/en/plugins>).
###
@@ -692,7 +692,7 @@
Pre-configure SSH connections for your team
-Administrators can distribute SSH connections to team members by adding `sshConfigs` to a [managed settings](</docs/en/settings#settings-precedence>) file. Connections defined this way appear in each user’s environment dropdown automatically and are shown as managed, so users can select them but cannot edit or delete them in the app. The following example pre-configures a single connection that opens in `~/projects` on the remote host:
+Administrators can distribute SSH connections to team members by adding `sshConfigs` to a [managed settings](</docs/en/managed-settings>) file. Connections defined this way appear in each user’s environment dropdown automatically and are shown as managed, so users can select them but cannot edit or delete them in the app. The following example pre-configures a single connection:
{
"sshConfigs": [
@@ -701,13 +701,12 @@
"name": "Shared Dev VM",
"sshHost": "user@dev.example.com",
"sshPort": 22,
- "sshIdentityFile": "~/.ssh/id_ed25519",
- "startDirectory": "~/projects"
+ "sshIdentityFile": "~/.ssh/id_ed25519"
}
]
}
-Each entry requires `id`, `name`, and `sshHost`. The `sshPort`, `sshIdentityFile`, and `startDirectory` fields are optional. Users can also add `sshConfigs` to their own `~/.claude/settings.json`, which is where connections added through the dialog are stored.
+Each entry requires `id`, `name`, and `sshHost`. The `sshPort` and `sshIdentityFile` fields are optional. Users can also add `sshConfigs` to their own `~/.claude/settings.json`, which is where connections added through the dialog are stored.
####
@@ -715,7 +714,7 @@
Restrict which SSH hosts users can connect to
-Administrators can limit Desktop’s SSH sessions to an approved set of hosts by adding `sshHostAllowlist` to a [managed settings](</docs/en/settings#settings-precedence>) file. When set, users can only connect to hosts whose resolved hostname matches one of the patterns. Set it to an empty array to disable SSH sessions entirely. The following example allows connections to any host under `devboxes.example.com` and to a single named bastion host:
+Administrators can limit Desktop’s SSH sessions to an approved set of hosts by adding `sshHostAllowlist` to a [managed settings](</docs/en/managed-settings>) file. When set, users can only connect to hosts whose resolved hostname matches one of the patterns. Set it to an empty array to disable SSH sessions entirely. The following example allows connections to any host under `devboxes.example.com` and to a single named bastion host:
{
"sshHostAllowlist": ["*.devboxes.example.com", "bastion.example.com"]
@@ -750,7 +749,7 @@
Managed settings
-Managed settings override project and user settings and apply to Claude Code sessions in Desktop. You can set these keys in your organization’s [managed settings](</docs/en/settings#settings-precedence>) file or push them remotely through the admin console.
+Managed settings override project and user settings and apply to Claude Code sessions in Desktop. You can set these keys in your organization’s [managed settings](</docs/en/managed-settings>) file or push them remotely through the admin console.
Key| Description
---|---
@@ -766,11 +765,11 @@
Which managed settings reach a Desktop session depends on where that session runs. Model restrictions such as [`availableModels`](</docs/en/model-config#restrict-model-selection>) are enforced in Desktop’s Claude Code sessions the same way as in the terminal CLI; see [surface coverage](</docs/en/model-config#surface-coverage>).
- * **Local sessions on this machine** : a managed settings file deployed to disk applies. Managed settings pushed remotely through the admin console also reach these sessions on Anthropic’s API when the session authenticates with an organization login or a directly configured API key, following the same [settings precedence](</docs/en/settings#settings-precedence>) as the terminal CLI.
+ * **Local sessions on this machine** : a managed settings file deployed to disk applies. Managed settings pushed remotely through the admin console also reach these sessions on Anthropic’s API when the session authenticates with an [eligible login or key](</docs/en/server-managed-settings#platform-availability>), following the same [settings precedence](</docs/en/settings#settings-precedence>) as the terminal CLI.
* **Cloud sessions** : receive [server-managed settings](</docs/en/server-managed-settings>); device-deployed files don’t reach them, because they run on Anthropic-managed VMs. Sessions routed to a [self-hosted environment](</docs/en/self-hosted-environments>) fall back to the managed settings file in the runner image when server-managed settings deliver no keys, per [settings precedence](</docs/en/server-managed-settings#settings-precedence>).
* **SSH sessions** : the session reads the managed settings file from the remote host. Desktop itself reads `sshConfigs` and `sshHostAllowlist` from the local machine’s managed settings when creating the connection.
-`permissions.disableBypassPermissionsMode` and `disableAutoMode` also work in user and project settings, but placing them in managed settings prevents users from overriding them. For the complete list of managed-only settings including `allowManagedPermissionRulesOnly` and `allowManagedHooksOnly`, see [managed-only settings](</docs/en/permissions#managed-only-settings>).
+`permissions.disableBypassPermissionsMode` and `disableAutoMode` also work in user and project settings, but placing them in managed settings prevents users from overriding them. For the permission, plugin, and delivery keys only a managed source can set, see [Keys only managed settings can set](</docs/en/managed-settings#managed-only-settings>).
###
@@ -938,7 +937,7 @@
What’s not available in Desktop
-The following features are only available in the CLI or VS Code extension, except where noted:
+The following features aren’t available in Desktop, except where noted:
* **Third-party providers** : Desktop connects to Anthropic’s API by default. To route Desktop through a gateway, or to run the Code tab on Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, or a self-hosted LLM gateway, follow the links in the Third-party providers row.
* **Linux (beta)** : Computer Use isn’t yet available in the Linux desktop app. See [Claude Desktop on Linux](</docs/en/desktop-linux>).
--- a/devcontainer.md
+++ b/devcontainer.md
@@ -60,7 +60,7 @@
Persist authentication and settings across rebuilds
-By default, the container’s home directory is discarded on rebuild, so engineers must sign in again each time. Claude Code stores its authentication token, user settings, and session history under the [`~/.claude`](</docs/en/claude-directory>) directory. It stores your OAuth account, personal MCP servers, and per-project trust in [`~/.claude.json`](</docs/en/settings#global-config-settings>), a separate file outside that directory, so mounting a volume at `~/.claude` alone doesn’t keep you signed in. Mount a named volume at `~/.claude` and set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) to the same path so Claude Code writes `.claude.json` inside the volume. The following example mounts the volume and sets `CLAUDE_CONFIG_DIR` for a container whose `remoteUser` is `node`:
+By default, the container’s home directory is discarded on rebuild, so engineers must sign in again each time. Claude Code stores its authentication token, user settings, and session history under the [`~/.claude`](</docs/en/claude-directory>) directory. It stores your OAuth account, personal MCP servers, and per-project trust in [`~/.claude.json`](</docs/en/settings-reference#global-config-settings>), a separate file outside that directory, so mounting a volume at `~/.claude` alone doesn’t keep you signed in. Mount a named volume at `~/.claude` and set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>) to the same path so Claude Code writes `.claude.json` inside the volume. The following example mounts the volume and sets `CLAUDE_CONFIG_DIR` for a container whose `remoteUser` is `node`:
devcontainer.json
@@ -79,14 +79,14 @@
Enforce organization policy
-A dev container is a convenient place to apply organization policy, because the same image and configuration run on every engineer’s machine. Claude Code reads `/etc/claude-code/managed-settings.json` on Linux and applies it at the highest precedence in the [settings hierarchy](</docs/en/settings#how-scopes-interact>), so values there override anything an engineer sets in `~/.claude` or the project’s `.claude/` directory. Copy the file into place from your Dockerfile:
+A dev container is a convenient place to apply organization policy, because the same image and configuration run on every engineer’s machine. Claude Code reads `/etc/claude-code/managed-settings.json` on Linux and applies it at the highest precedence in the [settings hierarchy](</docs/en/settings#settings-precedence>), so values there override anything an engineer sets in `~/.claude` or the project’s `.claude/` directory. Copy the file into place from your Dockerfile:
Dockerfile
RUN mkdir -p /etc/claude-code
COPY managed-settings.json /etc/claude-code/managed-settings.json
-Because the Dockerfile lives in the repository, anyone with write access can change or remove this step. For policy that engineers cannot bypass by editing repository files, deliver managed settings through [server-managed settings](</docs/en/server-managed-settings>) or your MDM instead. See [managed settings files](</docs/en/settings#settings-files>) for the available keys and the other delivery paths. To set [environment variables](</docs/en/env-vars>) that apply to every Claude Code session in the container, add them to `containerEnv` in your `devcontainer.json`. The following example opts out of telemetry and error reporting and prevents Claude Code from auto-updating after install:
+Because the Dockerfile lives in the repository, anyone with write access can change or remove this step. For policy that engineers cannot bypass by editing repository files, deliver managed settings through [server-managed settings](</docs/en/server-managed-settings>) or your MDM instead. See [managed settings files](</docs/en/managed-settings#delivery-mechanisms>) for the available keys and the other delivery paths. To set [environment variables](</docs/en/env-vars>) that apply to every Claude Code session in the container, add them to `containerEnv` in your `devcontainer.json`. The following example opts out of telemetry and error reporting and prevents Claude Code from auto-updating after install:
devcontainer.json
@@ -111,7 +111,7 @@
Run without permission prompts
-Because the container runs Claude Code as a non-root user and confines command execution to the container, you can pass `--dangerously-skip-permissions` for unattended operation. The CLI rejects this flag when launched as root, so confirm `remoteUser` is set to a non-root account. Skipping permission prompts removes your opportunity to review tool calls before they run. Claude can still modify any file in the bind-mounted workspace, which appears directly on your host, and reach anything the container’s network policy allows. Pair this flag with the network egress restrictions above to limit what a bypassed session can reach. If you want fewer prompts without disabling safety checks, consider [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) instead, which has a classifier review actions before they run. To prevent engineers from using `--dangerously-skip-permissions` at all, set `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/settings#permission-settings>).
+Because the container runs Claude Code as a non-root user and confines command execution to the container, you can pass `--dangerously-skip-permissions` for unattended operation. The CLI rejects this flag when launched as root, so confirm `remoteUser` is set to a non-root account. Skipping permission prompts removes your opportunity to review tool calls before they run. Claude can still modify any file in the bind-mounted workspace, which appears directly on your host, and reach anything the container’s network policy allows. Pair this flag with the network egress restrictions above to limit what a bypassed session can reach. If you want fewer prompts without disabling safety checks, consider [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) instead, which has a classifier review actions before they run. To prevent engineers from using `--dangerously-skip-permissions` at all, set `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](</docs/en/settings-reference#permission-settings>).
##
--- a/discover-plugins.md
+++ b/discover-plugins.md
@@ -30,7 +30,7 @@
/plugin install github@claude-plugins-official
-`/plugin` opens an interactive panel in the terminal CLI. If Claude replies that `/plugin` isn’t available in this environment, use the [plugin browser](</docs/en/desktop#install-plugins>) in the Claude desktop app, or declare the plugin under [`enabledPlugins`](</docs/en/settings#enabledplugins>) in `.claude/settings.json` for cloud sessions. If the install fails, match the message Claude Code reports:
+`/plugin` opens an interactive panel in the terminal CLI. If Claude replies that `/plugin` isn’t available in this environment, use the [plugin browser](</docs/en/desktop#install-plugins>) in the Claude desktop app, or declare the plugin under [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>) in `.claude/settings.json` for cloud sessions. If the install fails, match the message Claude Code reports:
* `Marketplace "claude-plugins-official" not found`: add the marketplace with `/plugin marketplace add anthropics/claude-plugins-official`, then retry the install.
* The plugin is not found in the marketplace: check the plugin name.
@@ -170,7 +170,7 @@
* **Marketplaces** : add, remove, or update your added marketplaces
* **Errors** : view any plugin loading errors
-Go to the **Discover** tab to see plugins from the marketplace you just added. When your administrator has allowlisted the marketplace via the [`pluginSuggestionMarketplaces`](</docs/en/settings#available-settings>) managed setting, plugins marked as relevant to your current working directory are pinned at the top with a **suggested for this directory** label.
+Go to the **Discover** tab to see plugins from the marketplace you just added. When your administrator has allowlisted the marketplace via the [`pluginSuggestionMarketplaces`](</docs/en/settings-reference#pluginsuggestionmarketplaces>) managed setting, plugins marked as relevant to your current working directory are pinned at the top with a **suggested for this directory** label.
3
@@ -192,7 +192,7 @@
/plugin install commit-commands@claude-code-plugins
-See [Configuration scopes](</docs/en/settings#configuration-scopes>) to learn more about scopes.
+See [Settings files](</docs/en/settings#where-settings-live>) to learn more about scopes.
4
@@ -239,7 +239,7 @@
* **`github.com` and `gitlab.com`**: Claude Code recognizes a repository URL with or without the `.git` suffix and clones it. Adding a `gitlab.com` URL without the suffix requires Claude Code v2.1.232 or later. Before v2.1.232, Claude Code treated it as a direct link to a hosted `marketplace.json` file.
* **Azure DevOps** : omit the suffix. Claude Code clones any URL whose path contains `/_git/`. If you append `.git` to a `/_git/` path, the clone fails.
- * **Every other host, including self-managed GitLab servers** : include the `.git` suffix so Claude Code clones the repository rather than treating the URL as a direct link to a hosted `marketplace.json` file. For a host whose clone URLs don’t carry the suffix, such as AWS CodeCommit, add the marketplace as a git entry in [`extraKnownMarketplaces`](</docs/en/settings#extraknownmarketplaces>) instead. Claude Code clones a git entry whether or not its URL ends in `.git`.
+ * **Every other host, including self-managed GitLab servers** : include the `.git` suffix so Claude Code clones the repository rather than treating the URL as a direct link to a hosted `marketplace.json` file. For a host whose clone URLs don’t carry the suffix, such as AWS CodeCommit, add the marketplace as a git entry in [`extraKnownMarketplaces`](</docs/en/settings-reference#extraknownmarketplaces>) instead. Claude Code clones a git entry whether or not its URL ends in `.git`.
Claude Code also clones a `gitlab.com` URL with nested subgroups, such as `https://gitlab.com/group/subgroup/project`. Include the `https://` prefix. Claude Code v2.1.196 and later reject a host typed without it, such as `gitlab.com/company/plugins.git`, as an invalid GitHub `owner/repo` shorthand, and the error tells you to add the prefix. Earlier versions misread it as a GitHub repository path and fail at clone time. Using HTTPS:
@@ -289,13 +289,13 @@
/plugin install plugin-name@marketplace-name
-The command opens that plugin’s details, where you choose an [installation scope](</docs/en/settings#configuration-scopes>). You see the same choices when you run `/plugin`, go to the **Discover** tab, and press **Enter** on a plugin:
+The command opens that plugin’s details, where you choose an [installation scope](</docs/en/settings#where-settings-live>). You see the same choices when you run `/plugin`, go to the **Discover** tab, and press **Enter** on a plugin:
* **User scope** : install for yourself across all projects
* **Project scope** : install for all collaborators on this repository, which adds the plugin to `.claude/settings.json`
* **Local scope** : install for yourself in this repository only, not shared with collaborators
-To install without an interactive step, use the [`claude plugin install`](</docs/en/plugins-reference#plugin-install>) shell command, which installs to user scope unless you pass `--scope`. For a plugin with a [`command` source](</docs/en/plugin-marketplaces#how-users-accept-the-command>), pass `--yes` to accept the command it displays. You may also see plugins with **managed** scope. These are installed by administrators via [managed settings](</docs/en/settings#settings-files>) and can’t be modified. Claude Code looks the plugin up in its local copy of the marketplace catalog. How you name the plugin controls whether Claude Code refreshes that copy first:
+To install without an interactive step, use the [`claude plugin install`](</docs/en/plugins-reference#plugin-install>) shell command, which installs to user scope unless you pass `--scope`. For a plugin with a [`command` source](</docs/en/plugin-marketplaces#how-users-accept-the-command>), pass `--yes` to accept the command it displays. You may also see plugins with **managed** scope. These are installed by administrators via [managed settings](</docs/en/managed-settings>) and can’t be modified. Claude Code looks the plugin up in its local copy of the marketplace catalog. How you name the plugin controls whether Claude Code refreshes that copy first:
* **With a marketplace name** : when you install `plugin-name@marketplace-name`, in a session or with `claude plugin install`, Claude Code refreshes that marketplace before the lookup. Claude Code runs the refresh even if you turned off auto-update for the marketplace or set `DISABLE_AUTOUPDATER`. Before v2.1.232, Claude Code didn’t refresh the marketplace before the lookup. Claude Code skips this refresh when:
* The marketplace wasn’t added from GitHub, another Git host, or a remote URL.
@@ -332,7 +332,7 @@
* plugins that your organization manages or that you load with `--plugin-dir`
* plugins that contribute a theme, output style, monitor, or workflow, since those deliver value without an invocation to track
-The **Not used recently** header and the **Last used** line are both hidden when your organization restricts marketplaces with [`strictKnownMarketplaces`](</docs/en/settings#strictknownmarketplaces>). A plugin’s [language server](</docs/en/plugins#add-lsp-servers-to-your-plugin>) 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. Before v2.1.203, language server activity couldn’t be counted as use, so plugins that contribute an LSP server were exempt from the group entirely, the same way theme and output style plugins still are. The first session on a version that counts language server activity also resets the usage record of each LSP plugin that hadn’t recorded any use yet, so Claude Code doesn’t judge a plugin you installed earlier as unused based on data recorded before its server activity was tracked. When you install a plugin that declares dependencies, the install output lists which dependencies were auto-installed alongside it. You can also manage plugins with direct commands:
+The **Not used recently** header and the **Last used** line are both hidden when your organization restricts marketplaces with [`strictKnownMarketplaces`](</docs/en/settings-reference#strictknownmarketplaces>). A plugin’s [language server](</docs/en/plugins#add-lsp-servers-to-your-plugin>) 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. Before v2.1.203, language server activity couldn’t be counted as use, so plugins that contribute an LSP server were exempt from the group entirely, the same way theme and output style plugins still are. The first session on a version that counts language server activity also resets the usage record of each LSP plugin that hadn’t recorded any use yet, so Claude Code doesn’t judge a plugin you installed earlier as unused based on data recorded before its server activity was tracked. When you install a plugin that declares dependencies, the install output lists which dependencies were auto-installed alongside it. You can also manage plugins with direct commands:
* When you run `/plugin disable`, `/plugin enable`, or `/plugin uninstall`, Claude Code opens the plugin panel to apply the change and leaves it open. Press **Esc** to close the panel before typing another command.
* For scripting, use the `claude plugin` shell commands instead, which don’t open the panel.
@@ -424,7 +424,7 @@
3. Choose a marketplace from the list
4. Select **Enable auto-update** or **Disable auto-update**
-Official Anthropic marketplaces have auto-update enabled by default. Third-party and local development marketplaces have auto-update disabled by default. Administrators can also set `"autoUpdate": true` on each [`extraKnownMarketplaces`](</docs/en/settings#extraknownmarketplaces>) entry in managed settings to enable auto-update for an organization marketplace without requiring each user to toggle it. To disable automatic updates for Claude Code and for plugins fetched from marketplaces, set the `DISABLE_AUTOUPDATER` environment variable. Plugins with a [`command` source](</docs/en/plugin-marketplaces#command-sources>) follow their own once-per-session re-resolve. See [Auto updates](</docs/en/setup#auto-updates>) for details. To keep plugin auto-updates enabled while disabling Claude Code auto-updates, set `FORCE_AUTOUPDATE_PLUGINS=1` along with `DISABLE_AUTOUPDATER`:
+`claude-plugins-official` and most other official Anthropic marketplaces have auto-update enabled by default. Third-party and local development marketplaces have auto-update disabled by default. Administrators can also set `"autoUpdate": true` on each [`extraKnownMarketplaces`](</docs/en/settings-reference#extraknownmarketplaces>) entry in managed settings to enable auto-update for an organization marketplace without requiring each user to toggle it. To disable automatic updates for Claude Code and for plugins fetched from marketplaces, set the `DISABLE_AUTOUPDATER` environment variable. Plugins with a [`command` source](</docs/en/plugin-marketplaces#command-sources>) follow their own once-per-session re-resolve. See [Auto updates](</docs/en/setup#auto-updates>) for details. To keep plugin auto-updates enabled while disabling Claude Code auto-updates, set `FORCE_AUTOUPDATE_PLUGINS=1` along with `DISABLE_AUTOUPDATER`:
export DISABLE_AUTOUPDATER=1
export FORCE_AUTOUPDATE_PLUGINS=1
@@ -448,7 +448,7 @@
}
}
-For full configuration options including `extraKnownMarketplaces` and `enabledPlugins`, see [Plugin settings](</docs/en/settings#plugin-settings>).
+For full configuration options including `extraKnownMarketplaces` and `enabledPlugins`, see [Plugin settings](</docs/en/settings-reference#plugin-settings>).
##
Show diff (213 lines)
--- a/env-vars.md
+++ b/env-vars.md
@@ -82,7 +82,7 @@
`.claude/settings.local.json`| You, in this project only, gitignored when Claude Code saves a setting to it; add it to your gitignore if you create it by hand
Managed settings| Everyone in your organization, deployed by an admin
-See [Settings files](</docs/en/settings#settings-files>) for where each file lives and [Settings precedence](</docs/en/settings#settings-precedence>) for how they combine when more than one sets the same variable.
+See [Settings files](</docs/en/settings#where-settings-live>) for where each file lives and [Settings precedence](</docs/en/settings#settings-precedence>) for how they combine when more than one sets the same variable.
##
@@ -90,7 +90,7 @@
Precedence
-Some behaviors have both an environment variable and a dedicated settings key. If you set both, the environment variable takes precedence, except for [`ANTHROPIC_DEFAULT_MODEL`](</docs/en/model-config#set-a-default-model-for-new-sessions>). For example, `ANTHROPIC_MODEL` overrides the `model` setting, and `CLAUDE_CODE_AUTO_CONNECT_IDE` overrides `autoConnectIde`. When the same variable is set in both your shell and a settings file `env` block, the settings file value applies. Claude Code writes each `env` entry into the process environment at startup and again when the file changes, replacing the value inherited from the shell. A few variables are special-cased; the [`env` setting](</docs/en/settings#available-settings>) lists the exceptions. In a settings file you can set a variable but you can’t remove one. To override a variable you can’t unset, such as a stale `CLAUDE_CODE_USE_VERTEX` exported by a shell profile you don’t control, set it to an empty string in the `env` block: `"CLAUDE_CODE_USE_VERTEX": ""`. Claude Code treats the empty value as unset for provider selection. Subprocesses still inherit the empty value. Between settings files, `env` values follow [settings precedence](</docs/en/settings#settings-precedence>), so a managed settings entry overrides the same variable in user or project settings. How an environment variable interacts with CLI flags and in-session commands varies per feature: `--model` and `/model` override `ANTHROPIC_MODEL`, while `CLAUDE_CODE_EFFORT_LEVEL` overrides `/effort`. When a variable interacts with another configuration source, its row in the Variables list states the precedence or links to the page that documents it. Claude Code reads shell environment variables at startup, so changes to them take effect the next time you launch `claude`. Variables set under the `env` key in settings files are reapplied to a running session when the file changes, with the startup-only exception described in In settings files.
+Some behaviors have both an environment variable and a dedicated settings key, and which one Claude Code reads first differs per key. For `ANTHROPIC_MODEL` and `CLAUDE_CODE_AUTO_CONNECT_IDE`, Claude Code reads the variable first and uses the `model` or `autoConnectIde` setting only when the variable is unset. For the pair you’re setting, check the variable’s row below and the key’s entry on the [settings reference](</docs/en/settings-reference>). When the same variable is set in both your shell and a settings file `env` block, the settings file value applies. Claude Code writes each `env` entry into the process environment at startup and again when the file changes, replacing the value inherited from the shell. A few variables are special-cased; the [`env` setting](</docs/en/settings-reference#env>) lists the exceptions. In a settings file you can set a variable but you can’t remove one. To override a variable you can’t unset, such as a stale `CLAUDE_CODE_USE_VERTEX` exported by a shell profile you don’t control, set it to an empty string in the `env` block: `"CLAUDE_CODE_USE_VERTEX": ""`. Claude Code treats the empty value as unset for provider selection. Subprocesses still inherit the empty value. Between settings files, `env` values follow [settings precedence](</docs/en/settings#settings-precedence>), so a managed settings entry overrides the same variable in user or project settings. How an environment variable interacts with CLI flags and in-session commands varies per feature: `--model` and `/model` override `ANTHROPIC_MODEL`, while `CLAUDE_CODE_EFFORT_LEVEL` overrides `/effort`. When a variable interacts with another configuration source, its row in the Variables list states the precedence or links to the page that documents it. Claude Code reads shell environment variables at startup, so changes to them take effect the next time you launch `claude`. Variables set under the `env` key in settings files are reapplied to a running session when the file changes, with the startup-only exception described in In settings files.
##
@@ -167,15 +167,15 @@
`BASH_MAX_TIMEOUT_MS`| Maximum timeout the model can set for long-running bash commands (default: 600000, or 10 minutes). The effective ceiling is the larger of this and `BASH_DEFAULT_TIMEOUT_MS`
`CCR_FORCE_BUNDLE`| Set to `1` to force [`claude --cloud`](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) to bundle and upload your local repository even when GitHub access is available
`CLAUDECODE`| Set to `1` in subprocesses Claude Code spawns (Bash and PowerShell tools, tmux sessions, [hook](</docs/en/hooks>) commands, [status line](</docs/en/statusline>) commands, stdio [MCP server](</docs/en/mcp>) subprocesses). IDE extensions also set this in their integrated terminals. Use to detect when a script is running inside a subprocess spawned by Claude Code. To check whether the current process was spawned directly by a tool call or hook, rather than inside a stdio MCP server that Claude Code started, use `CLAUDE_CODE_CHILD_SESSION` instead
-`CLAUDE_AFK_COUNTDOWN_MS`| How many milliseconds before auto-continue the on-screen countdown appears on an unanswered [`AskUserQuestion`](</docs/en/tools-reference>) dialog. Default `20000` (20 seconds), capped at the auto-continue timeout. Has no effect unless auto-continue is on; see the [`askUserQuestionTimeout`](</docs/en/settings#available-settings>) setting and `CLAUDE_AFK_TIMEOUT_MS`. Requires Claude Code v2.1.198 or later
-`CLAUDE_AFK_TIMEOUT_MS`| How many milliseconds of idle time before an unanswered [`AskUserQuestion`](</docs/en/tools-reference>) dialog auto-continues without you. Auto-continue is off by default; opt in with the [`askUserQuestionTimeout`](</docs/en/settings#available-settings>) setting. This variable is an override for demos and automated tests: when set, it takes precedence over that setting and turns auto-continue on even when the setting is unset or `never`. Setting `0` doesn’t turn the timeout off; it closes the dialog immediately. In v2.1.198 and v2.1.199, auto-continue was on by default with a `60000` (60 seconds) timeout. Requires Claude Code v2.1.198 or later
+`CLAUDE_AFK_COUNTDOWN_MS`| How many milliseconds before auto-continue the on-screen countdown appears on an unanswered [`AskUserQuestion`](</docs/en/tools-reference>) dialog. Default `20000` (20 seconds), capped at the auto-continue timeout. Has no effect unless auto-continue is on; see the [`askUserQuestionTimeout`](</docs/en/settings-reference#askuserquestiontimeout>) setting and `CLAUDE_AFK_TIMEOUT_MS`. Requires Claude Code v2.1.198 or later
+`CLAUDE_AFK_TIMEOUT_MS`| How many milliseconds of idle time before an unanswered [`AskUserQuestion`](</docs/en/tools-reference>) dialog auto-continues without you. Auto-continue is off by default; opt in with the [`askUserQuestionTimeout`](</docs/en/settings-reference#askuserquestiontimeout>) setting. This variable is an override for demos and automated tests: when set, it takes precedence over that setting and turns auto-continue on even when the setting is unset or `never`. Setting `0` doesn’t turn the timeout off; it closes the dialog immediately. In v2.1.198 and v2.1.199, auto-continue was on by default with a `60000` (60 seconds) timeout. Requires Claude Code v2.1.198 or later
`CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS`| Set to `1` to disable all built-in [subagent](</docs/en/sub-agents>) types such as Explore and Plan. Only applies in non-interactive mode (the `-p` flag). Useful for SDK users who want a blank slate. This also removes `general-purpose`, the subagent Claude Code runs when an Agent tool call omits `subagent_type`. Such a call then fails with [`subagent_type is required`](</docs/en/errors#subagent-type-is-required>)
`CLAUDE_AGENT_SDK_MCP_NO_PREFIX`| Set to `1` to skip the `mcp__<server>__` prefix on tool names from SDK-created MCP servers. Tools use their original names. SDK usage only
`CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`| Stall timeout in milliseconds for background subagents. Default `600000` (10 minutes). The timer resets on each streaming progress event; if no progress arrives within the window, the subagent is aborted and the task is marked failed, surfacing any partial result to the parent
`CLAUDE_AUTOCOMPACT_PCT_OVERRIDE`| Set the percentage (1-100) of the auto-compact window at which auto-compaction triggers. Use lower values like `50` to compact earlier; the variable can’t raise the threshold, so values above the default percentage are ignored. It applies only in sessions that [compact before the model’s context limit](</docs/en/model-config#context-window-and-auto-compaction>). Applies to both main conversations and subagents
`CLAUDE_AUTO_BACKGROUND_TASKS`| Set to `1` to force-enable automatic backgrounding of long-running agent tasks. When enabled, subagents are moved to the background after running for approximately two minutes. Also enables [automatic backgrounding of long MCP tool calls](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>) in non-interactive mode on Claude Code v2.1.212 or later
`CLAUDE_AX_PREPARK_MS`| In [screen reader mode](</docs/en/accessibility#what-your-screen-reader-hears>), how many milliseconds Claude Code waits, with the cursor at the start of the line, before it writes a new or changed line. Default `50`. Set `0` to write immediately. Claude Code caps the wait at `5000`. Requires Claude Code v2.1.233 or later
-`CLAUDE_AX_SCREEN_READER`| Set to `1` to render screen-reader friendly output: flat text without decorative borders or animations. Set to `0` to force screen-reader mode off even when [`axScreenReader`](</docs/en/settings#available-settings>) is `true`. The [`--ax-screen-reader`](</docs/en/cli-reference#cli-flags>) flag takes precedence. Requires Claude Code v2.1.181 or later
+`CLAUDE_AX_SCREEN_READER`| Set to `1` to render screen-reader friendly output: flat text without decorative borders or animations. Set to `0` to force screen-reader mode off even when [`axScreenReader`](</docs/en/settings-reference#axscreenreader>) is `true`. The [`--ax-screen-reader`](</docs/en/cli-reference#cli-flags>) flag takes precedence. Requires Claude Code v2.1.181 or later
`CLAUDE_AX_STARTUP_QUIET_MS`| In [screen reader mode](</docs/en/accessibility>), how many milliseconds Claude Code holds the first interface render after the startup confirmation line, so your screen reader can speak the line in full before new output interrupts it. Default `3000`. Set `0` to render immediately. Claude Code caps the hold at `600000` (10 minutes). Your first keystroke ends the hold early. Requires Claude Code v2.1.217 or later
`CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR`| Return to the original working directory after each Bash or PowerShell command in the main session
`CLAUDE_BYTE_STREAM_IDLE_TIMEOUT_MS`| Timeout in milliseconds for the byte-level streaming idle watchdog only; when set, it takes precedence over `CLAUDE_STREAM_IDLE_TIMEOUT_MS` for that watchdog and leaves the event-level watchdog unchanged. Claude Code clamps this variable to between 10 seconds and 30 minutes. Requires Claude Code v2.1.210 or later
@@ -184,13 +184,13 @@
`CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD`| Set to `1` to load memory files from directories specified with `--add-dir`. Loads `CLAUDE.md`, `.claude/CLAUDE.md`, `.claude/rules/*.md`, and `CLAUDE.local.md`. By default, additional directories do not load memory files
`CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT`| Set to `1` to repaint the entire screen on every frame in [fullscreen rendering](</docs/en/fullscreen>) instead of sending incremental updates. Use this if fullscreen mode shows stale or misplaced text fragments. Claude Code enables this automatically for background sessions and [agent view](</docs/en/agent-view>) on Windows
`CLAUDE_CODE_ALWAYS_ENABLE_EFFORT`| Set to `1` to send the [effort](</docs/en/model-config#adjust-effort-level>) parameter with every request, even when Claude Code does not recognize the model ID as effort-capable. Use this when routing through an [LLM gateway](</docs/en/llm-gateway>) or third-party provider that serves models under custom identifiers. Models that reject the effort parameter at the API, including Claude 3 models, Sonnet 4.0 and 4.5, Opus 4.0 and 4.1, and Haiku 4.5, are still excluded so requests do not fail
-`CLAUDE_CODE_API_KEY_HELPER_TTL_MS`| Interval in milliseconds at which credentials should be refreshed (when using [`apiKeyHelper`](</docs/en/settings#available-settings>))
+`CLAUDE_CODE_API_KEY_HELPER_TTL_MS`| Interval in milliseconds at which credentials should be refreshed (when using [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>))
`CLAUDE_CODE_ARTIFACT_AUTO_OPEN`| Set to `0` to stop Claude Code from opening the browser automatically when a new [artifact](</docs/en/artifacts>) is published. Republishing an existing artifact does not open the browser regardless of this setting
`CLAUDE_CODE_ARTIFACT_COMMENTS`| Set to `1` to let Claude read and reply to [comments on an artifact](</docs/en/artifacts#collect-comments-on-an-artifact>) when feature-flag fetching is off. Set to `0` to turn comment reading and replying off even when fetching is on. Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has [turned artifacts off](</docs/en/artifacts#availability>). Requires Claude Code v2.1.221 or later
`CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT`| Set to `1` to let Claude [reply on its own to comments sent to it](</docs/en/artifacts#let-claude-reply-to-comments-on-its-own>) when feature-flag fetching is off, or `0` to turn that off even when fetching is on. Needs comment reading on as well. Requires Claude Code v2.1.228 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_COMPACT_WINDOW`| Set the [auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) in tokens, from `100000` to `1000000`. Accepts a plain integer such as `500000` only: a value like `500k` reads as `500` and clamps to the 100K minimum. Takes precedence over the `/autocompact` command, the `--autocompact` flag, and the `autoCompactWindow` setting. The status line’s `used_percentage` always measures against the model’s full context window, so once this variable is set, that percentage no longer indicates when compaction will run
-`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#global-config-settings>) global config setting
+`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_AWS_CHAIN_RESOLVE_TIMEOUT_MS`| Time in milliseconds Claude Code waits for the AWS default credential provider chain to produce credentials before the request fails with [`AWS default-chain credential resolve timed out`](</docs/en/errors#aws-default-chain-credential-resolve-timed-out>) (default: `60000`). Raise it when a step in your chain legitimately needs longer, such as a browser-based SSO sign-in with MFA through a wrapper like `aws-vault`. Applies wherever Claude Code signs with the default chain: [Amazon Bedrock](</docs/en/amazon-bedrock#credential-caching-and-resolution-timeout>), [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), and the [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>). Requires Claude Code v2.1.207 or later
`CLAUDE_CODE_BRIDGE_SESSION_ID`| Set automatically in Bash tool and [hook command](</docs/en/hooks>) subprocesses while the session has an active [Remote Control](</docs/en/remote-control>) connection, and removed when the connection ends. The value is the session’s ID in `session_` form, the same identifier that appears in the session’s `claude.ai/code` URL, so a script can link back to the session that ran it. Requires Claude Code v2.1.199 or later. In [cloud sessions](</docs/en/claude-code-on-the-web>), read `CLAUDE_CODE_REMOTE_SESSION_ID` instead
`CLAUDE_CODE_BS_AS_CTRL_BACKSPACE`| Set to `0` to make Claude Code read the `0x08` byte, also written `^H`, as plain Backspace, or `1` to read it as Ctrl+Backspace. Either value replaces the platform default. By default, Claude Code reads it as Ctrl+Backspace on Windows, except when `TERM_PROGRAM` is `mintty` or `TERM` is `cygwin`, and as plain Backspace on macOS and Linux. Set `0` in a Windows terminal where [Backspace deletes a whole word](</docs/en/terminal-config#fix-backspace-deleting-a-whole-word-on-windows>)
@@ -204,26 +204,26 @@
`CLAUDE_CODE_DEBUG_LOG_LEVEL`| Minimum log level written to the debug log file. Values: `verbose`, `debug` (default), `info`, `warn`, `error`. Set to `verbose` to include high-volume diagnostics like full status line command output, or raise to `error` to reduce noise
`CLAUDE_CODE_DISABLE_1M_CONTEXT`| Set to `1` to disable [1M context window](</docs/en/model-config#extended-context>) support. When set, 1M model variants are unavailable in the model picker, and Claude Code holds sessions on models with a native 1M window, such as [Sonnet 5](</docs/en/model-config#sonnet-5-context-window>) and Fable 5, to a 200K window; see [Extended context](</docs/en/model-config#extended-context>) for how the hold is enforced. Useful for enterprise environments with compliance requirements. For its role in correcting the window for an unrecognized `[1m]` model ID, see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>)
`CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING`| Set to `1` to disable [adaptive reasoning](</docs/en/model-config#adjust-effort-level>) on Opus 4.6 and Sonnet 4.6 and fall back to the fixed thinking budget controlled by `MAX_THINKING_TOKENS`. Has no effect on Fable 5, Sonnet 5, or Opus 4.7 and later, which always use adaptive reasoning
-`CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION`| Set to `1` to stop Claude Code from merging [managed settings](</docs/en/settings#precedence-within-the-managed-tier>) `env` blocks per key across admin sources, so only the highest-priority source’s whole `env` block applies, as before v2.1.223. 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.223 or later
+`CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION`| Set to `1` to stop Claude Code from merging [managed settings](</docs/en/managed-settings#precedence-within-the-managed-tier>) `env` blocks per key across admin sources, so only the highest-priority source’s whole `env` block applies, as before v2.1.223. 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.223 or later
`CLAUDE_CODE_DISABLE_ADVISOR_TOOL`| Set to `1` to disable the [advisor tool](</docs/en/advisor>). The `/advisor` command becomes unavailable, any configured `advisorModel` is ignored, and the `--advisor` flag is accepted but has no effect, so existing scripts that pass it continue to work without errors
-`CLAUDE_CODE_DISABLE_AGENT_VIEW`| Set to `1` to turn off [background agents and agent view](</docs/en/agent-view>): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the [`disableAgentView`](</docs/en/settings#available-settings>) setting
-`CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN`| Set to `1` to disable [fullscreen rendering](</docs/en/fullscreen>) and use the classic main-screen renderer. The conversation stays in your terminal’s native scrollback so `Cmd+f` and tmux copy mode work as usual. Takes precedence over `CLAUDE_CODE_NO_FLICKER` and the [`tui`](</docs/en/settings#available-settings>) setting. You can also switch with `/tui default`. Does not apply to background sessions opened from [agent view](</docs/en/agent-view>), which always use fullscreen rendering
-`CLAUDE_CODE_DISABLE_ARTIFACT`| Set to `1` to disable the [Artifact](</docs/en/artifacts>) tool, which publishes session output as a private web page on claude.ai. Equivalent to the [`disableArtifact`](</docs/en/settings#available-settings>) setting
+`CLAUDE_CODE_DISABLE_AGENT_VIEW`| Set to `1` to turn off [background agents and agent view](</docs/en/agent-view>): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Equivalent to the [`disableAgentView`](</docs/en/settings-reference#disableagentview>) setting
+`CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN`| Set to `1` to disable [fullscreen rendering](</docs/en/fullscreen>) and use the classic main-screen renderer. The conversation stays in your terminal’s native scrollback so `Cmd+f` and tmux copy mode work as usual. Takes precedence over `CLAUDE_CODE_NO_FLICKER` and the [`tui`](</docs/en/settings-reference#tui>) setting. You can also switch with `/tui default`. Does not apply to background sessions opened from [agent view](</docs/en/agent-view>), which always use fullscreen rendering
+`CLAUDE_CODE_DISABLE_ARTIFACT`| Set to `1` to disable the [Artifact](</docs/en/artifacts>) tool, which publishes session output as a private web page on claude.ai. Equivalent to the [`disableArtifact`](</docs/en/settings-reference#disableartifact>) setting
`CLAUDE_CODE_DISABLE_ATTACHMENTS`| Set to `1` to disable attachment processing. File mentions with `@` syntax are sent as plain text instead of being expanded into file content
-`CLAUDE_CODE_DISABLE_AUTO_MEMORY`| Set to `1` to disable [auto memory](</docs/en/memory#auto-memory>). Set to `0` to force auto memory on even when `--bare` mode or [`autoMemoryEnabled: false`](</docs/en/settings#available-settings>) would otherwise disable it. When disabled, Claude does not create or load auto memory files
+`CLAUDE_CODE_DISABLE_AUTO_MEMORY`| Set to `1` to disable [auto memory](</docs/en/memory#auto-memory>). Set to `0` to force auto memory on even when `--bare` mode or [`autoMemoryEnabled: false`](</docs/en/settings-reference#automemoryenabled>) would otherwise disable it. When disabled, Claude does not create or load auto memory files
`CLAUDE_CODE_DISABLE_BACKGROUND_TASKS`| Set to `1` to disable all background task functionality, including the `run_in_background` parameter on Bash and subagent tools, auto-backgrounding, and the Ctrl+B shortcut
`CLAUDE_CODE_DISABLE_BEDROCK_CONTENT_TYPE_GUARD`| Set to `1` to skip the check that an [Amazon Bedrock](</docs/en/amazon-bedrock>) streaming response carries the `application/vnd.amazon.eventstream` content-type. Without this variable, a response with a different content-type fails with an error naming that content-type, which means a [gateway or proxy is transforming the response](</docs/en/amazon-bedrock#streaming-errors-behind-a-gateway-or-proxy>). Set it only when the gateway rewrites the `Content-Type` header but passes the binary event-stream body through unmodified; if the body itself was transformed, requests fail with `Truncated event message received` instead. Requires Claude Code v2.1.208 or later
`CLAUDE_CODE_DISABLE_BG_EXIT_HANDOFF`| Set to `1` to stop a [background session’s](</docs/en/agent-view>) running background shell commands, dynamic workflows, and, as of v2.1.198, background subagents when the [supervisor](</docs/en/agent-view#the-supervisor-process>) stops, restarts, or updates that session’s process, instead of handing them to the session’s next process. Affects only that handoff: backgrounding a session with `←` or [`/background`](</docs/en/agent-view#from-inside-a-session>) still carries in-flight work over, and `CLAUDE_DISABLE_ADOPT` turns off both. Requires Claude Code v2.1.196 or later
`CLAUDE_CODE_DISABLE_BG_SHELL_PRESSURE_REAP`| Set to `1` to stop Claude Code from terminating [background shell commands](</docs/en/interactive-mode#background-bash-commands>) when the operating system reports memory pressure. By default, on macOS and Linux, Claude Code terminates a background shell started in the main session on a memory-pressure signal once the session has been idle for 30 minutes and no turn or subagent is running. Windows has no memory-pressure signal, so this variable has no effect there. Requires Claude Code v2.1.193 or later
-`CLAUDE_CODE_DISABLE_BUNDLED_SKILLS`| Set to `1` to disable the [skills](</docs/en/skills>) and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model. `/doctor` stays typable like the built-in commands; hide it with `DISABLE_DOCTOR_COMMAND` instead. Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. Equivalent to the [`disableBundledSkills`](</docs/en/settings#available-settings>) setting
+`CLAUDE_CODE_DISABLE_BUNDLED_SKILLS`| Set to `1` to disable the [skills](</docs/en/skills>) and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model. `/doctor` stays typable like the built-in commands; hide it with `DISABLE_DOCTOR_COMMAND` instead. Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. Equivalent to the [`disableBundledSkills`](</docs/en/settings-reference#disablebundledskills>) setting
`CLAUDE_CODE_DISABLE_CLAUDE_MDS`| Set to `1` to prevent loading any CLAUDE.md memory files into context, including user, project, and auto memory files
`CLAUDE_CODE_DISABLE_CRON`| Set to `1` to disable [scheduled tasks](</docs/en/scheduled-tasks>). The `/loop` skill and cron tools become unavailable and any already-scheduled tasks stop firing, including tasks that are already running mid-session
-`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`| Set to `1` to strip Anthropic-specific `anthropic-beta` request headers and beta tool-schema fields (such as `defer_loading` and `eager_input_streaming`) from API requests. Use this when a proxy gateway rejects requests with errors like “Unexpected value(s) for the `anthropic-beta` header” or “Extra inputs are not permitted”. Standard fields (`name`, `description`, `input_schema`, `cache_control`) are preserved. [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is disabled and all MCP tools load upfront, even when you set `ENABLE_TOOL_SEARCH`. On Claude Code v2.1.227 or later, [managed settings](</docs/en/settings#settings-files>) can keep tool search on. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies
+`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`| Set to `1` to strip Anthropic-specific `anthropic-beta` request headers and beta tool-schema fields (such as `defer_loading` and `eager_input_streaming`) from API requests. Use this when a proxy gateway rejects requests with errors like “Unexpected value(s) for the `anthropic-beta` header” or “Extra inputs are not permitted”. Standard fields (`name`, `description`, `input_schema`, `cache_control`) are preserved. [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is disabled and all MCP tools load upfront, even when you set `ENABLE_TOOL_SEARCH`. On Claude Code v2.1.227 or later, [managed settings](</docs/en/managed-settings>) can keep tool search on. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies
`CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS`| Set to `1` to disable the built-in [Explore and Plan subagents](</docs/en/sub-agents#built-in-subagents>). Claude explores with its search tools or the general-purpose subagent instead, and [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) reads files directly rather than launching Explore and Plan agents. Custom subagents named `Explore` or `Plan` are unaffected. To remove every built-in subagent type in the Agent SDK or non-interactive mode, use `CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS` instead. Requires Claude Code v2.1.198 or later
`CLAUDE_CODE_DISABLE_FAST_MODE`| Set to `1` to disable [fast mode](</docs/en/fast-mode>)
-`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY`| Set to `1` to disable the “How is Claude doing?” session quality surveys. Surveys are also disabled when `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, unless `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` opts back in. To set a sample rate instead of disabling outright, use the [`feedbackSurveyRate`](</docs/en/settings#available-settings>) setting. See [Session quality surveys](</docs/en/data-usage#session-quality-surveys>)
-`CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING`| Set to `1` to disable file [checkpointing](</docs/en/checkpointing>). The `/rewind` command will not be able to restore code changes. Overrides the [`fileCheckpointingEnabled`](</docs/en/settings#available-settings>) setting
-`CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS`| Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude’s system prompt. Useful when using your own git workflow skills. Takes precedence over the [`includeGitInstructions`](</docs/en/settings#available-settings>) setting when set
+`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY`| Set to `1` to disable the “How is Claude doing?” session quality surveys. Surveys are also disabled when `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` is set, unless `CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL` opts back in. To set a sample rate instead of disabling outright, use the [`feedbackSurveyRate`](</docs/en/settings-reference#feedbacksurveyrate>) setting. See [Session quality surveys](</docs/en/data-usage#session-quality-surveys>)
+`CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING`| Set to `1` to disable file [checkpointing](</docs/en/checkpointing>). The `/rewind` command will not be able to restore code changes. Overrides the [`fileCheckpointingEnabled`](</docs/en/settings-reference#filecheckpointingenabled>) setting
+`CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS`| Set to `1` to remove built-in commit and PR workflow instructions and the git status snapshot from Claude’s system prompt. Useful when using your own git workflow skills. Takes precedence over the [`includeGitInstructions`](</docs/en/settings-reference#includegitinstructions>) setting when set
`CLAUDE_CODE_DISABLE_LEGACY_MODEL_REMAP`| Set to `1` to prevent automatic remapping of Opus 4.0 and 4.1 to the current Opus version on the Anthropic API. Use when you intentionally want to pin an older model. The remap does not run on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry
`CLAUDE_CODE_DISABLE_MOUSE`| Set to `1` to disable mouse tracking in [fullscreen rendering](</docs/en/fullscreen>). Keyboard scrolling with `PgUp` and `PgDn` still works. Use this to keep your terminal’s native copy-on-select behavior
`CLAUDE_CODE_DISABLE_MOUSE_CLICKS`| Set to `1` to disable click, drag, and hover handling in [fullscreen rendering](</docs/en/fullscreen>) while keeping mouse-wheel scrolling. Use this when you want wheel scroll to work inside Claude Code but don’t want clicks to position the cursor, expand tool output, or open links. `CLAUDE_CODE_DISABLE_MOUSE` takes precedence when both are set. Requires Claude Code v2.1.195 or later
@@ -238,17 +238,17 @@
`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. The variable’s behavior is unchanged from earlier versions; 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, which is also ineffective on Fable 5 since it cannot have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>), `0` likewise omits the parameter, so the two variables behave the same there
`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
-`CLAUDE_CODE_DISABLE_WORKFLOWS`| Set to `1` to disable [workflows](</docs/en/workflows#turn-workflows-off>). Equivalent to the [`disableWorkflows`](</docs/en/settings#available-settings>) setting
+`CLAUDE_CODE_DISABLE_WORKFLOWS`| Set to `1` to disable [workflows](</docs/en/workflows#turn-workflows-off>). Equivalent to the [`disableWorkflows`](</docs/en/settings-reference#disableworkflows>) setting
`CLAUDE_CODE_EFFORT_LEVEL`| Set the effort level for supported models. Values: `low`, `medium`, `high`, `xhigh`, `max`, or `auto` to use the model default. Available levels depend on the model. Takes precedence over `/effort` and the `effortLevel` setting. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>)
`CLAUDE_CODE_ENABLE_APPEND_SUBAGENT_PROMPT`| Set to `1` to enable appending extra text to the end of the system prompt of every [subagent](</docs/en/sub-agents>) other than a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>). The [`--append-subagent-system-prompt`](</docs/en/cli-reference#cli-flags>) flag supplies the appended text and sets this variable automatically, so you don’t need to set it yourself. Requires Claude Code v2.1.205 or later
`CLAUDE_CODE_ENABLE_AUTO_MODE`| Accepted for compatibility with older releases and has no effect. Auto mode is available by default on every provider, including Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions. In v2.1.158 through v2.1.206, setting this to `1` was required to make [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) available on those providers
-`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`| Override [session recap](</docs/en/interactive-mode#session-recap>) availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](</docs/en/settings#available-settings>) is `false`. Takes precedence over the setting and `/config` toggle
+`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`| Override [session recap](</docs/en/interactive-mode#session-recap>) availability. Set to `0` to force recaps off regardless of the `/config` toggle. Set to `1` to force recaps on when [`awaySummaryEnabled`](</docs/en/settings-reference#awaysummaryenabled>) is `false`. Takes precedence over the setting and `/config` toggle
`CLAUDE_CODE_ENABLE_BACKGROUND_PLUGIN_REFRESH`| Set to `1` to refresh plugin state at turn boundaries in [non-interactive mode](</docs/en/headless>) after a background install completes. Off by default because the refresh changes the system prompt mid-session, which invalidates [prompt caching](</docs/en/prompt-caching>) for that turn
`CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTEL`| Set to `1` to route the “How is Claude doing?” session quality survey to your own [OpenTelemetry collector](</docs/en/monitoring-usage>) when Anthropic-bound nonessential traffic is blocked. Survey ratings are emitted only as OTEL events to your configured collector. No survey data is sent to Anthropic in this mode. Applies when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, `DISABLE_TELEMETRY`, or `DO_NOT_TRACK` is set, and has no effect otherwise. `CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY` and the organization product feedback policy take precedence
`CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING`| Controls whether tool call inputs stream from the API as Claude generates them. With this off, a large tool input such as a long file write arrives only after Claude finishes generating it, which can look like it’s hanging. Enabled by default on the Anthropic API. On Amazon Bedrock and Google Cloud’s Agent Platform, enabled per model where the deployed container supports it. Set to `0` to opt out. Set to `1` to force on when routing through a proxy via `ANTHROPIC_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_BEDROCK_BASE_URL`. Off by default on Microsoft Foundry and [gateway](</docs/en/llm-gateway>) connections
-`CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY`| Set to `1` to populate the `/model` picker from your gateway’s `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway such as LiteLLM, Kong, or an internal proxy. Off by default because gateways backed by a shared API key would otherwise show every user every model the key can access. Discovered models are still filtered by an [`availableModels`](</docs/en/settings#available-settings>) allowlist the session receives; deliver the list through [MDM or a managed settings file](</docs/en/settings#settings-files>), since [server-managed delivery is not available on gateway configurations](</docs/en/server-managed-settings#platform-availability>)
+`CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY`| Set to `1` to populate the `/model` picker from your gateway’s `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway such as LiteLLM, Kong, or an internal proxy. Off by default because gateways backed by a shared API key would otherwise show every user every model the key can access. Discovered models are still filtered by an [`availableModels`](</docs/en/settings-reference#availablemodels>) allowlist the session receives; deliver the list through [MDM or a managed settings file](</docs/en/managed-settings#delivery-mechanisms>), since [server-managed delivery is not available on gateway configurations](</docs/en/server-managed-settings#platform-availability>)
`CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE`| Removed in v2.1.142, when the [fast mode](</docs/en/fast-mode>) default moved from Opus 4.6 to Opus 4.7
-`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`| Set to `false` to turn off prompt suggestions, the grayed-out predictions that appear in your prompt input. Takes precedence over the [`promptSuggestionEnabled`](</docs/en/settings#available-settings>) setting, which is what the **Prompt suggestions** toggle in `/config` writes. Claude Code also [pauses suggestions while your account is close to or at its usage limit](</docs/en/interactive-mode#when-claude-code-skips-suggestions>). Set to `true` to keep them on until you reach the limit. Requires Claude Code v2.1.238 or later. See [Prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>)
+`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`| Set to `false` to turn off prompt suggestions, the grayed-out predictions that appear in your prompt input. Takes precedence over the [`promptSuggestionEnabled`](</docs/en/settings-reference#promptsuggestionenabled>) setting, which is what the **Prompt suggestions** toggle in `/config` writes. Claude Code also [pauses suggestions while your account is close to or at its usage limit](</docs/en/interactive-mode#when-claude-code-skips-suggestions>). Set to `true` to keep them on until you reach the limit. Requires Claude Code v2.1.238 or later. See [Prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>)
`CLAUDE_CODE_ENABLE_TASKS`| Selects which task-tracking tools Claude Code provides in [sessions that have them](</docs/en/tools-reference#task-tool-availability>). By default, Claude Code provides the Task tools `TaskCreate`, `TaskUpdate`, `TaskGet`, and `TaskList`. Set to `0` to get the legacy `TodoWrite` tool instead. See [Task list](</docs/en/interactive-mode#task-list>)
`CLAUDE_CODE_ENABLE_TELEMETRY`| Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](</docs/en/monitoring-usage>)
`CLAUDE_CODE_ENABLE_TODO_TOOLS`| Set to `1` to get the task-tracking tools on the models listed under [Task tool availability](</docs/en/tools-reference#task-tool-availability>), where Claude Code otherwise leaves them out. `CLAUDE_CODE_ENABLE_TASKS` still selects the Task tools or `TodoWrite`. Requires Claude Code v2.1.233 or later
@@ -263,12 +263,12 @@
`CLAUDE_CODE_FORWARD_SUBAGENT_TEXT`| Set to `1` to emit [subagent](</docs/en/sub-agents>) text and thinking blocks in `claude -p --output-format stream-json` output, the same behavior as the [`--forward-subagent-text`](</docs/en/cli-reference#cli-flags>) flag. Use the variable when a harness invokes `claude` and can’t pass the flag itself. Unlike the flag, which exits with an error outside non-interactive mode with stream-json output, the variable is ignored there so that nested invocations keep working when it’s set process-wide. Requires Claude Code v2.1.211 or later
`CLAUDE_CODE_GIT_BASH_PATH`| Windows only: path to the Git Bash executable (`bash.exe`). Use when Git Bash is installed but not in your PATH. If the path doesn’t exist or the file isn’t named `bash.exe`, `sh.exe`, `bash`, or `sh`, Claude Code ignores the variable and auto-detects Git Bash as if it were unset, logging a warning visible with `--debug`. Before v2.1.219, Claude Code exited at startup when the path didn’t exist, and used any existing file as the shell without checking that it was bash or sh. See [Windows setup](</docs/en/setup#set-up-on-windows>)
`CLAUDE_CODE_GLOB_HIDDEN`| Set to `false` to exclude dotfiles from results when Claude invokes the [Glob tool](</docs/en/tools-reference#glob-tool-behavior>). Included by default. Does not affect `@` file autocomplete, `ls`, Grep, or Read
-`CLAUDE_CODE_GLOB_NO_IGNORE`| Set to `false` to make the [Glob tool](</docs/en/tools-reference#glob-tool-behavior>) respect `.gitignore` patterns. By default, Glob returns all matching files including gitignored ones. Does not affect `@` file autocomplete, which has its own [`respectGitignore` setting](</docs/en/settings#available-settings>)
+`CLAUDE_CODE_GLOB_NO_IGNORE`| Set to `false` to make the [Glob tool](</docs/en/tools-reference#glob-tool-behavior>) respect `.gitignore` patterns. By default, Glob returns all matching files including gitignored ones. Does not affect `@` file autocomplete, which has its own [`respectGitignore` setting](</docs/en/settings-reference#respectgitignore>)
`CLAUDE_CODE_GLOB_TIMEOUT_SECONDS`| Timeout in seconds for Glob tool file discovery. Defaults to 20 seconds on most platforms and 60 seconds on WSL
`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`| How many minutes background work can keep an active goal waiting before Claude Code [asks Claude to check on it](</docs/en/goal#background-work-defers-evaluation>). Default `30`. Set `0` to turn check-ins off. Give whole minutes in plain digits, at most `10080`, which is one week. Claude Code treats any other value as unset and uses the default. Requires Claude Code v2.1.234 or later
`CLAUDE_CODE_HIDE_CWD`| Set to `1` to hide the working directory in the startup logo. Useful for screenshares or recordings where the path exposes your OS username
`CLAUDE_CODE_IDE_HOST_OVERRIDE`| Override the host address used to connect to the IDE extension. By default Claude Code auto-detects the correct address, including WSL-to-Windows routing
-`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`| Set to `1` to skip auto-installation of IDE extensions. Equivalent to setting [`autoInstallIdeExtension`](</docs/en/settings#global-config-settings>) to `false`
+`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`| Set to `1` to skip auto-installation of IDE extensions. Equivalent to setting [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false`
`CLAUDE_CODE_IDE_SKIP_VALID_CHECK`| Set to `1` to skip validation of IDE lockfile entries during connection. Use when auto-connect fails to find your IDE despite it running
`CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS`| How many [subagents](</docs/en/sub-agents#concurrent-subagent-limit>) can be running in one session before the Agent tool refuses to spawn another (default: 20). Accepts a positive whole number in plain digits; anything else is ignored, so the variable can adjust the cap but can’t disable it. Requires Claude Code v2.1.217 or later
`CLAUDE_CODE_MAX_CONTEXT_TOKENS`| Override the context window size Claude Code assumes for the active model. As of v2.1.193, how it applies depends on how Claude Code resolves the model ID; see [Correct the window for a gateway or custom model ID](</docs/en/model-config#correct-the-window-for-a-gateway-or-custom-model-id>). Use this when routing to a model through `ANTHROPIC_BASE_URL` whose context window does not match the built-in size for its name
@@ -283,10 +283,10 @@
`CLAUDE_CODE_MCP_AUTO_BACKGROUND_MS`| Elapsed time in milliseconds before a still-running MCP tool call [moves to a background task](</docs/en/mcp#automatic-backgrounding-of-long-tool-calls>) (default: 120000, or 2 minutes). Set to `0` to turn automatic backgrounding off. Requires Claude Code v2.1.212 or later
`CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT`| Idle timeout in milliseconds for MCP tool calls. When a stdio, HTTP, SSE, WebSocket, or [claude.ai connector](</docs/en/mcp#use-mcp-servers-from-claude-ai>) MCP server sends no response and no progress notification for this long, the tool call aborts with an error instead of waiting for the overall `MCP_TOOL_TIMEOUT`. Overrides the per-transport defaults of 300000 (5 minutes) for network servers and 1800000 (30 minutes) for stdio servers. Set to `0` to disable the idle check. Values below 1000 are raised to one second, and the value is capped at the effective `MCP_TOOL_TIMEOUT`. A per-server `timeout` in `.mcp.json` of at least 1000 raises that server’s idle window to at least the `timeout` value. Doesn’t apply to IDE servers or SDK in-process servers. Requires Claude Code v2.1.187 or later. Before v2.1.203, stdio servers were exempt from the idle timeout
`CLAUDE_CODE_MESSAGING_SOCKET`| Set by Claude Code, not by you: in sessions that bind an [inbox socket](</docs/en/cross-session-messaging#the-sessions-inbox-socket>), Claude Code exports that socket’s path to hooks and Bash commands when it binds the socket. In a session that starts with messaging on, Claude Code binds the socket before any hook runs. Other sessions on the machine deliver messages to this path. Each session exports its own socket rather than one inherited from a parent, and messages arriving on it go through the session’s [inbound controls](</docs/en/cross-session-messaging#control-inbound-messages>). Settings `env` blocks can’t set it. Requires Claude Code v2.1.224 or later
-`CLAUDE_CODE_MESSAGING_TOKEN`| Set by Claude Code, not by you: in sessions that bind an [inbox socket](</docs/en/cross-session-messaging#the-sessions-inbox-socket>), Claude Code exports this per-session token to hooks and Bash commands alongside `CLAUDE_CODE_MESSAGING_SOCKET`. A script posting to the socket can send `{"type":"auth","token":"<token>"}` as its first line to prove it belongs to the session. The [own-child rules](</docs/en/cross-session-messaging#the-sessions-inbox-socket>) say when Claude Code consults it. Each session exports its own token, never one inherited from a parent session. Settings `env` blocks can’t set it. Requires Claude Code v2.1.228 or later
+`CLAUDE_CODE_MESSAGING_TOKEN`| Set by Claude Code, not by you: in sessions that bind an [inbox socket](</docs/en/cross-session-messaging#the-sessions-inbox-socket>), Claude Code exports this per-session token to hooks and Bash commands alongside `CLAUDE_CODE_MESSAGING_SOCKET`. A script posting to the socket can send `{"type":"auth","token":"<token>"}` as its first line to prove it belongs to the session. On native Windows, Claude Code requires this line and closes any connection that doesn’t open with a valid one. The [own-child rules](</docs/en/cross-session-messaging#the-sessions-inbox-socket>) say when Claude Code consults the token. Each session exports its own token, never one inherited from a parent session. Settings `env` blocks can’t set it. Requires Claude Code v2.1.228 or later
`CLAUDE_CODE_NATIVE_CURSOR`| Set to `1` to show the terminal’s own cursor at the input caret instead of a drawn block. The cursor respects the terminal’s blink, shape, and focus settings
`CLAUDE_CODE_NEW_INIT`| Set to `1` to make `/init` run an interactive setup flow. The flow asks which files to generate, including CLAUDE.md, skills, and hooks, before exploring the codebase and writing them. Without this variable, `/init` generates a CLAUDE.md automatically without prompting
-`CLAUDE_CODE_NO_FLICKER`| Set to `1` to enable [fullscreen rendering](</docs/en/fullscreen>), a research preview that reduces flicker and keeps memory flat in long conversations. You can also switch with `/tui fullscreen`
+`CLAUDE_CODE_NO_FLICKER`| Set to `1` to enable [fullscreen rendering](</docs/en/fullscreen>), a research preview that reduces flicker and keeps memory flat in long conversations. Overrides the [`tui`](</docs/en/settings-reference#tui>) setting; you can also switch with `/tui fullscreen`
`CLAUDE_CODE_OAUTH_REFRESH_TOKEN`| OAuth refresh token for Claude.ai authentication. When set, `claude auth login` exchanges this token directly instead of opening a browser. Requires `CLAUDE_CODE_OAUTH_SCOPES`. Useful for provisioning authentication in automated environments
`CLAUDE_CODE_OAUTH_SCOPES`| Space-separated OAuth scopes the refresh token was issued with, such as `"user:profile user:inference user:sessions:claude_code"`. Required when `CLAUDE_CODE_OAUTH_REFRESH_TOKEN` is set
`CLAUDE_CODE_OAUTH_TOKEN`| OAuth access token for claude.ai authentication. Alternative to `/login` for SDK and automated environments. Takes precedence over keychain-stored credentials. Generate one with [`claude setup-token`](</docs/en/authentication#generate-a-long-lived-token>). Unless you run [`/login`](</docs/en/authentication#authentication-precedence>), Claude Code uses the token you set for the whole session. To replace an expired token, generate a new one and restart
@@ -305,17 +305,17 @@
`CLAUDE_CODE_PLUGIN_SEED_DIR`| Path to one or more read-only plugin seed directories, separated by `:` on Unix or `;` on Windows. Use this to bundle a pre-populated plugins directory into a container image. Claude Code registers marketplaces from these directories at startup and uses pre-cached plugins without re-cloning. See [Pre-populate plugins for containers](</docs/en/plugin-marketplaces#pre-populate-plugins-for-containers>)
`CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY`| Set to `1` to stop Claude Code from passing `-ExecutionPolicy Bypass` when spawning PowerShell for tool calls, hooks, and status line commands, and respect the machine’s effective execution policy instead. By default Claude Code bypasses execution policy at process scope so `.ps1` scripts and module imports work on default-Restricted Windows installs. Process-scope bypass never overrides Group Policy `MachinePolicy` or `UserPolicy` regardless of this setting
`CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS`| Maximum time in milliseconds that [non-interactive mode](</docs/en/headless#background-tasks-at-exit>) with the `-p` flag waits after the final turn for background subagents and workflows whose result is part of the output. Default: `600000`, or 10 minutes. When the cap is exceeded, remaining background tasks are terminated and the process exits. Set to `0` to wait indefinitely. This cap is separate from the five-second grace period that applies to plain background shells
-`CLAUDE_CODE_PROCESS_WRAPPER`| Launch the processes Claude Code starts from its own binary, such as the background service that hosts [agent view](</docs/en/agent-view>) sessions, through a corporate launcher given as an argv prefix like `/opt/corp/launcher`. Set it in the `env` block of user or [managed settings](</docs/en/permissions#managed-settings>), not as a shell export, so the detached background service inherits it; project and local settings can’t set it. Equivalent to the [`processWrapper` setting](</docs/en/settings#available-settings>), which requires Claude Code v2.1.210 or later; this variable takes precedence when both are set. The VS Code extension configures its own launcher separately through its `claudeProcessWrapper` setting. Ignored on Windows. See [Run Claude Code behind a corporate launcher](</docs/en/corporate-launcher>) for the value format, what the launcher covers, and the contract the launcher must satisfy. Requires Claude Code v2.1.208 or later
+`CLAUDE_CODE_PROCESS_WRAPPER`| Launch the processes Claude Code starts from its own binary, such as the background service that hosts [agent view](</docs/en/agent-view>) sessions, through a corporate launcher given as an argv prefix like `/opt/corp/launcher`. Set it in the `env` block of user or [managed settings](</docs/en/managed-settings>), not as a shell export, so the detached background service inherits it; project and local settings can’t set it. Equivalent to the [`processWrapper` setting](</docs/en/settings-reference#processwrapper>), which requires Claude Code v2.1.210 or later; this variable takes precedence when both are set. The VS Code extension configures its own launcher separately through its `claudeProcessWrapper` setting. Ignored on Windows. See [Run Claude Code behind a corporate launcher](</docs/en/corporate-launcher>) for the value format, what the launcher covers, and the contract the launcher must satisfy. Requires Claude Code v2.1.208 or later
`CLAUDE_CODE_PROJECT_DIR_NAME`| Set together with `CLAUDE_CONFIG_DIR` to choose the `projects/` directory name Claude Code stores that session’s transcripts and auto memory under, in place of one derived from the working directory path. For example, starting Claude Code with `CLAUDE_CONFIG_DIR=/srv/tenant-a CLAUDE_CODE_PROJECT_DIR_NAME=work claude` stores them under `/srv/tenant-a/projects/work/`. Claude Code ignores this variable when `CLAUDE_CONFIG_DIR` is unset, and reads it only from the environment you start `claude` from, never from a settings file `env` block. See [Name the project directory yourself](</docs/en/sessions#name-the-project-directory-yourself>). Requires Claude Code v2.1.234 or later
`CLAUDE_CODE_PROPAGATE_TRACEPARENT`| Set to `1` to propagate W3C trace context when `ANTHROPIC_BASE_URL` points at a custom proxy. Propagation covers the `traceparent` header on model and HTTP MCP requests and the `TRACEPARENT` environment variable for Bash, PowerShell, and hook subprocesses. By default, propagation is enabled only when connected directly to the Anthropic API. Added in v2.1.152. See [Traces (beta)](</docs/en/monitoring-usage#traces-beta>)
-`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`| Set by host platforms that embed Claude Code and manage model provider routing on its behalf. When set, Claude Code ignores provider-selection, endpoint, and authentication variables such as `CLAUDE_CODE_USE_BEDROCK`, `ANTHROPIC_BASE_URL`, and `ANTHROPIC_API_KEY` in settings files, so user settings can’t override the host’s routing. Claude Code also ignores model-selection keys such as `model`, `fallbackModel`, and `modelOverrides` in [managed settings](</docs/en/permissions#managed-settings>), whichever managed source delivers them, so the host’s model configuration takes precedence over an out-of-date managed model pin; an [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist in managed settings still applies unless the host supplies its own. Claude Code also skips the automatic telemetry opt-out it otherwise applies on third-party providers such as Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, so telemetry follows the standard `DISABLE_TELEMETRY` opt-out. See [Default behaviors by API provider](</docs/en/data-usage#default-behaviors-by-api-provider>)
+`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`| Set by host platforms that embed Claude Code and manage model provider routing on its behalf. When set, Claude Code ignores provider-selection, endpoint, and authentication variables such as `CLAUDE_CODE_USE_BEDROCK`, `ANTHROPIC_BASE_URL`, and `ANTHROPIC_API_KEY` in settings files, so user settings can’t override the host’s routing. Claude Code also ignores model-selection keys such as `model`, `fallbackModel`, and `modelOverrides` in [managed settings](</docs/en/managed-settings>), whichever managed source delivers them, so the host’s model configuration takes precedence over an out-of-date managed model pin. Claude Code also ignores model-selection variables such as `ANTHROPIC_MODEL` and the `ANTHROPIC_DEFAULT_*_MODEL` family in a managed `env` block; an [`availableModels`](</docs/en/model-config#restrict-model-selection>) allowlist in managed settings still applies unless the host supplies its own. Claude Code also skips the automatic telemetry opt-out it otherwise applies on third-party providers such as Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, so telemetry follows the standard `DISABLE_TELEMETRY` opt-out. See [Default behaviors by API provider](</docs/en/data-usage#default-behaviors-by-api-provider>)
`CLAUDE_CODE_PROXY_RESOLVES_HOSTS`| Set to `1` to allow the proxy to perform DNS resolution instead of the caller. Opt-in for environments where the proxy should handle hostname resolution
`CLAUDE_CODE_REMOTE`| Set automatically to `true` when Claude Code is running as a [cloud session](</docs/en/claude-code-on-the-web>). Read this from a hook or setup script to detect whether you are in a cloud session
`CLAUDE_CODE_REMOTE_SESSION_ID`| Set automatically in [cloud sessions](</docs/en/claude-code-on-the-web>) to the current session’s ID. Read this to construct a link back to the session transcript. See [Link output back to the session](</docs/en/cloud-environments#link-output-back-to-the-session>)
`CLAUDE_CODE_RESUME_INTERRUPTED_TURN`| Set to `1` to automatically resume if the previous session ended mid-turn. Used in SDK mode so the model continues without requiring the SDK to re-send the prompt. To turn this off, unset the variable or set it to `0`. Before v2.1.221, Claude Code ignored `0` and other falsy values, so setting `0` still triggered the resume in non-interactive mode and unsetting the variable was the only way to turn it off
`CLAUDE_CODE_RESUME_INTERRUPTED_TURN_MAX_AGE_MS`| Maximum age in milliseconds of the last transcript message for a session that ended mid-turn to continue automatically on resume. When the last message is older than this bound, Claude Code skips both the `CLAUDE_CODE_RESUME_INTERRUPTED_TURN` automatic resume and the injected `CLAUDE_CODE_RESUME_PROMPT` continuation message, and the session starts idle so you continue explicitly. Unset or `0` means no bound; a negative or non-numeric value applies a one-hour bound. Spawn scripts for long-running agents can set this so a restart against an old transcript doesn’t re-run a stale prompt. Claude Code sets a one-hour bound itself when it restarts a crashed [agent view](</docs/en/agent-view>) session that inherited its conversation from an interactive session. Requires Claude Code v2.1.211 or later
`CLAUDE_CODE_RESUME_PROMPT`| Override the continuation message injected when resuming a session that ended mid-turn. Defaults to `Continue from where you left off.`. Spawn scripts for long-running agents can set this to a more directive boot message. An empty string uses the default
-`CLAUDE_CODE_RETRY_WATCHDOG`| Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. As of v2.1.199 it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later
+`CLAUDE_CODE_RETRY_WATCHDOG`| Set to `1` for unattended sessions such as eval harnesses, CI jobs, or remote workers. Retries `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once on a `429` that reports a spend limit or exhausted usage credits, even one from a [gateway spend cap](</docs/en/errors#spend-limit-reached>) that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. The watchdog backs off up to 5 minutes between attempts, or until the limit resets when the response carries a rate-limit reset time, so a session that hits a usage limit waits out the remaining window. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly. Requires Claude Code v2.1.186 or later
`CLAUDE_CODE_SAFE_MODE`| Set to `1` to start in safe mode: CLAUDE.md, skills, plugins, hooks, MCP servers, custom commands and agents, output styles, workflows, custom themes, custom keybindings, status line and file-suggestion commands, LSP servers, and auto memory do not load, for troubleshooting a broken configuration. Managed settings policy still applies, including policy-configured hooks, status line, and file-suggestion commands; managed plugins, managed skills, managed CLAUDE.md, and policy-configured MCP servers do not. Equivalent to passing [`--safe-mode`](</docs/en/cli-reference#cli-flags>). Directly spawned child processes inherit the variable
`CLAUDE_CODE_SCRIPT_CAPS`| JSON object limiting how many times specific scripts may be invoked per session when `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` is set. Keys are substrings matched against the command text; values are integer call limits. For example, `{"deploy.sh": 2}` allows `deploy.sh` to be called at most twice. Matching is substring-based so shell-expansion tricks like `./scripts/deploy.sh $(evil)` still count against the cap. Runtime fan-out via `xargs` or `find -exec` is not detected; this is a defense-in-depth control
`CLAUDE_CODE_SCROLL_SPEED`| Set the mouse wheel scroll multiplier in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Accepts any positive value up to 20, including fractional values below 1 such as `0.5` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. Set to `3` to match `vim` if your terminal sends one wheel event per notch without amplification. Ignored in the JetBrains IDE terminal, where Claude Code uses its own scroll handling
@@ -342,19 +342,19 @@
`CLAUDE_CODE_SYNC_SKILLS`| Set to `1` to download your enabled claude.ai skills into `~/.claude/skills/synced/` and resync every 10 minutes. Before it runs the first query, Claude Code waits up to `CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS` for the list of your skills. The downloads themselves finish in the background, and Claude waits for a skill’s download when it invokes that skill. The `synced` folder name is [reserved for this download](</docs/en/skills#where-skills-live>). Before v2.1.227, the skills downloaded into `~/.claude/skills/` directly. Applies only in non-interactive mode with the `-p` flag. Requires claude.ai authentication. [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions receive your enabled claude.ai skills automatically; you don’t need to set this there. Claude Code applies [extra rules to the downloaded skills](</docs/en/skills#how-synced-skills-behave>), such as not running their `!` commands on your machine
`CLAUDE_CODE_SYNC_SKILLS_INSTALL_TIMEOUT_MS`| Timeout in milliseconds for a mid-session skills resync when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 30000). Bounds the download triggered when the host requests a skill reload during the session. When exceeded, the resync stops and remaining downloads continue in the background
`CLAUDE_CODE_SYNC_SKILLS_WAIT_TIMEOUT_MS`| Timeout in milliseconds for the first query to wait for the initial skill list when `CLAUDE_CODE_SYNC_SKILLS` is set (default: 5000). When exceeded, the first query runs with whichever skills have arrived. The downloads finish in the background either way, and Claude waits for a skill’s download when it invokes that skill
-`CLAUDE_CODE_SYNTAX_HIGHLIGHT`| Set to `false` to disable syntax highlighting in diff output. Useful when colors interfere with your terminal setup. To also disable highlighting in code blocks and file previews, use the [`syntaxHighlightingDisabled`](</docs/en/settings>) setting
+`CLAUDE_CODE_SYNTAX_HIGHLIGHT`| Set to `false` to disable syntax highlighting in diff output. Useful when colors interfere with your terminal setup. To also disable highlighting in code blocks and file previews, use the [`syntaxHighlightingDisabled`](</docs/en/settings-reference#syntaxhighlightingdisabled>) setting
`CLAUDE_CODE_TASK_LIST_ID`| Share a task list across sessions. Set the same ID in multiple Claude Code instances to coordinate on a shared task list, in [sessions that have the Task tools](</docs/en/tools-reference#task-tool-availability>). See [Task list](</docs/en/interactive-mode#task-list>)
`CLAUDE_CODE_TEAM_TEARDOWN_PARK_TIMEOUT_MS`| Override, in milliseconds, how long a non-interactive session waits at exit for its [agent team](</docs/en/agent-teams>) to finish tearing down. Accepts 1000 to 60000; an out-of-range value is ignored and the default of 10000 applies. Requires Claude Code v2.1.206 or later
`CLAUDE_CODE_TMPDIR`| Override the temp directory used for internal temp files. Claude Code appends `/claude-{uid}/` on Unix or `/claude/` on Windows to this path. Default: `/tmp` on macOS, `os.tmpdir()` on Linux and Windows. As of v2.1.161, on macOS and Linux, [sandboxed](</docs/en/sandboxing>) Bash subprocesses receive a short fallback `$TMPDIR` under the system default when your override is a long path, since some tools fail when temp paths get too long. Unsandboxed Bash commands inherit your shell’s `$TMPDIR` unchanged. Claude Code’s own temp files always use your override
`CLAUDE_CODE_TMUX_TRUECOLOR`| Set to any non-empty value, such as `1`, to allow 24-bit truecolor output inside tmux. **Setting it to`0` or `false` still allows truecolor**, unlike most on/off variables; unset the variable to restore the 256-color clamp. By default, Claude Code clamps to 256 colors when `$TMUX` is set because tmux does not pass through truecolor escape sequences unless configured to. Set this after adding `set -ga terminal-overrides ',*:Tc'` to your `~/.tmux.conf`. See [Terminal configuration](</docs/en/terminal-config>) for other tmux settings
`CLAUDE_CODE_TOOL_MEMORY_LIMIT`| On Linux and WSL, set to a size such as `4G` to [cap the memory that Bash and PowerShell tool commands can use](</docs/en/tools-reference#memory-limit-on-linux-and-wsl>). Write the size in plain digits, alone for a number of bytes or with a `K`, `M`, `G`, or `T` suffix. Set `0` or `off` to turn the cap off. Once a tool command has turned the cap on or off, a changed value takes effect the next time you launch `claude`. Requires Claude Code v2.1.233 or later
-`CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS`| Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a [Remote Control](</docs/en/remote-control>) or SDK host, and for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>), before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren’t governed by it. Also bounds the mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) in a session that may be running unattended. [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) and [non-interactive sessions](</docs/en/cross-session-messaging#non-interactive-sessions>) cover the full held-message expiry rules, including the cases where the deadline doesn’t apply. Overrides the [`dialogExpiry`](</docs/en/settings#available-settings>) setting; `0` or a negative value disables the deadline
+`CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS`| Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a [Remote Control](</docs/en/remote-control>) or SDK host, and for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>), before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren’t governed by it. Also bounds the mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) in a session that may be running unattended. [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) and [non-interactive sessions](</docs/en/cross-session-messaging#non-interactive-sessions>) cover the full held-message expiry rules, including the cases where the deadline doesn’t apply. Overrides the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) setting; `0` or a negative value disables the deadline
`CLAUDE_CODE_USE_ANTHROPIC_AWS`| Use [Claude Platform on AWS](</docs/en/claude-platform-on-aws>)
`CLAUDE_CODE_USE_BEDROCK`| Use [Amazon Bedrock](</docs/en/amazon-bedrock>)
`CLAUDE_CODE_USE_FOUNDRY`| Use [Microsoft Foundry](</docs/en/microsoft-foundry>)
`CLAUDE_CODE_USE_MANTLE`| Use the Amazon Bedrock [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>)
`CLAUDE_CODE_USE_NATIVE_FILE_SEARCH`| Set to `1` to discover custom commands, subagents, and output styles using Node.js file APIs instead of ripgrep. Set this if the bundled ripgrep binary is unavailable or blocked in your environment. Does not affect the Grep or file search tools
-`CLAUDE_CODE_USE_POWERSHELL_TOOL`| Controls the PowerShell tool. On Windows without Git Bash, the tool is enabled automatically; set to `0` to disable it. On Windows with Git Bash installed, the tool is rolling out progressively: set to `1` to opt in or `0` to opt out. On Linux, macOS, and WSL, set to `1` to enable it, which requires `pwsh` on your `PATH`. When enabled on Windows, Claude can run PowerShell commands natively instead of routing through Git Bash. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)
+`CLAUDE_CODE_USE_POWERSHELL_TOOL`| Controls the PowerShell tool. On Windows without Git Bash, the tool is enabled automatically; set to `0` to disable it. On Windows with Git Bash installed, the tool is on by default for claude.ai and Console accounts; set to `1` to enable it in Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry sessions, or `0` to turn it off. On Linux, macOS, and WSL, set to `1` to enable it, which requires `pwsh` on your `PATH`. When enabled on Windows, Claude can run PowerShell commands natively instead of routing through Git Bash. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>)
`CLAUDE_CODE_USE_VERTEX`| Use [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>)
`CLAUDE_CODE_WEBFETCH_CACHE_TTL_MS`| Set to the number of milliseconds [WebFetch](</docs/en/tools-reference#webfetch-tool-behavior>) keeps each fetched URL’s response cached. The default is `900000`, which is 15 minutes. Takes plain digits only; `0`, a decimal, or any other spelling keeps the default. Claude Code reads the value once per launch, so a change in a settings `env` block applies when you next launch `claude`. Requires Claude Code v2.1.233 or later
`CLAUDE_CODE_WORKFLOW_PREFIX_STAGGER_MS`| Upper bound in milliseconds on how long a [workflow](</docs/en/workflows>) agent waits for a same-prefix sibling’s first response to begin before sending its own first request. When a fan-out starts several agents that share a [prompt-cache prefix](</docs/en/workflows#prompt-caching-in-a-fan-out>), Claude Code holds all but the first agent for up to this long so the rest read the cached prefix instead of each processing it uncached. Default `5000`. Set to `0` to disable the wait. When `DISABLE_PROMPT_CACHING` is set, agents never wait. Requires Claude Code v2.1.229 or later
@@ -371,7 +371,7 @@
`CLAUDE_SUBAGENT_BG_SHELL_MAX_MS`| Maximum lifetime in milliseconds for a [background shell command](</docs/en/interactive-mode#background-bash-commands>) that a [subagent](</docs/en/sub-agents>) started. Default `3600000` (60 minutes). When you set `0`, Claude Code applies the default instead of removing the cap. When the subagent runs in the foreground, Claude Code also ends the command when that subagent gives its final response, regardless of this cap. See [the background command lifetime rules](</docs/en/tools-reference#background-commands>). Claude Code doesn’t cap main-session background commands this way. For the memory-pressure limit that covers them, see [How backgrounding works](</docs/en/interactive-mode#how-backgrounding-works>)
`DEBUG`| Set to `1` to enable debug mode, equivalent to launching with [`--debug`](</docs/en/cli-reference#cli-flags>). Debug logs are written to `~/.claude/debug/<session-id>.txt`, or to the path set by `CLAUDE_CODE_DEBUG_LOGS_DIR`. Only the truthy values `1`, `true`, `yes`, and `on` enable debug mode, so namespace patterns like `DEBUG=express:*` set for other tools do not trigger it
`DISABLE_AUTOUPDATER`| Set to `1` to disable automatic background updates. Manual `claude update` still works. Use `DISABLE_UPDATES` to block both
-`DISABLE_AUTO_COMPACT`| Set to `1` to disable automatic compaction when approaching the context limit. The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the [`autoCompactEnabled`](</docs/en/settings#available-settings>) setting
+`DISABLE_AUTO_COMPACT`| Set to `1` to disable automatic compaction when approaching the context limit. The manual `/compact` command remains available. Use when you want explicit control over when compaction occurs. Overrides the [`autoCompactEnabled`](</docs/en/settings-reference#autocompactenabled>) setting
`DISABLE_COMPACT`| Set to `1` to disable all compaction: both automatic compaction and the manual `/compact` command
`DISABLE_COST_WARNINGS`| Set to `1` to disable cost warning messages
`DISABLE_DOCTOR_COMMAND`| Set to `1` to hide the [`/doctor`](</docs/en/commands#all-commands>) setup checkup skill and its `/checkup` alias. Useful for managed deployments where users shouldn’t run setup diagnostics from a session. Doesn’t affect the `claude doctor` terminal command. Before v2.1.205, this variable hid the `/doctor` diagnostics screen command
@@ -393,7 +393,7 @@
`DISABLE_UPDATES`| Set to `1` to block all updates including manual `claude update` and `claude install`. Stricter than `DISABLE_AUTOUPDATER`. Use when distributing Claude Code through your own channels and users should not self-update
`DISABLE_UPGRADE_COMMAND`| Set to `1` to hide the `/upgrade` command
`DO_NOT_TRACK`| Set to `1` to opt out of telemetry, with the same effect as `DISABLE_TELEMETRY`, including making [Remote Control](</docs/en/remote-control#requirements>) and the other features that need feature-flag fetching unavailable. Claude Code reads this variable as a standard boolean, so `0` leaves telemetry on, and honors it as the cross-tool convention recognized by many developer CLIs
-`ENABLE_CLAUDEAI_MCP_SERVERS`| Set to `false` to disable [claude.ai MCP servers](</docs/en/mcp#use-mcp-servers-from-claude-ai>) in Claude Code. Enabled by default for logged-in users. To disable per-project or per-org, set [`disableClaudeAiConnectors`](</docs/en/settings#available-settings>) in settings instead
+`ENABLE_CLAUDEAI_MCP_SERVERS`| Set to `false` to disable [claude.ai MCP servers](</docs/en/mcp#use-mcp-servers-from-claude-ai>) in Claude Code. Enabled by default for logged-in users. To disable per-project or per-org, set [`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>) in settings instead
`ENABLE_PROMPT_CACHING_1H`| Set to `1` to request a 1-hour [prompt cache TTL](</docs/en/prompt-caching#cache-lifetime>) instead of the default 5 minutes. Intended for API key, [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) users. Subscription users within included usage receive 1-hour TTL automatically. Subscription users drawing on [usage credits](<https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans>) can set it to keep the 1-hour TTL. 1-hour cache writes are billed at a higher rate
`ENABLE_PROMPT_CACHING_1H_BEDROCK`| Deprecated. Use `ENABLE_PROMPT_CACHING_1H` instead
`ENABLE_TOOL_SEARCH`| Controls [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>). Unset, Claude Code defers all MCP tools by default. It still loads them upfront on Google Cloud’s Agent Platform models earlier than the Claude 4.5 generation, on a Microsoft Foundry deployment hosted on Azure, and when `ANTHROPIC_BASE_URL` points to a non-first-party host. `true` always defers and sends the beta header, except on those same Agent Platform models and Microsoft Foundry deployments; requests fail on proxies that don’t support `tool_reference`. `auto` loads upfront when tool definitions fit within 10% of context. `auto:N` sets a custom threshold, such as `auto:5` for 5%. `false` loads all tools upfront. A value you set yourself is ignored when `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS` is set. Before v2.1.221, Claude Code disabled tool search for all models on Google Cloud’s Agent Platform unless you set this variable to `true`
@@ -415,7 +415,7 @@
`MCP_DISCOVERY_CACHE_STRIKES`| At a start where a [discovery-cache](</docs/en/mcp#server-status-detail>) entry is older than `MCP_DISCOVERY_CACHE_TTL_S`, Claude Code refreshes it in the background. This variable sets how many refreshes in a row can fail before Claude Code discards the entry and connects the server at the next start instead (default: 1). Raise it if your network connection drops occasionally, so that one failed refresh doesn’t discard the entry. Requires Claude Code v2.1.238 or later
`MCP_DISCOVERY_CACHE_TTL_S`| Seconds for which Claude Code uses a [discovery-cache](</docs/en/mcp#server-status-detail>) entry without refreshing it (default: 900). At a start where the entry is older than that, Claude Code still uses it but refreshes it in the background. Once the entry is older than `MCP_DISCOVERY_CACHE_MAX_STALE_S`, Claude Code discards it instead. Claude Code caps the value at `MCP_DISCOVERY_CACHE_MAX_STALE_S`, which is 4 hours by default. Before v2.1.238, Claude Code didn’t cap the value
`MCP_OAUTH_CALLBACK_PORT`| Fixed port for the OAuth redirect callback, as an alternative to `--callback-port` when adding an MCP server with [pre-configured credentials](</docs/en/mcp#use-pre-configured-oauth-credentials>)
-`MCP_PROTOCOL_NEGOTIATION`| On the [v2 MCP client runtime](</docs/en/mcp#mcp-client-runtimes>) only, whether Claude Code probes servers for MCP protocol revision 2026-07-28. Set `auto` to probe HTTP, claude.ai connector, and stdio servers; a server that doesn’t answer the probe connects on the earlier protocol instead, as SSE and WebSocket servers always do. Set `legacy` to skip the probe for every server. Without the variable, Claude Code probes HTTP, claude.ai connector, and stdio servers on Claude Code v2.1.232 or later, with the exceptions the [MCP client runtimes](</docs/en/mcp#mcp-client-runtimes>) section lists. Any other value is ignored with a warning in the debug log. Requires Claude Code v2.1.221 or later
+`MCP_PROTOCOL_NEGOTIATION`| On the [v2 MCP client runtime](</docs/en/mcp#mcp-client-runtimes>) only, whether Claude Code probes servers for MCP protocol revision 2026-07-28. Set `auto` to probe HTTP, claude.ai connector, and stdio servers; a server that doesn’t answer the probe connects on the earlier protocol instead, as SSE and WebSocket servers always do. Set `legacy` to skip the probe for every server. Without the variable, Claude Code probes HTTP and claude.ai connector servers on Claude Code v2.1.232 or later, with the exceptions the [MCP client runtimes](</docs/en/mcp#mcp-client-runtimes>) section lists. Any other value is ignored with a warning in the debug log. Requires Claude Code v2.1.221 or later
`MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE`| Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default: 20)
`MCP_SDK_GENERATION`| Pin which [MCP client runtime](</docs/en/mcp#mcp-client-runtimes>) this process connects to MCP servers with: `v1`, built on MCP TypeScript SDK 1.x, or `v2`, built on [MCP TypeScript SDK 2.0](<https://ts.sdk.modelcontextprotocol.io/v2/>). Without the variable, Claude Code uses v2 on Claude Code v2.1.232 or later, except where that section says it uses v1. On Claude Code v2.1.221 or later, the v2 runtime checks the issuer an MCP OAuth server returns in its authorization response and fails the sign-in with an error that begins `Issuer mismatch in authorization response` when it doesn’t match. The v1 runtime doesn’t run this check. If you set an unrecognized value, Claude Code ignores it and writes a warning to the debug log. Claude Code reads the value once per process. Requires Claude Code v2.1.218 or later
`MCP_SERVER_CONNECTION_BATCH_SIZE`| Maximum number of local MCP servers (stdio) to connect in parallel during startup (default: 3)
Show diff (248 lines)
--- a/errors.md
+++ b/errors.md
@@ -72,6 +72,7 @@
`Unable to connect to Anthropic services` during setup| Network
`Socket is closed`| Network
`Waiting for API response · will retry in`| Automatic retries, or Network if it persists
+`API returned an empty or malformed response`| Network
`Bedrock streaming response has content-type "..."; expected "application/vnd.amazon.eventstream"`| Network
`SSL certificate verification failed`| Network
`SSL certificate error (...)` during login or startup| Network
@@ -87,6 +88,10 @@
`Prompt is too long · automatic compaction failed:`| Request errors
`Context limit reached · /compact or /clear to continue`| Request errors
`Context limit reached · /clear to continue`| Request errors
+`capability_rejected: prompt_too_long` on a Claude apps gateway session| Request errors
+`upstream rejected the request` / `request too large for this upstream` on a Claude apps gateway session| [Upstream error messages](</docs/en/claude-apps-gateway-config#upstream-error-messages>)
+`upstream rate limit exceeded` on a Claude apps gateway session| [Upstream error messages](</docs/en/claude-apps-gateway-config#upstream-error-messages>)
+`all upstreams failed (N attempted)` on a Claude apps gateway session| [Upstream error messages](</docs/en/claude-apps-gateway-config#upstream-error-messages>)
`Context exceeds the ...-token limit by ... tokens` in `/context` output| Request errors
`Error during compaction: Conversation too long`| Request errors
`Request too large`| Request errors
@@ -123,6 +128,7 @@
`Input must be provided either through stdin or as a prompt argument when using --print`| Command-line errors
`Error: Input contained only whitespace`| Command-line errors
`Blank prompt — the message was only whitespace, so nothing was sent to the model.`| Command-line errors
+`Unknown command: /<name>`, with or without a `Did you mean` suggestion| Command-line errors
`Diff is too large for ultrareview` / `PR #<N> is too large for ultrareview`| Command-line errors
`Could not find merge-base with <branch>`| Command-line errors
`Your checkout has no branches (detached HEAD only)`| Command-line errors
@@ -192,6 +198,7 @@
* A server error, dropped connection, or stalled stream that arrives after Claude has completed a block of text or a tool call, or has started one after finishing its thinking, but before it finishes the response. Claude Code could execute the same tool calls twice if it re-ran the request, so it keeps what Claude completed and shows an incomplete-response notice. Claude Code still runs any tool calls Claude completed and continues the turn from their results. Before v2.1.199, Claude Code discarded the partial output and reported the whole turn as an error when a server error arrived mid-stream.
* A failure that arrives after Claude has finished the response: nothing needs retrying, so Claude Code keeps the complete response and ends the turn normally.
* An Amazon Bedrock streaming response with an unexpected content-type, because the gateway or proxy rewriting the response would rewrite the retry the same way. Requires Claude Code v2.1.208 or later.
+ * A non-streaming retry of a failed streaming request that gets a success status but no Claude API message in the body. Claude Code ends the turn with that error.
###
@@ -212,7 +219,7 @@
Variable| Default| Effect
---|---|---
[`CLAUDE_CODE_MAX_RETRIES`](</docs/en/env-vars>)| 10| Number of retry attempts. Capped at 15 as of v2.1.186; as of v2.1.199 `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. Lower it to surface failures faster in scripts.
-[`CLAUDE_CODE_RETRY_WATCHDOG`](</docs/en/env-vars>)| unset| Set to `1` in unattended sessions such as CI jobs to retry `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. As of v2.1.199 it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly.
+[`CLAUDE_CODE_RETRY_WATCHDOG`](</docs/en/env-vars>)| unset| Set to `1` in unattended sessions such as CI jobs to retry `429` and `529` capacity errors indefinitely instead of failing after `CLAUDE_CODE_MAX_RETRIES` attempts. Claude Code fails at once on a `429` that reports a spend limit or exhausted usage credits, even one from a gateway spend cap that resets on a schedule. Before v2.1.239, the watchdog retried these indefinitely. On v2.1.199 or later it also raises the default retry count for other transient errors, such as server errors, timeouts, and dropped connections, to 300, roughly three hours of backoff, and removes the cap of 15 on `CLAUDE_CODE_MAX_RETRIES` if you set that variable explicitly.
[`API_TIMEOUT_MS`](</docs/en/env-vars>)| 600000| Per-request timeout in milliseconds. Raise it for slow networks or proxies.
##
@@ -435,11 +442,11 @@
Fable 5 limit reached · continuing on Fable 5 uses usage credits, and the prompt to confirm went unanswered — nothing was sent · answer it where this session is running, or /model to change
Fable 5 now uses usage credits · the prompt to confirm went unanswered — nothing was sent · answer it where this session is running, or /model to change
-This happens in [Remote Control](</docs/en/remote-control>) sessions, [background sessions](</docs/en/agent-view>), and [agent team](</docs/en/agent-teams>) teammate sessions. Claude Code shows the consent prompt only in the session’s own interactive view: the terminal where it runs, or, for a background session, the [agents view](</docs/en/agent-view>) once you attach. A Remote Control client can’t display it. Claude Code closes the prompt at the [`dialogExpiry`](</docs/en/settings#available-settings>) deadline, five minutes by default, or as soon as a new prompt arrives while nobody has typed at that terminal, such as a prompt sent from a Remote Control client. Typing at the terminal where the session runs cancels the deadline, and Claude Code waits for your answer. In a background session’s attached view, typing doesn’t cancel the deadline, so answer before it passes. Claude Code sends nothing and keeps your model, so when you send your next prompt, Claude Code shows the consent prompt again. **What to do:**
+This happens in [Remote Control](</docs/en/remote-control>) sessions, [background sessions](</docs/en/agent-view>), and [agent team](</docs/en/agent-teams>) teammate sessions. Claude Code shows the consent prompt only in the session’s own interactive view: the terminal where it runs, or, for a background session, the [agents view](</docs/en/agent-view>) once you attach. A Remote Control client can’t display it. Claude Code closes the prompt at the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline, five minutes by default, or as soon as a new prompt arrives while nobody has typed at that terminal, such as a prompt sent from a Remote Control client. Typing at the terminal where the session runs cancels the deadline, and Claude Code waits for your answer. In a background session’s attached view, typing doesn’t cancel the deadline, and a new prompt still closes the consent prompt, so answer before either happens. Claude Code sends nothing and keeps your model, so when you send your next prompt, Claude Code shows the consent prompt again. **What to do:**
* At the terminal where the session runs, send another prompt and answer the consent prompt when it reappears. For a background session, attach to it from the [agents view](</docs/en/agent-view>) first. Resending from a Remote Control client shows this message again, because the client can’t display the prompt.
* Run `/model` to switch to a model that doesn’t bill usage credits
- * To give yourself more time to reach that terminal, set [`dialogExpiry`](</docs/en/settings#available-settings>) to a longer value or `"never"`
+ * To give yourself more time to reach that terminal, set [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) to a longer value or `"never"`
Before v2.1.236, this message didn’t appear: while a Remote Control client was connected, Claude Code waited 60 seconds for an answer and then continued the turn on your default model.
@@ -546,7 +553,7 @@
* Run `/login` to authenticate with your Claude subscription or Console account
* If you expected an environment variable to authenticate you, confirm `ANTHROPIC_API_KEY` is set and exported in the shell where you launched `claude`
- * For CI or automation where interactive login is not possible, configure an [`apiKeyHelper`](</docs/en/settings#available-settings>) script that fetches a key at startup
+ * For CI or automation where interactive login is not possible, configure an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) script that fetches a key at startup
* See [Authentication precedence](</docs/en/authentication#authentication-precedence>) to understand which credential Claude Code uses when several are present
If you are prompted to log in repeatedly, see [Not logged in or token expired](</docs/en/troubleshoot-install#not-logged-in-or-token-expired>) for system clock and macOS Keychain fixes.
@@ -583,7 +590,7 @@
* Check for typos and confirm the key has not been revoked in the [Console](<https://platform.claude.com/settings/keys>)
* In the same shell, run `env | grep ANTHROPIC`, or in PowerShell `Get-ChildItem Env:ANTHROPIC*`. Tools like direnv, dotenv shell plugins, and IDE terminals can load a stale key from a `.env` file in your project without you setting it explicitly.
* Unset `ANTHROPIC_API_KEY` and run `/login` to use subscription auth instead
- * If the key comes from an [`apiKeyHelper`](</docs/en/settings#available-settings>) script, run the script directly to confirm it prints a valid key on stdout
+ * If the key comes from an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) script, run the script directly to confirm it prints a valid key on stdout
* Run `/status` to confirm which credential source Claude Code is actually using
###
@@ -592,7 +599,7 @@
Your apiKeyHelper script is failing
-Claude Code ran the command in your [`apiKeyHelper`](</docs/en/settings#available-settings>) setting and didn’t get a key back. Without one, the request reaches the API with a placeholder credential, and the API rejects it with `401`. The `Authentication` panel in the terminal shows which of these happened:
+Claude Code ran the command in your [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) setting and didn’t get a key back. Without one, the request reaches the API with a placeholder credential, and the API rejects it with `401`. The `Authentication` panel in the terminal shows which of these happened:
* The command exited with an error or timed out
* The command printed nothing to stdout
@@ -625,7 +632,7 @@
* `Invalid ANTHROPIC_CUSTOM_HEADERS`: a header name or value you set in [`ANTHROPIC_CUSTOM_HEADERS`](</docs/en/env-vars>). The description counts which `Name: Value` pair is at fault, such as `distinct header 2 of 3 parsed from ANTHROPIC_CUSTOM_HEADERS`, without repeating the name or value, since you chose both.
* `Invalid request header from the environment`: a value Claude Code copies into a request header from another environment variable, such as `CLAUDE_AGENT_SDK_CLIENT_APP`. The description names the variable to fix.
-Claude Code reports a bad `ANTHROPIC_API_KEY` caught by this check as Invalid API key, with the same trailing description. It reports a bad saved `/login` credential as Not logged in instead; run `/login` to save a fresh one. An [`apiKeyHelper`](</docs/en/settings#available-settings>) script’s output never reaches this check: Claude Code validates it when the script runs, and output an HTTP header can’t carry fails with Your apiKeyHelper script is failing. After the second `·`, the message describes the problem, as in this full example:
+Claude Code reports a bad `ANTHROPIC_API_KEY` caught by this check as Invalid API key, with the same trailing description. It reports a bad saved `/login` credential as Not logged in instead; run `/login` to save a fresh one. An [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) script’s output never reaches this check: Claude Code validates it when the script runs, and output an HTTP header can’t carry fails with Your apiKeyHelper script is failing. After the second `·`, the message describes the problem, as in this full example:
Invalid auth token · Fix external auth token · Invalid Authorization header value from ANTHROPIC_AUTH_TOKEN: it contains a line break at character 41 (120 characters on 2 lines).
@@ -670,7 +677,7 @@
Environment variables and `apiKeyHelper` take precedence over `/login`, so running `/login` alone doesn’t help while either is still supplying a key. See [Authentication precedence](</docs/en/authentication#authentication-precedence>). **What to do:**
* If the message names `ANTHROPIC_API_KEY`, unset it in the current shell and remove it from your shell profile or `.env` file, then relaunch `claude`
- * If the message names `apiKeyHelper`, remove the [`apiKeyHelper`](</docs/en/settings#available-settings>) setting from your `settings.json`
+ * If the message names `apiKeyHelper`, remove the [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) setting from your `settings.json`
* Run `/login` to sign in with your claude.ai account
* Run `/status` afterward to confirm the active credential is your subscription rather than an API key
* If you need API key authentication for automation, ask your organization admin to re-enable it in the Console
@@ -725,7 +732,7 @@
**What to do:**
* Unset the variable the message names, such as `CLAUDE_CODE_USE_BEDROCK` or `ANTHROPIC_BASE_URL`, and restart the session, or start Remote Control from a session that talks to the Anthropic API directly
- * If the variable isn’t set in your shell, check the `env` key in your [settings files](</docs/en/settings#settings-files>), which applies environment variables to every session
+ * If the variable isn’t set in your shell, check the `env` key in your [settings files](</docs/en/settings#where-settings-live>), which applies environment variables to every session
* For this and the other Remote Control startup messages, see [Troubleshoot Remote Control](</docs/en/remote-control#troubleshooting>)
###
@@ -1026,6 +1033,28 @@
+API returned an empty or malformed response
+
+Claude Code shows this error when its non-streaming retry of a failed streaming request gets an HTTP success status but the body isn’t a Claude API message: commonly an HTML error or sign-in page, an empty body, or JSON in another format. A proxy, gateway, or network sign-in page answering in the API’s place is the usual source. Claude Code doesn’t retry the request, and the turn ends with this error.
+
+ API returned an empty or malformed response (HTTP 200) — check for a proxy or gateway intercepting the request.
+
+After that opening, the message reports what came back and which request failed:
+
+ * A `Response:` clause with the content type, the kind of body, such as `body is an HTML page` or `empty body`, its size in bytes, and whether the response carried an Anthropic request id. When the response names a recognizable server, such as `nginx` or `cloudflare`, or carries intermediary headers, such as `cf-ray` or `via`, the clause lists those too.
+ * A sentence naming the failed streaming request’s id and the failure that triggered the retry. When a stream had opened before the failure, it also reports how many stream events arrived and, if any did, how long the stream had been silent when the attempt failed.
+
+Before v2.1.234, the message ended after `intercepting the request`. **What to do:**
+
+ * Read the `Response:` clause to see which system answered. An HTML body, no Anthropic request id, or a named server such as `nginx` or `cloudflare` means that something between Claude Code and the API replied in its place
+ * If you route through an [LLM gateway](</docs/en/llm-gateway-connect#troubleshoot-gateway-errors>), test the route with a direct request and fix the hop that returns the non-API response
+ * On a network with a sign-in page, such as guest Wi-Fi, complete the sign-in in a browser, then retry
+ * If only the non-streaming route through your gateway is broken, set [`CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK=1`](</docs/en/env-vars#variables>) so a request that fails mid-stream goes to the normal retry path instead of this fallback, except when the streaming endpoint itself returns `404`, where Claude Code still falls back
+
+###
+
+
+
Bedrock streaming response has an unexpected content-type
A gateway or proxy between Claude Code and [Amazon Bedrock](</docs/en/amazon-bedrock>) is transforming the streaming response body or its `Content-Type` header. Amazon Bedrock streams responses as `application/vnd.amazon.eventstream`, and Claude Code rejects a successful streaming response that reports a different content-type instead of decoding a body it can’t read. The request isn’t retried.
@@ -1188,11 +1217,11 @@
Context limit reached · /compact or /clear to continue
-The line names only `/clear` when [`DISABLE_COMPACT`](</docs/en/env-vars>) is set. Longer forms of the error, such as the compaction-failed form below, keep the `Prompt is too long ·` wording. In `-p` output and the transcript, the text stays `Prompt is too long`. When you turned auto-compact off in your [user settings](</docs/en/settings#available-settings>), the line also says so:
+The line names only `/clear` when [`DISABLE_COMPACT`](</docs/en/env-vars>) is set. Longer forms of the error, such as the compaction-failed form below, keep the `Prompt is too long ·` wording. In `-p` output and the transcript, the text stays `Prompt is too long`. When you turned auto-compact off in your [user settings](</docs/en/settings-reference#autocompactenabled>), the line also says so:
Context limit reached · /compact or /clear to continue · auto-compact is off · /config to turn it on
-The **Auto-compact** toggle in `/config` writes `autoCompactEnabled` to user settings. The hint appears only when a `/config` change would take effect. For example, it doesn’t appear when [`DISABLE_AUTO_COMPACT`](</docs/en/env-vars>) or [`DISABLE_COMPACT`](</docs/en/env-vars>) turned auto-compact off. It also doesn’t appear when a higher-precedence scope, such as project or managed settings, set `autoCompactEnabled` to `false`. Nor does it appear in a terminal attached to a cloud session, where the cloud session owns auto-compact. Before v2.1.235, the line carried no auto-compact hint. Amazon Bedrock reports this condition as `Input is too long for requested model.`, which Claude Code handles the same way. Before v2.1.217, Claude Code didn’t recognize the Bedrock wording, so auto-compact never triggered on it and `/compact` failed with the same error. When automatic compaction ran on this turn and failed on an underlying error, such as an unavailable model or an authentication failure, the message names that error after a separator:
+The **Auto-compact** toggle in `/config` writes `autoCompactEnabled` to user settings. The hint appears only when a `/config` change would take effect. For example, it doesn’t appear when [`DISABLE_AUTO_COMPACT`](</docs/en/env-vars>) or [`DISABLE_COMPACT`](</docs/en/env-vars>) turned auto-compact off. It also doesn’t appear when a higher-precedence scope, such as project or managed settings, set `autoCompactEnabled` to `false`. Nor does it appear in a terminal attached to a cloud session, where the cloud session owns auto-compact. Before v2.1.235, the line carried no auto-compact hint. Amazon Bedrock reports this condition as `Input is too long for requested model.`, which Claude Code handles the same way. Before v2.1.217, Claude Code didn’t recognize the Bedrock wording, so auto-compact never triggered on it and `/compact` failed with the same error. A [Claude apps gateway](</docs/en/claude-apps-gateway-config#upstream-error-messages>) reports this condition as `capability_rejected: prompt_too_long` when a cloud upstream rejects the request in the provider’s own error shape. Claude Code treats the token the same as `Prompt is too long`. Before v2.1.228, Claude Code didn’t recognize the token, so auto-compact didn’t trigger on it. When automatic compaction ran on this turn and failed on an underlying error, such as an unavailable model or an authentication failure, the message names that error after a separator:
Prompt is too long · automatic compaction failed: <the underlying error>
@@ -1538,7 +1567,7 @@
Command-line errors
-These errors come from the `claude` command line, its subcommands, and commands such as `/security-review` that gather context by running shell commands before their prompt runs. So do errors from `/tui`, which relaunches the CLI.
+These errors come from the `claude` command line and its subcommands, from a command name you submit at the prompt, and from commands such as `/security-review` that gather context by running shell commands before their prompt runs. So do errors from `/tui`, which relaunches the CLI.
###
@@ -1623,7 +1652,7 @@
**What to do:**
* On a fresh installation, start `claude`, wait for the session to load, exit, and run `claude import` again
- * Where feature-flag fetching stays off, set the configuration up yourself: add MCP servers with [`claude mcp add`](</docs/en/mcp#installing-mcp-servers>), and create the [`CLAUDE.md` files](</docs/en/memory#how-claude-md-files-load>), [skills and commands](</docs/en/skills#where-skills-live>), and [subagents](</docs/en/sub-agents#choose-the-subagent-scope>) you want to carry over. The message also names `~/.claude/settings.json`. Of the configuration `claude import` carries, that file holds only the [permission mode](</docs/en/settings#permission-settings>); Claude Code doesn’t read MCP servers from it.
+ * Where feature-flag fetching stays off, set the configuration up yourself: add MCP servers with [`claude mcp add`](</docs/en/mcp#installing-mcp-servers>), and create the [`CLAUDE.md` files](</docs/en/memory#how-claude-md-files-load>), [skills and commands](</docs/en/skills#where-skills-live>), and [subagents](</docs/en/sub-agents#choose-the-subagent-scope>) you want to carry over. The message also names `~/.claude/settings.json`. Of the configuration `claude import` carries, that file holds only the [permission mode](</docs/en/settings-reference#permission-settings>); Claude Code doesn’t read MCP servers from it.
###
@@ -1729,6 +1758,27 @@
+Unknown command
+
+You submitted a `/` name that doesn’t match any command in this session, so Claude Code reports the name instead of running anything:
+
+ Unknown command: /hepl. Did you mean /help?
+
+Claude Code suggests the closest command name or alias that the menu lists in this session. When nothing is close, the message ends after the name. The cause is usually one of the following:
+
+ * A typo, such as `/hepl` for `/help`. [How the command menu matches what you type](</docs/en/commands#how-the-command-menu-matches-what-you-type>) covers picking a close match before you submit
+ * A command that exists but isn’t available in this session because a requirement isn’t met, such as your platform, plan, or authentication method. The troubleshooting entries for [`/web-setup`](</docs/en/web-quickstart#web-setup-shows-no-commands-match-or-unknown-command>) and [`/schedule`](</docs/en/routines#schedule-returns-unknown-command>) walk through two common cases
+ * A command from a [plugin](</docs/en/plugins>) or [MCP server](</docs/en/mcp#use-mcp-prompts-as-commands>) that isn’t installed or connected in this session
+
+Before v2.1.236, if you pressed `Enter` while the command menu listed a near match for the name you typed, Claude Code ran that match, so a typo such as `/hepl` ran `/help` instead of producing this message. **What to do:**
+
+ * Run the suggested name, or type `/` followed by part of the name to see what’s available in this session
+ * If Claude Code reports a documented command as unknown, check its row in the [commands reference](</docs/en/commands>) for the requirement it names
+
+###
+
+
+
Diff is too large for ultrareview
The diff between your branch and the base branch, including uncommitted and staged changes, exceeds the size limits for an [ultrareview](</docs/en/ultrareview>), so `/code-review ultra` and the `claude ultrareview` subcommand refuse the review before the cloud session starts. A refused review doesn’t use a free run and doesn’t bill usage credits. The message names the limits in effect, the size of your diff, and the files that contribute the most changed lines. Before v2.1.216, the message showed only the raw diff statistics.
@@ -1837,7 +1887,7 @@
**What to do:**
- * In a session started without those restrictions, run `/tui fullscreen`, or `/tui default` to switch back. Claude Code saves the [`tui` setting](</docs/en/settings#available-settings>) there
+ * In a session started without those restrictions, run `/tui fullscreen`, or `/tui default` to switch back. Claude Code saves the [`tui` setting](</docs/en/settings-reference#tui>) there
##
@@ -1951,7 +2001,7 @@
When Claude Code refuses the Write tool, the message ends `and cannot be written` instead. **What to do:**
- * If Claude should be able to change the file, remove or narrow the `Read` deny rule in `/permissions` or in [settings](</docs/en/settings#permission-settings>)
+ * If Claude should be able to change the file, remove or narrow the `Read` deny rule in `/permissions` or in [settings](</docs/en/settings-reference#permission-settings>)
* If the file must stay untouched, keep the rule and add an `Edit` deny rule for the same path to block the NotebookEdit tool too
###
@@ -2376,7 +2426,7 @@
Is not matched by file permission checks
-Claude Code found a `Write`, `NotebookEdit`, `MultiEdit`, or `Glob` [permission rule](</docs/en/permissions#read-and-edit>) with a path in one of your [settings files](</docs/en/settings#settings-files>), in [managed settings](</docs/en/permissions#managed-settings>), or in a `--allowedTools`, `--disallowedTools`, or `--settings` flag value. It checks file permissions against `Edit` and `Read` rules only, so it never consults a path rule that names one of the other file tools. It keeps the rule and changes nothing else; the warning names the rule, its source in parentheses, and the replacement to write:
+Claude Code found a `Write`, `NotebookEdit`, `MultiEdit`, or `Glob` [permission rule](</docs/en/permissions#read-and-edit>) with a path in one of your [settings files](</docs/en/settings#where-settings-live>), in [managed settings](</docs/en/managed-settings>), or in a `--allowedTools`, `--disallowedTools`, or `--settings` flag value. It checks file permissions against `Edit` and `Read` rules only, so it never consults a path rule that names one of the other file tools. It keeps the rule and changes nothing else; the warning names the rule, its source in parentheses, and the replacement to write:
Permission deny rule (.claude/settings.json): Write(docs/**) is not matched by file permission checks — only Edit(path) rules are. Use Edit(docs/**) instead (Edit rules cover all file-editing tools).
@@ -2407,7 +2457,7 @@
**What to do:**
- * Set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000`](</docs/en/env-vars>), or the [`autoCompactWindow`](</docs/en/settings#available-settings>) setting to `200000`, so auto-compaction compacts at the 200K boundary
+ * Set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000`](</docs/en/env-vars>), or the [`autoCompactWindow`](</docs/en/settings-reference#autocompactwindow>) setting to `200000`, so auto-compaction compacts at the 200K boundary
* If the message names a model ID this version doesn’t recognize, run `claude update`. A version that recognizes the ID as a 1M-context model enforces the limit without further configuration.
* If you want the session to use the model’s full window instead, unset `CLAUDE_CODE_DISABLE_1M_CONTEXT`; the warning reports only that the 200K limit isn’t enforced
@@ -2435,7 +2485,7 @@
Claude Code writes the line once per model string per process. It writes a separate line for each further unrecognized ID, such as one that a [subagent](</docs/en/sub-agents#choose-a-model>) or [background functionality](</docs/en/costs#background-token-usage>) uses. Claude Code doesn’t write the line for provider IDs it resolves to a model it recognizes, such as Amazon Bedrock `us.anthropic.claude-...` IDs, Google Cloud’s Agent Platform IDs with an `@` version suffix, and Microsoft Foundry deployment names that contain a Claude model ID. Claude Code checks the model behind an Amazon Bedrock [application inference profile ARN](</docs/en/amazon-bedrock#map-each-model-version-to-an-inference-profile>) rather than the ARN itself. It writes no line for an ARN it can’t resolve, such as a mistyped one. **What to do:**
- * If you set the ID on purpose, such as an [LLM gateway](</docs/en/llm-gateway>) alias, add a [`modelOverrides`](</docs/en/model-config#override-model-ids-per-version>) entry to your [settings file](</docs/en/settings#settings-files>) with the ID as its value. Use an Anthropic model ID as the key, not a family alias such as `opus`. For `my-proxy-model` from the example line, add this entry:
+ * If you set the ID on purpose, such as an [LLM gateway](</docs/en/llm-gateway>) alias, add a [`modelOverrides`](</docs/en/model-config#override-model-ids-per-version>) entry to your [settings file](</docs/en/settings#where-settings-live>) with the ID as its value. Use an Anthropic model ID as the key, not a family alias such as `opus`. For `my-proxy-model` from the example line, add this entry:
{
"modelOverrides": {
--- a/fast-mode.md
+++ b/fast-mode.md
@@ -137,7 +137,7 @@
Use fast mode behind proxies and LLM gateways
-Before offering fast mode, Claude Code checks your organization’s fast mode availability with a request directly to `api.anthropic.com`. The check doesn’t follow [`ANTHROPIC_BASE_URL`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>), so on a network that routes Claude traffic through an [LLM gateway](</docs/en/llm-gateway>) and blocks direct egress to `api.anthropic.com`, the check fails even though inference requests work. The check does use a configured [HTTP proxy](</docs/en/network-config#proxy-configuration>), so a network block fails the check only where `api.anthropic.com` is unreachable even through the proxy. When the check fails, `/fast` reports “Fast mode unavailable due to network connectivity issues”, and requests run at standard speed, even when your organization has fast mode enabled. A check that succeeded in the past keeps working from its cached result, so a blocked check mostly affects new installations. The same connectivity message appears on an open network when the check reaches `api.anthropic.com` but presents a credential Anthropic rejects. A session whose resolved key is a gateway-issued credential, held in [`ANTHROPIC_API_KEY`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>) or produced by an [`apiKeyHelper`](</docs/en/settings#available-settings>), sends the check with that key, and the rejected request is reported as a connectivity failure. To restore fast mode, allowlist direct egress to `api.anthropic.com` where a network block is the cause, or set whichever variable matches how the check fails:
+Before offering fast mode, Claude Code checks your organization’s fast mode availability with a request directly to `api.anthropic.com`. The check doesn’t follow [`ANTHROPIC_BASE_URL`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>), so on a network that routes Claude traffic through an [LLM gateway](</docs/en/llm-gateway>) and blocks direct egress to `api.anthropic.com`, the check fails even though inference requests work. The check does use a configured [HTTP proxy](</docs/en/network-config#proxy-configuration>), so a network block fails the check only where `api.anthropic.com` is unreachable even through the proxy. When the check fails, `/fast` reports “Fast mode unavailable due to network connectivity issues”, and requests run at standard speed, even when your organization has fast mode enabled. A check that succeeded in the past keeps working from its cached result, so a blocked check mostly affects new installations. The same connectivity message appears on an open network when the check reaches `api.anthropic.com` but presents a credential Anthropic rejects. A session whose resolved key is a gateway-issued credential, held in [`ANTHROPIC_API_KEY`](</docs/en/llm-gateway-connect#set-the-base-url-and-credential>) or produced by an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>), sends the check with that key, and the rejected request is reported as a connectivity failure. To restore fast mode, allowlist direct egress to `api.anthropic.com` where a network block is the cause, or set whichever variable matches how the check fails:
* `CLAUDE_CODE_SKIP_FAST_MODE_NETWORK_ERRORS=1` treats a failed check as available and still honors a “disabled by your organization” response. Use it when your network refuses the connection, or when Anthropic rejects a gateway credential; allowlisting doesn’t help the credential case, since nothing is blocked.
* `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK=1` skips the check entirely. Use it when your network intercepts the request rather than refusing it.
@@ -155,7 +155,7 @@
Require per-session opt-in
-By default, fast mode a user turns on in an interactive session persists across sessions. To change this, set `fastModePerSessionOptIn` to `true` in any [settings file](</docs/en/settings#settings-files>), which causes each session to start with fast mode off and requires users to explicitly enable it with `/fast`. Owners on [Team](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_teams#team-&-enterprise>) or [Enterprise](<https://anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_enterprise>) plans can deploy it organization-wide through [server-managed settings](</docs/en/server-managed-settings>).
+By default, fast mode a user turns on in an interactive session persists across sessions. To change this, set `fastModePerSessionOptIn` to `true` in any [settings file](</docs/en/settings#where-settings-live>), which causes each session to start with fast mode off and requires users to explicitly enable it with `/fast`. Owners on [Team](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_teams#team-&-enterprise>) or [Enterprise](<https://anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=fast_mode_enterprise>) plans can deploy it organization-wide through [server-managed settings](</docs/en/server-managed-settings>).
{
"fastModePerSessionOptIn": true
--- a/feature-availability.md
+++ b/feature-availability.md
@@ -28,7 +28,7 @@
* [Subagents](</docs/en/sub-agents>), [hooks](</docs/en/hooks-guide>), [commands](</docs/en/commands>), and [skills](</docs/en/skills>)
* [CLAUDE.md memory](</docs/en/memory>), [plugins](</docs/en/plugins>), and [MCP servers](</docs/en/mcp>)
* [Checkpoints](</docs/en/checkpointing>), [sandboxing](</docs/en/sandboxing>), and [Workflows](</docs/en/workflows>)
- * [OpenTelemetry metrics](</docs/en/monitoring-usage>) and the [managed settings file](</docs/en/settings#settings-files>)
+ * [OpenTelemetry metrics](</docs/en/monitoring-usage>) and the [managed settings file](</docs/en/managed-settings#delivery-mechanisms>)
Three of these have provider-specific differences:
@@ -69,7 +69,7 @@
[Fast mode](</docs/en/fast-mode>)| ✓ ([Owner-enabled](</docs/en/fast-mode#enable-fast-mode-for-your-organization>) on Team and Enterprise)| ✓ (provisioned organizations)| ✗| ✗| ✗| ✗
[Auto mode](</docs/en/auto-mode-config>)| ✓| ✓| See note 2| ✓| See note 2| See note 2
[Advisor](</docs/en/advisor>)| ✓| ✓| ✗| ✗| ✗| ✗
-[Cross-session messaging](</docs/en/cross-session-messaging>)| ✓ (macOS and Linux) 6| ✓ (macOS and Linux) 6| ✗| ✗| ✗| ✗
+[Cross-session messaging](</docs/en/cross-session-messaging>)| ✓ 6| ✓ 6| ✗| ✗| ✗| ✗
[Channels](</docs/en/channels>)| ✓| ✓| ✗| ✗| ✗| ✗
[`/loop` scheduled tasks](</docs/en/scheduled-tasks>)| ✓| ✓| See note 3| See note 3| See note 3| See note 3
[GitHub Actions](</docs/en/github-actions>)| ✓| ✓| ✓| ✗| ✓| ✓
@@ -91,7 +91,7 @@
3 Explicit intervals such as `/loop every 2 hours` work on every provider. On Amazon Bedrock, Claude Platform on AWS, Google Cloud’s Agent Platform, and Microsoft Foundry, `/loop` cannot pick its own interval or supply the default maintenance prompt, so a prompt with no interval runs every 10 minutes, and `/loop` with no arguments shows the usage message. See [Scheduled tasks](</docs/en/scheduled-tasks>).
4 Subject to your agreement with the cloud provider.
5 Dashboard and API only. [Contribution metrics](</docs/en/analytics#enable-contribution-metrics>) requires a claude.ai Team or Enterprise organization.
-6 Requires Claude Code v2.1.224 or later. WSL 2 counts as Linux; native Windows isn’t supported. With API key authentication, same-machine messaging only. Claude can find your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your sessions on other machines only from a session that is connected to [Remote Control](</docs/en/remote-control>). Connecting needs a claude.ai sign-in and the other [Remote Control requirements](</docs/en/remote-control#requirements>). See [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>).
+6 Requires Claude Code v2.1.224 or later on macOS and Linux, including Linux inside WSL 2. On native Windows, requires Claude Code v2.1.234 or later. With API key authentication, same-machine messaging only. Claude can find your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your sessions on other machines only from a session that is connected to [Remote Control](</docs/en/remote-control>). Connecting needs a claude.ai sign-in and the other [Remote Control requirements](</docs/en/remote-control#requirements>). See [Message sessions on other machines](</docs/en/cross-session-messaging#message-sessions-on-other-machines>).
If you authenticate through an [LLM gateway](</docs/en/llm-gateway>), feature availability matches the underlying provider the gateway forwards to. Some Anthropic-only features such as the [Advisor](</docs/en/advisor>) work only if the gateway forwards requests intact to the Anthropic API.
Show diff (114 lines)
--- a/features-overview.md
+++ b/features-overview.md
@@ -17,8 +17,9 @@
* **[Code intelligence](</docs/en/tools-reference#lsp-tool-behavior>)** connects Claude to a language server for symbol-level navigation and live type errors
* **[MCP](</docs/en/mcp>)** connects Claude to external services and tools
* **[Subagents](</docs/en/sub-agents>)** run their own loops in isolated context, returning summaries
- * **[Agent teams](</docs/en/agent-teams>)** coordinate multiple independent sessions with peer-to-peer messaging, plus a shared task list for [agents that have the Task tools](</docs/en/tools-reference#task-tool-availability>)
- * **[Hooks](</docs/en/hooks-guide>)** run your script, HTTP request, prompt, or subagent when Claude Code reaches a lifecycle event
+ * **[Dynamic workflows](</docs/en/workflows>)** run many subagents from a script Claude writes, returning one result
+ * **[Cross-session messaging](</docs/en/cross-session-messaging>)** lets Claude pass a message from one of your sessions to another
+ * **[Hooks](</docs/en/hooks-guide>)** run your script, HTTP request, MCP tool call, prompt, or subagent when Claude Code reaches a lifecycle event
* **[Plugins](</docs/en/plugins>)** and **[marketplaces](</docs/en/plugin-marketplaces>)** package and distribute these features
[Skills](</docs/en/skills>) are the most flexible extension. A skill is a markdown file containing knowledge, workflows, or instructions. You can invoke skills with a command like `/deploy`, or Claude can load them automatically when relevant. Skills can run in your current conversation or in an isolated context via subagents.
@@ -36,10 +37,11 @@
**CLAUDE.md**| Persistent context loaded every conversation| Project conventions, “always do X” rules| ”Use pnpm, not npm. Run tests before committing.”
**Skill**| Instructions, knowledge, and workflows Claude can use| Reusable content, reference docs, repeatable tasks| `/deploy` runs your deployment checklist; API docs skill with endpoint patterns
**Subagent**| Isolated execution context that returns summarized results| Context isolation, parallel tasks, specialized workers| Research task that reads many files but returns only key findings
-**[Agent teams](</docs/en/agent-teams>)**| Coordinate multiple independent Claude Code sessions| Parallel research, new feature development, debugging with competing hypotheses| Spawn reviewers to check security, performance, and tests simultaneously
+**[Dynamic workflow](</docs/en/workflows>)**| Script Claude writes that runs many subagents in the background| Work that outgrows a handful of subagents, or findings you want cross-checked| Audit a whole codebase, with a second set of agents verifying each finding
+**[Cross-session messaging](</docs/en/cross-session-messaging>)**| Claude delivers a message from one of your sessions to another| Sessions you run yourself that need each other’s findings mid-task| One session warns another that a change it made breaks what the other is building on
**[Code intelligence](</docs/en/tools-reference#lsp-tool-behavior>)**| Language-server navigation and diagnostics| Typed languages, large codebases where grep is slow or imprecise| Jump to a symbol’s definition instead of reading the whole file
**MCP**| Connect to external services| External data or actions| Query your database, post to Slack, control a browser
-**Hook**| Script, HTTP request, prompt, or subagent triggered by events| Automation that must run on every matching event| Run ESLint after every file edit
+**Hook**| Script, HTTP request, MCP tool call, prompt, or subagent triggered by events| Automation that must run on every matching event| Run ESLint after every file edit
**[Artifact](</docs/en/artifacts>)**| Publish session output as a private, interactive web page| Output you want to see or share visually rather than as terminal text| An incident timeline that updates as Claude investigates
**[Plugins](</docs/en/plugins>)** are the packaging layer. A plugin bundles skills, hooks, subagents, and MCP servers into a single installable unit. Plugin skills are namespaced (like `/my-plugin:review`) so multiple plugins can coexist. Use plugins when you want to reuse the same setup across multiple repositories or distribute to others via a **[marketplace](</docs/en/plugin-marketplaces>)**.
@@ -79,7 +81,7 @@
* CLAUDE.md vs Rules vs Skills
- * Subagent vs Agent team
+ * Subagent vs Dynamic workflow
* MCP vs Skill
@@ -120,22 +122,12 @@
**Use CLAUDE.md** for instructions every session needs: build commands, test conventions, project architecture.**Use rules** to keep CLAUDE.md focused. Rules with [`paths` frontmatter](</docs/en/memory#path-specific-rules>) only load when Claude works with matching files, saving context.**Use skills** for content Claude only needs sometimes, like API documentation or a deployment checklist you trigger with `/<name>`.
-Both parallelize work, but they’re architecturally different:
-
- * **Subagents** run inside your session and report results back to your main context
- * **Agent teams** are independent Claude Code sessions that communicate with each other
-
-Aspect| Subagent| Agent team
----|---|---
-**Context**| Own context window; results return to the caller| Own context window; fully independent
-**Communication**| Reports results back to the main agent only| Teammates message each other directly
-**Coordination**| Main agent manages all work| Self-coordination through messages, plus a shared task list for [agents that have the Task tools](</docs/en/tools-reference#task-tool-availability>)
-**Best for**| Focused tasks where only the result matters| Complex work requiring discussion and collaboration
-**Token cost**| Lower: results summarized back to main context| Higher: each teammate is a separate Claude instance
-
-**Use a subagent** when you need a quick, focused worker: research a question, verify a claim, review a file. The subagent does the work and returns a summary. Your main conversation stays clean.**Use an agent team** when teammates need to share findings, challenge each other, and coordinate independently. Agent teams are best for research with competing hypotheses, parallel code review, and new feature development where each teammate owns a separate piece.**Transition point:** If you’re running parallel subagents but hitting context limits, or if your subagents need to communicate with each other, agent teams are the natural next step. For separate sessions that pass messages to each other without a team, see [cross-session messaging](</docs/en/cross-session-messaging>).
-
-Agent teams are experimental and disabled by default. See [agent teams](</docs/en/agent-teams>) for setup and current limitations.
+Both do work outside your main conversation. With subagents, Claude decides turn by turn what runs next. In a workflow, the script decides:
+
+ * **Subagents** are workers Claude spawns, each returning a summary to the conversation that spawned it
+ * **[Dynamic workflows](</docs/en/workflows>)** are scripts Claude writes that run many subagents in the background and return one result
+
+**Use a subagent** when you need a quick, focused worker: research a question, verify a claim, review a file. The subagent does the work and returns a summary, so your main conversation stays clean. Subagents that Claude named when it spawned them can also [message each other](</docs/en/sub-agents#what-loads-at-startup>).**Use a dynamic workflow** when a job [outgrows a handful of subagents](</docs/en/workflows#when-to-use-a-workflow>), or when you want the findings cross-checked before you see them, such as a codebase-wide audit, a large migration, or a plan drafted from several angles. To start one, [ask for a workflow in your prompt](</docs/en/workflows#ask-for-a-workflow-in-your-prompt>).**To pass a finding from one of your sessions to another** , ask the first session’s Claude to send it. Claude delivers it with [cross-session messaging](</docs/en/cross-session-messaging>). [Run agents in parallel](</docs/en/agents>) compares the other ways to run more than one Claude at once, including sessions you hand off and check back on later.
MCP connects Claude to external services. Skills extend what Claude knows, including how to use those services effectively.
@@ -151,7 +143,7 @@
Aspect| Hook| Skill
---|---|---
-**Runs**| A shell command, HTTP request, LLM prompt, or subagent| Instructions Claude reads and follows
+**Runs**| A shell command, HTTP request, MCP tool call, LLM prompt, or subagent| Instructions Claude reads and follows
**Triggered by**| [Lifecycle events](</docs/en/hooks#hook-events>) such as `PostToolUse` or `SessionStart`| You typing `/<name>`, or Claude matching the description to your task
**Determinism**| Always fires on its event; the trigger is guaranteed| Claude interprets the instructions; outcome can vary
**Context cost**| Zero unless the hook returns output| Description loads each session; full content loads when used
@@ -236,15 +228,15 @@
**When:** Session start**What loads:** Full content of all CLAUDE.md files (managed, user, and project levels).**Inheritance:** Claude reads CLAUDE.md files from your working directory up to the root, and discovers nested ones in subdirectories as it accesses those files. See [How CLAUDE.md files load](</docs/en/memory#how-claude-md-files-load>) for details.
-Keep CLAUDE.md under 200 lines. Move reference material to skills, which load on-demand.
-
-Skills are extra capabilities in Claude’s toolkit. They can be reference material (like an API style guide) or invocable workflows you trigger with `/<name>` (like `/deploy`). Claude Code includes [bundled skills](</docs/en/commands>) like `/code-review`, `/batch`, and `/debug` that work out of the box. You can also create your own. Claude uses skills when appropriate, or you can invoke one directly.**When:** Depends on the skill’s configuration. By default, descriptions load at session start and full content loads when used. For user-only skills (`disable-model-invocation: true`), nothing loads until you invoke them.**What loads:** For model-invocable skills, Claude sees names and descriptions in every request. When you invoke a skill with `/<name>` or Claude loads it automatically, the full content loads into your conversation.**How Claude chooses skills:** Claude matches your task against skill descriptions to decide which are relevant. If descriptions are vague or overlap, Claude may load the wrong skill or miss one that would help. To tell Claude to use a specific skill, invoke it with `/<name>`. Skills with `disable-model-invocation: true` are invisible to Claude until you invoke them.**Context cost:** Low until used. User-only skills have zero cost until invoked.**In subagents:** Skills work differently in subagents. Instead of on-demand loading, skills listed in the subagent’s `skills` field are fully preloaded into its context at launch. Subagents can still discover and invoke unlisted project, user, and plugin skills through the Skill tool.
+Keep CLAUDE.md under 200 lines. Move reference material to skills, which load on demand. To get [trim proposals for a checked-in CLAUDE.md](</docs/en/memory#my-claude-md-is-too-large>), run `/doctor`.
+
+Skills are extra capabilities in Claude’s toolkit. They can be reference material (like an API style guide) or invocable workflows you trigger with `/<name>` (like `/deploy`). Claude Code includes [bundled skills](</docs/en/commands>) like `/code-review`, `/batch`, and `/debug` that work out of the box. You can also create your own.**When:** Depends on the skill’s configuration. By default, descriptions load at session start and full content loads when used. For user-only skills (`disable-model-invocation: true`), nothing loads until you invoke them.**What loads:** For model-invocable skills, Claude sees names and descriptions in every request. When you invoke a skill with `/<name>` or Claude loads it automatically, the full content loads into your conversation.**How Claude chooses skills:** Claude matches your task against skill descriptions to decide which are relevant. If descriptions are vague or overlap, Claude may load the wrong skill or miss one that would help. To tell Claude to use a specific skill, invoke it with `/<name>`. Skills with `disable-model-invocation: true` are invisible to Claude until you invoke them.**Context cost:** Low until used. User-only skills have zero cost until invoked.**In subagents:** Skills work differently in subagents. Instead of on-demand loading, skills listed in the subagent’s `skills` field are fully preloaded into its context at launch. Subagents can still discover and invoke unlisted project, user, and plugin skills through the Skill tool.
Use `disable-model-invocation: true` for skills with side effects. This saves context and ensures only you trigger them.
-**When:** Session start.**What loads:** Tool names from connected servers. Full JSON schemas stay deferred until Claude needs a specific tool.**Context cost:** [Tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is on by default, so idle MCP tools consume minimal context.
-
-Run `/mcp` to see connection status and token costs per server. Claude Code [reconnects to remote servers automatically](</docs/en/mcp#automatic-reconnection>) if they drop, and you can disconnect servers you’re not actively using.
+**When:** Session start.**What loads:** Tool names and server instructions from connected servers. Full JSON schemas stay deferred until Claude needs a specific tool.**Context cost:** [Tool search](</docs/en/mcp#scale-with-mcp-tool-search>) is on by default, so idle MCP tools consume minimal context.
+
+Run `/mcp` to see each server’s connection status. Run `/context all` to see how many tokens each loaded MCP tool uses. Claude Code [reconnects to remote servers automatically](</docs/en/mcp#automatic-reconnection>) if they drop, and you can disconnect servers you’re not actively using.
**When:** After file edits, and on demand when Claude navigates code.**What loads:** Type errors and warnings after each file edit. Definition, reference, and type information when Claude looks up a symbol.**Context cost:** Low. Symbol lookups often replace broad file reads, so net context use can go down.
@@ -285,9 +277,13 @@
Offload work to isolated context
-## Agent teams
-
-Coordinate multiple sessions working in parallel
+## Dynamic workflows
+
+Run many subagents from one script
+
+## Cross-session messaging
+
+Let Claude message your other sessions
## MCP
--- a/fullscreen.md
+++ b/fullscreen.md
@@ -1,4 +1,4 @@
-Fullscreen rendering is a research preview. If you first used Claude Code on or after May 6, 2026, Claude Code renders fullscreen by default; run `/tui default` to switch back. If you started earlier, you keep the classic renderer; run `/tui fullscreen` to switch in your current conversation. Behavior may change based on feedback.
+Fullscreen rendering is a research preview. Whether you start in fullscreen or in the classic renderer depends on your setup. Run `/tui fullscreen` or `/tui default` to switch in your current conversation. Behavior may change based on feedback.
Fullscreen rendering is an alternative rendering path for the Claude Code CLI that eliminates flicker, keeps memory usage flat in long conversations, and adds mouse support. It draws the interface on the terminal’s alternate screen buffer, like `vim` or `htop`, and only renders messages that are currently visible. This reduces the amount of data sent to your terminal on each update. The difference is most noticeable in terminal emulators where rendering throughput is the bottleneck, such as the VS Code integrated terminal, tmux, and iTerm2. If your terminal scroll position jumps to the top while Claude is working, or the screen flashes as tool output streams in, this mode addresses those.
@@ -10,7 +10,7 @@
Enable fullscreen rendering
-Run `/tui fullscreen` inside any Claude Code conversation. The CLI saves the [`tui` setting](</docs/en/settings#available-settings>) 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 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:
* 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
@@ -24,15 +24,37 @@
* Launch flags such as a [`--system-prompt`](</docs/en/cli-reference#cli-flags>) replacement, a [`--tools`](</docs/en/cli-reference#cli-flags>) allowlist, or [`--setting-sources`](</docs/en/cli-reference#cli-flags>)
* Deny or ask rules that a [hook or SDK permission update](</docs/en/hooks#permission-update-entries>) added for this session only
-In that case Claude Code prints [`Cannot switch renderers in this session`](</docs/en/errors#cannot-switch-renderers-in-this-session>) with the reasons. It doesn’t switch or save anything.
-
-If you first used Claude Code before May 6, 2026 and haven’t saved a `tui` setting, Claude Code may open a dialog at startup offering the switch. If you accept, Claude Code relaunches the same way `/tui fullscreen` does, carrying the same session state, and saves the setting once the relaunched session has started successfully.
-
-You can also set the `CLAUDE_CODE_NO_FLICKER` environment variable before starting Claude Code:
+In that case Claude Code prints [`Cannot switch renderers in this session`](</docs/en/errors#cannot-switch-renderers-in-this-session>) with the reasons. It doesn’t switch or save anything. You can also set the `CLAUDE_CODE_NO_FLICKER` environment variable before starting Claude Code:
CLAUDE_CODE_NO_FLICKER=1 claude
-Either one turns fullscreen rendering on. After a failed fullscreen start, Claude Code still honors the variable but not the setting. The `/tui` command clears `CLAUDE_CODE_NO_FLICKER` from the relaunched process so the setting it writes takes effect.
+For how the [`tui`](</docs/en/settings-reference#tui>) setting and the variable combine when both are set, see the setting’s entry. After a failed fullscreen start, Claude Code still honors the variable but not the setting. The `/tui` command clears `CLAUDE_CODE_NO_FLICKER` from the relaunched process so the setting it writes takes effect.
+
+###
+
+
+
+Fullscreen by default
+
+Attached [background sessions](</docs/en/agent-view>) render fullscreen, and other sessions in [screen reader mode](</docs/en/accessibility>) use the classic renderer. Otherwise, Claude Code starts you in the renderer from the first row of this table that matches your setup:
+
+Your situation| Renderer you start in
+---|---
+You set [`CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1`](</docs/en/env-vars>) or `CLAUDE_CODE_NO_FLICKER=0`| Classic
+You set `CLAUDE_CODE_NO_FLICKER=1`| Fullscreen
+Claude Code turned fullscreen off after a failed fullscreen start on this machine| Classic
+You’re in iTerm2’s `tmux -CC` integration mode, or you’re connected over SSH to Claude Code running on Windows| Classic
+You saved a [`tui` setting](</docs/en/settings-reference#tui>)| The renderer the setting names
+Your session doesn’t [fetch feature flags from Anthropic](</docs/en/env-vars#features-that-need-feature-flag-fetching>), and Claude Code has stopped offering the startup dialog on this machine| Classic
+Your session doesn’t fetch feature flags from Anthropic, and this machine’s first Claude Code launch ran v2.1.239 or later| Fullscreen
+Your session fetches feature flags from Anthropic, and you first used Claude Code on or after May 6, 2026| Fullscreen
+Anything else| Classic
+
+Sessions that don’t fetch feature flags include those through [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), or [Microsoft Foundry](</docs/en/microsoft-foundry>), and those with telemetry turned off. If you start in the classic renderer and haven’t saved a `tui` setting, Claude Code may open a dialog at startup offering the switch:
+
+ * If you accept, Claude Code relaunches the same way `/tui fullscreen` does, carrying the same session state, and saves the setting once the relaunched session has started successfully.
+ * If you choose **Not now** , Claude Code doesn’t offer again on this machine.
+ * Claude Code stops offering after it has shown the dialog on three launches, answered or not.
##
@@ -120,7 +142,7 @@
export CLAUDE_CODE_SCROLL_SPEED=3
-A value of `3` matches the default in `vim` and similar applications. The setting accepts any positive value up to 20, including fractional values below 1 such as `0.25` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. To adjust scroll speed interactively, run `/scroll-speed`. The dialog shows a ruler you can scroll while it is open so you can feel the change immediately. Press `←` and `→` to adjust the speed, `r` to reset to the auto-detected default, and `Enter` to save. The dialog steps in whole numbers up to 10, and on terminals that support finer control it also offers quarter steps down to 0.25. Quarter steps require Claude Code v2.1.172 or later. The command writes the same value the `CLAUDE_CODE_SCROLL_SPEED` environment variable sets, persisted to `~/.claude/settings.json`. The dialog’s maximum is 10: if you set a higher value through the environment variable, the dialog shows 10, and saving from the dialog persists 10. The command isn’t available in the JetBrains IDE terminal. Separately from the base speed, Claude Code accelerates the scroll rate when you spin the wheel quickly, so a fast spin covers more distance than the same number of slow notches. To turn acceleration off and keep a constant rate per notch, set `wheelScrollAccelerationEnabled` to `false` in [`settings.json`](</docs/en/settings#available-settings>). This setting requires Claude Code v2.1.174 or later.
+A value of `3` matches the default in `vim` and similar applications. The setting accepts any positive value up to 20, including fractional values below 1 such as `0.25` to slow accelerated trackpad and wheel scrolling in terminals that already amplify wheel events. To adjust scroll speed interactively, run `/scroll-speed`. The dialog shows a ruler you can scroll while it is open so you can feel the change immediately. Press `←` and `→` to adjust the speed, `r` to reset to the auto-detected default, and `Enter` to save. The dialog steps in whole numbers up to 10, and on terminals that support finer control it also offers quarter steps down to 0.25. Quarter steps require Claude Code v2.1.172 or later. The command writes the same value the `CLAUDE_CODE_SCROLL_SPEED` environment variable sets, persisted to `~/.claude/settings.json`. The dialog’s maximum is 10: if you set a higher value through the environment variable, the dialog shows 10, and saving from the dialog persists 10. The command isn’t available in the JetBrains IDE terminal. Separately from the base speed, Claude Code accelerates the scroll rate when you spin the wheel quickly, so a fast spin covers more distance than the same number of slow notches. To turn acceleration off and keep a constant rate per notch, set `wheelScrollAccelerationEnabled` to `false` in [`settings.json`](</docs/en/settings-reference#all-settings>). This setting requires Claude Code v2.1.174 or later.
###
@@ -241,7 +263,7 @@
How Claude Code counts failed starts
- * Sessions that count: only sessions that started in fullscreen rendering because your `tui` setting says so, because you accepted the startup dialog, or because your account renders fullscreen by default
+ * Sessions that count: only sessions that started in fullscreen rendering because your `tui` setting says so, because you accepted the startup dialog, or because Claude Code starts you in fullscreen by default
* `CLAUDE_CODE_NO_FLICKER=1`: if you set it, Claude Code renders that session fullscreen even after a failed start, and doesn’t count it
* Count reset: Claude Code counts failed starts per Claude Code version, and a successful fullscreen start resets the count
* Startup dialog: if you accepted the dialog and the relaunched session crashed, Claude Code prints neither line and doesn’t show the dialog again on this Claude Code version
--- a/gateways.md
+++ b/gateways.md
@@ -32,7 +32,7 @@
Claude apps gateway
-Claude apps gateway is Anthropic’s self-hosted gateway, included in the `claude` binary. It routes to Amazon Bedrock, Claude Platform on AWS, Google Cloud, Microsoft Foundry, or the Anthropic API as the upstream. Developers sign in with your corporate identity provider through `/login`, the gateway enforces model access and [managed settings](</docs/en/permissions#managed-settings>) by IdP group, and it emits [OpenTelemetry Protocol (OTLP)](</docs/en/monitoring-usage>) usage metrics to your own observability stack. Because it is built and tested alongside each Claude Code release, it forwards the headers and request fields Claude Code sends. A gateway maintained separately needs its [forwarding rules updated](</docs/en/llm-gateway-protocol#forward-as-open-lists>) as those headers and fields change with each release; Claude apps gateway releases with the CLI, so there is no list to keep current. See [Availability and limitations](</docs/en/claude-apps-gateway#availability-and-limitations>) for the small set of features that behave differently on a gateway session. The gateway sign-in is a browser SSO step, and there is no service-token flow, so a CI pipeline with no developer to approve the sign-in can’t authenticate through it; configure those against your provider directly. Agent SDK sessions and `claude -p` runs on a machine where a developer has signed in use that machine’s gateway session and are governed by its policies. See [CI pipelines and remote machines](</docs/en/claude-apps-gateway#ci-pipelines-and-remote-machines>). See [Claude apps gateway](</docs/en/claude-apps-gateway>) to deploy it.
+Claude apps gateway is Anthropic’s self-hosted gateway, included in the `claude` binary. It routes to Amazon Bedrock, Claude Platform on AWS, Google Cloud, Microsoft Foundry, or the Anthropic API as the upstream. Developers sign in with your corporate identity provider through `/login`, the gateway enforces model access and [managed settings](</docs/en/managed-settings>) by IdP group, and it emits [OpenTelemetry Protocol (OTLP)](</docs/en/monitoring-usage>) usage metrics to your own observability stack. Because it is built and tested alongside each Claude Code release, it forwards the headers and request fields Claude Code sends. A gateway maintained separately needs its [forwarding rules updated](</docs/en/llm-gateway-protocol#forward-as-open-lists>) as those headers and fields change with each release; Claude apps gateway releases with the CLI, so there is no list to keep current. See [Availability and limitations](</docs/en/claude-apps-gateway#availability-and-limitations>) for the small set of features that behave differently on a gateway session. The gateway sign-in is a browser SSO step, and there is no service-token flow, so a CI pipeline with no developer to approve the sign-in can’t authenticate through it; configure those against your provider directly. Agent SDK sessions and `claude -p` runs on a machine where a developer has signed in use that machine’s gateway session and are governed by its policies. See [CI pipelines and remote machines](</docs/en/claude-apps-gateway#ci-pipelines-and-remote-machines>). See [Claude apps gateway](</docs/en/claude-apps-gateway>) to deploy it.
###
--- a/github-actions.md
+++ b/github-actions.md
@@ -65,7 +65,7 @@
Add one of the following secrets to your repository, depending on how you authenticate. See GitHub’s guide to [using secrets in GitHub Actions](<https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions>).
- * `ANTHROPIC_API_KEY`: a Claude API key from the [Claude Console](<https://console.anthropic.com>)
+ * `ANTHROPIC_API_KEY`: a Claude API key from the [Claude Console](<https://platform.claude.com>)
* `CLAUDE_CODE_OAUTH_TOKEN`: an OAuth token that authenticates with your Claude subscription, available on Pro, Max, Team, and Enterprise plans. Generate one by running `claude setup-token` locally. See [Generate a long-lived token](</docs/en/authentication#generate-a-long-lived-token>)
In workflow files, pass the secret to the matching input: `anthropic_api_key` for an API key, or `claude_code_oauth_token` for an OAuth token.
@@ -90,7 +90,7 @@
* Store the authentication secret as an organization-level Actions secret so each repository doesn’t need its own copy
* Add the workflow file to each repository that should run the Claude Code GitHub Action, or define the job once as a [reusable workflow](<https://docs.github.com/en/actions/using-workflows/reusing-workflows>) that each repository calls
-For a secret shared across repositories, authenticate with an API key from the [Claude Console](<https://console.anthropic.com>) rather than an OAuth token, since an OAuth token is tied to the subscription of the person who ran `claude setup-token`. To avoid storing a long-lived secret entirely, authenticate through workload identity federation, where the Claude Code GitHub Action exchanges the workflow’s GitHub OpenID Connect (OIDC) token for Claude API access through a Claude Console service account. Set these inputs:
+For a secret shared across repositories, authenticate with an API key from the [Claude Console](<https://platform.claude.com>) rather than an OAuth token, since an OAuth token is tied to the subscription of the person who ran `claude setup-token`. To avoid storing a long-lived secret entirely, authenticate through workload identity federation, where the Claude Code GitHub Action exchanges the workflow’s GitHub OpenID Connect (OIDC) token for Claude API access through a Claude Console service account. Set these inputs:
* `anthropic_federation_rule_id`: the federation rule ID, `fdrl_...`
* `anthropic_organization_id`: your Anthropic organization ID
@@ -108,7 +108,7 @@
To remove the Claude Code GitHub Action, undo each piece of the setup that applies to your installation:
* **Workflow files** : delete the workflows that use `anthropics/claude-code-action` from `.github/workflows/`. If you used quick setup, look for `claude.yml` and, if you selected the review workflow, `claude-code-review.yml`. With the workflows deleted, the Claude Code GitHub Action no longer runs
- * **Secrets** : delete the `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` secret from the repository, and from organization-level Actions secrets if you shared it across repositories. If you delete a secret, the credential it held stays valid. To retire an API key entirely, also delete the key in the [Claude Console](<https://console.anthropic.com>)
+ * **Secrets** : delete the `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` secret from the repository, and from organization-level Actions secrets if you shared it across repositories. If you delete a secret, the credential it held stays valid. To retire an API key entirely, also delete the key in the [Claude Console](<https://platform.claude.com>)
* **GitHub App** : uninstall the Claude GitHub App in your repository or organization settings under GitHub Apps, but only if you don’t use it for another Claude feature, such as Code Review or web auto-fix
If you configured a [cloud provider](</docs/en/github-actions-cloud-providers>), also delete the provider secrets, such as `AWS_ROLE_TO_ASSUME`, the `GCP_*` secrets, or the `AZURE_*` secrets, and uninstall the custom GitHub App along with its `APP_ID` and `APP_PRIVATE_KEY` secrets.
--- a/github-enterprise-server.md
+++ b/github-enterprise-server.md
@@ -162,7 +162,7 @@
Pre-register GHES marketplaces with managed settings
-The `extraKnownMarketplaces` setting pre-registers a marketplace so developers get it without manual setup. It works from [any settings file](</docs/en/settings#extraknownmarketplaces>), including a repository’s `.claude/settings.json`; managed settings deliver it organization-wide:
+The `extraKnownMarketplaces` setting pre-registers a marketplace so developers get it without manual setup. It works from [any settings file](</docs/en/settings-reference#extraknownmarketplaces>), including a repository’s `.claude/settings.json`; managed settings deliver it organization-wide:
{
"extraKnownMarketplaces": {
@@ -180,7 +180,7 @@
* **Use a full git URL.** The `owner/repo` shorthand always resolves to github.com and cannot reference a GHES host.
* **Prefer HTTPS URLs.** SSH clones fail on machines that do not already trust your GHES host key. An HTTPS URL with your organization’s standard git credential helper works on any machine with credentials configured.
* **Confirm each machine can clone from your GHES host.** If a machine lacks credentials, the marketplace is registered but never installed, and its plugins report as not found instead of prompting for credentials.
- * **Confirm the setting reaches each machine.** A managed settings file only takes effect on machines it’s deployed to, for example through your device management system. See [managed settings](</docs/en/settings#settings-files>) for file locations.
+ * **Confirm the setting reaches each machine.** A managed settings file only takes effect on machines it’s deployed to, for example through your device management system. See [Deploy managed settings](</docs/en/managed-settings#delivery-mechanisms>) for file locations.
###
@@ -188,7 +188,7 @@
Allowlist GHES marketplaces in managed settings
-If your organization uses [managed settings](</docs/en/settings>) to restrict which marketplaces developers can add, use the `hostPattern` source type to allow all marketplaces from your GHES instance without enumerating each repository. See [settings files](</docs/en/settings#settings-files>) for file locations on each platform. Add the JSON to your `managed-settings.json` file or equivalent MDM policy:
+If your organization uses [managed settings](</docs/en/settings>) to restrict which marketplaces developers can add, use the `hostPattern` source type to allow all marketplaces from your GHES instance without enumerating each repository. See [Delivery mechanisms](</docs/en/managed-settings#delivery-mechanisms>) for file locations on each platform. Add the JSON to your `managed-settings.json` file or equivalent MDM policy:
{
"strictKnownMarketplaces": [
@@ -199,7 +199,7 @@
]
}
-See the [strictKnownMarketplaces](</docs/en/settings#strictknownmarketplaces>) and [extraKnownMarketplaces](</docs/en/settings#extraknownmarketplaces>) settings reference for the complete schema.
+See the [strictKnownMarketplaces](</docs/en/settings-reference#strictknownmarketplaces>) and [extraKnownMarketplaces](</docs/en/settings-reference#extraknownmarketplaces>) settings reference for the complete schema.
##
--- a/glossary.md
+++ b/glossary.md
@@ -222,7 +222,7 @@
Managed settings
-Settings enforced org-wide by IT or DevOps, delivered from Anthropic’s servers through the admin console or deployed to devices at an OS-level path outside `~/.claude`. User and project settings cannot override managed settings. Server-managed delivery applies on [eligible configurations](</docs/en/server-managed-settings#platform-availability>); see [Security considerations](</docs/en/server-managed-settings#security-considerations>). Use this for security policies, compliance requirements, or standardized tooling across a fleet. Learn more: [Server-managed settings](</docs/en/server-managed-settings>) · [Settings files](</docs/en/settings#settings-files>)
+Settings enforced org-wide by IT or DevOps, delivered from Anthropic’s servers through the admin console or deployed to devices at an OS-level path outside `~/.claude`. User and project settings cannot override managed settings. Server-managed delivery applies on [eligible configurations](</docs/en/server-managed-settings#platform-availability>); see [Security considerations](</docs/en/server-managed-settings#security-considerations>). Use this for security policies, compliance requirements, or standardized tooling across a fleet. Learn more: [Server-managed settings](</docs/en/server-managed-settings>) · [Settings files](</docs/en/settings#where-settings-live>)
###
@@ -246,7 +246,7 @@
MCP Tool Search
-A context-saving mechanism that defers MCP tool schemas until needed. Only tool names load at startup; Claude fetches the full schema on demand when it decides to use a specific tool. This keeps idle MCP servers from consuming much context. Learn more: [Scale with MCP Tool Search](</docs/en/mcp#scale-with-mcp-tool-search>)
+A context-saving mechanism that defers MCP tool schemas until needed. Only tool names and server instructions load at startup; Claude fetches the full schema on demand when it decides to use a specific tool. This keeps idle MCP servers from consuming much context. Learn more: [Scale with MCP Tool Search](</docs/en/mcp#scale-with-mcp-tool-search>)
##
@@ -380,7 +380,7 @@
Settings layers
-The hierarchy Claude Code reads configuration from, in precedence order from highest to lowest: managed policy, command-line arguments, local settings at `.claude/settings.local.json`, project settings at `.claude/settings.json`, then user settings at `~/.claude/settings.json`. Arrays merge across layers; scalars at a higher layer override lower ones. See [Settings precedence](</docs/en/settings#settings-precedence>). Learn more: [Settings files](</docs/en/settings#settings-files>)
+The hierarchy Claude Code reads configuration from, in precedence order from highest to lowest: managed policy, command-line arguments, local settings at `.claude/settings.local.json`, project settings at `.claude/settings.json`, then user settings at `~/.claude/settings.json`. Arrays merge across layers; scalars at a higher layer override lower ones. See [Settings precedence](</docs/en/settings#settings-precedence>). Learn more: [Settings files](</docs/en/settings#where-settings-live>)
###
--- a/goal.md
+++ b/goal.md
@@ -95,7 +95,7 @@
Resume with an active goal
-A goal that was still active when a session ended is restored when you resume that session with `--resume` or `--continue`. The condition carries over, but the turn count, timer, and token-spend baseline all reset on resume. A goal that was already achieved or cleared is not restored.
+When you resume a session, Claude Code restores a goal that was still active when the session ended. Claude Code restores it on every resume route: `--continue`, `--resume` with a session ID or name, and the [session picker](</docs/en/sessions#use-the-session-picker>). Before v2.1.239, Claude Code restored the goal on every route except the `claude --resume` picker. Claude Code carries the condition over but resets the turn count, timer, and token-spend baseline. It doesn’t restore a goal that was already achieved or cleared.
###
@@ -144,12 +144,12 @@
Background work defers evaluation
-If a subagent or a background shell command is still running when a turn ends, Claude Code skips the evaluation for that turn. It evaluates at the end of the next turn that finishes with no background work running. When the background work finishes, Claude Code delivers the result to Claude as a new turn, so you don’t have to prompt. Once background work has kept the goal waiting for 30 minutes, a check-in is due. In the check-in, Claude Code lists the running tasks and asks Claude to read their output, keep waiting if they’re progressing, and fix or stop any that are stuck. After each check-in, the 30 minutes start again. Claude Code delivers a due check-in, the first one included, in one of two ways:
+If a subagent or a background shell command is still running when a turn ends, Claude Code skips the evaluation for that turn. It evaluates at the end of the next turn that finishes with no background work running. When the background work finishes, Claude Code delivers the result to Claude as a new turn, so you don’t have to prompt. Once background work has kept the goal waiting for 30 minutes, a check-in is due. In the check-in, Claude Code lists the running tasks and asks Claude to read their output, keep waiting if they’re progressing, and fix or stop any that are stuck. After the first check-in, Claude Code waits twice as long before each later check-in, up to four times the first interval: with the default, 1 hour after the first check-in, then every 2 hours. Claude Code delivers a due check-in, the first one included, in one of two ways:
* **When a turn ends** : Claude Code delivers the check-in at the end of the next turn that finishes with the work still running. In a non-interactive session, such as one started with `-p`, this is the only way Claude Code delivers check-ins.
- * **While the session is idle** : in an interactive session, Claude Code also starts a turn on its own to deliver the check-in instead of waiting for your next prompt. After the first check-in, Claude Code waits twice as long before each later idle check-in, up to four times the interval: with the default, 1 hour after the first check-in, then every 2 hours. If the background work has stopped without reporting a result, Claude Code asks Claude to continue toward the goal. Idle check-ins require Claude Code v2.1.236 or later.
+ * **While the session is idle** : in an interactive session, Claude Code also starts a turn on its own to deliver the check-in instead of waiting for your next prompt. If the background work has stopped without reporting a result, Claude Code asks Claude to continue toward the goal. Idle check-ins require Claude Code v2.1.236 or later.
-To change the intervals, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](</docs/en/env-vars>). Claude Code uses your value in place of the 30-minute interval and scales the idle intervals with it. Set it to `0` to turn check-ins off. Check-ins require Claude Code v2.1.234 or later.
+Before v2.1.239, only idle check-ins backed off this way; a check-in delivered at a turn end recurred at the first interval. To change the first interval, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](</docs/en/env-vars>). Claude Code uses your value in place of the 30-minute interval and scales the later intervals with it. Set it to `0` to turn check-ins off. Check-ins require Claude Code v2.1.234 or later.
###
@@ -171,7 +171,7 @@
Requirements
-Claude Code makes `/goal` available under the same [workspace trust rule as hooks in settings files](</docs/en/permissions#what-runs-before-you-trust-a-folder>), because the evaluator is part of the hooks system. `/goal` is also unavailable when [`disableAllHooks`](</docs/en/hooks#disable-or-remove-hooks>) is `true` after settings precedence applies, or when [`allowManagedHooksOnly`](</docs/en/settings#hook-configuration>) is set in managed settings. In each case, the command tells you why instead of silently doing nothing.
+Claude Code makes `/goal` available under the same [workspace trust rule as hooks in settings files](</docs/en/permissions#what-runs-before-you-trust-a-folder>), because the evaluator is part of the hooks system. `/goal` is also unavailable when [`disableAllHooks`](</docs/en/hooks#disable-or-remove-hooks>) is `true` after settings precedence applies, or when [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>) is set in managed settings. In each case, the command tells you why instead of silently doing nothing.
##
--- a/google-vertex-ai.md
+++ b/google-vertex-ai.md
@@ -193,7 +193,7 @@
Startup model checks
-When Claude Code starts with Google Cloud’s Agent Platform configured, it verifies that the models it intends to use are accessible in your project. If you have pinned a model version that is older than the current Claude Code default, and your project can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. If you have not pinned a model and the current default is unavailable in your project, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in [Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize.
+When Claude Code starts with Google Cloud’s Agent Platform configured, it verifies that the models it intends to use are accessible in your project. If you have pinned a model version that is older than the current Claude Code default, and your project can invoke the newer version, Claude Code prompts you to update the pin. Accepting writes the new model ID to your [user settings file](</docs/en/settings>) and restarts Claude Code. Declining is remembered until the next default version change. If you have not pinned a model and the current default is unavailable in your project, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in [Model Garden](<https://console.cloud.google.com/vertex-ai/model-garden>) or pin a version to make the choice permanent. When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](</docs/en/settings-reference#model>), that version acts as the session’s pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don’t act as pins, and neither does a model ID Claude Code doesn’t recognize.
##
--- a/headless.md
+++ b/headless.md
@@ -28,7 +28,7 @@
Start faster with bare mode
-Add `--bare` to reduce startup time by skipping auto-discovery of hooks, skills, custom commands, [subagents](</docs/en/sub-agents>), plugins, MCP servers, auto memory, and CLAUDE.md. Without it, `claude -p` loads the same [context](</docs/en/how-claude-code-works#the-context-window>) an interactive session would, including anything configured in the working directory or `~/.claude`. Bare mode is useful for CI and scripts where you need the same result on every machine. A hook in a teammate’s `~/.claude` or an MCP server in the project’s `.mcp.json` won’t run, because bare mode never reads them. A directory you name with `--add-dir` is a partial exception: bare mode loads skills from its `.claude/skills/` folder, but still skips its `.claude/commands/` and `.claude/agents/` folders. [Skills from additional directories](</docs/en/skills#skills-from-additional-directories>) covers what does and doesn’t load. Without `--bare`, Claude Code runs the hooks in a project’s `.claude/settings.json` even in a folder you’ve never trusted, because a `-p` session shows no workspace trust dialog. It also connects the servers in the project’s `.mcp.json`, because a `-p` session can’t show the per-server approval prompt either. [What runs before you trust a folder](</docs/en/permissions#what-runs-before-you-trust-a-folder>) covers each kind of repository content under `-p` and how to keep it out. This example runs a one-off summarize task in bare mode and pre-approves the Read tool so the call completes without a permission prompt. Set `ANTHROPIC_API_KEY` before running it, because bare mode doesn’t use your subscription login:
+Add `--bare` to reduce startup time by skipping auto-discovery of hooks, skills, custom commands, [subagents](</docs/en/sub-agents>), plugins, MCP servers, auto memory, and CLAUDE.md. Without it, `claude -p` loads the same [context](</docs/en/how-claude-code-works#the-context-window>) an interactive session would, including anything configured in the working directory or `~/.claude`. Bare mode is useful for CI and scripts where you need the same result on every machine. A hook in a teammate’s `~/.claude` or an MCP server in the project’s `.mcp.json` won’t run, because bare mode never reads them. A directory you name with `--add-dir` is a partial exception: bare mode loads skills from its `.claude/skills/` folder, but still skips its `.claude/commands/` and `.claude/agents/` folders. [Skills from additional directories](</docs/en/skills#skills-from-additional-directories>) covers what does and doesn’t load. Without `--bare`, a `-p` session runs the hooks in a project’s `.claude/settings.json` and connects the servers in its `.mcp.json`, even in a folder you’ve never trusted. A `-p` session shows no workspace trust dialog and no per-server approval prompt. [What runs before you trust a folder](</docs/en/permissions#what-runs-before-you-trust-a-folder>) covers each kind of repository content under `-p` and how to keep it out. This example runs a one-off summarize task in bare mode and pre-approves the Read tool so the call completes without a permission prompt. Set `ANTHROPIC_API_KEY` before running it, because bare mode doesn’t use your subscription login:
claude --bare -p "Summarize README.md" --allowedTools "Read"
@@ -270,7 +270,7 @@
claude -p "Look at my staged changes and create an appropriate commit" \
--allowedTools "Bash(git diff *),Bash(git log *),Bash(git status *),Bash(git commit *)"
-The `--allowedTools` flag uses [permission rule syntax](</docs/en/settings#permission-rule-syntax>). The trailing ` *` enables prefix matching, so `Bash(git diff *)` allows any command starting with `git diff`. The space before `*` is important: without it, `Bash(git diff*)` would also match `git diff-index`.
+The `--allowedTools` flag uses [permission rule syntax](</docs/en/settings-reference#permission-rule-syntax>). The trailing ` *` enables prefix matching, so `Bash(git diff *)` allows any command starting with `git diff`. The space before `*` is important: without it, `Bash(git diff*)` would also match `git diff-index`.
User-invoked [skills](</docs/en/skills>) and custom commands work in `-p` mode: include `/skill-name` in the prompt string and Claude Code expands it before running. Built-in commands that only run in the terminal interface, such as `/login`, aren’t available in `-p` mode. `/model`, `/effort`, `/fast`, `/color`, and `/rename` accept the value as an argument, for example `/model sonnet`, and `/mcp` with no argument prints a text summary of server status; these forms require Claude Code v2.1.205 or later and follow each command’s [availability notes](</docs/en/commands#all-commands>). To change a setting from a `-p` invocation, pass `key=value` to `/config`, for example `/config thinking=false`.
@@ -294,7 +294,7 @@
Continue conversations
-Use `--continue` to continue the most recent conversation, or `--resume` with a session ID to continue a specific conversation. This example runs a review, then sends follow-up prompts:
+Use `--continue` to continue the most recent conversation, or `--resume` with a session ID to continue a specific conversation. `--continue` skips [background sessions](</docs/en/sessions#resume-a-session>). This example runs a review, then sends follow-up prompts:
# First request
claude -p "Review this codebase for performance issues"
--- a/how-claude-code-works.md
+++ b/how-claude-code-works.md
@@ -55,7 +55,7 @@
* **Your terminal.** Any command you could run: build tools, git, package managers, system utilities, scripts. If you can do it from the command line, Claude can too.
* **Your git state.** Current branch, uncommitted changes, and recent commit history.
* **Your[CLAUDE.md](</docs/en/memory>).** A markdown file where you store project-specific instructions, conventions, and context that Claude should know every session.
- * **[Auto memory](</docs/en/memory#auto-memory>).** Learnings Claude saves automatically as you work, like project patterns and your preferences. The first 200 lines or 25KB of MEMORY.md, whichever comes first, load at the start of each session.
+ * **[Auto memory](</docs/en/memory#auto-memory>).** Learnings Claude saves automatically as you work, like your preferences. The first 200 lines or 25KB of MEMORY.md, whichever comes first, load at the start of each session.
* **Extensions you configure.** [MCP servers](</docs/en/mcp>) for external services, [skills](</docs/en/skills>) for workflows, [subagents](</docs/en/sub-agents>) for delegated work, and [Claude in Chrome](</docs/en/chrome>) for browser interaction.
Because Claude sees your whole project, it can work across it. When you ask Claude to “fix the authentication bug,” it searches for relevant files, reads multiple files to understand context, makes coordinated edits across them, runs tests to verify the fix, and commits the changes if you ask. This is different from inline code assistants that only see the current file.
@@ -128,7 +128,7 @@
When context fills up
-Claude Code manages context automatically as you approach the limit. It clears older tool outputs first, then summarizes the conversation if needed. Your requests and key code snippets are preserved; detailed instructions from early in the conversation may be lost. Put persistent rules in CLAUDE.md rather than relying on conversation history. To control what’s preserved during compaction, add a “Compact Instructions” section to CLAUDE.md or run `/compact` with a focus (like `/compact focus on the API changes`). If a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error instead of looping. See [Auto-compaction stops with a thrashing error](</docs/en/troubleshooting#auto-compaction-stops-with-a-thrashing-error>) for recovery steps. Run `/context` to see what’s using space. MCP tool definitions are deferred by default and loaded on demand via [tool search](</docs/en/mcp#scale-with-mcp-tool-search>), so only tool names consume context until Claude uses a specific tool. Run `/mcp` to check per-server costs.
+Claude Code manages context automatically as you approach the limit. It clears older tool outputs first, then summarizes the conversation if needed. Your requests and key code snippets are preserved; detailed instructions from early in the conversation may be lost. Put persistent rules in CLAUDE.md rather than relying on conversation history. To control what’s preserved during compaction, add a “Compact Instructions” section to CLAUDE.md or run `/compact` with a focus (like `/compact focus on the API changes`). If a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error instead of looping. See [Auto-compaction stops with a thrashing error](</docs/en/troubleshooting#auto-compaction-stops-with-a-thrashing-error>) for recovery steps. Run `/context` to see what’s using space. MCP tool definitions are deferred by default and loaded on demand via [tool search](</docs/en/mcp#scale-with-mcp-tool-search>), so only tool names and server instructions consume context until Claude uses a specific tool.
####
@@ -278,7 +278,7 @@
## Extend with features
-Add Skills, MCP connections, and custom commands
+Add skills and MCP connections
## Common workflows
Show diff (174 lines)
--- a/interactive-mode.md
+++ b/interactive-mode.md
@@ -4,7 +4,7 @@
Keyboard shortcuts
-Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal. See [Enable Option key shortcuts on macOS](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) for the setting in each terminal.
+Keyboard shortcuts may vary by platform and terminal. In [fullscreen rendering](</docs/en/fullscreen>), press `?` in the transcript viewer to see available shortcuts there.**macOS users** : Option/Alt key shortcuts (`Alt+B`, `Alt+F`, `Alt+D`, `Alt+Y`, `Alt+P`) require configuring Option as Meta in your terminal. See [Enable Option key shortcuts on macOS](</docs/en/terminal-config#enable-option-key-shortcuts-on-macos>) for the setting in each terminal.
###
@@ -49,25 +49,31 @@
`Ctrl+K`| Delete to end of line| Stores deleted text for pasting
`Ctrl+U`| Delete from cursor to line start| Stores deleted text for pasting. Repeat to clear across lines in multiline input. On macOS, terminal emulators including iTerm2 and Terminal.app map `Cmd+Backspace` to this shortcut
`Ctrl+W`| Delete previous word| Stores deleted text for pasting. On macOS, `Option+Delete` deletes the previous word, and on Windows, `Ctrl+Backspace` does. To make `Ctrl+W` delete back to the previous whitespace instead, set `keybindingFlavor` to `"readline"`
-`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, or `Ctrl+W`
+`Ctrl+Y`| Paste deleted text| Paste text deleted with `Ctrl+K`, `Ctrl+U`, `Ctrl+W`, or, under `keybindingFlavor: "readline"`, `Alt+D`
`Alt+Y` (after `Ctrl+Y`)| Cycle paste history| After pasting, cycle through previously deleted text. Requires Option as Meta on macOS
`Alt+B`| Move cursor back one word| Word navigation. Requires Option as Meta on macOS
-`Alt+F`| Move cursor forward one word| Word navigation. Requires Option as Meta on macOS
+`Alt+F`| Move cursor forward one word| Moves to the start of the next word, or to the end of the current word when `keybindingFlavor` is `"readline"`. Requires Option as Meta on macOS
+`Alt+D`| Delete next word| Deletes through the space after the word, or to the end of the word when `keybindingFlavor` is `"readline"`. Requires Option as Meta on macOS
`Ctrl+_` or `Ctrl+Shift+-`| Undo last input edit| Restores the previous input text and cursor position
###
-Make Ctrl+W delete back to whitespace
-
-By default, `Ctrl+W` deletes the previous word, stopping at punctuation such as `/`. Set [`keybindingFlavor`](</docs/en/settings#available-settings>) to `"readline"` to make `Ctrl+W` delete back to the previous whitespace instead, as Bash does. The default value is `"classic"`. Requires Claude Code v2.1.238 or later. Add the setting to `~/.claude/settings.json`:
+Make editing keys follow readline conventions
+
+Set [`keybindingFlavor`](</docs/en/settings-reference#keybindingflavor>) to `"readline"` to make the prompt’s editing keys follow GNU readline conventions, as in Bash. The default value is `"classic"`. Requires Claude Code v2.1.238 or later. Under `"readline"`:
+
+ * `Ctrl+W` deletes back to the previous whitespace.
+ * A word is a run of letters and digits, so punctuation such as `_`, `.`, and `/` separates words. `Alt+F` and `Alt+D` stop at the end of the current word, and `Ctrl+Y` can paste back text that `Alt+D` deleted. Before v2.1.239, Claude Code applied `"readline"` only to `Ctrl+W`.
+
+Add the setting to `~/.claude/settings.json`:
{
"keybindingFlavor": "readline"
}
-To confirm, type `fix the bug in src/utils/foo.ts` in the prompt and press `Ctrl+W`. Claude Code removes `src/utils/foo.ts`. Under `"classic"` it removes only `foo.ts`.
+To confirm, type `fix the bug in src/utils/foo.ts` in the prompt and press `Ctrl+W`. Claude Code removes `src/utils/foo.ts`. Under `"classic"` it removes only `foo.ts`. This setting is separate from the [keybindings configuration file](</docs/en/keybindings>): the word-editing commands aren’t actions there, so you can’t remap them in `keybindings.json`.
###
@@ -140,7 +146,7 @@
Commands
-Type `/` in Claude Code to see all available commands, or type `/` followed by any letters to filter. The `/` menu shows everything you can invoke: built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code.
+Type `/` in Claude Code to see the commands available to you, or type `/` followed by any letters to filter. The `/` menu lists built-in commands, bundled and user-authored [skills](</docs/en/skills>), and commands contributed by [plugins](</docs/en/plugins>) and [MCP servers](</docs/en/mcp#use-mcp-prompts-as-commands>). Not all built-in commands are visible to every user since some depend on your platform or plan, and [a few available commands are hidden from the menu by design](</docs/en/commands#how-the-command-menu-matches-what-you-type>) and run when you type their full name. In [fullscreen rendering](</docs/en/fullscreen#use-the-mouse>), the `/` command and `@` file suggestion lists also respond to the mouse: hovering highlights a row and clicking accepts it. See the [commands reference](</docs/en/commands>) for the full list of commands included in Claude Code.
##
@@ -148,7 +154,7 @@
Vim editor mode
-Enable vim-style editing via `/config` → Editor mode.
+Enable vim-style editing via `/config` → Editor mode. Claude Code keeps your vim mode and cursor position when you toggle the transcript viewer with `Ctrl+O` or open and close a panel such as `/config`. If you leave the prompt in NORMAL mode, it’s still in NORMAL mode when you return, with the cursor where you left it.
###
@@ -174,14 +180,14 @@
Remap INSERT-mode key sequences
-The [`vimInsertModeRemaps`](</docs/en/settings#available-settings>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. Requires Claude Code v2.1.208 or later. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape:
+The [`vimInsertModeRemaps`](</docs/en/settings-reference#viminsertmoderemaps>) setting maps a two-key INSERT-mode sequence to Escape, so a mapping like `jj` returns you to NORMAL mode. Requires Claude Code v2.1.208 or later. The following `~/.claude/settings.json` example turns on vim mode and maps `jj` to Escape:
{
"editorMode": "vim",
"vimInsertModeRemaps": { "jj": "<Esc>" }
}
-Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target. Entries with a different length or target are ignored. Typing the first character of a sequence inserts it normally. Pressing the second character within one second removes that pending character and switches to NORMAL mode, leaving neither character in your input. After the one-second window, or if a different key follows, both characters stay as literal text, so you can still type a word containing the sequence by pausing between the two keys. Claude Code reads this setting from your user settings file, the `--settings` flag, and [managed settings](</docs/en/permissions#managed-settings>) only. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored, so a checked-out repository can’t remap your keystrokes.
+Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target. Entries with a different length or target are ignored. Typing the first character of a sequence inserts it normally. Pressing the second character within one second removes that pending character and switches to NORMAL mode, leaving neither character in your input. After the one-second window, or if a different key follows, both characters stay as literal text, so you can still type a word containing the sequence by pausing between the two keys. Claude Code reads this setting from your user settings file, the `--settings` flag, and [managed settings](</docs/en/managed-settings>) only. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored, so a checked-out repository can’t remap your keystrokes.
###
@@ -373,7 +379,7 @@
* Exit with `Escape`, `Backspace`, or `Ctrl+U` on an empty prompt
* Pasting text that starts with `!` into an empty prompt enters shell mode automatically, matching typed `!` behavior
-Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings#available-settings>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response.
+Claude responds to the command output automatically once it lands in the transcript, so you can run `! npm test` and get an explanation of the failures without a second prompt. The response costs the same as sending a normal prompt. To restore the earlier behavior where the output is added to context without a response, set [`respondToBashCommands`](</docs/en/settings-reference#respondtobashcommands>) to `false` in `settings.json`. Before v2.1.186, shell mode always added output to context without a response.
##
@@ -449,12 +455,12 @@
To disable prompt suggestions entirely, use any of the following:
* Turn off **Prompt suggestions** in `/config`
- * Set [`promptSuggestionEnabled`](</docs/en/settings#available-settings>) to `false` in your settings file
+ * Set [`promptSuggestionEnabled`](</docs/en/settings-reference#promptsuggestionenabled>) to `false` in your settings file
* Set the [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) environment variable to `false`, which takes precedence over the setting:
export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false
-To turn prompt suggestions off across an organization, set `promptSuggestionEnabled` to `false` in [managed settings](</docs/en/settings#settings-files>). Also set `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` to `false` under the managed [`env`](</docs/en/settings#environment-variables>) key so that users can’t re-enable them with their own environment variable.
+To turn prompt suggestions off across an organization, set `promptSuggestionEnabled` to `false` in [managed settings](</docs/en/managed-settings>). Also set `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` to `false` under the managed [`env`](</docs/en/settings-reference#env>) key so that users can’t re-enable them with their own environment variable.
##
@@ -467,7 +473,7 @@
* Type a complete shortcode such as `:heart:` and Claude Code replaces it with ❤️ as soon as you type the closing `:`
* Type `:` plus at least two characters of a name, such as `:hea`, to open a suggestion popup, then press `Tab` or `Enter` to insert the highlighted emoji
-The shortcode must start the input or follow a space, so a `:` inside a word or URL doesn’t open suggestions. To turn the feature off, set [`emojiCompletionEnabled`](</docs/en/settings#available-settings>) to `false` in `settings.json`. This disables both the suggestion popup and the inline replacement.
+The shortcode must start the input or follow a space, so a `:` inside a word or URL doesn’t open suggestions. To turn the feature off, set [`emojiCompletionEnabled`](</docs/en/settings-reference#emojicompletionenabled>) to `false` in `settings.json`. This disables both the suggestion popup and the inline replacement.
##
@@ -492,7 +498,7 @@
Turn spell checking on or off
-Claude Code reads the [`spellcheck`](</docs/en/settings#available-settings>) setting from three places, and ignores it in a project’s `.claude/settings.json` and `.claude/settings.local.json`. Turn it on from whichever one you use:
+Claude Code reads the [`spellcheck`](</docs/en/settings-reference#spellcheck>) setting from three places, and ignores it in a project’s `.claude/settings.json` and `.claude/settings.local.json`. Turn it on from whichever one you use:
* User settings
@@ -500,7 +506,7 @@
* Managed settings
-Add `spellcheck` to `~/.claude/settings.json`. It applies in every project you open, like the rest of your [user settings](</docs/en/settings#settings-files>):
+Add `spellcheck` to `~/.claude/settings.json`. It applies in every project you open, like the rest of your [user settings](</docs/en/settings#where-settings-live>):
{
"spellcheck": { "enabled": true }
@@ -582,7 +588,7 @@
* **Available while Claude is working** : you can run `/btw` even while Claude is processing a response. The side question runs independently and doesn’t interrupt the main turn. It sees everything in the conversation so far, except the reply Claude is still writing.
* **No tool access** : side questions answer only from what is already in context. Claude can’t read files, run commands, or search when answering a side question.
- * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access, fork this question and answer into their own session with `f`.
+ * **Single response** : there are no follow-up turns in the overlay. To continue the thread, ask another `/btw` question. To continue with full tool access in a local session, press `f` to fork this question and answer into a [background subagent](</docs/en/sub-agents#fork-the-current-conversation>).
* **Low cost** : while the conversation’s [prompt cache](</docs/en/prompt-caching>) is warm, a side question costs little beyond the answer itself.
Your five newest earlier side questions appear as a dimmed list above the current answer, with a count of any older ones. They stay out of the conversation history. To return to the overlay after dismissing it, run `/btw` with no question. The overlay reopens on your most recent exchange. Press `Left` to step back through earlier answers. Before v2.1.212, `/btw` without a question printed a usage message instead. Once the answer appears, the overlay accepts these keys.
@@ -593,10 +599,10 @@
`Up` / `Down`| Scroll the answer
`Left` / `Right`| Step between this answer and your earlier `/btw` answers. `Left` moves to older answers and `Right` returns toward the current one. Requires Claude Code v2.1.187 or later
`c`| Copy the answer to your clipboard as raw Markdown. Use this instead of mouse selection, which captures the hard-wrapped terminal rendering rather than the source text
-`f`| Fork into a new session. The fork inherits the parent conversation plus this question and answer as real transcript turns, so you can continue with full tool access. The original session is preserved under [`/resume`](</docs/en/commands>). Available in local sessions only
+`f`| Start a [forked subagent](</docs/en/sub-agents#fork-the-current-conversation>) that inherits the parent conversation plus this question and answer, so it can continue with full tool access. You stay in the current session and find the fork in the [panel below your prompt](</docs/en/sub-agents#observe-and-steer-running-forks>). Available in local sessions only
`x`| Clear the list of earlier `/btw` exchanges shown above the current answer
-`/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools, while a subagent has full tools but starts with an empty context. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new.
+`/btw` is the inverse of a [subagent](</docs/en/sub-agents>): it sees your full conversation but has no tools. Use `/btw` to ask about what Claude already knows from this session; use a subagent to go find out something new.
##
@@ -607,6 +613,7 @@
The task list is Claude’s to-do checklist: items Claude created to plan multi-step work, with indicators showing what’s pending, in progress, or complete. It’s separate from the background-task view. To see running shells and subagents, use [`/tasks`](</docs/en/commands>) instead. On [Opus 4.8, Sonnet 5, Fable 5, Mythos 5, and later versions of those families](</docs/en/tools-reference#task-tool-availability>), Claude keeps track of multi-step work without a written checklist, and Claude Code doesn’t provide the tools that fill this list, so it stays empty. If you’d like the task list on those models anyway, opt in with `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` or one of the other ways under [Task tool availability](</docs/en/tools-reference#task-tool-availability>). On earlier models such as Opus 4.7, and after you opt in, the task list works as follows:
* Press `Ctrl+T` to toggle the task list view. The display shows up to five tasks at a time. When Claude hasn’t created any checklist items yet, the toggle has no visible effect because there’s nothing to display
+ * If you leave the list expanded, Claude Code restores the expanded view the next time you launch into a session that still has tasks, such as with `--resume` or `--continue`. When the task list is empty, Claude Code starts it collapsed
* To see all tasks or clear them, ask Claude directly: “show me all tasks” or “clear all tasks”
* Tasks persist across context compactions, helping Claude stay organized on larger projects
* To share a task list across sessions, set `CLAUDE_CODE_TASK_LIST_ID` to use a named directory in `~/.claude/tasks/`: `CLAUDE_CODE_TASK_LIST_ID=my-project claude`
@@ -617,7 +624,7 @@
Session recap
-When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. To turn automatic recaps off, open `/config` and disable **Session recap**. Session recap is on by default for every plan and provider. The recap is always skipped in non-interactive mode.
+When you return to the terminal after stepping away, Claude Code shows a one-line recap of what happened in the session so far. The recap generates in the background once at least three minutes have passed since the last completed turn and the terminal is unfocused, so it’s ready when you switch back. Recaps only appear once the session has at least three turns, and never twice in a row. Run `/recap` to generate a summary on demand. Claude Code caps both automatic recaps and `/recap` output at 400 characters. To turn automatic recaps off, open `/config` and turn off **Session recap**. Session recap is on by default for every plan and provider. The recap is always skipped in non-interactive mode.
##
--- a/jetbrains.md
+++ b/jetbrains.md
@@ -25,7 +25,7 @@
* **Diff viewing** : Claude Code opens code changes in the IDE diff viewer instead of the terminal; change this with the **Diff tool** setting in `/config`
* **Selection context** : the current selection or tab in the IDE is automatically shared with Claude Code. [`Read` deny rules](</docs/en/permissions#read-and-edit>) block this sharing for matching files
* **File reference shortcuts** : use `Cmd+Option+K` (Mac) or `Alt+Ctrl+K` (Linux/Windows) to insert file references such as `@src/auth.ts#L1-99`
- * **Diagnostic sharing** : after Claude edits a file, Claude Code pulls the IDE’s new diagnostics for that file, such as lint and syntax errors, into the conversation, so Claude notices errors its edits introduce
+ * **Diagnostic sharing** : Claude reads the IDE’s inspection diagnostics, such as lint and syntax errors, by calling the `getDiagnostics` tool; Claude Code doesn’t request diagnostics from the plugin on its own after edits
##
@@ -95,7 +95,7 @@
2. Enter the `/config` command
3. Set **Diff tool** to `auto` to show diffs in the IDE, or `terminal` to keep them in the terminal
-The **Diff tool** entry appears in `/config` only when Claude Code is connected to the IDE, so run `claude` from the JetBrains terminal or run [`/ide`](</docs/en/commands>) first from an external terminal. See [`diffTool`](</docs/en/settings#global-config-settings>) for the underlying setting.
+The **Diff tool** entry appears in `/config` only when Claude Code is connected to the IDE, so run `claude` from the JetBrains terminal or run [`/ide`](</docs/en/commands>) first from an external terminal. See [`diffTool`](</docs/en/settings-reference#difftool>) for the underlying setting.
###
@@ -265,7 +265,7 @@
The built-in IDE MCP server
-When the plugin is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in the IDE’s native diff viewer, reads your current selection for `@`-mentions, and pulls inspection diagnostics into the conversation. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a [`PreToolUse` hook](</docs/en/hooks#pretooluse>) to allowlist MCP tools, though, you’ll need to know it exists. **Selection and open-file context.** While connected, the CLI includes your current editor selection and the path of the active file as context on each prompt you send. The transcript shows a `⧉ Selected N lines from <file>` line when this happens. To exclude a sensitive file such as `.env`, add a [`Read` deny rule](</docs/en/permissions#read-and-edit>) for its path. A matching deny rule prevents both the selected text and the open-file notice for that file from reaching Claude. **Transport and authentication.** The server listens on an OS-assigned ephemeral port, and the port is not configurable. The transport is unencrypted `ws://`; on loopback, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection against a local attacker. Each IDE start generates a fresh random auth token, writes it to a lock file at `~/.claude/ide/<port>.lock`, and the CLI must present it as the `X-Claude-Code-Ide-Authorization` header to connect. 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 several tools, but only one is visible to the model. The rest are internal RPC the CLI uses for its own UI, such as opening diffs and reading selections, and are filtered out before the tool list reaches Claude.
+When the plugin is active, it runs a local MCP server that the CLI connects to automatically. This is how the CLI opens diffs in the IDE’s native diff viewer, reads your current selection for `@`-mentions, and lets Claude read inspection diagnostics. The server is named `ide` and is hidden from `/mcp` because there’s nothing to configure. If your organization uses a [`PreToolUse` hook](</docs/en/hooks#pretooluse>) to allowlist MCP tools, though, you’ll need to know it exists. **Selection and open-file context.** While connected, the CLI includes your current editor selection and the path of the active file as context on each prompt you send. The transcript shows a `⧉ Selected N lines from <file>` line when this happens. To exclude a sensitive file such as `.env`, add a [`Read` deny rule](</docs/en/permissions#read-and-edit>) for its path. A matching deny rule prevents both the selected text and the open-file notice for that file from reaching Claude. **Transport and authentication.** The server listens on an OS-assigned ephemeral port, and the port is not configurable. The transport is unencrypted `ws://`; on loopback, any process that could capture the traffic can also read the token from the lock file, so TLS would not add protection against a local attacker. Each IDE start generates a fresh random auth token, writes it to a lock file at `~/.claude/ide/<port>.lock`, and the CLI must present it as the `X-Claude-Code-Ide-Authorization` header to connect. 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 several tools, but only one is visible to the model. The rest are internal RPC the CLI uses for its own UI, such as opening diffs and reading selections, and are filtered out before the tool list reaches Claude.
Tool name (as seen by hooks)| What it does| Read-only
---|---|---
Show diff (108 lines)
--- a/large-codebases.md
+++ b/large-codebases.md
@@ -75,35 +75,24 @@
In a large codebase, a single CLAUDE.md at the repository root tends to either grow to cover every subsystem’s conventions, costing context on instructions unrelated to the current task, or stay too generic to be useful. Splitting instructions across per-directory files means Claude loads repository-wide rules plus only the conventions for the code you’re working in. Claude Code loads every [CLAUDE.md](</docs/en/memory>) file from your working directory and every parent directory at launch, then loads each subdirectory’s file on demand when it reads files there. A root file sets repository-wide rules and each subdirectory adds its own. A common split is two levels:
- * **Root`CLAUDE.md`**: instructions that apply everywhere, such as coding standards, commit conventions, and repository layout
+ * **Root`CLAUDE.md`**: instructions that apply everywhere, such as coding standards and commit conventions
* **Per-subdirectory`CLAUDE.md`**: conventions specific to that area’s stack. In a monorepo that’s one per package. In a large single tree it’s one per subsystem such as `src/db/` or `src/api/`
-Commit these files to the repository so teammates inherit them. Each directory’s owner typically maintains its file. The root `CLAUDE.md` orients Claude to the repository structure:
+Commit these files to the repository so teammates inherit them. Each directory’s owner typically maintains its file. To trim a file that is already checked in, run the [`/doctor` checkup](</docs/en/memory#my-claude-md-is-too-large>). The root `CLAUDE.md` holds the rules that apply in every package:
CLAUDE.md
- This is a monorepo with three packages under packages/:
-
- - packages/api: Node.js REST API with Express, TypeScript, and PostgreSQL
- - packages/web: React frontend with Vite, TypeScript, and TailwindCSS
- - packages/shared: shared TypeScript utilities used by both api and web
-
- Run commands from the package directory, not the monorepo root.
- Each package has its own tsconfig.json, package.json, and test suite.
-
-Each subdirectory’s `CLAUDE.md`, here `packages/api/CLAUDE.md`, adds context specific to that area’s stack:
+ Run package scripts from the package directory, not the monorepo root.
+ Prefix commit subjects with the package name, for example `api: add rate limiting`.
+ Never edit files under packages/*/generated/. Run `npm run codegen` in the package instead.
+
+Each subdirectory’s `CLAUDE.md`, here `packages/api/CLAUDE.md`, adds the conventions specific to that area:
packages/api/CLAUDE.md
- This package is the REST API server.
-
- - Run tests: `npm test` (uses Vitest)
- - Run dev server: `npm run dev` (port 3001)
- - Database migrations: `npm run migrate`
- - Environment variables: copy `.env.example` to `.env`
-
- API routes are in src/routes/. Each route file exports an Express router.
- Database queries use Knex in src/db/. Never write raw SQL strings in route handlers.
+ Copy `.env.example` to `.env` before running anything. Tests and the dev server fail without it.
+ Write database queries with the Knex query builder. Never put raw SQL strings in route handlers.
+ Never edit a migration after it has merged. Add a new migration instead.
When you start Claude from `packages/api/`, it loads both `packages/api/CLAUDE.md` and the root `CLAUDE.md`. Claude sees the local instructions alongside the repository-wide rules, with no instructions from `packages/web/` in context. The same holds for any subdirectory in a non-monorepo tree. To confirm which files loaded, run `/context` and check the list under **Memory files**. A few ways to keep the files current as the codebase and models change:
@@ -150,7 +139,7 @@
* `"**/packages/legacy-*/**"`: excludes every package whose name matches the glob, including rules
* `"/home/user/monorepo/legacy/CLAUDE.md"`: excludes one specific file by absolute path
-Managed policy CLAUDE.md files cannot be excluded, so organization-wide instructions always apply. You can set `claudeMdExcludes` at any [settings scope](</docs/en/settings#configuration-scopes>): user, project, local, or managed. Arrays merge across scopes, so a team can set project-level defaults while individuals add local overrides. For the full exclusion documentation, see [Exclude specific CLAUDE.md files](</docs/en/memory#exclude-specific-claude-md-files>).
+Managed policy CLAUDE.md files cannot be excluded, so organization-wide instructions always apply. You can set `claudeMdExcludes` at any [settings scope](</docs/en/settings#where-settings-live>): user, project, local, or managed. Arrays merge across scopes, so a team can set project-level defaults while individuals add local overrides. For the full exclusion documentation, see [Exclude specific CLAUDE.md files](</docs/en/memory#exclude-specific-claude-md-files>).
##
@@ -166,11 +155,11 @@
Block reads of generated and vendored code
-Claude’s content searches respect `.gitignore` by default, so paths already listed there, such as `node_modules/`, `dist/`, and `build/`, stay out of search results without additional configuration. For paths that are checked in, such as a vendored SDK or committed generated code, add `Read` deny rules in `permissions.deny` to block Claude from opening those files even when a search lists them. The deny rules can cover everyone working in the repository, only you, or every session on the machine, depending on which settings file you put them in:
+Claude’s content searches respect `.gitignore` by default, so paths already listed there, such as `node_modules/`, `dist/`, and `build/`, stay out of search results without additional configuration. For paths that are checked in, such as a vendored SDK or committed generated code, add `Read` deny rules in `permissions.deny` to block Claude from opening those files. The deny rules can cover everyone working in the repository, only you, or every session on the machine, depending on which settings file you put them in:
* **Everyone working in the repository** : commit the rules to `.claude/settings.json`. Like other project settings on this page, that file loads only from your starting directory, so place it at the repository root if you start Claude there, or in each package’s `.claude/` if you start from subdirectories.
- * **Yourself only** : use `.claude/settings.local.json` at the repository root, which loads in every CLI session inside the repository regardless of starting directory. Relative patterns like the example’s `Read(./vendor/**)` still [anchor at the directory you start Claude Code from](</docs/en/permissions#read-and-edit>), so if you start sessions from subdirectories, write the rules in this file as `//`-absolute paths, such as `Read(//absolute/path/to/repo/vendor/**)`. Before v2.1.211, `.claude/settings.local.json` also loaded only from the starting directory.
- * **Everyone, enforced in every session** : set the rules in [managed settings](</docs/en/settings#settings-files>), which user and project settings cannot override.
+ * **Yourself only** : use `.claude/settings.local.json` at the repository root, which loads in every CLI session inside the repository regardless of starting directory, except in the cases where Claude Code [keeps the local file in the starting directory](</docs/en/settings#where-claude-code-looks-for-each-file>), such as on Windows. Relative patterns like the example’s `Read(./vendor/**)` still [anchor at the directory you start Claude Code from](</docs/en/permissions#read-and-edit>), so if you start sessions from subdirectories, write the rules in this file as `//`-absolute paths, such as `Read(//absolute/path/to/repo/vendor/**)`. Before v2.1.211, `.claude/settings.local.json` also loaded only from the starting directory.
+ * **Everyone, enforced in every session** : set the rules in [managed settings](</docs/en/managed-settings>), which user and project settings cannot override.
The example below blocks build artifacts and a vendored SDK:
@@ -187,7 +176,7 @@
}
}
-Deny rules cover Claude’s built-in file tools and recognized Bash file commands, including `cat`, `head`, `grep`, and `find`, when a denied path is passed as an argument. They do not filter denied paths out of a recursive search’s output, and they do not cover arbitrary subprocesses that open files themselves. For the full pattern syntax, see [Read and Edit permission rules](</docs/en/permissions#read-and-edit>).
+Deny rules cover Claude’s built-in file tools and recognized Bash file commands, including `cat`, `head`, `grep`, and `find`, when a denied path is passed as an argument. Claude Code also makes a best-effort attempt to leave denied paths out of the results of the built-in Grep and Glob tools. Claude still sees denied paths in the output of a Bash search such as `grep -r` or `find`. Deny rules don’t cover subprocesses that open files themselves. For the full pattern syntax, see [Read and Edit permission rules](</docs/en/permissions#read-and-edit>).
###
@@ -204,7 +193,7 @@
* `Marketplace "claude-plugins-official" not found`: add the marketplace with `/plugin marketplace add anthropics/claude-plugins-official`, then retry the install.
* The plugin is [not found in the marketplace](</docs/en/discover-plugins#install-plugins>): check the plugin name.
-To enable a plugin for everyone in the repository rather than installing it yourself, add it to the [`enabledPlugins` project setting](</docs/en/settings#plugin-settings>). Code intelligence plugins require the language’s language server binary on each developer’s machine. See [which binary each language requires](</docs/en/discover-plugins#code-intelligence>). Installing from the official marketplace requires network access to GitHub, where the marketplace is hosted. On a restricted network, [add the marketplace from an internal Git host or local path](</docs/en/discover-plugins#add-from-other-git-hosts>) instead. This pairs well with `claudeMdExcludes` and the `Read` deny rules above. Those keep irrelevant content out of context, and code intelligence keeps Claude from reading through what remains to locate a definition.
+To enable a plugin for everyone in the repository rather than installing it yourself, add it to the [`enabledPlugins` project setting](</docs/en/settings-reference#plugin-settings>). Code intelligence plugins require the language’s language server binary on each developer’s machine. See [which binary each language requires](</docs/en/discover-plugins#code-intelligence>). Installing from the official marketplace requires network access to GitHub, where the marketplace is hosted. On a restricted network, [add the marketplace from an internal Git host or local path](</docs/en/discover-plugins#add-from-other-git-hosts>) instead. This pairs well with `claudeMdExcludes` and the `Read` deny rules above. Those keep irrelevant content out of context, and code intelligence keeps Claude from reading through what remains to locate a definition.
##
@@ -255,7 +244,7 @@
The `sparsePaths` and `symlinkDirectories` settings are read from your starting directory before the worktree is created. After creation, the session’s working directory is the worktree root, not the subdirectory you launched from. Project settings inside the worktree therefore load from the worktree root’s `.claude/settings.json`, the checked-out copy of the repository root’s file. Put any other settings you need inside worktrees, such as permission rules or hooks, in the repository root’s `.claude/settings.json`.
-For the full worktree settings reference, see [Worktree settings](</docs/en/settings#worktree-settings>).
+For the full worktree settings reference, see [Worktree settings](</docs/en/settings-reference#worktree>).
###
@@ -450,7 +439,7 @@
The configuration above controls what Claude sees. When a single change touches several packages, such as updating a shared type along with every call site that uses it, how you scope and sequence the task also affects the result. Two techniques help keep a cross-package change consistent:
* **Give Claude the whole change in one session** : handing over the shared edit and its call sites together keeps the decisions behind each edit consistent, rather than re-deriving them per package
- * **Save the plan to a file before editing** : [plan first](</docs/en/best-practices#explore-first-then-plan-then-code>) and ask Claude to write the plan to a markdown file in the repository. A long cross-package session [compacts its context](</docs/en/context-window#what-survives-compaction>) along the way, and the saved plan survives where conversation history may not
+ * **Plan before editing** : [plan first](</docs/en/best-practices#explore-first-then-plan-then-code>) in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>), and Claude writes the plan to a file. A long cross-package session [compacts its context](</docs/en/context-window#what-survives-compaction>) along the way. Claude Code re-injects the plan file after each compaction, so the plan survives where conversation history may not
##
--- a/legal-and-compliance.md
+++ b/legal-and-compliance.md
@@ -12,7 +12,7 @@
Your use of Claude Code is subject to:
- * [Commercial Terms](<https://www.anthropic.com/legal/commercial-terms>) \- for Team, Enterprise, and Claude API users
+ * [Commercial Terms of Service](<https://www.anthropic.com/legal/commercial-terms>) \- for Team, Enterprise, and Claude API users
* [Consumer Terms of Service](<https://www.anthropic.com/legal/consumer-terms>) \- for Free, Pro, and Max users
###
@@ -22,6 +22,19 @@
Commercial agreements
Whether you’re using the Claude API directly (1P) or accessing it through Amazon Bedrock or Google Cloud’s Agent Platform (3P), your existing commercial agreement will apply to Claude Code usage, unless we’ve mutually agreed otherwise.
+
+###
+
+
+
+Can customers offer Claude Code in their products?
+
+Unless we’ve mutually agreed otherwise, preinstalling or running Claude Code in your products or services (e.g. in hosted sandboxes or other agent infrastructure) requires agreeing to our [Commercial Terms of Service](<https://www.anthropic.com/legal/commercial-terms>) and complying with the conditions below:
+
+ * **The Claude Code binary must not be modified.** Claude Code must be installed and run as published by Anthropic, and customers may not remove, disable, or restrict any authentication method built into it (including methods that permit signing in with a Claude account or the user’s own API key).
+ * **Customers may not pay for, resell, or intermediate Claude usage on their end users’ behalf.** Each end user must authenticate with their own Anthropic API key, Claude subscription plan credentials, or 3P inference provider credential (Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry). That usage is billed directly to the end user under their own agreement with Anthropic or, for third-party inference providers, with the applicable provider.
+
+**Using the Claude Code name and logo.** You can accurately say, in plain text, that your product has Claude Code preinstalled or that it runs Claude Code. But you can’t use the Claude Code or Anthropic names or logos as part of your own product, feature, or company name, in your own logo, or in a way that suggests Anthropic built, endorses, or is partnered with your product. Any other use of Anthropic’s names or logos is governed by our [Trademark Guidelines](<https://www.anthropic.com/legal/trademark-guidelines>) and requires our written permission. Claude Code remains governed by Anthropic’s standard terms (see the License and Commercial agreements sections above) regardless of the platform through which it is accessed.
##
@@ -35,7 +48,7 @@
Healthcare compliance (BAA)
-If a customer has a Business Associate Agreement (BAA) with us, and wants to use Claude Code, the BAA will automatically extend to cover Claude Code if the customer has executed a BAA and has [Zero Data Retention (ZDR)](</docs/en/zero-data-retention>) activated. The BAA will be applicable to that customer’s API traffic flowing through Claude Code. ZDR is enabled on a per-organization basis, so each organization must have ZDR enabled separately to be covered under the BAA.
+If a customer has executed a Business Associate Agreement (BAA) with Anthropic and has [Zero Data Retention (ZDR)](</docs/en/zero-data-retention>) enabled for the relevant organization, that BAA extends to the customer’s API traffic through Claude Code.
##
@@ -60,9 +73,9 @@
Claude Code authenticates with Anthropic’s servers using OAuth tokens or API keys. These authentication methods serve different purposes:
* **OAuth authentication** is intended exclusively for purchasers of Claude Free, Pro, Max, Team, and Enterprise subscription plans and is designed to support ordinary use of Claude Code and other native Anthropic applications. For the sign-in steps, see [Logging in to your Claude account](<https://support.claude.com/en/articles/13189465-logging-in-to-your-claude-account>); for how Claude Code performs OAuth authentication, see [Authentication](</docs/en/authentication>).
- * **Developers** building products or services that interact with Claude’s capabilities, including those using the [Agent SDK](</docs/en/agent-sdk/overview>), should use API key authentication through [Claude Console](<https://platform.claude.com/>) or a supported cloud provider. Anthropic does not permit third-party developers to offer Claude.ai login or to route requests through Free, Pro, or Max plan credentials on behalf of their users.
+ * **Developers** building products or services that interact with Claude’s capabilities, including those using the [Agent SDK](</docs/en/agent-sdk/overview>), should use API key authentication through [Claude Console](<https://platform.claude.com/>) or a supported cloud provider. Anthropic does not permit third-party developers to offer Claude.ai login into their own applications, or to route requests through Free, Pro, or Max plan credentials on behalf of their users. Moreover, developers may not collect, store, or intermediate Claude.ai credentials or session tokens — sign-in to a Claude account must complete through Anthropic’s own flow.
-Anthropic reserves the right to take measures to enforce these restrictions and may do so without prior notice. For questions about permitted authentication methods for your use case, please [contact sales](<https://www.anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=legal_compliance_contact_sales>).
+This does not restrict how customers provision and manage their own API keys or third-party inference provider credentials — for example, configuring an API key in a development environment, secrets manager, or machine image for use by the customer’s own authorized users — provided the resulting usage is billed to the key owner under their agreement with Anthropic (or the applicable provider) and is not resold or intermediated as described above. Nor does it prevent an end user from signing in to the unmodified Claude Code binary with their own Claude subscription, including where a platform hosts Claude Code as described under _Can customers offer Claude Code in their products?_ above. Anthropic reserves the right to take measures to enforce these restrictions and may do so without prior notice. For questions about permitted authentication methods for your use case, please [contact sales](<https://www.anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=legal_compliance_contact_sales>).
##
--- a/llm-gateway.md
+++ b/llm-gateway.md
@@ -32,7 +32,7 @@
1. Deploy the gateway and give it your provider credential, so it can authenticate the requests it forwards.
2. Issue each developer a gateway credential, so usage is attributed to the developer and offboarding revokes one credential.
- 3. Distribute the configuration through a [managed settings file](</docs/en/settings#settings-files>) and your secrets tooling, so every machine receives the base URL and a credential. When both are distributed, developers don’t configure anything. If you don’t have settings distribution in place, developers follow the [connect page](</docs/en/llm-gateway-connect>) to set the variables themselves.
+ 3. Distribute the configuration through a [managed settings file](</docs/en/managed-settings#delivery-mechanisms>) and your secrets tooling, so every machine receives the base URL and a credential. When both are distributed, developers don’t configure anything. If you don’t have settings distribution in place, developers follow the [connect page](</docs/en/llm-gateway-connect>) to set the variables themselves.
4. Have each developer [check for the configuration in Claude Code](</docs/en/llm-gateway-connect#check-for-an-existing-configuration>), so distribution problems surface before they depend on the gateway.
[Roll out an LLM gateway for your organization](</docs/en/llm-gateway-rollout>) walks each step and shows the configuration files to distribute at each one. The gateway is one part of organization setup; for policy enforcement, usage visibility, and data handling decisions, see [Set up Claude Code for your organization](</docs/en/admin-setup>).
--- a/llm-gateway-connect.md
+++ b/llm-gateway-connect.md
@@ -9,7 +9,7 @@
Check for an existing configuration
-Administrators can distribute the gateway address and credential through [managed settings](</docs/en/settings#settings-files>), device management, or an `apiKeyHelper`, so Claude Code picks them up at startup with nothing for you to set. To check whether your organization already did this:
+Administrators can distribute the gateway address and credential through [managed settings](</docs/en/managed-settings>), device management, or an `apiKeyHelper`, so Claude Code picks them up at startup with nothing for you to set. To check whether your organization already did this:
1
@@ -494,12 +494,12 @@
---|---|---
A startup warning naming two credential sources and ending in `auth may not work as expected`. Older versions show `Auth conflict: Both a token (SOURCE) and an API key (SOURCE) are set` instead.| A gateway credential and a saved login are both active; the variable is used for requests, but the stale login can cause unexpected auth behavior| Unset the variable to use the saved login, or run `/logout` to use the gateway credential
`401` errors naming an invalid or unrecognized token| The credential isn’t one the gateway issued, or it’s in a header the gateway doesn’t read| Confirm the variable matches your credential kind in the credential table, and regenerate the key at the gateway if it was revoked
-`Your apiKeyHelper script is failing`| The command in the [`apiKeyHelper`](</docs/en/settings#available-settings>) setting didn’t produce a usable key, so requests carry a placeholder key| Run the command directly to see why it fails, and re-authenticate with your credential provider if it reports an expired session; see [the error reference](</docs/en/errors#your-apikeyhelper-script-is-failing>)
+`Your apiKeyHelper script is failing`| The command in the [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) setting didn’t produce a usable key, so requests carry a placeholder key| Run the command directly to see why it fails, and re-authenticate with your credential provider if it reports an expired session; see [the error reference](</docs/en/errors#your-apikeyhelper-script-is-failing>)
`Connection refused — a firewall or proxy may be blocking it (ConnectionRefused)` when nothing answers at the address, or `Can't reach the API server — check your internet or DNS (ENOTFOUND)` when the hostname doesn’t resolve, often after a silent pause while Claude Code [retries with backoff](</docs/en/errors#automatic-retries>). The code in parentheses varies; [Unable to connect to API](</docs/en/errors#unable-to-connect-to-api>) covers the code spellings and the earlier wording| Nothing answered at the base URL: the address is wrong, or a VPN or firewall blocks the path to the gateway| Run the curl test above, which fails immediately with the same cause, and confirm the URL and network path with your gateway team
-`API returned an empty or malformed response (HTTP 200)`| The gateway or an intermediate proxy returned a non-API response, often an HTML error or login page| Test with the curl request above; fix the gateway route that returns non-JSON
+`API returned an empty or malformed response (HTTP 200)`| The gateway or an intermediate proxy returned a non-API response, often an HTML error or login page| Test with the curl request above; fix the gateway route that answers with something other than a Claude API response. [The error reference](</docs/en/errors#api-returned-an-empty-or-malformed-response>) explains the detail the message reports
`400` errors naming `context_management`, `Extra inputs are not permitted`, or other unrecognized fields| The gateway forwards requests to an upstream that rejects fields Claude Code sends to Anthropic-format endpoints| Set `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`, which suppresses most pre-release fields; see [feature pass-through](</docs/en/llm-gateway-protocol#feature-pass-through>). Some betas aren’t gated by this flag; for those, set the matching `CLAUDE_CODE_USE_*` provider variable so Claude Code sends only what that provider accepts
`400` errors naming `thinking` or `adaptive`, such as `Input tag 'adaptive' found`| The upstream model build doesn’t accept adaptive reasoning, which Claude Code requests for Claude 4.6 and later models| Upgrade the gateway’s upstream. On Opus 4.6 and Sonnet 4.6, `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING=1` works instead. The [model configuration](</docs/en/model-config>) capability variables apply only to the provider configurations, such as `CLAUDE_CODE_USE_BEDROCK` and `CLAUDE_CODE_USE_VERTEX`, not behind an `ANTHROPIC_BASE_URL` gateway
-`400` errors stating a context or token limit in the gateway’s own words, such as `ContextWindowExceededError` or `prompt token count of N exceeds the limit of M`| The gateway enforces a smaller context than the model’s native window and rewrites the upstream error, so the automatic compact-and-retry, which matches Anthropic’s `prompt is too long` wording, doesn’t fire| Run `/compact` to recover the session. To prevent it, set `CLAUDE_CODE_AUTO_COMPACT_WINDOW` to the gateway’s limit; the value is clamped to at least 100,000 tokens and at most the model’s context window, so a gateway limit below 100,000 can’t be matched and `/compact` remains the recovery there. Also set `CLAUDE_CODE_MAX_OUTPUT_TOKENS` below the gateway model’s output limit
+`400` errors stating a context or token limit in the gateway’s own words, such as `ContextWindowExceededError` or `prompt token count of N exceeds the limit of M`| The gateway enforces a smaller context than the model’s native window and rewrites the upstream error, so Claude Code doesn’t recognize it as a [too-long error](</docs/en/errors#prompt-is-too-long>) and doesn’t compact and retry automatically| Run `/compact` to recover the session. To prevent it, set `CLAUDE_CODE_AUTO_COMPACT_WINDOW` to the gateway’s limit; Claude Code clamps the value to at least 100,000 tokens and at most the model’s context window, so you can’t match a gateway limit below 100,000, and `/compact` remains the recovery there. Also set `CLAUDE_CODE_MAX_OUTPUT_TOKENS` below the gateway model’s output limit
Models missing from the `/model` picker| Gateway model names aren’t in Claude Code’s built-in list| Enable gateway model discovery or add names with the [model configuration](</docs/en/model-config>) variables
`/fast` reports `Fast mode unavailable due to network connectivity issues` while inference requests work| The [fast mode](</docs/en/fast-mode>) availability check goes directly to `api.anthropic.com` and doesn’t follow `ANTHROPIC_BASE_URL`, so blocked direct egress fails the check. The same message appears on an open network when the check presents a gateway-issued key from `ANTHROPIC_API_KEY` or an `apiKeyHelper` and Anthropic rejects it| Allowlist `api.anthropic.com` if egress is blocked, or set a skip variable; for a rejected gateway key only the skip variables help. See [use fast mode behind proxies and LLM gateways](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>)
`/fast` reports `Fast mode has been disabled by your organization` in a session authenticated with `ANTHROPIC_AUTH_TOKEN`, even though the organization has fast mode enabled| The availability check requires a claude.ai login or an Anthropic API key; with only a bearer token, Claude Code treats fast mode as disabled without sending the check| Set `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK=1`; see [use fast mode behind proxies and LLM gateways](</docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways>)
--- a/llm-gateway-protocol.md
+++ b/llm-gateway-protocol.md
@@ -24,7 +24,7 @@
API formats
-A gateway must expose at least one of the following API formats to Claude Code clients. Which format Claude Code speaks is determined by the client’s configuration: the variable in the Selected by column of the table below points Claude Code at your gateway in that format. Google Cloud’s Agent Platform is Google Cloud’s Claude endpoint, formerly Vertex AI; its variable names keep the `VERTEX` spelling.
+A gateway must expose at least one of the following API formats to Claude Code clients. A client picks a format and points Claude Code at your gateway with the variables in the Selected by column of the table below. Google Cloud’s Agent Platform is Google Cloud’s Claude endpoint, formerly Vertex AI; its variable names keep the `VERTEX` spelling.
Format| Selected by| Endpoints| Forward unchanged
---|---|---|---
@@ -143,7 +143,7 @@
Automatic retry and error forwarding
-Claude Code retries automatically after some upstream rejections and disables the rejected capability for the rest of the conversation. Rejections of the `thinking` field, of [thinking signatures](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>), and of mid-conversation system messages all recover this way. Context management and tool schema field rejections don’t retry; those `400` errors reach the developer. The retry logic matches on the upstream’s error wording, so forward error response bodies unmodified. A gateway that wraps upstream errors in its own envelope breaks the recovery path even when it preserves the status code.
+Claude Code retries automatically after some upstream rejections and disables the rejected capability for the rest of the conversation. Rejections of the `thinking` field, of [thinking signatures](<https://platform.claude.com/docs/en/build-with-claude/extended-thinking>), and of mid-conversation system messages all recover this way. Context management and tool schema field rejections don’t retry; those `400` errors reach the developer. The retry logic matches on the upstream’s error wording, so forward error response bodies unmodified. A gateway that wraps upstream errors in its own envelope breaks the recovery path, even when it preserves the status code, unless the envelope’s message carries a stable `capability_rejected:` token. [Claude apps gateway substitutes those tokens for cloud providers’ error wording](</docs/en/claude-apps-gateway-config#upstream-error-messages>), for example `capability_rejected: prompt_too_long`.
###
@@ -151,7 +151,7 @@
Disable pre-release capabilities
-`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` stops Claude Code from sending pre-release capabilities and their body fields on every provider, including context management and the beta tool fields. The variable doesn’t affect adaptive reasoning, which is selected by model rather than by beta. It never suppresses the OAuth capability that subscription authentication requires. On Claude Code v2.1.227 or later, your organization can keep [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) on under this variable through [managed settings](</docs/en/settings#settings-files>). What Claude Code sends with that override in place depends on how you connect:
+`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` stops Claude Code from sending pre-release capabilities and their body fields on every provider, including context management and the beta tool fields. The variable doesn’t affect adaptive reasoning, which is selected by model rather than by beta. It never suppresses the OAuth capability that subscription authentication requires. On Claude Code v2.1.227 or later, your organization can keep [MCP tool search](</docs/en/mcp#scale-with-mcp-tool-search>) on under this variable through [managed settings](</docs/en/managed-settings>). What Claude Code sends with that override in place depends on how you connect:
* On a direct connection, or through a gateway set with `ANTHROPIC_BASE_URL`, Claude Code keeps sending the tool-search beta header, `defer_loading` tool fields, and `tool_reference` blocks, and strips the rest
* On a cloud provider, or signed in through a [Claude apps gateway](</docs/en/claude-apps-gateway>), the override has no effect
@@ -206,7 +206,7 @@
Picker entries and caching
-The picker is the interactive model list that opens when a developer runs `/model` in Claude Code. Each discovered entry is labeled “From gateway” and uses `display_name` when provided. The [`availableModels` managed setting](</docs/en/settings#available-settings>) bounds what discovery can add. A discovered ID is skipped when it exactly matches a row already in the picker, or when both the discovered and existing IDs resolve to [Fable](</docs/en/model-config#work-with-fable-5>). A discovered explicit ID is also folded into a built-in entry when both resolve to the same model. Built-in rows are keyed on aliases such as `sonnet`, so a discovered explicit ID of the model the alias currently resolves to, such as `claude-sonnet-5`, collapses into the `sonnet` row, while an ID the alias doesn’t resolve to, such as `claude-sonnet-4-6`, still adds its own “From gateway” row alongside the built-in entry. Before v2.1.197, Claude Code didn’t fold explicit IDs into built-in entries, so a discovered ID such as `claude-sonnet-5` added its own “From gateway” row alongside the `sonnet` row. Results are cached to `~/.claude/cache/gateway-models.json`, or `%USERPROFILE%\.claude\cache\gateway-models.json` on Windows, and refreshed on each startup. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), the cache lives under that directory instead. If the request fails or the gateway doesn’t implement `/v1/models`, the picker falls back to the cached list from the previous startup or to the built-in model list. If your gateway serves Claude models under aliases that don’t match the discovery filter, developers can add those aliases manually with the [model configuration](</docs/en/model-config>) variables.
+The picker is the interactive model list that opens when a developer runs `/model` in Claude Code. Each discovered entry is labeled “From gateway” and uses `display_name` when provided. The [`availableModels` managed setting](</docs/en/settings-reference#availablemodels>) bounds what discovery can add. A discovered ID is skipped when it exactly matches a row already in the picker, or when both the discovered and existing IDs resolve to [Fable](</docs/en/model-config#work-with-fable-5>). A discovered explicit ID is also folded into a built-in entry when both resolve to the same model. Built-in rows are keyed on aliases such as `sonnet`, so a discovered explicit ID of the model the alias currently resolves to, such as `claude-sonnet-5`, collapses into the `sonnet` row, while an ID the alias doesn’t resolve to, such as `claude-sonnet-4-6`, still adds its own “From gateway” row alongside the built-in entry. Before v2.1.197, Claude Code didn’t fold explicit IDs into built-in entries, so a discovered ID such as `claude-sonnet-5` added its own “From gateway” row alongside the `sonnet` row. Results are cached to `~/.claude/cache/gateway-models.json`, or `%USERPROFILE%\.claude\cache\gateway-models.json` on Windows, and refreshed on each startup. If you set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>), the cache lives under that directory instead. If the request fails or the gateway doesn’t implement `/v1/models`, the picker falls back to the cached list from the previous startup or to the built-in model list. If your gateway serves Claude models under aliases that don’t match the discovery filter, developers can add those aliases manually with the [model configuration](</docs/en/model-config>) variables.
##
--- a/llm-gateway-rollout.md
+++ b/llm-gateway-rollout.md
@@ -30,7 +30,7 @@
* **Stream responses** : pass server-sent events through as they arrive, including keep-alive pings, instead of buffering the whole response; [streaming](</docs/en/llm-gateway-protocol#streaming>) covers what buffering or stripped pings break
* **Route Claude model names** : map each name developers use to an upstream model. Claude Code sends a model name such as `claude-sonnet-4-6` in each request; in most gateway products the mapping is a model list or routing table in the gateway’s own configuration
* **Forward headers and body unchanged** : pass `anthropic-beta`, `anthropic-version`, and the request body through in both directions; the [feature pass-through table](</docs/en/llm-gateway-protocol#feature-pass-through>) maps each to the feature that breaks without it
- * **Return upstream errors unmodified** : Claude Code’s automatic recovery matches on error wording, so wrapping errors in the gateway’s own envelope breaks it
+ * **Return upstream errors unmodified** : Claude Code’s automatic recovery matches on error wording, so wrapping errors in the gateway’s own envelope breaks it, unless the envelope’s message carries one of the `capability_rejected:` tokens a [Claude apps gateway substitutes for cloud providers’ error wording](</docs/en/claude-apps-gateway-config#upstream-error-messages>)
* **Exempt the path from request-body WAF inspection** : Claude Code prompts carry source code and XML-style tags that match cross-site-scripting body rules; a WAF in front of the gateway returns `403` on real sessions while short test requests pass
Optionally, serve `GET /v1/models` so Claude Code can populate the model picker from your gateway with [model discovery](</docs/en/llm-gateway-protocol#model-discovery>).
@@ -147,7 +147,7 @@
Distribute the configuration
-Every developer machine needs the gateway address and a credential. You can distribute them centrally through [managed settings](</docs/en/settings#settings-files>), so developers configure nothing, or hand developers the values to set themselves.
+Every developer machine needs the gateway address and a credential. You can distribute them centrally through [managed settings](</docs/en/managed-settings#delivery-mechanisms>), so developers configure nothing, or hand developers the values to set themselves.
####
@@ -174,7 +174,7 @@
Distribute through managed settings
-Deliver the variables through the `env` block of a [managed settings file](</docs/en/settings#settings-files>), pushed by MDM, registry policy, or configuration management:
+Deliver the variables through the `env` block of a [managed settings file](</docs/en/managed-settings#delivery-mechanisms>), pushed by MDM, registry policy, or configuration management:
{
"env": {
@@ -187,7 +187,7 @@
* The desktop app reads gateway routing from its third-party inference configuration, not from managed settings; deploy that file through MDM alongside managed settings so desktop sessions route through the gateway too. See the [desktop third-party configuration docs](<https://claude.com/docs/third-party/claude-desktop/configuration>) and the [desktop gateway docs](<https://claude.com/docs/third-party/claude-desktop/gateway>)
* CI runners need `ANTHROPIC_BASE_URL` and the credential set in the [runner’s environment](</docs/en/llm-gateway-connect#configure-each-surface>)
- * WSL on managed Windows machines reads the Windows managed settings only when [`wslInheritsWindowsSettings`](</docs/en/settings#available-settings>) is `true`
+ * WSL on managed Windows machines reads the Windows managed settings only when [`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>) is `true`
####
@@ -261,5 +261,6 @@
* [Connect Claude Code to an LLM gateway](</docs/en/llm-gateway-connect>): the developer-facing setup steps, with per-surface configuration and a troubleshooting table you can hand to developers
* [Gateway protocol reference](</docs/en/llm-gateway-protocol>): the wire contract for gateway operators, covering endpoints, headers to forward, and the feature pass-through table
- * [Settings files and precedence](</docs/en/settings#settings-files>): how managed, project, and user settings combine, and where the managed file goes on each platform
+ * [Which value Claude Code uses](</docs/en/settings#which-value-claude-code-uses>): how managed, project, and user settings combine
+ * [Delivery mechanisms](</docs/en/managed-settings#delivery-mechanisms>): where the managed file goes on each platform
* [Set up Claude Code for your organization](</docs/en/admin-setup>): the wider rollout this gateway is one part of, including policy enforcement, usage visibility, and data handling
--- a/managed-mcp.md
+++ b/managed-mcp.md
@@ -21,7 +21,7 @@
**Disable MCP**| No servers load, apart from the VS Code extension’s own in-process server| `managed-mcp.json` with an empty server map
**Fixed deployment**| Every user gets the same servers and can’t add others| `managed-mcp.json` with the servers you want
**Approved catalog**| Publish a list of approved servers; users add the ones they want, anything else is blocked| `allowedMcpServers` \+ `allowManagedMcpServersOnly: true`
-**Plugin servers only**| Servers can only come from plugins; users can’t add their own| [`strictPluginOnlyCustomization`](</docs/en/settings#strictpluginonlycustomization>) with `mcp` in the list
+**Plugin servers only**| Servers can only come from plugins; users can’t add their own| [`strictPluginOnlyCustomization`](</docs/en/settings-reference#strictpluginonlycustomization>) with `mcp` in the list
**Soft allowlist**| Enforce an allowlist that users can broaden in their own settings| `allowedMcpServers` without `allowManagedMcpServersOnly`
**Denylist only**| Block known-bad servers, allow everything else| `deniedMcpServers`
**No restrictions**| Users add anything| Don’t deploy any managed MCP configuration
@@ -151,7 +151,7 @@
`allowedMcpServers`| All servers allowed| No servers allowed| Only matching servers allowed
`deniedMcpServers`| No servers blocked| No servers blocked| Matching servers blocked
-See [Invalid entries in managed settings](</docs/en/settings#invalid-entries-in-managed-settings>) for what happens when an entry fails schema validation.
+See [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) for what happens when an entry fails schema validation.
A `serverName` entry, in either list, is not a security control. The name is the label a user assigns when running `claude mcp add` or editing a config file, not the underlying server, so a user can call any server `github`. For claude.ai connectors the name is the display name returned by claude.ai, which can change. To enforce which servers actually run, add `serverCommand` or `serverUrl` entries.
@@ -372,7 +372,7 @@
Surface| What it controls| Where it lives| How to deliver
---|---|---|---
`managed-mcp.json`| Fixed server set, exclusive control| System path: `/Library/Application Support/ClaudeCode/`, `/etc/claude-code/`, or `C:\Program Files\ClaudeCode\`| MDM, GPO, fleet management, or any process with administrator privileges. Cannot be set through server-managed settings
-`allowedMcpServers`| Allowlist of permitted servers| Any [settings file](</docs/en/settings#settings-files>); entries from every source merge unless `allowManagedMcpServersOnly` is set| For enforcement, a [managed settings source](</docs/en/admin-setup#decide-how-settings-reach-devices>): server-managed settings, `managed-settings.json`, MDM profile, or registry
+`allowedMcpServers`| Allowlist of permitted servers| Any [settings file](</docs/en/settings#where-settings-live>); entries from every source merge unless `allowManagedMcpServersOnly` is set| For enforcement, a [managed settings source](</docs/en/admin-setup#decide-how-settings-reach-devices>): server-managed settings, `managed-settings.json`, MDM profile, or registry
`deniedMcpServers`| Denylist of blocked servers| Any settings file; entries from every source merge| Same as `allowedMcpServers`
`allowManagedMcpServersOnly`| Locks the allowlist to managed sources only| Managed settings sources only; the setting has no effect elsewhere| Same as `allowedMcpServers`
`allowAllClaudeAiMcps`| Loads the claude.ai connectors Claude Code fetches itself alongside `managed-mcp.json`. Connectors delivered to cloud sessions stay suppressed| Managed settings sources only; the setting has no effect elsewhere| Same as `allowedMcpServers`
Show diff (294 lines)
--- a/managed-settings.md
+++ b/managed-settings.md
@@ -0,0 +1,291 @@
+Managed settings are the settings your organization deploys to every developer’s machine. Claude Code applies them above every other level, so no user, project, local, or `--settings` value overrides them, apart from a few [security-sensitive exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>) where a stricter value from a lower level still counts. This page is for the administrator who deploys managed settings or debugs why one isn’t applying. To decide what to enforce, start with the [Decide what to enforce](</docs/en/admin-setup#decide-what-to-enforce>) table. For the claude.ai console path, see [Server-managed settings](</docs/en/server-managed-settings>). For which file a developer’s own values go in, see [Settings](</docs/en/settings>).
+
+##
+
+
+
+Deploy a managed settings file
+
+This is the quickest way to put a policy on each machine: a `managed-settings.json` file. If you haven’t picked how to deliver managed settings yet, or your devices are under MDM or developers run cloud sessions, read Choose a delivery mechanism first.
+
+1
+
+Write managed-settings.json
+
+Write a `managed-settings.json` that holds the keys you’ve decided to enforce, in the same JSON shape as `settings.json`. The [Decide what to enforce](</docs/en/admin-setup#decide-what-to-enforce>) table lists the keys behind each control, and each entry in the [settings reference](</docs/en/settings-reference>) says whether a managed source can set it. This file blocks two file reads, turns off bypass mode, and makes Claude Code ignore permission rules from user, project, and local files and from `--allowedTools`:
+
+managed-settings.json
+
+ {
+ "permissions": {
+ "deny": [
+ "Read(./.env)",
+ "Read(./secrets/**)"
+ ],
+ "disableBypassPermissionsMode": "disable"
+ },
+ "allowManagedPermissionRulesOnly": true
+ }
+
+For a fuller example that shows the shape of more managed keys, including the login method, models, MCP servers, and marketplaces, see [An organization’s managed settings](</docs/en/settings-example#an-organizations-managed-settings>).
+
+2
+
+Place the file on each machine
+
+Save the file as `managed-settings.json` in the system directory for the operating system, using whatever tooling already places files on your fleet:
+
+ * **macOS** : `/Library/Application Support/ClaudeCode/managed-settings.json`
+ * **Linux and WSL** : `/etc/claude-code/managed-settings.json`
+ * **Windows** : `C:\Program Files\ClaudeCode\managed-settings.json`
+
+3
+
+Confirm the policy applied
+
+On one machine, run `/status` inside Claude Code. The `Setting sources` line shows `Enterprise managed settings (file)`. Roll out to the rest of the fleet after that; Check that a policy is in force covers what to look at when the line is missing.
+
+##
+
+
+
+Choose a delivery mechanism
+
+The file in the steps above is one of four ways to get managed settings onto a machine. Every mechanism carries the same policy keys as a `settings.json` file, so the [settings reference](</docs/en/settings-reference>) applies to all of them. A few keys are tied to particular sources, and each entry’s Scope line says which:
+
+ * **Delivery controls** : [`policyHelper`](</docs/en/settings-reference#policyhelper>) and [`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>)
+ * **Gateway login keys** : [`forceLoginGatewayUrl`](</docs/en/settings-reference#forcelogingatewayurl>) and the `"gateway"` value of [`forceLoginMethod`](</docs/en/settings-reference#forceloginmethod>)
+
+A managed settings file, an MDM profile, or the claude.ai console applies one policy to everyone it reaches. To give one group of developers a different policy, deploy a different file or profile to that group; the claude.ai console [can’t target a group yet](</docs/en/server-managed-settings#current-limitations>), while a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) delivers managed settings per IdP group. When more than one mechanism delivers a policy to the same machine, Claude Code uses one and ignores the others; Which managed source Claude Code uses gives the order. The MDM and file rows are together called endpoint-managed settings, because the policy is stored on the developer’s device, as opposed to the server-managed row, where Claude Code fetches it. Pick a mechanism by how you already manage devices, using the table below.
+
+Mechanism| How you deliver it| When Claude Code reads it| Use it when
+---|---|---|---
+[Server-managed settings](</docs/en/server-managed-settings>)| In the claude.ai admin console, or on a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>)| Fetched at startup and polled hourly; see changes that need approval| You want one place to change policy for a claude.ai organization without touching each machine
+MDM or OS-level policy| As a macOS configuration profile or a Windows `HKLM` registry value, through Jamf, Intune, Group Policy, or a similar tool; see where each mechanism stores the policy| Read at startup and checked for changes every 30 minutes| You already manage devices with MDM or Group Policy
+File-based| As `managed-settings.json` in a system directory on each machine; see where each mechanism stores the policy| Read at startup and reloaded when a file changes| Machines without MDM, Linux hosts, or images you build yourself
+HKCU registry, Windows and WSL| As a Windows `HKCU` registry value; see where each mechanism stores the policy| Read at startup and checked for changes every 30 minutes; Claude Code uses it only when no other managed source delivers a policy key and no host-supplied parent settings supply a restrictive key| You can’t write the machine-level `HKLM` key
+
+Starter templates for Jamf, Iru, Intune, and Group Policy are in the [MDM examples repository](<https://github.com/anthropics/claude-code/tree/main/examples/mdm>). For managed MCP servers, which you deploy alongside any of these through `managed-mcp.json`, see [Managed MCP configuration](</docs/en/managed-mcp>).
+
+###
+
+
+
+Where and when a policy applies
+
+A deployed policy reaches the developer’s sessions as follows:
+
+ * **Surfaces** : every surface that runs Claude Code on the machine reads these sources: the terminal, the VS Code and JetBrains extensions, the desktop app, and [Agent SDK](</docs/en/agent-sdk/typescript>) sessions, which load managed settings even when `settingSources` excludes the user, project, and local files.
+ * **Cloud sessions** : a session in an Anthropic-hosted environment doesn’t read a device’s MDM profile or file, so policy for it has to come from server-managed settings. A session in a [self-hosted environment](</docs/en/self-hosted-environments>) reads the managed settings file in its runner image only when server-managed settings deliver no keys.
+ * **Running sessions** : a session picks up most changes on the schedule in the table without a restart. Claude Code reads [`forceRemoteSettingsRefresh`](</docs/en/settings-reference#forceremotesettingsrefresh>) and [`requiredMinimumVersion`](</docs/en/settings-reference#requiredminimumversion>) only at session start, arms a new or changed [`policyHelper`](</docs/en/settings-reference#policyhelper>) entry at the next launch, and reads [some user-editable keys once at session start](</docs/en/settings#when-edits-take-effect>).
+ * **Changes that need approval** : a server-managed change to a setting that [needs approval](</docs/en/server-managed-settings#security-approval-dialogs>), such as a hook or an `env` variable, waits for the developer to accept the dialog in an interactive session, and applies for the current run in a session an IDE extension or the Agent SDK hosts. Other server-managed changes apply on the next poll.
+ * **Long-lived sessions** : a session left open for weeks can still lag a rollout. [`requiredMinimumVersion`](</docs/en/settings-reference#requiredminimumversion>) blocks an outdated binary from starting and doesn’t end a session that’s already running.
+
+###
+
+
+
+Where each mechanism stores the policy
+
+The keys are the same everywhere, but each mechanism stores them in a different place and shape:
+
+ * **Server-managed** : Anthropic’s servers, or your gateway, hold the policy. Claude Code keeps a local cache that it applies at startup and [replaces on each successful fetch](</docs/en/server-managed-settings#security-considerations>).
+ * **macOS configuration profile** : the `com.anthropic.claudecode` managed preferences domain. Use the same top-level keys as `managed-settings.json`, with nested settings as dictionaries and lists as plist arrays.
+ * **Windows HKLM registry** : the JSON as a `REG_SZ` or `REG_EXPAND_SZ` value named `Settings` under `HKLM\SOFTWARE\Policies\ClaudeCode`.
+ * **File-based** : `managed-settings.json`, an optional `managed-settings.d/` directory, and `managed-mcp.json` in the system directory: `/Library/Application Support/ClaudeCode/` on macOS, `/etc/claude-code/` on Linux and WSL, and `C:\Program Files\ClaudeCode\` on Windows. Claude Code doesn’t read the legacy Windows path `C:\ProgramData\ClaudeCode\managed-settings.json`.
+ * **Windows HKCU registry** : the same `Settings` value under `HKCU\SOFTWARE\Policies\ClaudeCode`.
+
+###
+
+
+
+Split a file-based policy across teams
+
+If several teams own parts of one policy, put each part in its own file in `managed-settings.d/`, next to `managed-settings.json` in the same system directory, instead of editing one shared file. Claude Code merges `managed-settings.json` first, then every `*.json` file in the directory in alphabetical order. Name the files with numeric prefixes to control the order, such as `10-telemetry.json` and `20-security.json`. Claude Code ignores hidden files and files that don’t end in `.json`. When two files set the same key, Claude Code combines them by these rules:
+
+ * **Single values** , such as `"model": "opus"` or `"cleanupPeriodDays": 7`: the later file’s value replaces the earlier one
+ * **Lists** , such as `permissions.deny` or `sandbox.network.allowedDomains`: the two lists combine, with duplicates removed
+ * **Nested blocks** , such as `env` or `sandbox`: the two blocks merge key by key, and each key inside follows these same rules
+ * **`fallbackModel`** : the later chain replaces the earlier one whole
+ * **[`extraKnownMarketplaces`](</docs/en/settings-reference#extraknownmarketplaces>)** : a later entry with the same name replaces the earlier one whole
+
+##
+
+
+
+Which managed source Claude Code uses
+
+When your organization delivers more than one managed source, Claude Code uses the first of these sources that delivers at least one policy key and ignores the rest rather than merging them, apart from the few cross-source keys covered in Keys read from every admin source. Claude Code shows no warning for the sources it skips. To see which source it used, run `/status`. Two terms recur in this section:
+
+ * **Policy key** : any settings key other than the control key [`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>). A managed settings file or MDM policy that contains only that key doesn’t count, and Claude Code moves on to the next source.
+ * **Admin source** : one of the first three sources below. The HKCU registry is user-writable and isn’t one.
+
+Claude Code checks the sources in this order, highest priority first:
+
+ 1. Remote settings, delivered from claude.ai as [server-managed settings](</docs/en/server-managed-settings>) or by a [Claude apps gateway](</docs/en/claude-apps-gateway>). Claude Code fetches this source only when the session authenticates to Anthropic’s API directly with an [eligible login or key](</docs/en/server-managed-settings#platform-availability>), or signs in to a gateway with `/login`. On other providers, or when `ANTHROPIC_BASE_URL` points somewhere other than Anthropic’s API, it starts at the next source
+ 2. MDM or OS-level policies: the macOS plist or the HKLM registry key
+ 3. Managed settings files, `managed-settings.d/*.json` and `managed-settings.json` merged together
+ 4. The HKCU registry, on Windows, and on WSL once the HKLM registry or the Windows managed settings file turns [`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>) on and the HKCU value also sets it. Claude Code reads it only when no source above it delivers a policy key and no host-supplied parent settings supply a restrictive key
+
+This diagram shows the ranking, with examples of the cross-source keys Claude Code reads from the first three sources:
+
+###
+
+
+
+Keys read from every admin source
+
+For most keys, Claude Code reads only the source it selected. A value in a lower-ranked source is ignored even when the selected source leaves that key unset. A few keys work differently. Claude Code reads them from every admin source, so a lower-ranked MDM policy or managed settings file can still set them when the selected source doesn’t. Claude Code leaves the user-writable HKCU registry out of that scan; when HKCU is the only source and no host supplies parent settings, HKCU applies like any selected source. The cross-source keys include:
+
+ * `sandbox.network.allowManagedDomainsOnly` and `sandbox.filesystem.allowManagedReadPathsOnly`: a `true` in any admin source turns the lock on. While a lock is on, Claude Code unions the allowlist it locks, `sandbox.network.allowedDomains` together with `WebFetch(domain:...)` allow rules, or `sandbox.filesystem.allowRead`, across every admin source. Without the lock, an unselected admin source’s allowlist is ignored like any other key from an unselected source
+ * `allowAllClaudeAiMcps`
+ * The sandbox binary paths `sandbox.bwrapPath` and `sandbox.socatPath`
+ * The sandbox `ripgrep` binary, [`sandbox.ripgrep`](</docs/en/settings-reference#sandbox-ripgrep>)
+ * `sandbox.filesystem.disabled` and `sandbox.network.strictAllowlist`
+ * [`useAutoModeDuringPlan`](</docs/en/settings-reference#useautomodeduringplan>) and [`syncClaudeAiSkills`](</docs/en/settings-reference#syncclaudeaiskills>), where a `false` from any admin source turns the behavior off. A `false` in the developer’s user or local settings turns it off too; each key can only deny
+ * A commit-trailer opt-out in `attribution`, or in the deprecated `includeCoAuthoredBy`, from any tier
+ * [`forceRemoteSettingsRefresh`](</docs/en/server-managed-settings>)
+ * `env`, merged per variable across the admin sources: each variable comes from the highest-priority source that defines it, so lower sources fill in variables the higher ones leave unset. A few variables follow their own rules; [Per-key exceptions across managed sources](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>) names each one. Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applied the selected source’s whole `env` block only
+
+###
+
+
+
+Compute the policy with a helper program
+
+A [`policyHelper`](</docs/en/settings-reference#policyhelper>) is an executable your MDM policy or managed settings file names, and Claude Code runs it to compute managed settings at startup. When the selected source configures one and the helper emits a `managedSettings` object, that output changes what Claude Code reads:
+
+ * **The emitted`managedSettings` object is the only managed settings for the session**, including for the keys it otherwise reads from every admin source, apart from `forceRemoteSettingsRefresh`, which Claude Code checks in every admin source at startup before the helper runs. A helper that exits 0 without emitting one contributes nothing, and the sources apply as usual; a helper that fails stops Claude Code from starting, as the [`policyHelper`](</docs/en/settings-reference#policyhelper>) entry describes
+
+Claude Code selects the source at startup, and that selection decides whether a helper runs. The [`policyHelper`](</docs/en/settings-reference#policyhelper>) entry says which sources can configure a helper.
+
+###
+
+
+
+Let an embedding host add policy
+
+When another application launches Claude Code, such as Claude Desktop, an IDE extension, or an Agent SDK app, that host can pass its own managed settings through the SDK `managedSettings` option. Claude Code calls these parent settings. By default, Claude Code ignores parent settings whenever an admin source is present: server-managed settings, an MDM or OS-level policy, or a managed settings file. To have Claude Code merge parent settings alongside an admin source, set [`parentSettingsBehavior`](</docs/en/settings-reference#parentsettingsbehavior>) to `"merge"` in the highest-priority managed source; Claude Code reads the key from that source only. Claude Code then keeps only the host’s values that restrict what Claude can do, with one gap to know about: unless you also set the `allowManaged*Only` locks, the host’s permission allow rules and sandbox allowlists still apply. See [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) for the locks. A [`policyHelper`](</docs/en/settings-reference#policyhelper>) can turn parent merging off regardless of this key; its entry says when. Claude Code also applies these checks to parent-supplied values on their own:
+
+ * When any admin source sets `allowManagedPermissionRulesOnly`, Claude Code drops [parent-supplied](</docs/en/claude-apps-gateway#restrict-parent-settings>) permission allow rules and `additionalDirectories` as it reads them, even when a higher-priority source leaves the key unset. The key’s effect on your own permission rules still comes only from the selected source, or from parent settings you’ve chosen to merge
+ * A `forceLoginOrgUUID` or `allowedMcpServers` value in the highest-priority admin source blocks a parent-supplied one, and Claude Code enforces the admin value. A value in an admin source that isn’t the highest-priority one neither applies nor blocks the parent’s. Before v2.1.223, a value in any admin source blocked the parent’s
+ * An `availableModels` value follows the same rule as `forceLoginOrgUUID` and `allowedMcpServers`
+
+###
+
+
+
+What a developer can change
+
+A developer’s own settings files, `--settings` values, and project files never override a managed value; the [exceptions](</docs/en/settings#exceptions-to-managed-settings-precedence>) only let a stricter lower-level value count. Four things sit outside that rule:
+
+ * **The model for a session** : a managed `model` is a default, not a lock. `--model` and `ANTHROPIC_MODEL` still pick the model for that session, so deploy [`availableModels`](</docs/en/settings-reference#availablemodels>) to restrict the choice.
+ * **Local admin rights** : a developer who is an administrator on the machine can edit the managed source itself, which is why MDM tooling can redeploy the profile or file on a schedule and why the HKLM registry and the macOS managed preferences domain exist.
+ * **The server-managed cache** : server-managed settings come from Anthropic’s servers, and an edit to the local cache [lasts only until the next successful fetch](</docs/en/server-managed-settings#security-considerations>).
+ * **Other tools** : managed settings bind Claude Code only. A developer who calls the API from another tool isn’t under them.
+
+##
+
+
+
+Check that a policy is in force
+
+A developer reports that a policy isn’t applying, or you want to confirm a rollout landed before pushing it to the fleet. Two commands on that machine answer it: `/status` shows which managed source Claude Code selected, and `claude doctor` lists what it dropped.
+
+###
+
+
+
+Read the source in /status
+
+On the developer’s machine, run `/status` inside Claude Code and read the `Setting sources` line. When a managed source is in effect, the line lists `Enterprise managed settings` with the source Claude Code selected in parentheses:
+
+ * `(remote)`: server-managed settings from claude.ai or a gateway
+ * `(plist)` or `(HKLM)`: an MDM or OS policy
+ * `(file)`, `(drop-ins)`, or `(file + drop-ins)`: `managed-settings.json`, the drop-in directory, or both
+ * `(HKCU)`: the user-writable registry fallback
+ * `(parent process)`: an embedding host supplied restrictive settings
+ * `(helper)`: a [`policyHelper`](</docs/en/settings-reference#policyhelper>) configured by the selected MDM or file source
+
+When the policy isn’t applying, the line tells you which of two problems you have:
+
+ * **The line is missing** : Claude Code found no managed source that delivers a policy key. Check that the file sits at the path for the OS, that it’s valid JSON, and that it contains a key other than `wslInheritsWindowsSettings`.
+ * **The line names a source other than the one you deployed** : a higher-priority source is present and Claude Code ignored yours. Which managed source Claude Code uses gives the order.
+
+###
+
+
+
+Find entries Claude Code dropped
+
+When a managed settings file, MDM profile, registry value, or server-managed payload fails schema validation, Claude Code first skips the individual entries it can repair, such as one invalid permission rule, with a warning for each, then drops any top-level key whose value still fails and keeps enforcing every remaining valid key. Claude Code is stricter with the `managedSettings` a [`policyHelper`](</docs/en/settings-reference#policyhelper>) emits: it makes the same entry repairs, but any schema violation that survives fails the whole helper run, and at startup Claude Code refuses to start, the same as for a helper that exits non-zero. A managed settings file or drop-in file that isn’t valid JSON contributes no settings at all; Claude Code reports it with the other validation errors and reads the remaining sources as usual. To find a dropped entry, look in one of three places:
+
+ * Interactive sessions show a dialog at startup listing the invalid entries.
+ * Non-interactive runs with `-p` print a summary to stderr.
+ * [`claude doctor`](</docs/en/debug-your-config>) lists each invalid entry with its source and field.
+
+####
+
+
+
+Keys that fail closed
+
+A few enforcement keys aren’t dropped when invalid. Claude Code enforces a stricter fallback until the value is fixed; the table shows what it enforces for each key:
+
+Field| Behavior when present but invalid
+---|---
+`allowedMcpServers`| Enforced as an empty allowlist, so no MCP servers are admitted until the value is fixed. An individual invalid entry is stripped and the valid subset is enforced.
+`allowManagedHooksOnly`| Treated as `true` until fixed: the [hook restrictions](</docs/en/settings-reference#allowmanagedhooksonly>) apply and, unless `disableCommandPluginSources` is explicitly `false`, command-sourced plugins are disabled.
+`allowManagedMcpServersOnly`| Treated as `true`.
+`disableCommandPluginSources`| Treated as `true`, so command-sourced plugins stay disabled until the value is fixed.
+`availableModels`| Enforced as an empty allowlist until fixed, so only the Default model is available; a non-string entry is stripped and the valid subset enforced.
+`enforceAvailableModels`| Treated as `true`.
+`forceLoginOrgUUID`| No organization is permitted to log in until the value is fixed.
+`deniedMcpServers`| An individual invalid entry is stripped and the valid subset is enforced. A wholly invalid value is dropped with a warning, since denying every server would block servers the policy never named.
+`sandbox.credentials`| A recoverable invalid entry is degraded to `mode: "deny"` with a warning; an unrecoverable one is stripped; valid entries stay enforced. See [invalid credential entries](</docs/en/settings-reference#invalid-credential-entries-in-managed-settings>)
+
+`requiredMinimumVersion` and `requiredMaximumVersion` fail open by design: an invalid value is dropped rather than enforced, so a bad policy push can’t prevent Claude Code from starting. This tolerance applies only to managed settings. User, project, and local settings files remain strict: a file whose JSON or top-level shape fails validation is rejected as a whole and reported, and an individual entry that fails, such as a malformed permission rule, is skipped with a warning while the rest of the file applies.
+
+##
+
+
+
+Keys only a managed source can set
+
+Claude Code reads the following keys only from a managed source; placing them in user or project settings files has no effect. Most of them are locks: the value a lock governs, such as permission rules or `sandbox.network.allowedDomains`, is an ordinary key that any level can set, and the lock tells Claude Code to honor only the managed value. The table covers the permission, plugin, and delivery controls. For any key not listed here, the Scope column of the [settings reference](</docs/en/settings-reference#all-settings>) index says whether it’s managed-only; the remaining managed-only keys there include the gateway login URL, version, browser, mobile-simulator, SSH host, sandbox binary path, and CLAUDE.md controls.
+
+Setting| Description
+---|---
+[`allowAllClaudeAiMcps`](</docs/en/settings-reference#allowallclaudeaimcps>)| Load the claude.ai connectors alongside a deployed `managed-mcp.json` instead of suppressing them
+[`allowedChannelPlugins`](</docs/en/settings-reference#allowedchannelplugins>)| Allowlist of channel plugins that may push messages. Replaces the default Anthropic allowlist when set. Requires `channelsEnabled: true`. See [Restrict which channel plugins can run](</docs/en/channels#restrict-which-channel-plugins-can-run>)
+[`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>)| When `true`, restricts which hooks run; see [what runs under `allowManagedHooksOnly`](</docs/en/settings-reference#what-runs-under-allowmanagedhooksonly>) for the full effect list
+[`allowManagedMcpServersOnly`](</docs/en/settings-reference#allowmanagedmcpserversonly>)| When `true`, only `allowedMcpServers` from managed settings are respected. `deniedMcpServers` still merges from all sources. See [Managed MCP configuration](</docs/en/managed-mcp>)
+[`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>)| Only managed permission rules apply; the entry lists every source it ignores
+[`blockedMarketplaces`](</docs/en/settings-reference#blockedmarketplaces>)| Blocklist of marketplace sources. Blocked sources are checked before downloading, so they never touch the filesystem. See [managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)
+[`channelsEnabled`](</docs/en/settings-reference#channelsenabled>)| Allow [channels](</docs/en/channels>) for the organization. See [enterprise controls](</docs/en/channels#enterprise-controls>) for the default on each plan
+[`disableCommandPluginSources`](</docs/en/settings-reference#disablecommandpluginsources>)| When `true`, blocks [`command` plugin sources](</docs/en/plugin-marketplaces#command-sources>) entirely, so the marketplace-declared command never runs. When unset, follows `allowManagedHooksOnly`. Requires Claude Code v2.1.229 or later
+[`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>)| Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` flags at startup. In cloud sessions, Claude Code drops the MCP servers the server delivered through `--mcp-config`, other than in-process `type: "sdk"` entries, and starts the session. Requires Claude Code v2.1.193 or later
+[`forceRemoteSettingsRefresh`](</docs/en/settings-reference#forceremotesettingsrefresh>)| When `true`, blocks CLI startup until remote managed settings are freshly fetched and exits if the fetch fails. See [fail-closed enforcement](</docs/en/server-managed-settings#enforce-fail-closed-startup>)
+[`parentSettingsBehavior`](</docs/en/settings-reference#parentsettingsbehavior>)| Whether host-supplied parent settings merge under the managed policy
+[`pluginSuggestionMarketplaces`](</docs/en/settings-reference#pluginsuggestionmarketplaces>)| Marketplaces whose plugins Claude Code may suggest to users
+[`pluginTrustMessage`](</docs/en/settings-reference#plugintrustmessage>)| Custom message appended to the plugin trust warning shown before installation
+[`policyHelper`](</docs/en/settings-reference#policyhelper>)| Executable that computes managed settings at startup; see [Compute managed settings with a policy helper](</docs/en/settings-reference#policyhelper>)
+[`sandbox.filesystem.allowManagedReadPathsOnly`](</docs/en/settings-reference#sandbox-filesystem-allowmanagedreadpathsonly>)| When `true`, only `filesystem.allowRead` paths from managed settings are respected. `denyRead` still merges from all sources
+[`sandbox.network.allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>)| Honor only managed `allowedDomains` and `WebFetch(domain:...)` allow rules; block other domains without prompting
+[`strictKnownMarketplaces`](</docs/en/settings-reference#strictknownmarketplaces>)| Controls which plugin marketplace sources users can add and install plugins from. See [managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)
+[`strictPluginOnlyCustomization`](</docs/en/settings-reference#strictpluginonlycustomization>)| Block skills, agents, hooks, and MCP servers from user and project sources; `true` locks all four, an array names which
+[`wslInheritsWindowsSettings`](</docs/en/settings-reference#wslinheritswindowssettings>)| When set in the HKLM registry or a file under `C:\Program Files\ClaudeCode`, have WSL read the Windows policy chain, and read `/etc/claude-code` only when no managed settings file or drop-in under that directory delivers a policy key other than `wslInheritsWindowsSettings`; the entry gives the order
+
+On Team and Enterprise plans, an Owner enables or disables [Remote Control](</docs/en/remote-control>) and [web sessions](</docs/en/claude-code-on-the-web>) organization-wide in [Claude Code admin settings](<https://claude.ai/admin-settings/claude-code>). Remote Control can additionally be disabled per device with the [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>) setting. Web sessions have no per-device managed settings key.
+
+##
+
+
+
+See also
+
+ * [Set up Claude Code for your organization](</docs/en/admin-setup>): decide what to enforce and how
+ * [Server-managed settings](</docs/en/server-managed-settings>): deliver policy from the claude.ai console or a gateway
+ * [Managed MCP configuration](</docs/en/managed-mcp>): control which MCP servers developers can use
+ * [Settings reference](</docs/en/settings-reference>): every key, with whether a managed source can set it
+ * [Example settings files](</docs/en/settings-example#an-organizations-managed-settings>): a complete `managed-settings.json` showing the shape of the managed keys
Show diff (122 lines)
--- a/memory.md
+++ b/memory.md
@@ -24,7 +24,7 @@
**What it contains**| Instructions and rules| Learnings and patterns
**Scope**| Project, user, or org| Per repository, shared across worktrees
**Loaded into**| Every session| Every session (first 200 lines or 25KB)
-**Use for**| Coding standards, workflows, project architecture| Build commands, debugging insights, preferences Claude discovers
+**Use for**| Coding standards, workflows, project architecture| Your preferences, corrections you give Claude, project context Claude can’t derive from the code
Use CLAUDE.md files when you want to guide Claude’s behavior. Auto memory lets Claude learn from your corrections without manual effort. Subagents can also maintain their own auto memory. See [subagent configuration](</docs/en/sub-agents#enable-persistent-memory>) for details.
@@ -68,7 +68,7 @@
**Project instructions**| `./CLAUDE.md` or `./.claude/CLAUDE.md`| Team-shared instructions for the project| Project architecture, coding standards, common workflows| Team members via source control
**Local instructions**| `./CLAUDE.local.md`| Personal project-specific preferences; add to `.gitignore`| Your sandbox URLs, preferred test data| Just you (current project)
-CLAUDE.md and CLAUDE.local.md files in the directory hierarchy above the working directory are loaded in full at launch. Files in subdirectories load on demand when Claude reads files in those directories. See How CLAUDE.md files load for the full resolution order. For large projects, you can break instructions into topic-specific files using project rules. Rules let you scope instructions to specific file types or subdirectories.
+CLAUDE.md and CLAUDE.local.md files in the directory hierarchy above the working directory are loaded at launch. Files in subdirectories load on demand when Claude reads files in those directories. See How CLAUDE.md files load for the full resolution order. For large projects, you can break instructions into topic-specific files using project rules. Rules let you scope instructions to specific file types or subdirectories.
###
@@ -142,7 +142,7 @@
How CLAUDE.md files load
-Claude Code reads CLAUDE.md files by walking up the directory tree from your current working directory, checking each directory along the way for `CLAUDE.md` and `CLAUDE.local.md` files. This means if you run Claude Code in `foo/bar/`, it loads instructions from `foo/bar/CLAUDE.md`, `foo/CLAUDE.md`, and any `CLAUDE.local.md` files alongside them. All discovered files are concatenated into context rather than overriding each other. Across the directory tree, content is ordered from the filesystem root down to your working directory. For the `foo/bar/` example, `foo/CLAUDE.md` appears in context before `foo/bar/CLAUDE.md`, so instructions closer to where you launched Claude are read last. Within each directory, `CLAUDE.local.md` is appended after `CLAUDE.md`, so your personal notes are the last thing Claude reads at that level. Claude also discovers `CLAUDE.md` and `CLAUDE.local.md` files in subdirectories under your current working directory. Instead of loading them at launch, they are included when Claude reads files in those subdirectories. If you work in a large monorepo where other teams’ CLAUDE.md files get picked up, use `claudeMdExcludes` to skip them. For the full layout of root and per-directory CLAUDE.md files and rules, see [Monorepos and large repos](</docs/en/large-codebases>). Block-level HTML comments (`<!-- maintainer notes -->`) in CLAUDE.md files are stripped before the content is injected into Claude’s context. Use them to leave notes for human maintainers without spending context tokens on them. Comments inside code blocks are preserved. When you open a CLAUDE.md file directly with the Read tool, comments remain visible.
+Claude Code loads `CLAUDE.md` and `CLAUDE.local.md` from your current working directory and every directory above it. Run Claude Code in `foo/bar/` and it loads instructions from `foo/bar/CLAUDE.md`, `foo/CLAUDE.md`, and any `CLAUDE.local.md` files alongside them. All discovered files are concatenated into context rather than overriding each other. Across the directory tree, content is ordered from the filesystem root down to your working directory. For the `foo/bar/` example, `foo/CLAUDE.md` appears in context before `foo/bar/CLAUDE.md`, so instructions closer to where you launched Claude are read last. Within each directory, `CLAUDE.local.md` is appended after `CLAUDE.md`, so your personal notes are the last thing Claude reads at that level. Claude also discovers `CLAUDE.md` and `CLAUDE.local.md` files in subdirectories under your current working directory. Instead of loading them at launch, they are included when Claude reads files in those subdirectories. If you work in a large monorepo where other teams’ CLAUDE.md files get picked up, use `claudeMdExcludes` to skip them. For the full layout of root and per-directory CLAUDE.md files and rules, see [Monorepos and large repos](</docs/en/large-codebases>). Block-level HTML comments (`<!-- maintainer notes -->`) in CLAUDE.md files are stripped before the content is injected into Claude’s context. Use them to leave notes for human maintainers without spending context tokens on them. Comments inside code blocks are preserved. When you open a CLAUDE.md file directly with the Read tool, comments remain visible.
####
@@ -276,7 +276,7 @@
Deploy with your configuration management system
-Use MDM, Group Policy, Ansible, or similar tools to distribute the file across developer machines. See [managed settings](</docs/en/permissions#managed-settings>) for other organization-wide configuration options.
+Use MDM, Group Policy, Ansible, or similar tools to distribute the file across developer machines. See [managed settings](</docs/en/managed-settings>) for other organization-wide configuration options.
The `claudeMd` key lets you put managed CLAUDE.md content directly inside `managed-settings.json` instead of deploying a separate file. **Scope** : every Claude Code session on the machine, in every repository. For repository-specific guidance, commit a project CLAUDE.md instead. **Precedence** : same as a managed CLAUDE.md file. Loads before user and project CLAUDE.md. **Where it’s honored** : managed and policy settings only. Setting `claudeMd` in user, project, or local settings has no effect. The example below adds behavioral instructions directly in a managed settings file:
@@ -284,7 +284,7 @@
"claudeMd": "Always run `make lint` before committing.\nNever push directly to main."
}
-A managed CLAUDE.md and [managed settings](</docs/en/settings#settings-files>) serve different purposes. Use settings for technical enforcement and CLAUDE.md for behavioral guidance:
+A managed CLAUDE.md and [managed settings](</docs/en/managed-settings>) serve different purposes. Use settings for technical enforcement and CLAUDE.md for behavioral guidance:
Concern| Configure in
---|---
@@ -313,7 +313,7 @@
]
}
-Patterns are matched against absolute file paths using glob syntax. You can configure `claudeMdExcludes` at any [settings layer](</docs/en/settings#settings-files>): user, project, local, or managed policy. Arrays merge across layers. Managed policy CLAUDE.md files cannot be excluded. This ensures organization-wide instructions always apply regardless of individual settings.
+Patterns are matched against absolute file paths using glob syntax. You can configure `claudeMdExcludes` at any [settings layer](</docs/en/settings#where-settings-live>): user, project, local, or managed policy. Arrays merge across layers. Managed policy CLAUDE.md files cannot be excluded. This ensures organization-wide instructions always apply regardless of individual settings.
##
@@ -321,7 +321,14 @@
Auto memory
-Auto memory lets Claude accumulate knowledge across sessions without you writing anything. Claude saves notes for itself as it works: build commands, debugging insights, architecture notes, code style preferences, and workflow habits. Claude doesn’t save something every session. It decides what’s worth remembering based on whether the information would be useful in a future conversation.
+Auto memory lets Claude accumulate knowledge across sessions without you writing anything. As it works, Claude saves four kinds of notes for itself. Claude records the kind as a `type` field in the memory file’s frontmatter:
+
+ * `user`: your role, expertise, and working preferences
+ * `feedback`: corrections you give Claude and approaches you confirm
+ * `project`: ongoing work, deadlines, and decisions that Claude can’t derive from the code or git history
+ * `reference`: where to find information outside the project, such as an issue tracker or dashboard
+
+Claude skips anything it can derive from the codebase, such as architecture, file paths, or debugging fixes. It also skips anything your CLAUDE.md files already say. Claude doesn’t save something every session. It decides what’s worth remembering based on whether the information would be useful in a future conversation.
###
@@ -349,15 +356,15 @@
"autoMemoryDirectory": "~/my-custom-memory-dir"
}
-The value must be an absolute path or start with `~/`. When you set it in a project’s `.claude/settings.json` or `.claude/settings.local.json`, Claude Code honors it under the same [workspace trust rule as hooks in settings files](</docs/en/permissions#what-runs-before-you-trust-a-folder>). The directory contains a `MEMORY.md` entrypoint and optional topic files:
+The value must be an absolute path or start with `~/`. When you set it in a project’s `.claude/settings.json` or `.claude/settings.local.json`, Claude Code honors it under the same [workspace trust rule as hooks in settings files](</docs/en/permissions#what-runs-before-you-trust-a-folder>). The directory contains a `MEMORY.md` index and one topic file per memory:
~/.claude/projects/<project>/memory/
- ├── MEMORY.md # Concise index, loaded into every session
- ├── debugging.md # Detailed notes on debugging patterns
- ├── api-conventions.md # API design decisions
- └── ... # Any other topic files Claude creates
-
-`MEMORY.md` acts as an index of the memory directory. Claude reads and writes files in this directory throughout your session, using `MEMORY.md` to keep track of what’s stored where. Auto memory is machine-local. All worktrees and subdirectories within the same git repository share one auto memory directory. Files are not shared across machines or cloud environments. Claude Code deletes old session transcripts after the [`cleanupPeriodDays`](</docs/en/settings#available-settings>) retention period, but excludes the files in the memory directory from that [retention sweep](</docs/en/claude-directory#cleaned-up-automatically>). `MEMORY.md` and topic files stay until you or Claude edits or deletes them.
+ ├── MEMORY.md # Index, one line per memory, loaded into every session
+ ├── user_role.md # One memory
+ ├── feedback_testing.md # One memory
+ └── ... # Any other topic files Claude creates
+
+`MEMORY.md` acts as an index of the memory directory. Claude reads and writes files in this directory throughout your session, using `MEMORY.md` to keep track of what’s stored where. Auto memory is machine-local. All worktrees and subdirectories within the same git repository share one auto memory directory. Files are not shared across machines or cloud environments. Claude Code deletes old session transcripts after the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) retention period, but excludes the files in the memory directory from that [retention sweep](</docs/en/claude-directory#cleaned-up-automatically>). `MEMORY.md` and topic files stay until you or Claude edits or deletes them.
###
@@ -365,7 +372,7 @@
How it works
-The first 200 lines of `MEMORY.md`, or the first 25KB, whichever comes first, are loaded at the start of every conversation. Content beyond that threshold is not loaded at session start. Claude keeps `MEMORY.md` concise by moving detailed notes into separate topic files. After Claude writes to `MEMORY.md`, Claude Code measures the file against the 200-line and 25KB read limits. If the file is near a limit, Claude Code reminds Claude to shorten it: keep one line per entry, move detail into topic files, and merge or drop stale entries. If the file is over a limit, the write still succeeds, but Claude Code returns an [error telling Claude to rewrite the index](</docs/en/errors#memory-index-is-over-its-read-limit>), because everything past the limit is dropped on the next load. The check measures only the content that loads: YAML frontmatter and block-level HTML comments are stripped before the index is loaded, so they don’t count toward the limits. Before v2.1.211, Claude Code measured the raw file, and frontmatter or comments could trigger the error even when the loaded content fit. This limit applies only to `MEMORY.md`. CLAUDE.md files are loaded in full regardless of length, though shorter files produce better adherence. Topic files like `debugging.md` or `patterns.md` are not loaded at startup. Claude reads them on demand using its standard file tools when it needs the information. The main conversation’s auto memory isn’t loaded into [subagents](</docs/en/sub-agents#what-loads-at-startup>); the exception is a [fork](</docs/en/sub-agents#fork-the-current-conversation>), which inherits the parent conversation and system prompt. A subagent’s own auto memory, enabled with the subagent `memory` field, is a separate directory. Claude reads and writes memory files during your session. When you see messages like “Saved 2 memories” or “Recalled 2 memories” in the Claude Code interface, Claude is actively updating or reading from `~/.claude/projects/<project>/memory/`. When Claude writes a memory file that begins with YAML frontmatter, Claude Code records the write time in a `modified` frontmatter field as an ISO 8601 timestamp. The timestamp shows how current the fact is, both to you and to Claude when it reads the memory back. Any file that has frontmatter gets the field the next time Claude writes it, including files created on earlier versions; Claude Code never adds frontmatter to a file that has none. The `modified` field requires Claude Code v2.1.214 or later.
+The first 200 lines of `MEMORY.md`, or the first 25KB, whichever comes first, are loaded at the start of every conversation. Content beyond that threshold is not loaded at session start. Claude keeps `MEMORY.md` concise by moving detailed notes into separate topic files. After Claude writes to `MEMORY.md`, Claude Code measures the file against the 200-line and 25KB read limits. If the file is near a limit, Claude Code reminds Claude to shorten it: keep one line per entry, move detail into topic files, and merge or drop stale entries. If the file is over a limit, the write still succeeds, but Claude Code returns an [error telling Claude to rewrite the index](</docs/en/errors#memory-index-is-over-its-read-limit>), because everything past the limit is dropped on the next load. The check measures only the content that loads: YAML frontmatter and block-level HTML comments are stripped before the index is loaded, so they don’t count toward the limits. Before v2.1.211, Claude Code measured the raw file, and frontmatter or comments could trigger the error even when the loaded content fit. This limit applies only to `MEMORY.md`. Claude Code loads a CLAUDE.md file of up to 4 MiB in full and skips a larger file. Shorter files produce better adherence. Claude Code doesn’t load topic files such as `user_role.md` or `feedback_testing.md` at startup. Claude reads them on demand using its standard file tools when it needs the information. The main conversation’s auto memory isn’t loaded into [subagents](</docs/en/sub-agents#what-loads-at-startup>); the exception is a [fork](</docs/en/sub-agents#fork-the-current-conversation>), which inherits the parent conversation and system prompt. A subagent’s own auto memory, enabled with the subagent `memory` field, is a separate directory. Claude reads and writes memory files during your session. When you see messages like “Saved 2 memories” or “Recalled 2 memories” in the Claude Code interface, Claude is actively updating or reading from `~/.claude/projects/<project>/memory/`. When Claude writes a memory file that begins with YAML frontmatter, Claude Code records the write time in a `modified` frontmatter field as an ISO 8601 timestamp. The timestamp shows how current the fact is, both to you and to Claude when it reads the memory back. Any file that has frontmatter gets the field the next time Claude writes it, including files created on earlier versions; Claude Code never adds frontmatter to a file that has none. The `modified` field requires Claude Code v2.1.214 or later.
###
@@ -422,7 +429,7 @@
My CLAUDE.md is too large
-Files over 200 lines consume more context and may reduce adherence. Use path-scoped rules to load instructions only when Claude works with matching files, or trim content that isn’t needed in every session. Splitting into `@path` imports helps organization but doesn’t reduce context, since imported files load at launch. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can derive from the codebase, such as directory layouts, dependency lists, and architecture overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults. The trim check requires Claude Code v2.1.206 or later.
+Files over 200 lines consume more context and may reduce adherence. Claude Code skips a file over 4 MiB. Use path-scoped rules to load instructions only when Claude works with matching files, or trim content that isn’t needed in every session. Splitting into `@path` imports helps organization but doesn’t reduce context, since imported files load at launch. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes trims for a checked-in CLAUDE.md: it cuts content Claude can derive from the codebase, such as directory layouts, dependency lists, and architecture overviews, and keeps pitfalls, rationale, and conventions that differ from tool defaults. The trim check requires Claude Code v2.1.206 or later.
###
@@ -430,7 +437,7 @@
Instructions seem lost after `/compact`
-Project-root CLAUDE.md survives compaction: after `/compact`, Claude re-reads it from disk and re-injects it into the session. Nested CLAUDE.md files in subdirectories and rules with `paths:` frontmatter are not re-injected automatically; they reload the next time Claude reads a file in that subdirectory or a file matching the rule’s patterns. If an instruction disappeared after compaction, it was given only in conversation, lives in a nested CLAUDE.md that hasn’t reloaded yet, or is a path-scoped rule that hasn’t matched a file since. Add conversation-only instructions to CLAUDE.md to make them persist. See [What survives compaction](</docs/en/context-window#what-survives-compaction>) for the full breakdown. See Write effective instructions for guidance on size, structure, and specificity.
+Project-root CLAUDE.md survives compaction: after `/compact`, Claude re-reads it from disk and re-injects it into the session. Nested CLAUDE.md files in subdirectories and rules with `paths:` frontmatter reload as Claude reads files they apply to. If an instruction disappeared after compaction, it was given only in conversation, lives in a nested CLAUDE.md that hasn’t reloaded yet, or is a path-scoped rule that hasn’t matched a file since. Add conversation-only instructions to CLAUDE.md to make them persist. See [What survives compaction](</docs/en/context-window#what-survives-compaction>) for the full breakdown. See Write effective instructions for guidance on size, structure, and specificity.
##
--- a/mobile.md
+++ b/mobile.md
@@ -58,7 +58,12 @@
Continue a local session with Remote Control
-Remote Control connects the Claude app to a Claude Code session running on your machine, so code execution and filesystem access stay local while you drive the session from your phone. Start the session on your computer with `claude remote-control`, or run `/remote-control` in a session that’s already open. Then scan the session QR code the terminal can display, or open the Claude app, tap **Code** , and pick the session from the list. See [connect from another device](</docs/en/remote-control#connect-from-another-device>) for each option. Attachments you add in the Claude app reach the local session too. Claude sees attached photos directly as part of your message. Claude Code downloads other files to your machine and passes them to Claude as `@` file references. For requirements, invocation modes, and troubleshooting, see the [Remote Control overview](</docs/en/remote-control>).
+Remote Control connects the Claude app to a Claude Code session running on your machine, so code execution and filesystem access stay local while you drive the session from your phone. Start the session on your computer with `claude remote-control`, or run `/remote-control` in a session that’s already open. Then scan the session QR code the terminal can display, or open the Claude app, tap **Code** , and pick the session from the list. See [connect from another device](</docs/en/remote-control#connect-from-another-device>) for each option. When you add an attachment in the Claude app, it reaches the local session too:
+
+ * **Photos** : Claude sees attached photos directly as part of your message. Claude Code also saves each photo under `~/.claude/uploads/` and tells Claude the saved file path, so Claude can copy the image into files it creates.
+ * **Other files** : Claude Code downloads them to your machine and passes them to Claude as `@` file references.
+
+For requirements, invocation modes, and troubleshooting, see the [Remote Control overview](</docs/en/remote-control>).
###
Show diff (162 lines)
--- a/model-config.md
+++ b/model-config.md
@@ -78,7 +78,7 @@
* In the `/model` picker, you keep your current model.
* Mid-session, Claude Code continues the turn on your default model.
-After you choose to continue on Fable 5 using usage credits, Claude Code doesn’t show the prompt again. In a session with [Remote Control](</docs/en/remote-control>) connected, a [background session](</docs/en/agent-view>), or an [agent team](</docs/en/agent-teams>) teammate’s session, nobody may be at the terminal, so Claude Code holds the mid-session consent prompt for the [`dialogExpiry`](</docs/en/settings#available-settings>) deadline, five minutes by default. If nobody has answered by the deadline, Claude Code ends the turn without sending the request and adds a notice to the transcript, which the Remote Control client also shows. Your model selection is unchanged, and Claude Code asks for consent again on your next message. What you can do while the prompt is waiting depends on the session:
+After you choose to continue on Fable 5 using usage credits, Claude Code doesn’t show the prompt again. In a session with [Remote Control](</docs/en/remote-control>) connected, a [background session](</docs/en/agent-view>), or an [agent team](</docs/en/agent-teams>) teammate’s session, nobody may be at the terminal, so Claude Code holds the mid-session consent prompt for the [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) deadline, five minutes by default. If nobody has answered by the deadline, Claude Code ends the turn without sending the request and adds a notice to the transcript, which the Remote Control client also shows. Your model selection is unchanged, and Claude Code asks for consent again on your next message. What you can do while the prompt is waiting depends on the session:
* With Remote Control connected or in a teammate’s session, press any key at the terminal to cancel the deadline, and Claude Code waits for your answer.
* In a background session, answer before the deadline.
@@ -105,7 +105,7 @@
* `Enter`: switch model and save as your default
* `s`: switch model for this session only
-Typing `/model <name>` directly behaves like `Enter`. A model set with `/model` in [non-interactive mode](</docs/en/headless>), with the `-p` flag, applies to the current session only and isn’t saved as your default. Project and managed settings still take precedence and reapply on the next launch. An organization default model that your admin has configured to override user selection also reapplies on the next launch. In v2.1.144 through v2.1.152, `/model` applied to the current session only and `d` in the picker saved a default. The `--model` flag and `ANTHROPIC_MODEL` environment variable apply only to the session you launch with them. To run different models in different terminals at the same time, launch each one with its own `--model` flag rather than switching with `/model`. Prices in the `/model` picker appear when Claude Code talks to the Anthropic API, directly or through an [LLM gateway](</docs/en/llm-gateway>) that proxies it, and the price on a row is the price of the model that row selects. On [third-party providers](</docs/en/third-party-integrations>) such as Amazon Bedrock and on the [Claude apps gateway](</docs/en/claude-apps-gateway>), your provider or gateway determines what you pay, so picker rows show no price. The price is a display label only; it doesn’t affect which model a row selects or what your provider bills. Before v2.1.206, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) and gateway sessions showed Anthropic list prices, and a row could show the price of a different model than the one it selected. Resumed sessions started with `claude --resume`, `--continue`, or the `/resume` picker keep the model they were using when the transcript was saved, regardless of the current `model` setting. If the restored model has been retired or is excluded by `availableModels`, the session falls through to the normal precedence order. This prevents another session’s `/model` choice from changing the model on resume. On providers that use provider-specific deployment IDs rather than Anthropic model IDs, such as Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, the transcript model isn’t restored at all and the session resolves its model through the normal precedence order. A model you pick for the new launch with `--model` or `ANTHROPIC_MODEL` still takes precedence over the restored model. As of v2.1.195, so does an `ANTHROPIC_DEFAULT_OPUS_MODEL` family variable. `ANTHROPIC_DEFAULT_MODEL` can too, under the conditions listed in its section. When the active model at startup comes from project or managed settings rather than your own selection, the startup header shows which settings file set it. Run `/model` to override; the project or managed setting reapplies on the next launch. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; the key-level enumeration is under [Settings precedence](</docs/en/settings#settings-precedence>). When a model switch is requested through the [Agent SDK](</docs/en/agent-sdk/overview>) `setModel()` method or by an app such as the [Desktop app](</docs/en/desktop>) that runs the Claude Code CLI for you, Claude Code checks that the string is one it recognizes before saving it. This check requires Claude Code v2.1.200 or later. On the Anthropic API, Claude Code recognizes:
+Typing `/model <name>` directly behaves like `Enter`. A model set with `/model` in [non-interactive mode](</docs/en/headless>), with the `-p` flag, applies to the current session only and isn’t saved as your default. Project and managed settings still take precedence and reapply on the next launch. An organization default model that your admin has configured to override user selection also reapplies on the next launch. In v2.1.144 through v2.1.152, `/model` applied to the current session only and `d` in the picker saved a default. The `--model` flag and `ANTHROPIC_MODEL` environment variable apply only to the session you launch with them. To run different models in different terminals at the same time, launch each one with its own `--model` flag rather than switching with `/model`. Prices in the `/model` picker appear when Claude Code talks to the Anthropic API, directly or through an [LLM gateway](</docs/en/llm-gateway>) that proxies it, and the price on a row is the price of the model that row selects. On [third-party providers](</docs/en/third-party-integrations>) such as Amazon Bedrock and on the [Claude apps gateway](</docs/en/claude-apps-gateway>), your provider or gateway determines what you pay, so picker rows show no price. The price is a display label only; it doesn’t affect which model a row selects or what your provider bills. Before v2.1.206, [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) and gateway sessions showed Anthropic list prices, and a row could show the price of a different model than the one it selected. Resumed sessions started with `claude --resume`, `--continue`, or the `/resume` picker keep the model they were using when the transcript was saved, regardless of the current `model` setting. If the restored model has been retired or is excluded by `availableModels`, the session falls through to the normal precedence order. This prevents another session’s `/model` choice from changing the model on resume. On providers that use provider-specific deployment IDs rather than Anthropic model IDs, such as Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, the transcript model isn’t restored at all and the session resolves its model through the normal precedence order. A model you pick for the new launch with `--model` or `ANTHROPIC_MODEL` still takes precedence over the restored model. As of v2.1.195, so does an `ANTHROPIC_DEFAULT_OPUS_MODEL` family variable. `ANTHROPIC_DEFAULT_MODEL` can too, under the conditions listed in its section. When the active model at startup comes from project or managed settings rather than your own selection, the startup header shows which settings file set it. Run `/model` to override; the project or managed setting reapplies on the next launch. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>) says which keys and variables the host overrides. When a model switch is requested through the [Agent SDK](</docs/en/agent-sdk/overview>) `setModel()` method or by an app such as the [Desktop app](</docs/en/desktop>) that runs the Claude Code CLI for you, Claude Code checks that the string is one it recognizes before saving it. This check requires Claude Code v2.1.200 or later. On the Anthropic API, Claude Code recognizes:
* a model alias
* an entry from the `/model` picker
@@ -157,7 +157,7 @@
Restrict model selection
-Enterprise administrators can use `availableModels` in [managed or policy settings](</docs/en/settings#settings-files>) to restrict which models users can select. Entries match a model family such as `sonnet`, a version prefix such as `claude-sonnet-4-5`, or a full model ID such as `claude-sonnet-4-5-20250929`. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; the key-level enumeration is under [Settings precedence](</docs/en/settings#settings-precedence>). When `availableModels` is set, the allowlist applies everywhere a user can specify a model:
+Enterprise administrators can use `availableModels` in [managed or policy settings](</docs/en/managed-settings>) to restrict which models users can select. Entries match a model family such as `sonnet`, a version prefix such as `claude-sonnet-4-5`, or a full model ID such as `claude-sonnet-4-5-20250929`. On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>) says which keys and variables the host overrides. When `availableModels` is set, the allowlist applies everywhere a user can specify a model:
* **Main session model** : `/model`, the `--model` flag, the `ANTHROPIC_MODEL` environment variable, the `model` setting, `ANTHROPIC_DEFAULT_MODEL`, and the model restored when resuming a session
* **Alias resolution** : the `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and `ANTHROPIC_DEFAULT_FABLE_MODEL` environment variables cannot redirect an allowed alias to a model outside the list
@@ -200,12 +200,12 @@
Delivery mechanism| CLI and IDE| Desktop local sessions| Web, mobile, and cloud sessions| Agent SDK and non-interactive| Cowork
---|---|---|---|---|---
[Server-managed settings](</docs/en/server-managed-settings>) from the admin console| Enforced| Enforced| Enforced| Enforced| Not delivered
-[MDM or managed settings files](</docs/en/settings#settings-files>)| Enforced| Enforced| Not delivered in Anthropic-hosted environments; in [self-hosted environments](</docs/en/self-hosted-environments>), enforced from the runner image when server-managed settings deliver no keys| Enforced| Enforced where deployed
+[MDM or managed settings files](</docs/en/managed-settings#delivery-mechanisms>)| Enforced| Enforced| Not delivered in Anthropic-hosted environments; in [self-hosted environments](</docs/en/self-hosted-environments>), enforced from the runner image when server-managed settings deliver no keys| Enforced| Enforced where deployed
* Cloud sessions, on [Claude Code on the web](</docs/en/claude-code-on-the-web>) or in the Desktop app, run on Anthropic-managed VMs by default: settings deployed to your device do not reach them, so deliver the allowlist through server-managed settings. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on your own compute and fall back to the managed settings file in the runner image when your organization delivers no server-managed settings; when both exist, the server-managed payload takes precedence, with the per-key `env` merge exception described in [settings precedence](</docs/en/server-managed-settings#settings-precedence>). A mid-session model switch in a cloud session is rejected when the requested model is excluded by the allowlist. Server-side rejection at session creation applies to organization model restrictions, not the `availableModels` settings key.
* Cowork, the agentic-work tab in the Claude Desktop app, is not a Claude Code surface and does not receive server-managed settings by design. A managed settings file applies to Cowork sessions when it is present where the session runs; remote Cowork sessions run on Anthropic-managed VMs, where a device-deployed file is not present.
* Sessions on [third-party providers](</docs/en/server-managed-settings#platform-availability>) such as Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) do not receive server-managed settings, so deliver the allowlist through MDM or managed settings files there.
- * Server-managed delivery also requires the session to authenticate with an organization login or a directly configured API key. Fleets that generate keys only through an [`apiKeyHelper`](</docs/en/settings#available-settings>) script should deliver the allowlist through MDM or managed settings files.
+ * Server-managed delivery also requires the session to authenticate with an [eligible login or key](</docs/en/server-managed-settings#platform-availability>). Fleets that generate keys only through an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) script should deliver the allowlist through MDM or managed settings files.
* The Desktop Code tab also hosts [SSH sessions](</docs/en/desktop#ssh-sessions>), which read the managed settings file from the remote host they run on. See [Desktop managed settings](</docs/en/desktop#managed-settings>).
* The model pickers on claude.ai and in the Desktop app hide or grey out models excluded by your organization’s allowlist. The picker state is a convenience for users; enforcement happens in the session.
@@ -230,7 +230,7 @@
"enforceAvailableModels": true
}
-The Default option resolves to the account-type default, or to the organization default model when an admin has set one. When that model is not in the allowlist, the Default option instead resolves to the first `availableModels` entry that names an allowed, available model, and the `/model` picker’s Default row shows that model. This applies everywhere the default is reached: session startup, selecting Default in `/model`, the `"default"` keyword in fallback model chains, and the fallback used when an excluded selection is dropped. `enforceAvailableModels` remaps the Default option only when `availableModels` is non-empty. With `availableModels: []`, the Default model for the account type remains usable, so the setting cannot lock users out of every model. When `availableModels` is non-empty but no entry resolves to an allowed and available model, enforcement is skipped and Default resolves to the account-type default, with a warning visible only under `--debug`. Keep at least one guaranteed-available entry in the list to avoid this. Deploy both keys in the [highest-precedence managed source](</docs/en/settings#precedence-within-the-managed-tier>): these keys don’t merge across managed sources, so a pair placed in a managed settings file is ignored when the admin console delivers any settings.
+The Default option resolves to the account-type default, or to the organization default model when an admin has set one. When that model is not in the allowlist, the Default option instead resolves to the first `availableModels` entry that names an allowed, available model, and the `/model` picker’s Default row shows that model. This applies everywhere the default is reached: session startup, selecting Default in `/model`, the `"default"` keyword in fallback model chains, and the fallback used when an excluded selection is dropped. `enforceAvailableModels` remaps the Default option only when `availableModels` is non-empty. With `availableModels: []`, the Default model for the account type remains usable, so the setting cannot lock users out of every model. When `availableModels` is non-empty but no entry resolves to an allowed and available model, enforcement is skipped and Default resolves to the account-type default, with a warning visible only under `--debug`. Keep at least one guaranteed-available entry in the list to avoid this. Deploy both keys in the [highest-precedence managed source](</docs/en/managed-settings#precedence-within-the-managed-tier>): these keys don’t merge across managed sources, so a pair placed in a managed settings file is ignored when the admin console delivers any settings.
###
@@ -280,7 +280,7 @@
Organization model restrictions
-Organization admins on Claude Enterprise plans restrict which models members can run by disabling individual models in the claude.ai admin console. This restriction is delivered with the account’s entitlements when Claude Code authenticates, separate from any `availableModels` list in settings, and the server enforces the same restriction independently when a session is created. Requires Claude Code v2.1.187 or later. The restriction applies when a member signs in or uses their own API key. Organization-scoped credentials, such as organization service keys, are not tied to a user, so the restriction does not apply to them. The Claude Console has no model restriction control. Organizations without a Claude Enterprise plan, including those whose members authenticate through the Anthropic API, restrict models with `availableModels` in [managed settings](</docs/en/settings#settings-files>) instead, adding `enforceAvailableModels` to cover the Default option. These settings are enforced by Claude Code itself, not by the server. A restricted model is hidden from the `/model` picker. Selecting it by name with `--model`, the `ANTHROPIC_MODEL` environment variable, or the `model` setting shows the notice `Model "<name>" is restricted by your organization's settings. Using <model> instead.` and the session starts on an allowed model. Typing `/model <name>` for a restricted model is rejected with `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.` and the session keeps its current model. A model family alias such as `opus` resolves to the newest version of its family that the organization permits, with the same substitution notice. `/model <alias>` is rejected only when every version of its family is restricted; an alias set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting is still replaced at startup in that case. Before v2.1.205, a family alias was substituted or rejected based on its newest released version alone, even when an older version was allowed. Restrictions apply org-wide or per role:
+Organization admins on Claude Enterprise plans restrict which models members can run by disabling individual models in the claude.ai admin console. This restriction is delivered with the account’s entitlements when Claude Code authenticates, separate from any `availableModels` list in settings, and the server enforces the same restriction independently when a session is created. Requires Claude Code v2.1.187 or later. The restriction applies when a member signs in or uses their own API key. Organization-scoped credentials, such as organization service keys, are not tied to a user, so the restriction does not apply to them. The Claude Console has no model restriction control. Organizations without a Claude Enterprise plan, including those whose members authenticate through the Anthropic API, restrict models with `availableModels` in [managed settings](</docs/en/managed-settings>) instead, adding `enforceAvailableModels` to cover the Default option. These settings are enforced by Claude Code itself, not by the server. A restricted model is hidden from the `/model` picker. Selecting it by name with `--model`, the `ANTHROPIC_MODEL` environment variable, or the `model` setting shows the notice `Model "<name>" is restricted by your organization's settings. Using <model> instead.` and the session starts on an allowed model. Typing `/model <name>` for a restricted model is rejected with `Model '<name>' is restricted by your organization's settings. Run /model to choose a different model.` and the session keeps its current model. A model family alias such as `opus` resolves to the newest version of its family that the organization permits, with the same substitution notice. `/model <alias>` is rejected only when every version of its family is restricted; an alias set with `--model`, `ANTHROPIC_MODEL`, or the `model` setting is still replaced at startup in that case. Before v2.1.205, a family alias was substituted or rejected based on its newest released version alone, even when an older version was allowed. Restrictions apply org-wide or per role:
* Disabling a model at the organization level removes it for every member.
* Role-level access grants different models to different custom roles, and a member who holds several roles can use any model that one of their roles grants.
@@ -298,7 +298,7 @@
Organization admins on Claude Enterprise plans can set a default model for Claude Code members from the claude.ai admin console, for the whole organization or per custom role. When one is set, the Default option resolves to that model. Requires Claude Code v2.1.196 or later. The Default row in the `/model` picker shows the organization default’s name with the label Org default. The label reads Org default whether the admin set the default for the whole organization or for your role. A role default covers members of that custom role and takes precedence over the organization-wide default; when several of your roles set different defaults, the most capable model applies. The organization default is a starting point, not a restriction. These selections take precedence over it:
* the `--model` flag and the `ANTHROPIC_MODEL` environment variable
- * a `model` value in [managed settings](</docs/en/settings#settings-files>) or supplied through `--settings`
+ * a `model` value in [managed settings](</docs/en/managed-settings>) or supplied through `--settings`
* a `model` value in your user, project, or local settings, including a model you save with `/model`
Admins can also configure the organization default to override user selection. With override on, it takes precedence over the `model` value in user, project, and local settings, so a model you save with `/model` applies for the current session and the organization default returns on the next launch. When your selection differs, `/model` shows `Your organization's default (<model>) applies on restart`. The `--model` flag, `ANTHROPIC_MODEL`, managed settings, and `--settings` still take precedence even with override on. Override is available to a limited set of organizations; ask your Anthropic account team about availability. To limit which models members can select, use organization model restrictions or `availableModels` instead. Claude Code reads the organization default once at startup, so a default the admin changes mid-session takes effect on the next launch. When the organization default doesn’t override user selection, the first interactive launch after the admin changes it clears the `model` key from your user settings once, so the new default applies. It changes nothing else in the file, and a model you save with `/model` after that launch is kept. The organization default passes through these restriction checks before it is adopted:
@@ -307,7 +307,7 @@
* an organization default that organization model restrictions deny for your account is replaced by the newest allowed model in its family, or a lower-cost family when every version of it is restricted
* an organization default that isn’t available to your account at all, such as Fable 5 under [zero data retention](</docs/en/zero-data-retention>), is skipped, and the Default option resolves as it would without an organization default
-As of v2.1.199, when the organization default is a different model family from your account type’s usual default, the `/model` picker keeps a separate row for that usual family, so you can still switch to it for a session. In v2.1.196 through v2.1.198 that row is missing from the picker. The organization default reaches only sessions authenticated with the Anthropic API. To set a default anywhere else, including [LLM gateway](</docs/en/llm-gateway>) deployments, use the `model` key in [managed settings](</docs/en/settings#settings-files>) instead.
+As of v2.1.199, when the organization default is a different model family from your account type’s usual default, the `/model` picker keeps a separate row for that usual family, so you can still switch to it for a session. In v2.1.196 through v2.1.198 that row is missing from the picker. The organization default reaches only sessions authenticated with the Anthropic API. To set a default anywhere else, including [LLM gateway](</docs/en/llm-gateway>) deployments, use the `model` key in [managed settings](</docs/en/managed-settings>) instead.
##
@@ -399,7 +399,7 @@
Ask before switching
-To decide what happens each time a request is flagged, rather than switching automatically, run `/config` and turn off **Switch models when a message is flagged** , or set [`switchModelsOnFlag`](</docs/en/settings#available-settings>) to `false` in your settings file. A flagged request then pauses the session with two options: switch to the fallback model, or edit the prompt and retry on the current model. Some cases behave differently:
+To decide what happens each time a request is flagged, rather than switching automatically, run `/config` and turn off **Switch models when a message is flagged** , or set [`switchModelsOnFlag`](</docs/en/settings-reference#switchmodelsonflag>) to `false` in your settings file. A flagged request then pauses the session with two options: switch to the fallback model, or edit the prompt and retry on the current model. Some cases behave differently:
* When the flagged category has no fallback model, such as a biology flag on Opus 5, Claude Code doesn’t show the prompt and the request ends with the refusal.
* If both models flag the same request, you can edit the prompt and retry, or start a new session.
@@ -446,11 +446,11 @@
A level you pick from the effort control on a phone or browser connected through [Remote Control](</docs/en/remote-control#what-connected-devices-see>) applies to that session only.
-A level set with `/effort` in [non-interactive mode](</docs/en/headless>), with the `-p` flag, applies to the current session only and isn’t saved as your default. It also can’t release the model-default hold: while the hold is in force, a non-interactive `/effort` reports `Not applied`, so pass `--effort` at launch instead. The `/effort` menu also offers `ultracode`. Ultracode is a Claude Code setting rather than a model effort level: it sends `xhigh` to the model and additionally has Claude orchestrate [dynamic workflows](</docs/en/workflows>) for substantive tasks. It applies to the current session only. You can turn on ultracode through any of the following:
+A level set with `/effort` in [non-interactive mode](</docs/en/headless>), with the `-p` flag, applies to the current session only and isn’t saved as your default. It also can’t release the model-default hold: while the hold is in force, a non-interactive `/effort` reports `Not applied`, so pass `--effort` at launch instead. The `/effort` menu also offers `ultracode`. Ultracode is a Claude Code setting rather than a model effort level: it sends `xhigh` to the model and additionally has Claude orchestrate [dynamic workflows](</docs/en/workflows>) for substantive tasks. For where it can be set persistently, see the [`ultracode`](</docs/en/settings-reference#ultracode>) setting. You can turn on ultracode through any of the following:
* **`/effort`** : run `/effort ultracode`, or select it from the menu
* **`--effort` flag**: launch with `claude --effort ultracode`, which starts the session at `xhigh` effort with ultracode on
- * **`--settings` or an Agent SDK control request**: pass `"ultracode": true`. An [`applyFlagSettings()`](</docs/en/agent-sdk/typescript#applyflagsettings>) request also accepts `effortLevel: "ultracode"`
+ * **`ultracode` setting**: set [`"ultracode": true`](</docs/en/settings-reference#ultracode>) in a settings file, with `--settings`, or in an Agent SDK control request. An [`applyFlagSettings()`](</docs/en/agent-sdk/typescript#applyflagsettings>) request also accepts `effortLevel: "ultracode"`
Passing `ultracode` to the `--effort` flag or the Agent SDK `effortLevel` value requires Claude Code v2.1.203 or later. Before v2.1.203, `--effort ultracode` printed `Unknown --effort value 'ultracode'` and the session started at the default effort. The persisted `effortLevel` setting and the `CLAUDE_CODE_EFFORT_LEVEL` environment variable don’t accept `ultracode`. When `CLAUDE_CODE_EFFORT_LEVEL` is set to a level other than `xhigh`, requests run at that level and ultracode’s workflow orchestration stays inactive. Selecting ultracode then shows a warning that the environment variable overrides effort for the session. When ultracode isn’t available, for example when [workflows are turned off](</docs/en/workflows#turn-workflows-off>), `--effort ultracode` sets `xhigh` effort only.
@@ -469,7 +469,7 @@
`high`| Balances token usage and intelligence. The default on every model except Opus 4.7
`xhigh`| Deeper reasoning at higher token spend. The default on Opus 4.7
`max`| Can improve performance on demanding tasks but may show diminishing returns and is prone to overthinking. Test before adopting broadly
-`ultracode`| A Claude Code setting that plans a [dynamic workflow](</docs/en/workflows>) for each substantive task with `xhigh` per-message reasoning. Session-only
+`ultracode`| A Claude Code setting that plans a [dynamic workflow](</docs/en/workflows>) for each substantive task with `xhigh` per-message reasoning
The effort scale is calibrated per model, so the same level name does not represent the same underlying value across models.
@@ -493,11 +493,11 @@
* **In`/model`**: use left/right arrow keys to adjust the effort slider when selecting a model
* **`--effort` flag**: pass a level name to set it for a single session when launching Claude Code
* **Environment variable** : set `CLAUDE_CODE_EFFORT_LEVEL` to a level name or `auto`
- * **Settings** : set `effortLevel` to `low`, `medium`, `high`, or `xhigh` in your settings file. `max` and `ultracode` are session-only and are not accepted here
+ * **Settings** : set `effortLevel` to `low`, `medium`, `high`, or `xhigh` in your settings file. `max` isn’t accepted here, and `ultracode` has its own [`ultracode`](</docs/en/settings-reference#ultracode>) key
* **From a connected device** : in a [Remote Control](</docs/en/remote-control#what-connected-devices-see>) session, pick a level from the effort control on your phone or in your browser. The level applies to the current session only. Requires Claude Code v2.1.234 or later
* **Skill and subagent frontmatter** : set `effort` in a [skill](</docs/en/skills#frontmatter-reference>) or [subagent](</docs/en/sub-agents#supported-frontmatter-fields>) markdown file to override the effort level when that skill or subagent runs
-The environment variable takes precedence over all other methods, then your configured level, then the model default. Frontmatter effort applies when that skill or subagent is active, overriding the session level but not the environment variable. The `effortLevel` key in [managed settings](</docs/en/settings#settings-precedence>) is a starting default, not enforcement: users can change it for a session with `/effort` or `--effort`, and the managed value re-asserts as the default in new sessions. The effort slider appears in `/model` when a supported model is selected. The current effort level is also shown in the session header next to the model name, for example “with low effort”, so you can confirm which setting is active without opening `/model`. The footer also briefly shows the effort level at startup and when it changes.
+The environment variable takes precedence over all other methods, then your configured level, then the model default. Frontmatter effort applies when that skill or subagent is active, overriding the session level but not the environment variable. The `effortLevel` key in [managed settings](</docs/en/managed-settings>) is a starting default, not enforcement: users can change it for a session with `/effort` or `--effort`, and the managed value re-asserts as the default in new sessions. The effort slider appears in `/model` when a supported model is selected. The current effort level is also shown in the session header next to the model name, for example “with low effort”, so you can confirm which setting is active without opening `/model`. The footer also briefly shows the effort level at startup and when it changes.
####
@@ -578,7 +578,7 @@
You can set the auto-compact window in three places:
- * **For this session and later ones** : run `/autocompact` with a value, like `/autocompact 500k`. Claude Code saves it to your user settings as [`autoCompactWindow`](</docs/en/settings#available-settings>) and applies it to the current session; if a higher-priority [settings scope](</docs/en/settings#settings-precedence>) such as managed settings sets the key, the command saves your value but the session keeps that scope’s window, and the command says so. Run `/autocompact auto` to return to the window tuned for your model.
+ * **For this session and later ones** : run `/autocompact` with a value, like `/autocompact 500k`. Claude Code saves it to your user settings as [`autoCompactWindow`](</docs/en/settings-reference#autocompactwindow>) and applies it to the current session; if a higher-priority [settings scope](</docs/en/settings#settings-precedence>) such as managed settings sets the key, the command saves your value but the session keeps that scope’s window, and the command says so. Run `/autocompact auto` to return to the window tuned for your model.
* **For one launch** : pass [`--autocompact`](</docs/en/cli-reference#cli-flags>) when starting Claude Code. The flag overrides your saved setting for that launch without changing it, and `claude --autocompact auto` runs the session at the tuned window even if your saved setting has a value. Unlike `/autocompact`, the flag isn’t preempted by a higher-priority settings scope such as managed settings.
* **In scripts and cloud environments** : set [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>). While it’s set, it takes precedence over the command, the flag, and the setting, and `/autocompact` reports the override instead of changing the window.
@@ -689,7 +689,7 @@
* Only append `[1m]` when the underlying model [supports 1M context](<https://platform.claude.com/docs/en/build-with-claude/context-windows#context-window-sizes-by-model>).
* The suffix is read per variable, not per model. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, a model ID without `[1m]` in one variable uses 200K context even if another variable sets the same model with the suffix. Sonnet 5 always runs with the 1M window on these providers and never needs the suffix.
-An `availableModels` allowlist delivered through [MDM or a managed settings file](</docs/en/settings#settings-files>) still applies when using third-party providers; [server-managed settings are not delivered there](</docs/en/server-managed-settings#platform-availability>). Filtering matches on a model alias such as `opus`, a version prefix such as `claude-opus-4-8`, or the full provider-form model ID. Provider-specific prefixes such as `us.anthropic.` are not stripped, so to allow a specific model, list the same provider-form ID the picker shows, or map it through `modelOverrides`. Any `[1m]` suffix is stripped from both the allowlist entry and the requested model before matching.
+An `availableModels` allowlist delivered through [MDM or a managed settings file](</docs/en/managed-settings#delivery-mechanisms>) still applies when using third-party providers; [server-managed settings are not delivered there](</docs/en/server-managed-settings#platform-availability>). Filtering matches on a model alias such as `opus`, a version prefix such as `claude-opus-4-8`, or the full provider-form model ID. Provider-specific prefixes such as `us.anthropic.` are not stripped, so to allow a specific model, list the same provider-form ID the picker shows, or map it through `modelOverrides`. Any `[1m]` suffix is stripped from both the allowlist entry and the requested model before matching.
###
@@ -729,7 +729,7 @@
Override model IDs per version
-On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; the key-level enumeration is under [Settings precedence](</docs/en/settings#settings-precedence>). The family-level environment variables above configure one model ID per family alias. If you need to map several versions within the same family to distinct provider IDs, use the `modelOverrides` setting instead. `modelOverrides` maps individual Anthropic model IDs to the provider-specific strings that Claude Code sends to your provider’s API. When a user selects a mapped model in the `/model` picker, Claude Code uses your configured value instead of the built-in default. This lets enterprise administrators route each model version to a specific Amazon Bedrock inference profile ARN, Google Cloud’s Agent Platform version name, or Microsoft Foundry deployment name for governance, cost allocation, or regional routing. Set `modelOverrides` in your [settings file](</docs/en/settings#settings-files>):
+On platforms that embed Claude Code and set [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>), the host’s model configuration takes precedence over managed model settings, while a managed `availableModels` allowlist stays in force unless the host supplies its own; [Exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>) says which keys and variables the host overrides. The family-level environment variables above configure one model ID per family alias. If you need to map several versions within the same family to distinct provider IDs, use the `modelOverrides` setting instead. `modelOverrides` maps individual Anthropic model IDs to the provider-specific strings that Claude Code sends to your provider’s API. When a user selects a mapped model in the `/model` picker, Claude Code uses your configured value instead of the built-in default. This lets enterprise administrators route each model version to a specific Amazon Bedrock inference profile ARN, Google Cloud’s Agent Platform version name, or Microsoft Foundry deployment name for governance, cost allocation, or regional routing. Set `modelOverrides` in your [settings file](</docs/en/settings#where-settings-live>):
{
"modelOverrides": {
@@ -739,7 +739,7 @@
}
}
-Keys must be Anthropic model IDs as listed in the [Models overview](<https://platform.claude.com/docs/en/about-claude/models/overview>). For dated model IDs, include the date suffix exactly as it appears there. Unknown keys are ignored. To stop the `[claude-code:unrecognized_model]` [diagnostic line](</docs/en/errors#unrecognized-model-id-on-a-request>) for an ID such as a gateway alias, add an entry with that ID as its value. Overrides replace the built-in model IDs that back each entry in the `/model` picker. On Amazon Bedrock, `modelOverrides` entries take precedence over any inference profiles that Claude Code discovers automatically at startup. Claude Code passes values that are already provider-native, such as Amazon Bedrock inference profile ARNs or Microsoft Foundry deployment names, to the provider as-is. Overrides also apply when you pass an Anthropic model ID directly through `--model`, the `ANTHROPIC_MODEL` environment variable, or an `ANTHROPIC_DEFAULT_*_MODEL` environment variable. On Amazon Bedrock, Google Cloud’s Agent Platform, and [Mantle](</docs/en/amazon-bedrock#use-the-mantle-endpoint>), an Anthropic model ID with no `modelOverrides` entry resolves to the same provider-specific ID as the `/model` picker row for that version, when the provider supports that version. Mantle supports a subset of versions. For an Anthropic model ID outside that subset, Claude Code sends the raw ID to Mantle without mapping it, unless a `modelOverrides` entry covers it. Before v2.1.200, `--model` and the environment-variable values reached the provider as-is without going through the override map. `modelOverrides` works alongside `availableModels`. The allowlist is evaluated against the Anthropic model ID, not the override value, so an entry like `"opus"` in `availableModels` continues to match even when Opus versions are mapped to ARNs. When `enforceAvailableModels` is set in managed settings, the enforced Default resolves through `modelOverrides` from the [highest-precedence managed source](</docs/en/server-managed-settings#settings-precedence>) only. An admin’s mapping, such as a version pinned to an inference profile ARN, is honored in the enforced Default. Overrides from user or project settings do not affect it. When `availableModels` is set in [managed settings](</docs/en/settings#settings-files>), only `modelOverrides` from that managed source apply to an Anthropic model ID passed directly through `--model` or the environment variables above. Claude Code ignores overrides in user or project settings for those IDs, and never resolves an ID the managed list excludes through `modelOverrides` from any settings source. This managed-source restriction requires Claude Code v2.1.200 or later. See Restrict model selection for how blocked IDs are handled.
+Keys must be Anthropic model IDs as listed in the [Models overview](<https://platform.claude.com/docs/en/about-claude/models/overview>). For dated model IDs, include the date suffix exactly as it appears there. Unknown keys are ignored. To stop the `[claude-code:unrecognized_model]` [diagnostic line](</docs/en/errors#unrecognized-model-id-on-a-request>) for an ID such as a gateway alias, add an entry with that ID as its value. Overrides replace the built-in model IDs that back each entry in the `/model` picker. On Amazon Bedrock, `modelOverrides` entries take precedence over any inference profiles that Claude Code discovers automatically at startup. Claude Code passes values that are already provider-native, such as Amazon Bedrock inference profile ARNs or Microsoft Foundry deployment names, to the provider as-is. Overrides also apply when you pass an Anthropic model ID directly through `--model`, the `ANTHROPIC_MODEL` environment variable, or an `ANTHROPIC_DEFAULT_*_MODEL` environment variable. On Amazon Bedrock, Google Cloud’s Agent Platform, and [Mantle](</docs/en/amazon-bedrock#use-the-mantle-endpoint>), an Anthropic model ID with no `modelOverrides` entry resolves to the same provider-specific ID as the `/model` picker row for that version, when the provider supports that version. Mantle supports a subset of versions. For an Anthropic model ID outside that subset, Claude Code sends the raw ID to Mantle without mapping it, unless a `modelOverrides` entry covers it. Before v2.1.200, `--model` and the environment-variable values reached the provider as-is without going through the override map. `modelOverrides` works alongside `availableModels`. The allowlist is evaluated against the Anthropic model ID, not the override value, so an entry like `"opus"` in `availableModels` continues to match even when Opus versions are mapped to ARNs. When `enforceAvailableModels` is set in managed settings, the enforced Default resolves through `modelOverrides` from the [highest-precedence managed source](</docs/en/server-managed-settings#settings-precedence>) only. An admin’s mapping, such as a version pinned to an inference profile ARN, is honored in the enforced Default. Overrides from user or project settings do not affect it. When `availableModels` is set in [managed settings](</docs/en/managed-settings>), only `modelOverrides` from that managed source apply to an Anthropic model ID passed directly through `--model` or the environment variables above. Claude Code ignores overrides in user or project settings for those IDs, and never resolves an ID the managed list excludes through `modelOverrides` from any settings source. This managed-source restriction requires Claude Code v2.1.200 or later. See Restrict model selection for how blocked IDs are handled.
###
--- a/monitoring-usage.md
+++ b/monitoring-usage.md
@@ -37,7 +37,7 @@
Administrator configuration
-Administrators can configure OpenTelemetry settings for all users through the [managed settings file](</docs/en/settings#settings-files>). See the [settings precedence](</docs/en/settings#settings-precedence>) for more information about how settings are applied. Example managed settings configuration:
+Administrators can configure OpenTelemetry settings for all users through the [managed settings file](</docs/en/managed-settings#delivery-mechanisms>). See the [settings precedence](</docs/en/settings#settings-precedence>) for more information about how settings are applied. Example managed settings configuration:
{
"env": {
@@ -63,7 +63,7 @@
* **Endpoints** : when you set `OTEL_EXPORTER_OTLP_ENDPOINT`, Claude Code removes every developer-set per-signal endpoint. Developers can’t point one signal at a different collector, so you don’t need to also set the per-signal endpoint variables in managed settings.
* **Protocols** : when you set `OTEL_EXPORTER_OTLP_PROTOCOL`, Claude Code removes every developer-set per-signal protocol.
* **Credentials** : when you set `OTEL_EXPORTER_OTLP_HEADERS`, `OTEL_EXPORTER_OTLP_CLIENT_KEY`, or `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE`, Claude Code removes the developer-set per-signal versions of that variable, plus every developer-set endpoint variable, generic or per-signal, since those credentials would otherwise reach a collector the managed settings didn’t choose.
- * **Exporter selectors** : `OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER`, and the beta `OTEL_TRACES_EXPORTER` follow normal per-key precedence. A developer’s setting can still disable a signal or switch it to the console exporter, so set the selectors in managed settings too if you need them locked. Across [admin sources](</docs/en/settings#precedence-within-the-managed-tier>), `OTEL_LOGS_EXPORTER` follows the [telemetry unit](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>) while the other two selectors merge per key. Requires Claude Code v2.1.223 or later.
+ * **Exporter selectors** : `OTEL_METRICS_EXPORTER`, `OTEL_LOGS_EXPORTER`, and the beta `OTEL_TRACES_EXPORTER` follow normal per-key precedence. A developer’s setting can still disable a signal or switch it to the console exporter, so set the selectors in managed settings too if you need them locked. Across [admin sources](</docs/en/managed-settings#precedence-within-the-managed-tier>), `OTEL_LOGS_EXPORTER` follows the [telemetry unit](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>) while the other two selectors merge per key. Requires Claude Code v2.1.223 or later.
Claude Code doesn’t remove per-signal variables that you set in managed settings itself, so you can route one signal to a different collector by setting its variable there, as the SIEM example does. If you set a per-signal credential there, Claude Code removes the developer-set endpoint for that signal. This removal behavior changes where telemetry is delivered, not what Claude Code collects. Before v2.1.217, every variable followed per-key settings precedence independently, so a signal-specific endpoint set in user settings or the shell redirected that signal away from the managed collector.
@@ -1143,7 +1143,7 @@
Retention sweep event
-Logged once per run of the retention cleanup sweep, which deletes [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) older than the [`cleanupPeriodDays`](</docs/en/settings#available-settings>) setting. Claude Code runs the sweep in the background at most once per session, and a run that deletes nothing still emits the event. If Claude Code ran the sweep in any session on the same machine in the last 24 hours, it delays this session’s sweep by at least 10 minutes, so a session that exits sooner emits nothing. When you run `claude -p` with `--bare`, Claude Code doesn’t run the sweep and emits nothing. Like every OTel event on this page, it goes only to the telemetry backend you configure. Requires Claude Code v2.1.227 or later. When Claude Code can’t safely determine the retention period, it pauses the sweep and emits the event with `result` set to `"skipped"` and a `skip_reason`. When [managed settings](</docs/en/server-managed-settings>) set `cleanupPeriodDays`, the managed value pins the retention period and the sweep runs even when a settings file in a lower-priority scope is broken or invalid; a managed settings file that itself can’t be read or parsed still pauses the sweep. The deletion counter attributes are present only when `result` is `"complete"`. **Event Name** : `claude_code.retention_sweep` **Attributes** :
+Logged once per run of the retention cleanup sweep, which deletes [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) older than the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) setting. Claude Code runs the sweep in the background at most once per session, and a run that deletes nothing still emits the event. If Claude Code ran the sweep in any session on the same machine in the last 24 hours, it delays this session’s sweep by at least 10 minutes, so a session that exits sooner emits nothing. When you run `claude -p` with `--bare`, Claude Code doesn’t run the sweep and emits nothing. Like every OTel event on this page, it goes only to the telemetry backend you configure. Requires Claude Code v2.1.227 or later. When Claude Code can’t safely determine the retention period, it pauses the sweep and emits the event with `result` set to `"skipped"` and a `skip_reason`. When [managed settings](</docs/en/server-managed-settings>) set `cleanupPeriodDays`, the managed value pins the retention period and the sweep runs even when a settings file in a lower-priority scope is broken or invalid. When `managed-settings.json` itself can’t be read or parsed, Claude Code still pauses the sweep unless the [managed source it selects](</docs/en/server-managed-settings#settings-precedence>) supplies `cleanupPeriodDays` from elsewhere, such as server-managed settings or a `managed-settings.d/` drop-in beside the broken file. The deletion counter attributes are present only when `result` is `"complete"`. **Event Name** : `claude_code.retention_sweep` **Attributes** :
* All standard attributes
* `event.name`: `"retention_sweep"`
--- a/network-config.md
+++ b/network-config.md
@@ -107,7 +107,7 @@
* `NODE_TLS_REJECT_UNAUTHORIZED`
* `CLAUDE_CODE_OAUTH_SCOPES`
-Claude Code notes each ignored key in the session’s debug log. In [Claude Desktop](</docs/en/desktop>) sessions where the app manages the provider connection, such as the Code tab on a [third-party provider](</docs/en/third-party-integrations>) and Cowork sessions, Claude Code reads these variables and the proxy variables `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` only from [managed settings](</docs/en/settings#settings-files>) and `~/.claude/settings.json`: it ignores them in a repository’s own settings files, so a checked-out repository can’t redirect the TLS or proxy path of a session whose credentials come from the app. In a local, SSH, or WSL Code tab session signed in through claude.ai, the app doesn’t manage the connection, and Claude Code reads these variables from every settings scope, like any terminal session; [cloud sessions](</docs/en/claude-code-on-the-web>) follow the cloud-session rules above wherever you start them. Before v2.1.217, Claude Code ignored these variables in every settings file when the app managed the connection.
+Claude Code notes each ignored key in the session’s debug log. In [Claude Desktop](</docs/en/desktop>) sessions where the app manages the provider connection, such as the Code tab on a [third-party provider](</docs/en/third-party-integrations>) and Cowork sessions, Claude Code reads these variables and the proxy variables `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` only from [managed settings](</docs/en/managed-settings>) and `~/.claude/settings.json`: it ignores them in a repository’s own settings files, so a checked-out repository can’t redirect the TLS or proxy path of a session whose credentials come from the app. In a local, SSH, or WSL Code tab session signed in through claude.ai, the app doesn’t manage the connection, and Claude Code reads these variables from every settings scope, like any terminal session; [cloud sessions](</docs/en/claude-code-on-the-web>) follow the cloud-session rules above wherever you start them. Before v2.1.217, Claude Code ignored these variables in every settings file when the app managed the connection.
##
@@ -153,7 +153,7 @@
Configure a corporate launcher as a setting
-Some organizations require every Claude Code process to start through a corporate launcher that applies sandboxing, network controls, or credential injection. The supervisor and its workers start Claude Code from a fixed path rather than by looking up `claude` on `PATH`, so every background agent bypasses a wrapper you place earlier on `PATH`. Set the [`processWrapper`](</docs/en/settings#available-settings>) setting to prefix the supervisor, its workers, and the other background processes listed under [What the launcher covers](</docs/en/corporate-launcher#what-the-launcher-covers>) with your launcher. The equivalent [`CLAUDE_CODE_PROCESS_WRAPPER`](</docs/en/env-vars>) environment variable takes precedence when both are set, and it is subject to the same rule: deliver it through managed settings or `~/.claude/settings.json`, not a shell export. [Run Claude Code behind a corporate launcher](</docs/en/corporate-launcher>) covers the contract the launcher must satisfy, what it does and doesn’t reach, and how to roll it out.
+Some organizations require every Claude Code process to start through a corporate launcher that applies sandboxing, network controls, or credential injection. The supervisor and its workers start Claude Code from a fixed path rather than by looking up `claude` on `PATH`, so every background agent bypasses a wrapper you place earlier on `PATH`. Set the [`processWrapper`](</docs/en/settings-reference#processwrapper>) setting to prefix the supervisor, its workers, and the other background processes listed under [What the launcher covers](</docs/en/corporate-launcher#what-the-launcher-covers>) with your launcher. The equivalent [`CLAUDE_CODE_PROCESS_WRAPPER`](</docs/en/env-vars>) environment variable takes precedence when both are set, and it is subject to the same rule: deliver it through managed settings or `~/.claude/settings.json`, not a shell export. [Run Claude Code behind a corporate launcher](</docs/en/corporate-launcher>) covers the contract the launcher must satisfy, what it does and doesn’t reach, and how to roll it out.
An already-running supervisor keeps the launch configuration it started with. After deploying the launcher setting, run [`claude daemon stop --any`](</docs/en/agent-view#the-supervisor-process>) so the next `claude agents` or `--bg` starts a supervisor that honors it. An installed service takes `claude daemon stop` without `--any`.
@@ -194,13 +194,13 @@
`claude.ai`| claude.ai account authentication
`claude.com`| claude.ai account sign-in opens a `claude.com` page in the browser, which redirects to `claude.ai`; pre-approved WebFetch documentation lookups also reach this host from the CLI
`platform.claude.com`| Anthropic Console account authentication. OAuth token exchange, refresh, and revocation also go to this host for claude.ai accounts, so both Console and claude.ai sign-ins require it
-`mcp-proxy.anthropic.com`| [MCP connectors from claude.ai](</docs/en/mcp#use-mcp-servers-from-claude-ai>), including connectors an organization administrator configures. Connector traffic routes through this proxy; connectors are enabled by default for claude.ai-authenticated users. To disable, set [`ENABLE_CLAUDEAI_MCP_SERVERS=false`](</docs/en/env-vars>) or the [`disableClaudeAiConnectors`](</docs/en/settings#available-settings>) setting
+`mcp-proxy.anthropic.com`| [MCP connectors from claude.ai](</docs/en/mcp#use-mcp-servers-from-claude-ai>), including connectors an organization administrator configures. Connector traffic routes through this proxy; connectors are enabled by default for claude.ai-authenticated users. To disable, set [`ENABLE_CLAUDEAI_MCP_SERVERS=false`](</docs/en/env-vars>) or the [`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>) setting
`downloads.claude.ai`| Plugin executable downloads; native installer, native auto-updater, and update version checks
-`storage.googleapis.com`| Install counts and plugin metadata shown in `/plugin`. Signed [artifact](</docs/en/artifacts>) uploads try this host first; publishing falls back to `api.anthropic.com` when it is blocked
+`storage.googleapis.com`| Plugin install counts and metadata shown in `/plugin`
`storage.googleapis.com`| Native installer and native auto-updater on versions prior to 2.1.116
`registry.npmjs.org`| Plugin installs (fetching npm-source plugin packages and installing plugins’ Node.js package dependencies), `npx`-launched MCP servers, and the package registry for npm and bun installs of Claude Code itself
`bridge.claudeusercontent.com`| [Claude in Chrome](</docs/en/chrome>) extension WebSocket bridge
-`*.frame.claudeusercontent.com`| [Artifact](</docs/en/artifacts>) content reads. The CLI fetches an artifact’s files from this host when Claude opens one, and only when the Artifact tool is [available](</docs/en/artifacts#availability>) for your account. To disable the tool and drop this requirement, set [`CLAUDE_CODE_DISABLE_ARTIFACT=1`](</docs/en/env-vars>) or the [`disableArtifact`](</docs/en/settings#available-settings>) setting
+`*.frame.claudeusercontent.com`| [Artifact](</docs/en/artifacts>) content reads. The CLI fetches an artifact’s files from this host when Claude opens one, and only when the Artifact tool is [available](</docs/en/artifacts#availability>) for your account. To disable the tool and drop this requirement, set [`CLAUDE_CODE_DISABLE_ARTIFACT=1`](</docs/en/env-vars>) or the [`disableArtifact`](</docs/en/settings-reference#disableartifact>) setting
`raw.githubusercontent.com`| Changelog feed for [`/release-notes`](</docs/en/commands>) and the release notes shown after updating
`http-intake.logs.us5.datadoghq.com`| Operational telemetry events, sent only when the CLI uses the Anthropic API directly, never for Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. Optional: disable with [`DISABLE_TELEMETRY`](</docs/en/data-usage#telemetry-services>) or `DO_NOT_TRACK`
`browser-intake-us5-datadoghq.com`| Operational error reports, sent when the CLI uses the Anthropic API directly and a server-side rollout gate enables them. Optional: disable with `DISABLE_ERROR_REPORTING` or `DISABLE_TELEMETRY`; see [Telemetry services](</docs/en/data-usage#telemetry-services>)
--- a/output-styles.md
+++ b/output-styles.md
@@ -50,7 +50,7 @@
* User: `~/.claude/output-styles`
* Project: `.claude/output-styles`
- * Managed policy: `.claude/output-styles` inside the [managed settings directory](</docs/en/settings#settings-files>)
+ * Managed policy: `.claude/output-styles` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>)
Project output styles load from every `.claude/output-styles/` between the working directory and the repository root. When more than one of these nested directories defines a style with the same name, Claude Code uses the one closest to the working directory.
Show diff (114 lines)
--- a/permission-modes.md
+++ b/permission-modes.md
@@ -44,7 +44,7 @@
You want to| Start with| Isolation needed| Notes
---|---|---|---
Review every action yourself| Manual mode: `claude --permission-mode default`| None| Sensitive work, unfamiliar code
-Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings#sandbox-settings>) to `true`
+Iterate locally with fewer prompts, without a classifier| Manual mode plus the Bash sandbox in [auto-allow mode](</docs/en/sandboxing#sandbox-modes>): `claude --permission-mode default`, then run `/sandbox` and select auto-allow| The built-in Bash sandbox, on macOS, Linux, and WSL2| Deny rules still apply, and ask rules that name a command, such as `Bash(git push *)`, still prompt. To turn the sandbox on from a settings file instead, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true`
Explore before changing anything| `claude --permission-mode plan`| None| Claude Code blocks edits until you approve a plan
Work hands-off with a classifier reviewing each action| `claude --permission-mode auto`, the built-in starting permission mode on Pro, Max, and Team| None; a sandbox or container adds defense in depth| Requires a supported model, and your organization can turn auto mode off
Run in CI with an exact allowlist| `claude -p "run the test suite" --permission-mode dontAsk --allowedTools "Bash(npm test)" "Read"`| None beyond what your CI runner provides| [Claude Code on the web](</docs/en/claude-code-on-the-web>) ignores `dontAsk` from settings files
@@ -61,7 +61,7 @@
When you start a new session in a terminal, Claude Code takes the permission mode from the first of these that applies:
1. The `--permission-mode` flag, or `--dangerously-skip-permissions`
- 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#settings-files>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
+ 2. `permissions.defaultMode` in a [settings file](</docs/en/settings#where-settings-live>). An `"auto"` value in `.claude/settings.json` or `.claude/settings.local.json` doesn’t take effect, and Claude Code then uses the built-in default rather than a `defaultMode` from `~/.claude/settings.json`. The other values apply from any settings file
3. The built-in default
Conversations the VS Code extension starts follow the extension’s own list in Switch permission modes. A session you resume keeps the permission mode it was in unless you pass `--permission-mode` or `--dangerously-skip-permissions`; [what a resumed session restores](</docs/en/sessions#what-a-resumed-session-restores>) lists the exceptions. The built-in `auto` default requires Claude Code v2.1.228 or later on macOS, Linux, and WSL, and v2.1.233 or later on native Windows. On earlier versions, the built-in default is Manual. The built-in default depends on how you run Claude Code, on your plan, and on whether Claude Code could fetch its feature flags. The first row that matches your session applies. The table covers sessions you start in a terminal or through the VS Code extension; for the desktop app and claude.ai, see the Desktop and Web tabs in Switch permission modes.
@@ -95,7 +95,7 @@
One session you’re about to start| Pass the permission mode as a flag, for example `claude --permission-mode default`
Every terminal session you start on this machine| Set `permissions.defaultMode` in `~/.claude/settings.json`. For what the VS Code extension reads, see Switch permission modes
Every terminal session you start in one project| Set `permissions.defaultMode` in the project’s `.claude/settings.json`. Sessions you start in a terminal honor every value except `auto`; sessions the VS Code extension starts don’t read project settings for the starting permission mode
-Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/permissions#managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
+Every terminal session in your organization| Set `permissions.defaultMode` in [managed settings](</docs/en/managed-settings>). Terminal sessions start in that mode and people can still switch to auto mode; for what the VS Code extension reads, see Switch permission modes. To remove auto mode so nobody can select it, set `permissions.disableAutoMode` to `"disable"` instead
This example makes every terminal session on your machine start in Manual mode, whose config value is `default`. Save it in `~/.claude/settings.json`:
@@ -128,7 +128,7 @@
**During a session** : press `Shift+Tab` to cycle permission modes. From `auto`, the first press switches to `default`, and the cycle then runs `default` → `acceptEdits` → `plan` → back to `default`. Optional modes, described below, slot in after `plan`. The status bar shows the active mode as a gray `⏸ manual mode on` for `default`, or as `⏵⏵ accept edits on`, `⏸ plan mode on`, `⏵⏵ auto mode on`, `⏵⏵ don't ask on`, or `⏵⏵ bypass permissions on`.Not every mode is in the default cycle:
* `auto`: appears when your account meets the auto mode requirements; cycling to it switches permission modes without a confirmation prompt
- * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
+ * `bypassPermissions`: appears after you start with `--permission-mode bypassPermissions`, `--dangerously-skip-permissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>); the `--allow-` variant adds the permission mode to the cycle without activating it
* `dontAsk`: never appears in the cycle; set it with `--permission-mode dontAsk`
Enabled optional modes slot in after `plan`, with `bypassPermissions` first and `auto` last. If you have both enabled, you will cycle through `bypassPermissions` on the way to `auto`.**At startup** : pass the permission mode as a flag.
@@ -151,7 +151,7 @@
1. `claudeCode.initialPermissionMode`
2. The mode you last picked from the mode indicator, if it was Manual, Edit automatically, or Auto. Picking Plan or Bypass permissions applies to that conversation only
- 3. `permissions.defaultMode` from [managed settings](</docs/en/permissions#managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
+ 3. `permissions.defaultMode` from [managed settings](</docs/en/managed-settings>) or `~/.claude/settings.json`, on Pro, Max, and Team plans with feature-flag fetching available
4. The built-in default for your plan, provider, and organization settings
The extension never reads a project’s `.claude/settings.json` or `.claude/settings.local.json` for the starting permission mode, and in conversations that don’t meet item 3’s conditions it reads no settings file at all. When `claudeCode.claudeProcessWrapper` is set, items 3 and 4 don’t apply either: those conversations start in Manual unless item 1 or item 2 sets a permission mode.Auto mode appears in the mode indicator when your account meets every requirement listed in the auto mode section.Bypass permissions requires the **Allow dangerously skip permissions** toggle in the extension settings. Without it, the permission mode doesn’t appear in the indicator, and a `bypassPermissions` value from item 1 or item 3 starts the conversation in Manual instead. Auto from any item likewise starts the conversation in Manual when auto mode isn’t available.See the [VS Code guide](</docs/en/vs-code>) for extension-specific details.
@@ -163,7 +163,7 @@
* **Auto** : appears when your account meets the auto mode requirements
* **Bypass permissions** : requires the **Allow bypass permissions mode** toggle in Desktop settings on Pro and Max plans; on Team and Enterprise plans, organization policy controls it instead
-The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#settings-files>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
+The Cowork tab doesn’t use these modes. Cowork has its own permission modes, enabled separately, and the Cowork tab shows no mode selector at all until a mode beyond its default is enabled for your account. See the [Cowork docs](<https://claude.com/docs/cowork/overview>).For desktop-specific details, see [Choose a permission mode](</docs/en/desktop#choose-a-permission-mode>) in the Desktop guide.**As a default** : set `defaultMode` in [settings](</docs/en/settings#where-settings-live>). The desktop app reads the same settings files as the CLI and applies the permission mode to new local sessions.A mode you pick in the mode selector is remembered per folder and takes precedence over `defaultMode` for that folder. Plan is the exception: picking it applies to the current session only.This example sets Plan mode as the default for new local sessions:
{
"permissions": {
@@ -217,7 +217,7 @@
* **Yes, manually approve edits** : approve and review each edit individually.
* **No, keep planning** : stay in plan mode and tell Claude what to change.
-Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings#available-settings>) is enabled, the list gains a first option that approves the plan and clears the planning context. Accepting a plan also names the session from the plan content automatically, unless you’ve already set a name with `--name` or `/rename`.
+Approving a plan exits plan mode and switches the session to the permission mode each approve option describes, so Claude starts editing. To plan again, cycle back to plan mode with `Shift+Tab`, or prefix your next prompt with `/plan`. Press `Ctrl+G` to open the proposed plan in your default text editor and edit it directly before Claude proceeds. When [`showClearContextOnPlanAccept`](</docs/en/settings-reference#showclearcontextonplanaccept>) is enabled, the list gains a first option that approves the plan and clears the planning context. Accepting a plan also gives the session a [generated title](</docs/en/sessions#name-your-sessions>) based on the plan, unless you’ve already named the session.
###
@@ -246,11 +246,11 @@
Auto mode is available only when your account meets all of these requirements:
* **Plan** : All plans.
- * **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>).
+ * **Organization** : on Team and Enterprise, auto mode is available by default. Administrators can turn it off for the organization by setting `permissions.disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>).
* **Model** : on the Anthropic API and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), Claude Opus 4.6 or later, Sonnet 4.6 or later, or [Fable 5](</docs/en/model-config#work-with-fable-5>). On Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, only Claude Sonnet 5, Opus 4.7 or later, and Fable 5. Older models, including Sonnet 4.5, Opus 4.5, Haiku, and claude-3 models, are not supported on any provider.
* **Provider** : available by default on the Anthropic API, Claude Platform on AWS, Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and signed-in Claude apps gateway sessions.
-If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings#available-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. In Claude Code v2.1.142 and later, `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
+If Claude Code reports auto mode as unavailable, one of these requirements is unmet; this is not a transient outage. A separate message that names a model and says auto mode “cannot determine the safety” of an action means a classifier request failed; that failure is usually transient, but on Amazon Bedrock it can repeat until your account can invoke the named model. See the [error reference](</docs/en/errors#auto-mode-cannot-determine-the-safety-of-an-action>) for the causes and what to do. If you set `defaultMode: "auto"` in [settings](</docs/en/settings-reference#all-settings>) and a terminal session starts in Manual mode with no error, the setting is likely in `.claude/settings.json` or `.claude/settings.local.json`. In Claude Code v2.1.142 and later, `auto` doesn’t take effect from those files. Move it to `~/.claude/settings.json`. For a conversation the VS Code extension started, check the extension’s own list in Switch permission modes instead.
###
@@ -258,7 +258,7 @@
Auto mode on Bedrock, Agent Platform, or Foundry
-On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings#available-settings>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/permissions#managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
+On [Amazon Bedrock](</docs/en/amazon-bedrock>), [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>), [Microsoft Foundry](</docs/en/microsoft-foundry>), and signed-in [Claude apps gateway](</docs/en/claude-apps-gateway>) sessions, auto mode appears in the `Shift+Tab` cycle by default. Appearing in the cycle doesn’t change the permission mode a session starts in: on these providers, terminal sessions start in your [`defaultMode`](</docs/en/settings-reference#permissions-defaultmode>), which is Manual unless you change it, and conversations in the [VS Code extension](</docs/en/vs-code>) start in Manual unless `claudeCode.initialPermissionMode` or a mode you picked in the extension sets one. Only Claude Sonnet 5, Opus 4.7 or later, and Fable 5 are supported on these providers. To make auto mode the default starting permission mode, set `"permissions": {"defaultMode": "auto"}` in user or managed settings. In sessions the VS Code extension starts, select **Auto** from the mode indicator instead. Switch permission modes covers what outranks that pick. The [`/doctor`](</docs/en/commands#all-commands>) checkup proposes this user-settings default on these providers the same way it does on the Anthropic API. To prevent developers from using auto mode, set `disableAutoMode` to `"disable"` in [managed settings](</docs/en/managed-settings>). This removes `auto` from the `Shift+Tab` cycle, and a session started with `--permission-mode auto` starts in Manual instead. In v2.1.158 through v2.1.206, auto mode was off on these providers until you set `CLAUDE_CODE_ENABLE_AUTO_MODE=1`, and Claude Code ignored `defaultMode: "auto"` on these providers unless the variable was also set. The variable is still accepted for compatibility and has no effect from v2.1.207 onward.
###
@@ -423,14 +423,14 @@
`bypassPermissions` mode disables permission prompts and safety checks so tool calls execute immediately, including writes to protected paths. The actions no mode auto-approves still prompt in this mode. Two [cross-session messaging](</docs/en/cross-session-messaging>) safeguards still apply in this mode, and in plan-mode sessions where bypass permissions are available:
- * The [`isolatePeerMachines`](</docs/en/settings#available-settings>) approval prompt for messages to your sessions beyond this machine still appears.
+ * The [`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>) approval prompt for messages to your sessions beyond this machine still appears.
* When no [`crossSessionInbound`](</docs/en/cross-session-messaging#control-inbound-messages>) value applies, Claude Code holds an inbound message from another of your sessions for your approval, and delivers without asking only when the sending session identifies itself as also bypassing permission prompts. If you leave the permission mode while messages are held, Claude Code re-applies the inbound rules and delivers any held message they now accept.
In sessions with bypass permissions available, Claude Code also doesn’t enforce plan mode’s blocks. Claude is still instructed to plan without editing, but a file edit or shell command it attempts during planning runs without prompting. Explicit [ask rules](</docs/en/permissions#manage-permissions>) and `rm` and `rmdir` removals targeting a critical path still prompt.
Only use this mode in isolated environments like containers, VMs, or dev containers without internet access, where Claude Code cannot damage your host system.
-You can’t enter `bypassPermissions` from a session that was started without it enabled. Enable it at launch with `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings#permission-settings>) or with an enabling flag:
+You can’t enter `bypassPermissions` from a session that was started without it enabled. Enable it at launch with `permissions.defaultMode: "bypassPermissions"` in [settings](</docs/en/settings-reference#permission-settings>) or with an enabling flag:
claude --permission-mode bypassPermissions
@@ -440,7 +440,7 @@
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. [Claude Code on the web](</docs/en/claude-code-on-the-web>) does not honor `defaultMode: "bypassPermissions"` or `"dontAsk"` from your settings files, so a repository’s checked-in settings cannot 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/permissions#managed-settings>).
+`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>).
##
--- a/permissions.md
+++ b/permissions.md
@@ -18,13 +18,13 @@
Deny rules
-Check `deny` rules (from `disallowed_tools` and [settings.json](</docs/en/settings#permission-settings>)). If a deny rule matches, the tool is blocked, even in `bypassPermissions` mode. Bare-name deny rules like `Bash` remove the tool from Claude’s context before this evaluation begins, so only scoped rules like `Bash(rm *)` are checked at this step.
+Check `deny` rules (from `disallowed_tools` and [settings.json](</docs/en/settings-reference#permission-settings>)). If a deny rule matches, the tool is blocked, even in `bypassPermissions` mode. Bare-name deny rules like `Bash` remove the tool from Claude’s context before this evaluation begins, so only scoped rules like `Bash(rm *)` are checked at this step.
3
Ask rules
-Check `ask` rules from [settings.json](</docs/en/settings#permission-settings>). If an ask rule matches, the call falls through to your [`canUseTool` callback](</docs/en/agent-sdk/user-input>) for confirmation, even in `bypassPermissions` mode.Tools that require user interaction behave the same way: `AskUserQuestion` and MCP tools whose server sets [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) always fall through to the callback, even when an allow rule matches. In `dontAsk` mode both cases are denied instead, because that mode never prompts. The MCP annotation requires Claude Code v2.1.199 or later.[claude.ai connector](</docs/en/mcp#organization-controls-on-connector-tools>) tools your organization has set to `ask` also leave the flow at this step. Every call falls through to the callback, even in `bypassPermissions` mode and even when an allow rule matches. The callback receives the reason `Your organization requires approval for this tool`. In `dontAsk` mode the call is denied instead, because that mode never prompts.
+Check `ask` rules from [settings.json](</docs/en/settings-reference#permission-settings>). If an ask rule matches, the call falls through to your [`canUseTool` callback](</docs/en/agent-sdk/user-input>) for confirmation, even in `bypassPermissions` mode.Tools that require user interaction behave the same way: `AskUserQuestion` and MCP tools whose server sets [`_meta["anthropic/requiresUserInteraction"]`](</docs/en/mcp#require-approval-for-a-specific-tool>) always fall through to the callback, even when an allow rule matches. In `dontAsk` mode both cases are denied instead, because that mode never prompts. The MCP annotation requires Claude Code v2.1.199 or later.[claude.ai connector](</docs/en/mcp#organization-controls-on-connector-tools>) tools your organization has set to `ask` also leave the flow at this step. Every call falls through to the callback, even in `bypassPermissions` mode and even when an allow rule matches. The callback receives the reason `Your organization requires approval for this tool`. In `dontAsk` mode the call is denied instead, because that mode never prompts.
4
@@ -82,7 +82,7 @@
**`allowed_tools` does not constrain `bypassPermissions`.** `allowed_tools` pre-approves the tools you list. Other unlisted tools are not matched by any allow rule and fall through to the permission mode, where `bypassPermissions` approves them. Setting `allowed_tools=["Read"]` alongside `permission_mode="bypassPermissions"` still approves every tool, including `Bash`, `Write`, and `Edit`. If you need `bypassPermissions` but want specific tools blocked, use `disallowed_tools`.
-You can also configure allow, deny, and ask rules declaratively in `.claude/settings.json`. These rules are read when the `project` setting source is enabled, which it is for default `query()` options. If you set `setting_sources` (TypeScript: `settingSources`) explicitly, include `"project"` for them to apply. See [Permission settings](</docs/en/settings#permission-settings>) for the rule syntax.
+You can also configure allow, deny, and ask rules declaratively in `.claude/settings.json`. These rules are read when the `project` setting source is enabled, which it is for default `query()` options. If you set `setting_sources` (TypeScript: `settingSources`) explicitly, include `"project"` for them to apply. See [Permission settings](</docs/en/settings-reference#permission-settings>) for the rule syntax.
##
@@ -270,4 +270,4 @@
* [Handle approvals and user input](</docs/en/agent-sdk/user-input>): interactive approval prompts and clarifying questions
* [Hooks guide](</docs/en/agent-sdk/hooks>): run custom code at key points in the agent lifecycle
- * [Permission rules](</docs/en/settings#permission-settings>): declarative allow/deny rules in `settings.json`
+ * [Permission rules](</docs/en/settings-reference#permission-settings>): declarative allow/deny rules in `settings.json`
--- a/platforms.md
+++ b/platforms.md
@@ -17,7 +17,7 @@
[Web](</docs/en/claude-code-on-the-web>)| Long-running tasks that don’t need much steering, or work that should continue when you’re offline| Cloud, Anthropic-managed by default; continues after you disconnect
[Mobile](</docs/en/mobile>)| Starting and monitoring tasks while away from your computer| Cloud sessions from the Claude app for iOS and Android, [Remote Control](</docs/en/remote-control>) for local sessions, [Dispatch](</docs/en/desktop#sessions-from-dispatch>) to Desktop on Pro and Max
-The CLI is the most complete surface for terminal-native work: scripting and the Agent SDK are CLI-only. Third-party providers also work in [VS Code](</docs/en/vs-code#use-third-party-providers>). Enterprise [Desktop](</docs/en/desktop>) deployments support Google Cloud’s Agent Platform, and Desktop supports [gateway providers](</docs/en/llm-gateway-connect#desktop-app>); for Amazon Bedrock or Microsoft Foundry, use the CLI or VS Code, or [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>), which runs the Code tab on those providers. Desktop and the IDE extensions trade some CLI-only features for visual review and tighter editor integration. The web runs in the cloud, so tasks keep going after you disconnect. Mobile is a thin client into those same cloud sessions or into a local session via Remote Control, and can send tasks to Desktop with Dispatch. You can mix surfaces on the same project. Configuration, project memory, and MCP servers are shared across the local surfaces.
+The CLI is the most complete surface for terminal-native work: scripting and the Agent SDK are CLI-only. Third-party providers also work in [VS Code](</docs/en/vs-code#use-third-party-providers>) and in [JetBrains](</docs/en/feature-availability#features-available-on-every-provider>), which runs the CLI in your IDE’s terminal. Enterprise [Desktop](</docs/en/desktop>) deployments support Google Cloud’s Agent Platform, and Desktop supports [gateway providers](</docs/en/llm-gateway-connect#desktop-app>); for Amazon Bedrock or Microsoft Foundry, use the CLI or an IDE extension, or [Claude Desktop on 3P](<https://claude.com/docs/third-party/claude-desktop/overview>), which runs the Code tab on those providers. Desktop and the IDE extensions trade some CLI-only features for visual review and tighter editor integration. The web runs in the cloud, so tasks keep going after you disconnect. Mobile is a thin client into those same cloud sessions or into a local session via Remote Control, and can send tasks to Desktop with Dispatch. You can mix surfaces on the same project. Configuration, project memory, and MCP servers are shared across the local surfaces.
##
--- a/plugin-dependencies.md
+++ b/plugin-dependencies.md
@@ -64,7 +64,7 @@
* Enable auto-update for the marketplace in `/plugin`. The next auto-update moves the bundle to the new version and installs any dependencies it adds.
* Run `claude plugin update backend-standard`, then `/reload-plugins` to install the newly added dependencies.
-To roll bundles out across an organization, add the bundle plugin to `enabledPlugins` in [managed settings](</docs/en/settings#enabledplugins>).
+To roll bundles out across an organization, add the bundle plugin to `enabledPlugins` in [managed settings](</docs/en/settings-reference#enabledplugins>).
##
Show diff (128 lines)
--- a/plugin-marketplaces.md
+++ b/plugin-marketplaces.md
@@ -191,7 +191,7 @@
`$schema`| string| JSON Schema URL for editor autocomplete and validation. Claude Code ignores this field at load time.
`description`| string| Brief marketplace description
`version`| string| Marketplace manifest version
-`metadata.pluginRoot`| string| Base directory prepended to relative plugin source paths (for example, `"./plugins"` lets you write `"source": "formatter"` instead of `"source": "./plugins/formatter"`)
+`metadata.pluginRoot`| string| Directory that Claude Code resolves bare plugin source names under. See Relative paths. Requires Claude Code v2.1.239 or later.
`allowCrossMarketplaceDependenciesOn`| array| Other marketplaces that plugins in this marketplace may depend on. Dependencies from a marketplace not listed here are blocked at install. See [Depend on a plugin from another marketplace](</docs/en/plugin-dependencies#depend-on-a-plugin-from-another-marketplace>).
`renames`| object| Map from a former plugin `name` to its current name, or to `null` if the plugin was removed. Lets existing users migrate automatically when you rename or remove an entry in `plugins`. See Rename or remove a plugin. Requires Claude Code v2.1.193 or later.
@@ -262,7 +262,7 @@
Source| Type| Fields| Notes
---|---|---|---
-Relative path| `string` (e.g. `"./my-plugin"`)| none| Local directory within the marketplace repo. Must start with `./`. Resolved relative to the marketplace root, not the `.claude-plugin/` directory
+Relative path| `string` (e.g. `"./my-plugin"`)| none| Local directory within the marketplace repo. Must start with `./`, unless you write a bare name under `metadata.pluginRoot`. Claude Code resolves the path relative to the marketplace root, not the `.claude-plugin/` directory
`github`| object| `repo`, `ref?`, `sha?`|
`url`| object| `url`, `ref?`, `sha?`| Git URL source
`git-subdir`| object| `url`, `path`, `ref?`, `sha?`| Subdirectory within a git repo. Clones sparsely to minimize bandwidth for monorepos
@@ -300,7 +300,7 @@
"source": "./plugins/my-plugin"
}
-Paths resolve relative to the marketplace root, which is the directory containing `.claude-plugin/`. In the example above, `./plugins/my-plugin` points to `<repo>/plugins/my-plugin`, even though `marketplace.json` lives at `<repo>/.claude-plugin/marketplace.json`. Don’t use `../` to reference paths outside the marketplace root.
+Paths resolve relative to the marketplace root, which is the directory containing `.claude-plugin/`. In the example above, `./plugins/my-plugin` points to `<repo>/plugins/my-plugin`, even though `marketplace.json` lives at `<repo>/.claude-plugin/marketplace.json`. Don’t use `../` to reference paths outside the marketplace root. A bare name is a single directory name with no `/`, such as `"formatter"`. To write bare names instead of `./` paths, set `metadata.pluginRoot` to the directory they resolve under. With `"pluginRoot": "./plugins"`, Claude Code resolves `"source": "formatter"` to `./plugins/formatter`. Requires Claude Code v2.1.239 or later. `metadata.pluginRoot` must itself be a relative path inside the marketplace. Claude Code ignores it for a source that already starts with `./`. A source that contains a `/`, such as `team-a/formatter`, isn’t a bare name and still needs the `./` prefix, even when `metadata.pluginRoot` is set.
Claude Code resolves relative paths against a local copy of the marketplace, so they work when users add your marketplace from a git source or a local directory. If users add your marketplace via a direct URL to the `marketplace.json` file, relative paths won’t resolve, because Claude Code downloads only that file. For URL-based distribution, use any other plugin source instead. See Troubleshooting for details.
@@ -494,7 +494,7 @@
`url`| string| Required. HTTPS URL of the zip archive. Claude Code rejects `http://` URLs, along with loopback, link-local, and cloud-metadata hosts. Every redirect hop must satisfy the same rules, or Claude Code refuses the download
`sha256`| string| Optional. SHA-256 digest of the archive as 64 hex characters, uppercase or lowercase. Claude Code verifies every download against it and refuses the install on a mismatch
-The `sha256` digest also serves as the plugin’s version when neither `plugin.json` nor the marketplace entry declares one. See [Version management](</docs/en/plugins-reference#version-management>). If you declare a `version`, that version string is the update signal, so after changing the zip and its digest, bump the version too, or users keep the cached copy. If you register the marketplace from a URL source with `headers`, such as an [`extraKnownMarketplaces` entry](</docs/en/settings#extraknownmarketplaces>), Claude Code sends those headers with archive downloads whose URL shares the marketplace URL’s origin: the same scheme, host, and port. Claude Code downloads an archive on a different origin without the headers, and drops them when a redirect leaves the origin, so it never sends a marketplace credential to a third-party host.
+The `sha256` digest also serves as the plugin’s version when neither `plugin.json` nor the marketplace entry declares one. See [Version management](</docs/en/plugins-reference#version-management>). If you declare a `version`, that version string is the update signal, so after changing the zip and its digest, bump the version too, or users keep the cached copy. If you register the marketplace from a URL source with `headers`, such as an [`extraKnownMarketplaces` entry](</docs/en/settings-reference#extraknownmarketplaces>), Claude Code sends those headers with archive downloads whose URL shares the marketplace URL’s origin: the same scheme, host, and port. Claude Code downloads an archive on a different origin without the headers, and drops them when a redirect leaves the origin, so it never sends a marketplace credential to a third-party host.
###
@@ -546,7 +546,7 @@
* Every other path runs only the command the user already accepted. This includes updates started from `/plugin` and the background runs described in When Claude Code re-runs the command. When none was accepted, Claude Code refuses to run the command and tells the user how to review it. Claude Code never installs a command-sourced plugin as a dependency of another plugin, so users install it themselves first.
* If you change the entry’s `command`, or switch its `mode`, users keep the version they already have and Claude Code stops re-running the command. In interactive sessions, the `/plugin` Errors tab shows the new command until the user reviews and accepts it by running `claude plugin update <plugin>@<marketplace>`.
-Administrators can block command sources across an organization with the managed setting [`disableCommandPluginSources`](</docs/en/settings#available-settings>). If an organization sets [`allowManagedHooksOnly`](</docs/en/settings#hook-configuration>), Claude Code blocks command sources by default.
+Administrators can block command sources across an organization with the managed setting [`disableCommandPluginSources`](</docs/en/settings-reference#disablecommandpluginsources>). If an organization sets [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>), Claude Code blocks command sources by default.
####
@@ -753,7 +753,7 @@
}
}
-For full configuration options, see [Plugin settings](</docs/en/settings#plugin-settings>).
+For full configuration options, see [Plugin settings](</docs/en/settings-reference#plugin-settings>).
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. Marketplace state is stored once per user in `~/.claude/plugins/known_marketplaces.json`, not per project.
@@ -789,7 +789,7 @@
Managed marketplace restrictions
-For organizations requiring strict control over plugin sources, administrators can restrict which plugin marketplaces users are allowed to add using the [`strictKnownMarketplaces`](</docs/en/settings#strictknownmarketplaces>) setting in managed settings. To also reject the CLI flags that sideload plugins, agents, and MCP servers for a single run, pair it with [`disableSideloadFlags`](</docs/en/settings#available-settings>). To allowlist which marketplaces’ plugins can appear as contextual install suggestions, set [`pluginSuggestionMarketplaces`](</docs/en/settings#available-settings>). `strictKnownMarketplaces` matches the marketplace a plugin comes from, not the entries inside it, so users can still install a plugin with a `command` source from an allowed marketplace. To block command sources as well, set [`disableCommandPluginSources`](</docs/en/settings#available-settings>). When `strictKnownMarketplaces` is configured in managed settings, the restriction behavior depends on the value:
+For organizations requiring strict control over plugin sources, administrators can restrict which plugin marketplaces users are allowed to add using the [`strictKnownMarketplaces`](</docs/en/settings-reference#strictknownmarketplaces>) setting in managed settings. To also reject the CLI flags that sideload plugins, agents, and MCP servers for a single run, pair it with [`disableSideloadFlags`](</docs/en/settings-reference#disablesideloadflags>). To allowlist which marketplaces’ plugins can appear as contextual install suggestions, set [`pluginSuggestionMarketplaces`](</docs/en/settings-reference#pluginsuggestionmarketplaces>). `strictKnownMarketplaces` matches the marketplace a plugin comes from, not the entries inside it, so users can still install a plugin with a `command` source from an allowed marketplace. To block command sources as well, set [`disableCommandPluginSources`](</docs/en/settings-reference#disablecommandpluginsources>). When `strictKnownMarketplaces` is configured in managed settings, the restriction behavior depends on the value:
Value| Behavior
---|---
@@ -825,7 +825,7 @@
* Non-interactive environments that run before the machine’s first interactive launch.
* Machines where Claude Code already ran interactively under a policy that blocked the marketplace, such as the empty-array lockdown. Claude Code records the blocked attempt and doesn’t retry after the policy changes.
-On these machines, add the marketplace to [`extraKnownMarketplaces`](</docs/en/settings#extraknownmarketplaces>) in the same `managed-settings.json` so Claude Code registers it automatically, or run `claude plugin marketplace add anthropics/claude-plugins-official`. Allow specific marketplaces only:
+On these machines, add the marketplace to [`extraKnownMarketplaces`](</docs/en/settings-reference#extraknownmarketplaces>) in the same `managed-settings.json` so Claude Code registers it automatically, or run `claude plugin marketplace add anthropics/claude-plugins-official`. Allow specific marketplaces only:
{
"strictKnownMarketplaces": [
@@ -845,7 +845,7 @@
]
}
-Allow every marketplace repository under a GitHub organization with an [owner-wildcard](</docs/en/settings#owner-wildcards>) entry. Owner wildcards require Claude Code v2.1.223 or later.
+Allow every marketplace repository under a GitHub organization with an [owner-wildcard](</docs/en/settings-reference#owner-wildcards>) entry. Owner wildcards require Claude Code v2.1.223 or later.
{
"strictKnownMarketplaces": [
@@ -880,7 +880,7 @@
Use `".*"` as the `pathPattern` to allow any filesystem path while still controlling network sources with `hostPattern`.
-`strictKnownMarketplaces` restricts what users can add, but doesn’t register marketplaces on its own. To register an allowed marketplace for users automatically, add it to [`extraKnownMarketplaces`](</docs/en/settings#extraknownmarketplaces>) in the same `managed-settings.json`.The official Anthropic marketplace is the only one Claude Code registers on its own, and only when the allowlist allows it. Automatic registration also misses some machines, such as non-interactive environments and machines where an earlier policy blocked it. To cover those machines, add the official marketplace to `extraKnownMarketplaces` as well. For the two settings side by side, see the [`strictKnownMarketplaces` reference](</docs/en/settings#strictknownmarketplaces>).
+`strictKnownMarketplaces` restricts what users can add, but doesn’t register marketplaces on its own. To register an allowed marketplace for users automatically, add it to [`extraKnownMarketplaces`](</docs/en/settings-reference#extraknownmarketplaces>) in the same `managed-settings.json`.The official Anthropic marketplace is the only one Claude Code registers on its own, and only when the allowlist allows it. Automatic registration also misses some machines, such as non-interactive environments and machines where an earlier policy blocked it. To cover those machines, add the official marketplace to `extraKnownMarketplaces` as well. For the two settings side by side, see the [`strictKnownMarketplaces` reference](</docs/en/settings-reference#strictknownmarketplaces>).
####
@@ -888,14 +888,14 @@
How restrictions work
-Restrictions are checked before any network or filesystem operation. The check runs on marketplace add and on plugin install, update, refresh, and auto-update. If a marketplace was added before the policy was configured and its source no longer matches the allowlist, Claude Code refuses to install or update plugins from it. The same enforcement applies to `blockedMarketplaces`. To block every marketplace repository under a GitHub owner, use the owner-wildcard form in a `blockedMarketplaces` entry: `{ "source": "github", "repo": "untrusted-org/*" }`. Requires Claude Code v2.1.223 or later. For the matching rules, which differ between the blocklist and the allowlist, see [Owner wildcards](</docs/en/settings#owner-wildcards>). When a user adds an `https://` repository URL that Claude Code [clones rather than fetches](</docs/en/discover-plugins#add-from-other-git-hosts>), such as a bare `github.com` or `gitlab.com` repository URL, Claude Code also checks it against the `url` entries in `blockedMarketplaces`. Claude Code blocks the addition if an entry names the same URL. In that comparison, Claude Code ignores the `.git` suffix and any ref the user appends after `#`. Requires Claude Code v2.1.232 or later. Before v2.1.232, Claude Code matched a `url` entry only against a URL it fetched as a hosted `marketplace.json` file. The allowlist uses exact matching for most source types, apart from owner-wildcard `github` entries. For a marketplace to be allowed, all specified fields must match:
-
- * For GitHub sources: `repo` is required, either naming one repository or using the owner-wildcard form `owner/*` to cover every repository under that owner. For how wildcard entries match, including the case rules, see [Owner wildcards](</docs/en/settings#owner-wildcards>). For single-repository entries, `ref` must match exactly or be absent from both the marketplace source and the allowlist entry, and the same rule applies to `path`
+Restrictions are checked before any network or filesystem operation. The check runs on marketplace add and on plugin install, update, refresh, and auto-update. If a marketplace was added before the policy was configured and its source no longer matches the allowlist, Claude Code refuses to install or update plugins from it. The same enforcement applies to `blockedMarketplaces`. To block every marketplace repository under a GitHub owner, use the owner-wildcard form in a `blockedMarketplaces` entry: `{ "source": "github", "repo": "untrusted-org/*" }`. Requires Claude Code v2.1.223 or later. For the matching rules, which differ between the blocklist and the allowlist, see [Owner wildcards](</docs/en/settings-reference#owner-wildcards>). When a user adds an `https://` repository URL that Claude Code [clones rather than fetches](</docs/en/discover-plugins#add-from-other-git-hosts>), such as a bare `github.com` or `gitlab.com` repository URL, Claude Code also checks it against the `url` entries in `blockedMarketplaces`. Claude Code blocks the addition if an entry names the same URL. In that comparison, Claude Code ignores the `.git` suffix and any ref the user appends after `#`. Requires Claude Code v2.1.232 or later. Before v2.1.232, Claude Code matched a `url` entry only against a URL it fetched as a hosted `marketplace.json` file. The allowlist uses exact matching for most source types, apart from owner-wildcard `github` entries. For a marketplace to be allowed, all specified fields must match:
+
+ * For GitHub sources: `repo` is required, either naming one repository or using the owner-wildcard form `owner/*` to cover every repository under that owner. For how wildcard entries match, including the case rules, see [Owner wildcards](</docs/en/settings-reference#owner-wildcards>). For single-repository entries, `ref` must match exactly or be absent from both the marketplace source and the allowlist entry, and the same rule applies to `path`
* For URL sources: the full URL must match exactly
* For `hostPattern` sources: the marketplace host is matched against the regex pattern
* For `pathPattern` sources: the marketplace’s filesystem path is matched against the regex pattern
-The allowlist’s exact matching doesn’t normalize URLs: a trailing slash, `.git` suffix, or `ssh://` versus `https://` form are treated as different values. If your organization’s marketplace can be cloned by more than one URL form, prefer a `hostPattern` entry over a literal URL so all forms match. Because `strictKnownMarketplaces` is set in [managed settings](</docs/en/settings#settings-files>), individual users and project configurations can’t override these restrictions. For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](</docs/en/settings#strictknownmarketplaces>).
+The allowlist’s exact matching doesn’t normalize URLs: a trailing slash, `.git` suffix, or `ssh://` versus `https://` form are treated as different values. If your organization’s marketplace can be cloned by more than one URL form, prefer a `hostPattern` entry over a literal URL so all forms match. Because `strictKnownMarketplaces` is set in [managed settings](</docs/en/managed-settings>), individual users and project configurations can’t override these restrictions. For complete configuration details including all supported source types and comparison with `extraKnownMarketplaces`, see the [strictKnownMarketplaces reference](</docs/en/settings-reference#strictknownmarketplaces>).
###
@@ -913,7 +913,7 @@
Set up release channels
-To support “stable” and “latest” release channels for your plugins, you can set up two marketplaces that point to different refs or SHAs of the same repo. You can then assign the two marketplaces to different user groups through [managed settings](</docs/en/settings#settings-files>).
+To support “stable” and “latest” release channels for your plugins, you can set up two marketplaces that point to different refs or SHAs of the same repo. You can then assign the two marketplaces to different user groups through [managed settings](</docs/en/managed-settings>).
Each channel must resolve to a different version. If you use explicit versions, `plugin.json` must declare a different `version` at each pinned ref. If you omit `version`, the distinct commit SHAs already distinguish the channels. If two refs resolve to the same version string, Claude Code treats them as identical and skips the update.
@@ -1339,5 +1339,5 @@
* [Discover and install prebuilt plugins](</docs/en/discover-plugins>) \- Installing plugins from existing marketplaces
* [Plugins](</docs/en/plugins>) \- Creating your own plugins
* [Plugins reference](</docs/en/plugins-reference>) \- Complete technical specifications and schemas
- * [Plugin settings](</docs/en/settings#plugin-settings>) \- Plugin configuration options
- * [strictKnownMarketplaces reference](</docs/en/settings#strictknownmarketplaces>) \- Managed marketplace restrictions
+ * [Plugin settings](</docs/en/settings-reference#plugin-settings>) \- Plugin configuration options
+ * [strictKnownMarketplaces reference](</docs/en/settings-reference#strictknownmarketplaces>) \- Managed marketplace restrictions
--- a/plugin-relevance.md
+++ b/plugin-relevance.md
@@ -1,4 +1,4 @@
-If you operate a plugin marketplace for your organization, you can have Claude Code suggest specific plugins to users based on what they are working on. Add a `relevance` block to a plugin’s entry in `marketplace.json`, then allowlist the marketplace in managed settings. When a user’s session matches one of the declared signals, Claude Code surfaces an install suggestion for that plugin. Marketplace-declared suggestions are opt-in per marketplace through [managed settings](</docs/en/settings#settings-files>). No marketplace’s `relevance` declarations produce suggestions until an administrator adds it to the allowlist, including the official Anthropic marketplace. Claude Code also includes one built-in suggestion that is independent of this allowlist; that tip and all marketplace-declared tips are disabled when [`spinnerTipsEnabled`](</docs/en/settings#available-settings>) is set to `false`. This feature requires Claude Code v2.1.152 or later. Older clients ignore the `relevance` field. This page is for marketplace operators and enterprise administrators. If you are looking to install plugins, see [Discover and install plugins](</docs/en/discover-plugins>).
+If you operate a plugin marketplace for your organization, you can have Claude Code suggest specific plugins to users based on what they are working on. Add a `relevance` block to a plugin’s entry in `marketplace.json`, then allowlist the marketplace in managed settings. When a user’s session matches one of the declared signals, Claude Code surfaces an install suggestion for that plugin. Marketplace-declared suggestions are opt-in per marketplace through [managed settings](</docs/en/managed-settings>). No marketplace’s `relevance` declarations produce suggestions until an administrator adds it to the allowlist, including the official Anthropic marketplace. Claude Code also includes one built-in suggestion that is independent of this allowlist; that tip and all marketplace-declared tips are disabled when [`spinnerTipsEnabled`](</docs/en/settings-reference#spinnertipsenabled>) is set to `false`. This feature requires Claude Code v2.1.152 or later. Older clients ignore the `relevance` field. This page is for marketplace operators and enterprise administrators. If you are looking to install plugins, see [Discover and install plugins](</docs/en/discover-plugins>).
##
@@ -100,7 +100,7 @@
Enable suggestions in managed settings
-Declaring `relevance` in `marketplace.json` is not enough on its own. An administrator must allowlist the marketplace in [managed settings](</docs/en/settings#settings-files>) before its suggestions appear to users. Add the marketplace name to `pluginSuggestionMarketplaces`. For any marketplace other than the official Anthropic marketplace, also declare the marketplace source in the same managed settings, either as that name’s entry in `extraKnownMarketplaces` or as an entry in `strictKnownMarketplaces`. The allowlisted name is ignored if the marketplace registered on the machine came from a different source. This prevents an unrelated source from registering under an allowlisted name to have its plugins suggested across your org. The following `managed-settings.json` registers an org marketplace from a GitHub repository and enables its suggestions:
+Declaring `relevance` in `marketplace.json` is not enough on its own. An administrator must allowlist the marketplace in [managed settings](</docs/en/managed-settings>) before its suggestions appear to users. Add the marketplace name to `pluginSuggestionMarketplaces`. For any marketplace other than the official Anthropic marketplace, also declare the marketplace source in the same managed settings, either as that name’s entry in `extraKnownMarketplaces` or as an entry in `strictKnownMarketplaces`. The allowlisted name is ignored if the marketplace registered on the machine came from a different source. This prevents an unrelated source from registering under an allowlisted name to have its plugins suggested across your org. The following `managed-settings.json` registers an org marketplace from a GitHub repository and enables its suggestions:
{
"extraKnownMarketplaces": {
@@ -157,4 +157,4 @@
* [Create and distribute a plugin marketplace](</docs/en/plugin-marketplaces>): build the marketplace that hosts your plugins
* [Recommend your plugin from your CLI](</docs/en/plugin-hints>): prompt users from your own CLI instead of from Claude Code’s session signals
- * [Settings](</docs/en/settings>): full reference for `pluginSuggestionMarketplaces` and `extraKnownMarketplaces`
+ * [Settings reference](</docs/en/settings-reference#pluginsuggestionmarketplaces>): `pluginSuggestionMarketplaces` and `extraKnownMarketplaces`
--- a/plugins-reference.md
+++ b/plugins-reference.md
@@ -293,9 +293,9 @@
`user`| `~/.claude/settings.json`| Personal plugins available across all projects (default)
`project`| `.claude/settings.json`| Team plugins shared via version control
`local`| `.claude/settings.local.json`| Project-specific plugins, gitignored when Claude Code saves a setting to it
-`managed`| [Managed settings](</docs/en/settings#settings-files>)| Managed plugins (read-only, update only)
-
-Plugins use the same scope system as other Claude Code configurations. For installation instructions and scope flags, see [Install plugins](</docs/en/discover-plugins#install-plugins>). For a complete explanation of scopes, see [Configuration scopes](</docs/en/settings#configuration-scopes>).
+`managed`| [Managed settings](</docs/en/managed-settings>)| Managed plugins (read-only, update only)
+
+Plugins use the same scope system as other Claude Code configurations. For installation instructions and scope flags, see [Install plugins](</docs/en/discover-plugins#install-plugins>). For a complete explanation of scopes, see [Configuration scopes](</docs/en/settings#where-settings-live>).
* * *
@@ -529,13 +529,13 @@
Monitor commands| Read the value from a config file in the script
MCP [`headersHelper`](</docs/en/mcp#use-dynamic-headers-for-custom-authentication>)| Read the value from a config file in the script
-Before v2.1.207, these fields substituted `${user_config.KEY}` values; update plugins that relied on this. Non-sensitive values are stored under the [`pluginConfigs`](</docs/en/settings#pluginconfigs>) key in your user `settings.json` as `pluginConfigs[<plugin-id>].options`. Sensitive values go to the macOS Keychain, or to `~/.claude/.credentials.json` on platforms where no supported keychain is available. Keychain storage is shared with OAuth tokens and has an approximately 2 KB total limit, so keep sensitive values small. Claude Code reads all `pluginConfigs` values from only three settings sources:
+Before v2.1.207, these fields substituted `${user_config.KEY}` values; update plugins that relied on this. Non-sensitive values are stored under the [`pluginConfigs`](</docs/en/settings-reference#pluginconfigs>) key in your user `settings.json` as `pluginConfigs[<plugin-id>].options`. Sensitive values go to the macOS Keychain, or to `~/.claude/.credentials.json` on platforms where no supported keychain is available. Keychain storage is shared with OAuth tokens and has an approximately 2 KB total limit, so keep sensitive values small. Claude Code reads all `pluginConfigs` values from only three settings sources:
* **User settings** : `~/.claude/settings.json`, the file the enable-time prompt writes to
* **`--settings`** : the CLI flag or SDK inline settings
* **Managed settings** : [organization-controlled policy](</docs/en/permissions#managed-settings>)
-When more than one source sets the same key, managed settings take precedence, then `--settings`, then user settings. The [`--setting-sources`](</docs/en/cli-reference#cli-flags>) flag narrows the list further. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored. Both files live in the workspace, so a cloned repository could supply values there, and those values would flow into plugin hook commands, MCP server configs, LSP commands, and monitor commands. Before v2.1.207, these entries were read. The restriction is specific to `pluginConfigs`: [`enabledPlugins`](</docs/en/settings#enabledplugins>) still honors project and local settings.
+When more than one source sets the same key, managed settings take precedence, then `--settings`, then user settings. The [`--setting-sources`](</docs/en/cli-reference#cli-flags>) flag narrows the list further. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored. Both files live in the workspace, so a cloned repository could supply values there, and those values would flow into plugin hook commands, MCP server configs, LSP commands, and monitor commands. Before v2.1.207, these entries were read. The restriction is specific to `pluginConfigs`: [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>) still honors project and local settings.
###
--- a/prompt-caching.md
+++ b/prompt-caching.md
@@ -34,7 +34,15 @@
* **Microsoft Foundry** : depends on the deployment’s [hosting option](<https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options>). Hosted on Azure deployments are served on Azure infrastructure; Hosted on Anthropic deployments are served on Anthropic’s infrastructure
* **Custom`ANTHROPIC_BASE_URL` or [LLM gateway](</docs/en/llm-gateway>)**: the cache lives wherever your requests are forwarded, and whether caching works depends on the gateway
-System context that Claude Code appends mid-conversation, such as file-change notices, is cached on Amazon Bedrock and its [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>), Google Cloud’s Agent Platform, and Microsoft Foundry the same way it is on the Claude API. Before v2.1.211, these providers billed that appended system context as uncached input tokens on every request. When your requests pass through an [LLM gateway](</docs/en/llm-gateway>) or a custom `ANTHROPIC_BASE_URL`, Claude Code marks that appended system context for caching the same way, and whether the cache takes effect depends on the gateway. If the gateway rejects the [cache breakpoint](<https://platform.claude.com/docs/en/build-with-claude/prompt-caching#explicit-cache-breakpoints>) on that block, Claude Code retries the request without it and leaves that block uncached for the rest of the conversation. For what each provider stores and processes, see [data usage](</docs/en/data-usage>). Wherever the cache lives, entries expire after a period of inactivity, and Cache lifetime below covers the TTL and how to extend it.
+Claude Code also appends system context mid-conversation, such as file-change notices. Whether that block is cached depends on how your requests reach the provider. At the provider’s own endpoint, Amazon Bedrock and its [Mantle endpoint](</docs/en/amazon-bedrock#use-the-mantle-endpoint>), Google Cloud’s Agent Platform, and Microsoft Foundry cache the block the same way the Claude API does. For Bedrock, Mantle, and Agent Platform, that means their base-URL variables are unset. For Foundry, it means `ANTHROPIC_FOUNDRY_BASE_URL` is unset or points at your resource’s `services.ai.azure.com` host, the standard [Microsoft Foundry setup](</docs/en/microsoft-foundry>). Before v2.1.211, these providers billed the block as uncached input tokens on every request. Claude Code doesn’t mark the block for caching, so it shows up as uncached input on every request, in any of these setups:
+
+ * [`ANTHROPIC_BEDROCK_BASE_URL`](</docs/en/env-vars>), `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_BEDROCK_MANTLE_BASE_URL` set to any value, even the provider’s own endpoint
+ * `ANTHROPIC_FOUNDRY_BASE_URL` pointing at a host outside `services.ai.azure.com`, such as a gateway
+ * [`ANTHROPIC_AWS_BASE_URL`](</docs/en/env-vars>) set to any value on [Claude Platform on AWS](</docs/en/claude-platform-on-aws>), including a custom-region endpoint
+ * An [LLM gateway](</docs/en/llm-gateway>) or a custom `ANTHROPIC_BASE_URL`
+ * A [Claude apps gateway](</docs/en/claude-apps-gateway>) session
+
+Claude Code keeps the conversation’s own [cache breakpoints](<https://platform.claude.com/docs/en/build-with-claude/prompt-caching#explicit-cache-breakpoints>) in place, so a gateway that forwards them still caches your conversation. Before v2.1.237, Claude Code marked the block for caching through gateways too, and a gateway that silently removed the marker left the entire conversation billed as uncached input on every turn. For what each provider stores and processes, see [data usage](</docs/en/data-usage>). Wherever the cache lives, entries expire after a period of inactivity, and Cache lifetime below covers the TTL and how to extend it.
##
@@ -59,12 +67,7 @@
Switching models
-Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the current cache hasn’t expired. Whether the cache has expired depends on how long it has been since Claude Code last sent a request in this conversation or Claude last responded:
-
- * **Less than onecache TTL ago**: the cache is still warm.
- * **One cache TTL or longer ago** : the cache has already expired, so Claude Code switches without asking.
-
-Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable 5 and Opus 5 is also a model switch. When a safety classifier flags a request and the flagged category has a fallback model, Claude Code re-runs the request on that model and the session continues there.
+Each model has its own cache. Switching with [`/model`](</docs/en/model-config#setting-your-model>) means the next request reads the entire conversation history with no cache hits, even though the content is identical. When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the cache is still warm. The cache stays warm for one cache TTL after Claude Code last sent a request in this conversation or Claude last responded. Once that time passes, the cache has expired, so Claude Code switches without asking. Before v2.1.238, Claude Code didn’t check the cache TTL and asked even after the cache had expired. The [`opusplan` model setting](</docs/en/model-config#opusplan-model-setting>) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](</docs/en/model-config#automatic-model-fallback>) on Fable 5 and Opus 5 is also a model switch. When a safety classifier flags a request and the flagged category has a fallback model, Claude Code re-runs the request on that model and the session continues there.
###
@@ -157,7 +160,7 @@
Denying an entire tool
-Adding a bare tool name like `Bash` or `WebFetch` as a [deny rule](</docs/en/permissions#manage-permissions>) removes that tool from Claude’s context entirely. Built-in tool definitions load into the system prompt layer, so adding or removing one of these rules mid-session invalidates the cache. Claude Code applies the change on the next request, even one in the middle of a turn, whether you add the rule through `/permissions` or by [editing a settings file directly](</docs/en/settings#when-edits-take-effect>). Only a deny rule that matches in the tool-name position has this effect: a bare tool name, the equivalent `Bash(*)` form, or a [tool-name glob](</docs/en/permissions#tool-name-wildcards>) like `"*"`. A glob that matches only MCP tools, such as `"mcp__*"`, removes those tools the same way but leaves the cache intact when the matched tools are deferred, the default, since deferred definitions were never in the cached prefix. Scoped deny rules like `Bash(rm *)`, and all allow and ask rules, don’t change which tools Claude sees. Claude Code checks them when Claude attempts a call, leaving the prefix intact.
+Adding a bare tool name like `Bash` or `WebFetch` as a [deny rule](</docs/en/permissions#manage-permissions>) removes that tool from Claude’s context entirely. Claude Code loads built-in tool definitions into the system prompt layer, so adding or removing one of these rules mid-session invalidates the cache. Claude Code applies the change on the next request, whether you add the rule through `/permissions` or by [editing a settings file directly](</docs/en/settings#when-edits-take-effect>). That includes a rule you add through `/permissions` in the middle of a turn. Only a deny rule that matches in the tool-name position has this effect: a bare tool name, the equivalent `Bash(*)` form, or a [tool-name glob](</docs/en/permissions#tool-name-wildcards>) like `"*"`. A glob that matches only MCP tools, such as `"mcp__*"`, removes those tools the same way but leaves the cache intact when the matched tools are deferred, the default, since deferred definitions were never in the cached prefix. Scoped deny rules like `Bash(rm *)`, and all allow and ask rules, don’t change which tools Claude sees. Claude Code checks them when Claude attempts a call, leaving the prefix intact.
###
@@ -282,7 +285,7 @@
Override the TTL
-Set `FORCE_PROMPT_CACHING_5M=1` to force the five-minute TTL regardless of authentication. This is useful when you’re debugging cache behavior, comparing the two TTLs, or overriding an `ENABLE_PROMPT_CACHING_1H` set in [managed settings](</docs/en/settings#settings-files>).
+Set `FORCE_PROMPT_CACHING_5M=1` to force the five-minute TTL regardless of authentication. This is useful when you’re debugging cache behavior, comparing the two TTLs, or overriding an `ENABLE_PROMPT_CACHING_1H` set in [managed settings](</docs/en/managed-settings>).
##
@@ -331,7 +334,7 @@
`DISABLE_PROMPT_CACHING_OPUS`| Disable for Opus only
`DISABLE_PROMPT_CACHING_FABLE`| Disable for Fable only
-To set caching policy across an organization, put any of these or the TTL variables in the `env` block of [managed settings](</docs/en/settings#settings-files>). For normal use, leave caching enabled.
+To set caching policy across an organization, put any of these or the TTL variables in the `env` block of [managed settings](</docs/en/managed-settings>). For normal use, leave caching enabled.
##
--- a/prompt-library.md
+++ b/prompt-library.md
@@ -10,7 +10,7 @@
add rate limiting to the public API and make sure existing tests still pass
-**Give it a way to check its own work.** Ask for run, test, compare, or verify in the same prompt so Claude iterates instead of stopping after one attempt.
+**Give it a way to check its own work.** Ask for run, test, compare, or verify in the same prompt so Claude iterates instead of stopping after one attempt. To check the finished change against the running app, run [`/verify`](</docs/en/skills#run-and-verify-your-app>).
write the migration, run it against the dev database, and confirm the schema matches
--- a/python.md
+++ b/python.md
@@ -959,7 +959,7 @@
)
* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.
- * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG=1`: it retries capacity errors indefinitely, and as of Claude Code v2.1.199 raises the default for other transient errors to `300` and removes the cap on this variable.
+ * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>): it retries transient capacity errors indefinitely and, on Claude Code v2.1.199 or later, raises the default for other transient errors to `300` and removes the cap on this variable.
* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.
* `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed.
--- a/remote-control.md
+++ b/remote-control.md
@@ -23,7 +23,7 @@
* You use Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry.
* You point [`ANTHROPIC_BASE_URL`](</docs/en/env-vars>) at a host other than `api.anthropic.com`, such as an [LLM gateway](</docs/en/llm-gateway>) or proxy. Unset the variable to use Remote Control. Before v2.1.196, Claude Code allowed Remote Control with a custom `ANTHROPIC_BASE_URL`.
* You sign in through an enterprise [Claude apps gateway](</docs/en/claude-apps-gateway>).
- * **Feature-flag evaluation** : [`DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, and `DISABLE_GROWTHBOOK`](</docs/en/env-vars>) each disable the feature-flag evaluation that Remote Control availability depends on. Unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings#available-settings>), to use Remote Control.
+ * **Feature-flag evaluation** : [`DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, and `DISABLE_GROWTHBOOK`](</docs/en/env-vars>) each disable the feature-flag evaluation that Remote Control availability depends on. Unset the variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>), to use Remote Control.
* **Workspace trust** : run `claude` in your project directory at least once to accept the workspace trust dialog. The startup trust dialog never saves trust for your home directory, so start Remote Control from a project directory.
##
@@ -136,7 +136,7 @@
3. The last meaningful message in existing conversation history
4. An auto-generated name like `myhost-graceful-unicorn`, where `myhost` is your machine’s hostname or the prefix you set with `--remote-control-session-name-prefix`
-If you didn’t set an explicit name, Claude Code updates the title to reflect your prompt once you send one. Claude Code matches auto-generated titles to the language of your conversation, or to the [`language`](</docs/en/settings#available-settings>) setting if one is configured; the language matching requires Claude Code v2.1.176 or later. When you rename a session from claude.ai or the Claude app, Claude Code also updates the local title shown in `claude --resume`. Claude Code applies the same rename to the session name shown on the prompt bar, and in the `claude agents` listing when the session [runs in the background](</docs/en/agent-view>). Before v2.1.221, renaming from the session list at claude.ai or in the Claude app updated only the title, and the CLI kept its previous session name; `/rename`, which runs in the CLI itself, set the name on any version. If you don’t have the Claude app yet, use the `/mobile` command inside Claude Code to display a download QR code for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) or [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>).
+If you didn’t set an explicit name, Claude Code updates the title to reflect your prompt once you send one. Claude Code matches auto-generated titles to the language of your conversation, or to the [`language`](</docs/en/settings-reference#language>) setting if one is configured; the language matching requires Claude Code v2.1.176 or later. When you rename a session from claude.ai or the Claude app, Claude Code also updates the local title shown in `claude --resume`. Claude Code applies the same rename to the session name shown on the prompt bar, and in the `claude agents` listing when the session [runs in the background](</docs/en/agent-view>). Before v2.1.221, renaming from the session list at claude.ai or in the Claude app updated only the title, and the CLI kept its previous session name; `/rename`, which runs in the CLI itself, set the name on any version. If you don’t have the Claude app yet, use the `/mobile` command inside Claude Code to display a download QR code for [iOS](<https://apps.apple.com/us/app/claude-by-anthropic/id6473753684>) or [Android](<https://play.google.com/store/apps/details?id=com.anthropic.claude>).
###
@@ -163,7 +163,7 @@
Remote Control only activates when you explicitly run `claude remote-control`, `claude --remote-control`, or `/remote-control`, unless auto-connect is turned on. To turn auto-connect on for every interactive session, run `/config` inside Claude Code and set **Enable Remote Control for all sessions**. The toggle takes three values:
* **`true`** : connect automatically when an interactive session starts.
- * **`false`** : turn auto-connect off, though a `true` from [managed settings](</docs/en/settings#settings-files>) outranks it, because Claude Code saves the choice to your user settings. A `false` in project or local settings (`.claude/settings.json`, `.claude/settings.local.json`) turns auto-connect off even over a managed `true`.
+ * **`false`** : turn auto-connect off, though a `true` from [managed settings](</docs/en/managed-settings>) outranks it, because Claude Code saves the choice to your user settings. A `false` in project or local settings (`.claude/settings.json`, `.claude/settings.local.json`) turns auto-connect off even over a managed `true`.
* **`default`** : clear your choice and follow your organization’s admin default if one is set, otherwise Claude Code’s current default.
The same toggle appears outside the CLI:
@@ -171,7 +171,7 @@
* **Desktop app** : **Settings > Claude Code > Enable remote control by default**.
* **VS Code extension** : **Enable Remote Control for all sessions** in the [command menu’s](</docs/en/vs-code#use-the-prompt-box>) Settings section. Requires Claude Code v2.1.203 or later.
-To turn auto-connect on from a settings file instead, set [`remoteControlAtStartup`](</docs/en/settings#available-settings>) to `true` in your user `~/.claude/settings.json` or in [managed settings](</docs/en/settings#settings-files>). In project or local settings (`.claude/settings.json`, `.claude/settings.local.json`), Claude Code honors a `false` and turns auto-connect off for that repository, but ignores a `true`, so a checked-in file can’t turn on Remote Control for everyone who opens the repository. Auto-connect signs in with your own claude.ai account, so a session it starts appears only in your own account’s Claude apps and grants no one else access. With this setting on, each interactive Claude Code process registers one remote session. If you run multiple instances, each one gets its own remote session. To run multiple concurrent sessions from a single process, use server mode instead.
+To turn auto-connect on from a settings file instead, set [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) to `true` in your user `~/.claude/settings.json` or in [managed settings](</docs/en/managed-settings>). In project or local settings (`.claude/settings.json`, `.claude/settings.local.json`), Claude Code honors a `false` and turns auto-connect off for that repository, but ignores a `true`, so a checked-in file can’t turn on Remote Control for everyone who opens the repository. Auto-connect signs in with your own claude.ai account, so a session it starts appears only in your own account’s Claude apps and grants no one else access. With this setting on, each interactive Claude Code process registers one remote session. If you run multiple instances, each one gets its own remote session. To run multiple concurrent sessions from a single process, use server mode instead.
###
@@ -193,7 +193,7 @@
Connection and security
-Your local Claude Code session makes outbound HTTPS requests only and never opens inbound ports on your machine. When you start Remote Control, it registers with the Anthropic API and polls for work. When you connect from another device, the server routes messages between the web or mobile client and your local session over a streaming connection. All traffic travels through the Anthropic API over TLS, the same transport security as any Claude Code session. The connection uses multiple short-lived credentials, each scoped to a single purpose and expiring independently. While Remote Control is connected, the session transcript, including your messages, Claude’s responses, and tool activity, is stored on Anthropic servers. The stored transcript keeps the conversation in sync across your devices and lets the session reconnect after a network drop. Execution and filesystem access stay on your machine, and stored transcripts are retained under the [Data usage](</docs/en/data-usage>) policy. To turn Remote Control off entirely, use the [`disableRemoteControl`](</docs/en/settings#available-settings>) setting. Organizations with compliance requirements such as Zero Data Retention can’t enable Remote Control.
+Your local Claude Code session makes outbound HTTPS requests only and never opens inbound ports on your machine. When you start Remote Control, it registers with the Anthropic API and polls for work. When you connect from another device, the server routes messages between the web or mobile client and your local session over a streaming connection. All traffic travels through the Anthropic API over TLS, the same transport security as any Claude Code session. The connection uses multiple short-lived credentials, each scoped to a single purpose and expiring independently. While Remote Control is connected, the session transcript, including your messages, Claude’s responses, and tool activity, is stored on Anthropic servers. The stored transcript keeps the conversation in sync across your devices and lets the session reconnect after a network drop. Execution and filesystem access stay on your machine, and stored transcripts are retained under the [Data usage](</docs/en/data-usage>) policy. To turn Remote Control off entirely, use the [`disableRemoteControl`](</docs/en/settings-reference#disableremotecontrol>) setting. Organizations with compliance requirements such as Zero Data Retention can’t enable Remote Control.
##
@@ -320,7 +320,7 @@
* **Server mode** : Claude Code gives up after roughly 10 minutes and the `claude remote-control` process exits. Run `claude remote-control` again to start a new session.
* **Interactive session** : keep working locally. Claude Code retries for as long as the outage lasts and reconnects on its own when the network returns.
* **Presence heartbeats failing** : if an interactive session disconnects with `could not reach the Remote Control server for about 30 minutes`, run `/remote-control` to reconnect. Claude Code shows this message only when the session’s presence heartbeats have been failing while the rest of the connection stayed up; it re-registers the session for about 30 minutes before disconnecting.
- * **Forwarded dialogs expire** : Claude Code keeps permission prompts and `AskUserQuestion` questions open until you answer them. When Claude Code forwards another kind of dialog to the remote session, such as the model-choice prompt shown after a safety refusal, it waits five minutes by default, then closes the dialog and continues with the dialog’s no-action default. The mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) follows the same deadline but isn’t forwarded: Claude Code shows it only in the terminal where the session runs, and if nobody has answered there by the deadline, it ends the turn without sending the request. Your model selection is unchanged, and Claude Code asks again on your next message. Set [`dialogExpiry`](</docs/en/settings#available-settings>) to adjust or disable the deadline. Requires Claude Code v2.1.224 or later. Claude Code applies the same deadline to the approval dialog for a held cross-session message. [The held-message expiry rules](</docs/en/cross-session-messaging#control-inbound-messages>) cover the cases where Claude Code keeps the dialog open past it.
+ * **Forwarded dialogs expire** : Claude Code keeps permission prompts and `AskUserQuestion` questions open until you answer them. When Claude Code forwards another kind of dialog to the remote session, such as the model-choice prompt shown after a safety refusal, it waits five minutes by default, then closes the dialog and continues with the dialog’s no-action default. The mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) follows the same deadline but isn’t forwarded: Claude Code shows it only in the terminal where the session runs, and if nobody has answered there by the deadline, it ends the turn without sending the request. Your model selection is unchanged, and Claude Code asks again on your next message. Set [`dialogExpiry`](</docs/en/settings-reference#dialogexpiry>) to adjust or disable the deadline. Requires Claude Code v2.1.224 or later. Claude Code applies the same deadline to the approval dialog for a held cross-session message. [The held-message expiry rules](</docs/en/cross-session-messaging#control-inbound-messages>) cover the cases where Claude Code keeps the dialog open past it.
* **Some commands are local-only** : commands that only run in the terminal interface, such as `/plugin` or `/resume`, work only from the local CLI, whether or not you pass an argument. The following work from mobile and web:
* Text-output commands: `/compact`, `/clear`, `/context`, `/usage`, `/exit`, `/usage-credits` (prints the billing URL instead of opening a browser), `/recap`, `/reload-plugins`
* `/model`, `/effort`, `/fast`, `/color`, and `/rename`: pass the value as an argument, for example `/model sonnet` or `/effort high`. From mobile and web, `/model` and `/effort` take the argument in place of the terminal picker or slider.
@@ -381,7 +381,7 @@
”Remote Control requires feature-flag evaluation”
-One of these variables is set: [`DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars>). Each of them disables the feature-flag evaluation that Remote Control availability depends on, and the full message names the variable Claude Code found. Unset that variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings#available-settings>). On versions before 2.1.154, the same configuration produces “Remote Control is not yet enabled for your account” instead.
+One of these variables is set: [`DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, or `DISABLE_GROWTHBOOK`](</docs/en/env-vars>). Each of them disables the feature-flag evaluation that Remote Control availability depends on, and the full message names the variable Claude Code found. Unset that variable wherever it’s set, in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>). On versions before 2.1.154, the same configuration produces “Remote Control is not yet enabled for your account” instead.
###
@@ -399,7 +399,7 @@
A policy blocks Remote Control. The message’s own text tells you which:
- * **The error mentions`disableRemoteControl`**: your IT administrator has disabled Remote Control on this device through [managed settings](</docs/en/settings#settings-files>), independent of the organization-wide toggle and of how you’re signed in.
+ * **The error mentions`disableRemoteControl`**: your IT administrator has disabled Remote Control on this device through [managed settings](</docs/en/managed-settings>), independent of the organization-wide toggle and of how you’re signed in.
* **Otherwise, an Owner hasn’t enabled it for your organization** : this form appears when you’re signed in with an eligible claude.ai account but Remote Control is off, the default on Team and Enterprise plans. An Owner can enable it at [claude.ai/admin-settings/claude-code](<https://claude.ai/admin-settings/claude-code>) by turning on the **Remote Control** toggle. This toggle is a server-side organization setting.
###
--- a/routines.md
+++ b/routines.md
@@ -396,7 +396,7 @@
The CLI hides `/schedule` when one of its requirements isn’t met: the command menu shows `No commands match "/schedule"` while you type, and submitting it returns `Unknown command: /schedule` in every case below except a Console API key or an Anthropic profile with feature-flag fetching enabled. The cause is usually one of the following:
* You are authenticated with a Console API key, an [Anthropic profile or federation credential](</docs/en/authentication#anthropic-profiles-and-federation-credentials>), or a cloud provider such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. `/schedule` requires a claude.ai subscription login. With a Console API key or a profile, submitting `/schedule` instead shows `/schedule is available with Claude for Enterprise — ask your admin about migrating from API-key access`. With a cloud-provider login, you still see `Unknown command: /schedule`. If `ANTHROPIC_API_KEY` or `ANTHROPIC_AUTH_TOKEN` is set in your shell, or `apiKeyHelper` is set in `settings.json`, remove it first, since these take precedence over a claude.ai login. A profile or federation credential takes precedence too, so switch that off as well
- * `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, or `DISABLE_GROWTHBOOK` is set in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings#available-settings>). These disable feature-flag fetching, which `/schedule` depends on
+ * `DISABLE_TELEMETRY`, `DO_NOT_TRACK`, `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, or `DISABLE_GROWTHBOOK` is set in your shell environment or in the `env` block of a [`settings.json` file](</docs/en/settings-reference#all-settings>). These disable feature-flag fetching, which `/schedule` depends on
* You are inside a Claude Code on the web session. Manage routines from the [web UI](<https://claude.ai/code/routines>) instead
* Your organization’s policy disables [Claude Code on the web](</docs/en/claude-code-on-the-web>), which routines run on
* An Owner turned off routines for your Team or Enterprise organization. Before v2.1.227, the command still appeared in this case, and claude.ai rejected the routine when Claude tried to create or run it
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -165,7 +165,7 @@
Individual developers can opt into any of the sandboxing approaches on this page. What an organization can enforce, and with which tools, depends on the approach:
- * **Built-in Bash sandbox** : the only approach Claude Code enforces itself. Deliver the `sandbox` settings keys through [managed settings](</docs/en/settings#settings-files>), either as a file managed by your MDM or through [server-managed settings](</docs/en/server-managed-settings>) on Claude.ai. See [Enforce sandboxing with managed settings](</docs/en/sandboxing#enforce-sandboxing-with-managed-settings>) for the keys to deploy and how to keep developers from widening the policy.
+ * **Built-in Bash sandbox** : the only approach Claude Code enforces itself. Deliver the `sandbox` settings keys through [managed settings](</docs/en/managed-settings#delivery-mechanisms>), either as a file managed by your MDM or through [server-managed settings](</docs/en/server-managed-settings>) on Claude.ai. See [Enforce sandboxing with managed settings](</docs/en/sandboxing#enforce-sandboxing-with-managed-settings>) for the keys to deploy and how to keep developers from widening the policy.
* **Dev containers** : commit the [example dev container](</docs/en/devcontainer>) to your repositories to standardize the environment across a team. This is a convention rather than an enforcement boundary, because Claude Code does not require a container. If developers should not be able to run Claude Code outside it, enforce that with your organization’s device management or software allowlisting tools.
* **Custom containers and VMs** : distribute Claude Code through the approved image and use your organization’s device management or software allowlisting tools to prevent installation outside it.
@@ -181,4 +181,4 @@
* [Dev container](</docs/en/devcontainer>): the preconfigured Docker development container
* [Security](</docs/en/security>): the full Claude Code security model
* [Secure deployment](</docs/en/agent-sdk/secure-deployment>): isolation guidance for Agent SDK applications
- * [Settings](</docs/en/settings#sandbox-settings>): all sandbox configuration keys, including managed settings delivery
+ * [Settings](</docs/en/settings-reference#sandbox-settings>): all sandbox configuration keys, including managed settings delivery
Show diff (226 lines)
--- a/sandboxing.md
+++ b/sandboxing.md
@@ -21,7 +21,7 @@
This opens the sandbox panel with three tabs, plus a Dependencies tab on Linux when the optional seccomp filter is missing:
* **Mode** : choose how sandboxed commands are approved, covered in the next step
- * **Overrides** : choose whether commands that fail under the sandbox can fall back to running unsandboxed. This is the [`allowUnsandboxedCommands`](</docs/en/settings#sandbox-settings>) setting
+ * **Overrides** : choose whether commands that fail under the sandbox can fall back to running unsandboxed. This is the [`allowUnsandboxedCommands`](</docs/en/settings-reference#sandbox-allowunsandboxedcommands>) setting
* **Config** : view the resolved sandbox settings
If the panel shows only a Dependencies tab, a required package is missing. Install it as described in Set up Linux and WSL2, restart Claude Code, and run `/sandbox` again.
@@ -38,9 +38,9 @@
Ask Claude to run a command, such as a build or a test suite. By default, commands inside the sandbox can write only to the working directory and the session temp directory. The first time a command needs a new network domain, Claude Code prompts for approval, or in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) sends the request to the classifier.Commands that cannot run sandboxed fall back to the regular permission flow. To widen or narrow these boundaries, see Configure sandboxing.
-When you select a mode in the panel, Claude Code saves it to your project’s local settings at `.claude/settings.local.json`, which apply to the current project. Claude Code adds that file to your global gitignore when it saves a setting there. To enable the sandbox across all of your projects, set [`sandbox.enabled`](</docs/en/settings#sandbox-settings>) to `true` in your user settings at `~/.claude/settings.json`. To enforce sandboxing for every developer in an organization, use managed settings.
-
-By default, if the sandbox cannot start because dependencies are missing or the platform is unsupported, Claude Code shows a warning and runs commands without sandboxing. To make this a hard failure instead, set [`sandbox.failIfUnavailable`](</docs/en/settings#sandbox-settings>) to `true`. This is intended for managed deployments that require sandboxing as a security gate.
+When you select a mode in the panel, Claude Code saves it to your project’s local settings at `.claude/settings.local.json`, which apply to the current project. Claude Code adds that file to your global gitignore when it saves a setting there. To enable the sandbox across all of your projects, set [`sandbox.enabled`](</docs/en/settings-reference#sandbox-enabled>) to `true` in your user settings at `~/.claude/settings.json`. To enforce sandboxing for every developer in an organization, use managed settings.
+
+By default, if the sandbox cannot start because dependencies are missing or the platform is unsupported, Claude Code shows a warning and runs commands without sandboxing. To make this a hard failure instead, set [`sandbox.failIfUnavailable`](</docs/en/settings-reference#sandbox-failifunavailable>) to `true`. This is intended for managed deployments that require sandboxing as a security gate.
###
@@ -85,7 +85,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#sandbox-settings>): the optional seccomp filter has to be installed to block the socket in the first place. To allow these launches, set `allowAllUnixSockets`; to keep them out of the sandbox entirely, add the command to [`excludedCommands`](</docs/en/settings#sandbox-settings>).
+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`; to keep them out of the sandbox entirely, add the command to [`excludedCommands`](</docs/en/settings-reference#sandbox-excludedcommands>).
###
@@ -124,7 +124,7 @@
The unsandboxed retry escape hatch
-Some commands can’t run inside the sandbox at all, such as tools that are incompatible with it or that need a host you haven’t allowed. When a command fails after the sandbox denied it access, Claude Code appends the violation details to the failed command’s output, so Claude sees which file path or network host the sandbox blocked. Rather than failing the task or requiring you to turn sandboxing off, Claude Code includes an escape hatch: when a command fails because of sandbox restrictions, Claude analyzes the failure and may retry the command with the `dangerouslyDisableSandbox` parameter. The retried command runs outside the sandbox, so it goes through the regular permission flow: in Manual mode you get a confirmation prompt; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) the classifier evaluates the underlying command instead of prompting you. To be prompted on every unsandboxed retry even in auto mode, add an [ask rule](</docs/en/permissions#match-by-input-parameter>) for `Bash(dangerouslyDisableSandbox:true)`. You can disable this escape hatch by setting `"allowUnsandboxedCommands": false` in your [sandbox settings](</docs/en/settings#sandbox-settings>). When disabled, which the `/sandbox` Overrides tab shows as **Strict sandbox mode** , the `dangerouslyDisableSandbox` parameter is completely ignored and all commands must run sandboxed or be explicitly listed in `excludedCommands`.
+Some commands can’t run inside the sandbox at all, such as tools that are incompatible with it or that need a host you haven’t allowed. When a command fails after the sandbox denied it access, Claude Code appends the violation details to the failed command’s output, so Claude sees which file path or network host the sandbox blocked. Rather than failing the task or requiring you to turn sandboxing off, Claude Code includes an escape hatch: when a command fails because of sandbox restrictions, Claude analyzes the failure and may retry the command with the `dangerouslyDisableSandbox` parameter. The retried command runs outside the sandbox, so it goes through the regular permission flow: in Manual mode you get a confirmation prompt; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) the classifier evaluates the underlying command instead of prompting you. To be prompted on every unsandboxed retry even in auto mode, add an [ask rule](</docs/en/permissions#match-by-input-parameter>) for `Bash(dangerouslyDisableSandbox:true)`. You can disable this escape hatch by setting `"allowUnsandboxedCommands": false` in your [sandbox settings](</docs/en/settings-reference#sandbox-settings>). When disabled, which the `/sandbox` Overrides tab shows as **Strict sandbox mode** , the `dangerouslyDisableSandbox` parameter is completely ignored and all commands must run sandboxed or be explicitly listed in `excludedCommands`.
####
@@ -140,7 +140,7 @@
Configure sandboxing
-Customize sandbox behavior through your `settings.json` file. See [Settings](</docs/en/settings#sandbox-settings>) for the complete configuration reference. By default, sandboxed commands can write only to the current working directory and the session temp directory. If subprocess commands like `kubectl`, `terraform`, or `npm` need to write outside those directories, use `sandbox.filesystem.allowWrite` to grant access to specific paths:
+Customize sandbox behavior through your `settings.json` file. See [Settings](</docs/en/settings-reference#sandbox-settings>) for the complete configuration reference. By default, sandboxed commands can write only to the current working directory and the session temp directory. If subprocess commands like `kubectl`, `terraform`, or `npm` need to write outside those directories, use `sandbox.filesystem.allowWrite` to grant access to specific paths:
{
"sandbox": {
@@ -159,13 +159,13 @@
`~/`| Relative to home directory| `~/.kube` becomes `$HOME/.kube`
`./` or no prefix| Relative to the project root for project settings, or to `~/.claude` for user settings| `./output` in `.claude/settings.json` resolves to `<project-root>/output`
-This syntax differs from [Read and Edit permission rules](</docs/en/permissions#read-and-edit>), which use `//path` for absolute and `/path` for project-relative. Sandbox filesystem paths use standard conventions: `/tmp/build` is absolute. For how Claude Code treats a trailing slash or a wildcard in these paths, see [Sandbox path prefixes](</docs/en/settings#sandbox-path-prefixes>). You can also deny write or read access using `sandbox.filesystem.denyWrite` and `sandbox.filesystem.denyRead`, and re-allow specific paths within a denied region using `sandbox.filesystem.allowRead`. When read rules overlap, the more specific path wins:
+This syntax differs from [Read and Edit permission rules](</docs/en/permissions#read-and-edit>), which use `//path` for absolute and `/path` for project-relative. Sandbox filesystem paths use standard conventions: `/tmp/build` is absolute. For how Claude Code treats a trailing slash or a wildcard in these paths, see [Sandbox path prefixes](</docs/en/settings-reference#sandbox-path-prefixes>). You can also deny write or read access using `sandbox.filesystem.denyWrite` and `sandbox.filesystem.denyRead`, and re-allow specific paths within a denied region using `sandbox.filesystem.allowRead`. When read rules overlap, the more specific path wins:
Example rules| Result
---|---
`"denyRead": ["~/"]` with `"allowRead": ["~/projects"]`| `~/projects` is readable and the rest of the home directory stays blocked. The narrower allow re-opens that part of the denied region
`"allowRead": ["~/"]` with `"denyRead": ["~/.env"]`| `~/.env` stays blocked and the rest of the home directory is readable. The deny holds inside a wider allow, so a broad allow can’t silently re-expose a secret
-`"allowRead": ["~/"]` with `"denyRead": ["~/**/.env"]`| Every `.env` under the home directory stays blocked and the rest is readable. A [wildcard deny](</docs/en/settings#sandbox-path-prefixes>) holds inside a wider allow the same way an exact path does
+`"allowRead": ["~/"]` with `"denyRead": ["~/**/.env"]`| Every `.env` under the home directory stays blocked and the rest is readable. A [wildcard deny](</docs/en/settings-reference#sandbox-path-prefixes>) holds inside a wider allow the same way an exact path does
The example below blocks reading from the entire home directory while still allowing reads from the current project. Place it in your project’s `.claude/settings.json`, because the relative path `.` resolves to the project root only when the configuration lives in project settings:
@@ -224,7 +224,7 @@
`"mode": "deny"`| Yes| Nothing: the read block is part of the filesystem layer
`"mode": "mask"`, applied as a mask| No| Masking itself: the sentinel copy and proxy on Linux and WSL2, the sandbox’s own read rules on macOS
`"mode": "mask"`, fallen back to `deny` at setup| No| Nothing, same as `deny`. List a path that can’t be masked, such as a directory, as an explicit `deny` entry, which pins the key
-`"mode": "mask"`, [degraded to `deny` by validation](</docs/en/settings#invalid-entries-in-managed-settings>)| Yes, like an explicit `deny`| Nothing, same as `deny`
+`"mode": "mask"`, [degraded to `deny` by validation](</docs/en/managed-settings#invalid-entries-in-managed-settings>)| Yes, like an explicit `deny`| Nothing, same as `deny`
A fallback happens when the sandbox starts, after Claude Code has already read the settings the pin check runs on, so a fallen-back entry never pins. Validation rewrites an invalid entry to `deny` while settings load, so a degraded entry pins like one you wrote as `deny`.
@@ -245,7 +245,7 @@
Two other things change:
* Sandboxed commands inherit your shell’s `$TMPDIR` instead of the session temp directory, because every temp directory is writable and Claude Code no longer redirects commands to the session one. On Linux the variable is often unset in the parent shell, so it can expand empty inside sandboxed commands; Claude Code tells Claude through its Bash tool guidance to create scratch directories with `mktemp -d` instead of relying on `$TMPDIR`.
- * [`autoAllowBashIfSandboxed`](</docs/en/settings#sandbox-settings>) still defaults to `true`, so sandboxed commands keep running without prompts. Set it to `false` to prompt for sandboxed commands.
+ * [`autoAllowBashIfSandboxed`](</docs/en/settings-reference#sandbox-autoallowbashifsandboxed>) still defaults to `true`, so sandboxed commands keep running without prompts. Set it to `false` to prompt for sandboxed commands.
###
@@ -271,7 +271,7 @@
}
}
-Environment variable entries and file entries also accept `"mode": "mask"`, described under Mask credentials. File paths follow the same [prefix rules](</docs/en/settings#sandbox-path-prefixes>) as `sandbox.filesystem.*` settings, and `deny` entries from every [settings scope](</docs/en/settings#settings-precedence>) are merged. A `deny` entry only ever narrows access, so any scope can add one, but no scope can remove one that another scope added. There is no built-in credential deny list, so only the files and variables you list are restricted. The setting affects sandboxed Bash commands only. To strip Anthropic and cloud provider credentials from all subprocesses regardless of sandboxing, set [`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`](</docs/en/env-vars>).
+Environment variable entries and file entries also accept `"mode": "mask"`, described under Mask credentials. File paths follow the same [prefix rules](</docs/en/settings-reference#sandbox-path-prefixes>) as `sandbox.filesystem.*` settings, and `deny` entries from every [settings scope](</docs/en/settings#settings-precedence>) are merged. A `deny` entry only ever narrows access, so any scope can add one, but no scope can remove one that another scope added. There is no built-in credential deny list, so only the files and variables you list are restricted. The setting affects sandboxed Bash commands only. To strip Anthropic and cloud provider credentials from all subprocesses regardless of sandboxing, set [`CLAUDE_CODE_SUBPROCESS_ENV_SCRUB`](</docs/en/env-vars>).
###
@@ -287,7 +287,7 @@
Mask environment variables
-`"mode": "mask"` protects a credential while keeping the tools that authenticate with it working. `deny` removes the variable entirely, which also breaks tools that need it, such as `gh` or `npm`. Requires Claude Code v2.1.199 or later. With `mask`, the sandboxed command sees a per-session sentinel value instead of the real one. Each `mask` entry can list `injectHosts`, the hosts the real value is allowed to reach. When a request leaves the sandbox for one of them, the sandbox proxy replaces the sentinel with the real value. The command and anything it logs never hold the real credential, but its requests still authenticate. The proxy substitutes the credential inside request contents, so it has to see them. Set [`network.tlsTerminate`](</docs/en/settings#sandbox-settings>) so the proxy terminates TLS itself. Without it, masking fails without exposing anything: the command still sees only the sentinel, but the sentinel reaches the server unchanged and authentication fails. Claude Code reports this misconfiguration at startup. Substitution covers headers and request bodies. Requests that authenticate with a signature derived from the credential, rather than the credential itself, need re-signing at the proxy; Re-sign AWS requests covers how that works for AWS. The example below masks two tokens. `GH_TOKEN` is substituted only on requests to `api.github.com`, while `NPM_TOKEN` has no `injectHosts` and is substituted on requests to every host in `network.allowedDomains`. The proxy injects only on connections the domain allowlist admits, so each `injectHosts` destination must also be reachable through `network.allowedDomains`.
+`"mode": "mask"` protects a credential while keeping the tools that authenticate with it working. `deny` removes the variable entirely, which also breaks tools that need it, such as `gh` or `npm`. Requires Claude Code v2.1.199 or later. With `mask`, the sandboxed command sees a per-session sentinel value instead of the real one. Each `mask` entry can list `injectHosts`, the hosts the real value is allowed to reach. When a request leaves the sandbox for one of them, the sandbox proxy replaces the sentinel with the real value. The command and anything it logs never hold the real credential, but its requests still authenticate. The proxy substitutes the credential inside request contents, so it has to see them. Set [`network.tlsTerminate`](</docs/en/settings-reference#sandbox-network-tlsterminate>) so the proxy terminates TLS itself. Without it, masking fails without exposing anything: the command still sees only the sentinel, but the sentinel reaches the server unchanged and authentication fails. Claude Code reports this misconfiguration at startup. Substitution covers headers and request bodies. Requests that authenticate with a signature derived from the credential, rather than the credential itself, need re-signing at the proxy; Re-sign AWS requests covers how that works for AWS. The example below masks two tokens. `GH_TOKEN` is substituted only on requests to `api.github.com`, while `NPM_TOKEN` has no `injectHosts` and is substituted on requests to every host in `network.allowedDomains`. The proxy injects only on connections the domain allowlist admits, so each `injectHosts` destination must also be reachable through `network.allowedDomains`.
{
"sandbox": {
@@ -310,7 +310,7 @@
* **`network.allowedDomains`** : the bracketed form domain lists use, such as `"[::1]"`. The proxy checks this list to admit the connection.
* **`injectHosts`** : the bare address in its canonical compressed form, such as `"::1"` or `"2001:db8::1"`. The proxy matches each entry against the connection’s bare destination address, ignoring ports, so a bracketed, zone-ID, or differently compressed spelling never matches and the proxy never injects the credential there.
-`/doctor` flags `injectHosts` entries that can never match with the warning `Sandbox credential injectHosts entries can never match their destination`. Unlike `deny`, masking authorizes the proxy to send your real credential to the listed hosts, so it is honored only from settings you or your administrator control: user settings, managed settings, and the `--settings` CLI flag. `mask` entries, `network.tlsTerminate`, and [`credentials.allowPlaintextInject`](</docs/en/settings#sandbox-settings>), which lets the proxy inject credentials into unencrypted requests, are all ignored in a repository’s `.claude/settings.json` or `.claude/settings.local.json`. When the same variable is listed with `deny` in any scope, `deny` takes precedence. Masking replaces the variable’s entire value by default, which suits a bare token. Optional entry fields, which require Claude Code v2.1.224 or later, handle values with structure:
+`/doctor` flags `injectHosts` entries that can never match with the warning `Sandbox credential injectHosts entries can never match their destination`. Unlike `deny`, masking authorizes the proxy to send your real credential to the listed hosts, so it is honored only from settings you or your administrator control: user settings, managed settings, and the `--settings` CLI flag. `mask` entries, `network.tlsTerminate`, and [`credentials.allowPlaintextInject`](</docs/en/settings-reference#sandbox-credentials-allowplaintextinject>), which lets the proxy inject credentials into unencrypted requests, are all ignored in a repository’s `.claude/settings.json` or `.claude/settings.local.json`. When the same variable is listed with `deny` in any scope, `deny` takes precedence. Masking replaces the variable’s entire value by default, which suits a bare token. Optional entry fields, which require Claude Code v2.1.224 or later, handle values with structure:
* `extract`: a regular expression Claude Code applies across the value, replacing only the text captured by group 1 of each match, so a tool that parses the value, such as a `DATABASE_URL` connection string, still works inside the sandbox. The pattern must contain at least one capturing group.
* `onExtractNoMatch` controls what happens when the pattern matches nothing:
@@ -319,7 +319,7 @@
* `error` stops sandbox setup until you fix the configuration
* `decode: "jwt"`: for a variable holding a JSON Web Token (JWT). Claude Code verifies the value is a JWT and replaces it with a structurally valid fake token, so code inside the sandbox that decodes the token keeps working. Add `maskClaims` to list top-level payload claims to mask individually instead of replacing the whole token; the other claims stay readable. When the value doesn’t verify as a JWT, or no listed claim matches, Claude Code passes the variable through unmasked with a warning. `decode` can’t be combined with `extract`.
-See the [`credentials.envVars[]` rows in the settings reference](</docs/en/settings#sandbox-settings>) for the full field list.
+See the [`credentials.envVars[]` rows in the settings reference](</docs/en/settings-reference#sandbox-settings>) for the full field list.
####
@@ -327,7 +327,7 @@
Re-sign AWS requests
-AWS requests carry SigV4 signatures over the request contents, so mask `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` together. The proxy detects a SigV4 request by the access key’s sentinel and re-signs it after substituting the real values. Masking the secret alone leaves requests signed with the placeholder, which the proxy can’t detect, so they fail at AWS; Claude Code warns about this case at startup, but not when only the access key ID is masked. A detected request the proxy can’t re-sign, such as one missing its `x-amz-date` header, fails with a proxy error instead of reaching the server with a broken signature. Claude Code links the conventional `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` variables into one credential automatically when you mask their whole values. If your AWS credential lives in variables with other names, group them yourself with [`credentials.awsPairs`](</docs/en/settings#sandbox-settings>), which requires Claude Code v2.1.224 or later. This example adds the pairing to a configuration that already masks `MY_KEY_ID`, `MY_SECRET_KEY`, and `MY_SESSION_TOKEN` whole-value, as in the masking configuration above:
+AWS requests carry SigV4 signatures over the request contents, so mask `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` together. The proxy detects a SigV4 request by the access key’s sentinel and re-signs it after substituting the real values. Masking the secret alone leaves requests signed with the placeholder, which the proxy can’t detect, so they fail at AWS; Claude Code warns about this case at startup, but not when only the access key ID is masked. A detected request the proxy can’t re-sign, such as one missing its `x-amz-date` header, fails with a proxy error instead of reaching the server with a broken signature. Claude Code links the conventional `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` variables into one credential automatically when you mask their whole values. If your AWS credential lives in variables with other names, group them yourself with [`credentials.awsPairs`](</docs/en/settings-reference#sandbox-credentials-awspairs>), which requires Claude Code v2.1.224 or later. This example adds the pairing to a configuration that already masks `MY_KEY_ID`, `MY_SECRET_KEY`, and `MY_SESSION_TOKEN` whole-value, as in the masking configuration above:
{
"sandbox": {
@@ -350,7 +350,7 @@
* The proxy re-signs requests on the hosts listed in the access key ID entry’s `injectHosts`.
* Naming any of the conventional variables in a pair replaces the automatic pairing.
-Like `mask` entries, `awsPairs` is honored only from user settings, managed settings, and the `--settings` CLI flag. Three AWS request forms carry signatures the proxy can’t recompute. When such a request is signed with a masked pair’s placeholder, the proxy fails it rather than forward a broken signature; requests signed with unmasked credentials are never affected. The [`credentials.sigv4`](</docs/en/settings#sandbox-settings>) setting, which requires Claude Code v2.1.224 or later, relaxes this per form: setting a form’s key to `passthrough` forwards the request with its placeholder-derived signature, so the calling tool receives AWS’s own rejection response instead of a proxy error. Like `awsPairs`, `sigv4` is honored only from user settings, managed settings, and the `--settings` CLI flag.
+Like `mask` entries, `awsPairs` is honored only from user settings, managed settings, and the `--settings` CLI flag. Three AWS request forms carry signatures the proxy can’t recompute. When such a request is signed with a masked pair’s placeholder, the proxy fails it rather than forward a broken signature; requests signed with unmasked credentials are never affected. The [`credentials.sigv4`](</docs/en/settings-reference#sandbox-credentials-sigv4>) setting, which requires Claude Code v2.1.224 or later, relaxes this per form: setting a form’s key to `passthrough` forwards the request with its placeholder-derived signature, so the calling tool receives AWS’s own rejection response instead of a proxy error. Like `awsPairs`, `sigv4` is honored only from user settings, managed settings, and the `--settings` CLI flag.
Request form| `sigv4` key| Why the proxy can’t re-sign it
---|---|---
@@ -369,7 +369,7 @@
* **Linux and WSL2** : sandboxed commands read a sentinel copy of the file, a stand-in whose secret is replaced with a placeholder value, and the sandbox proxy substitutes the real value on egress.
* **macOS** : sandboxed commands can’t read the listed file at all. Claude Code builds no sentinel copy and substitutes nothing on egress, so tools that authenticate with the file don’t work inside the sandbox, the same effect as `deny`. Unlike a `deny` entry, the read block holds even when you disable filesystem isolation.
-On every platform, the [`network.tlsTerminate`](</docs/en/settings#sandbox-settings>) requirement, `injectHosts`, and the settings-source restriction work the same way as for masked environment variables. The example below masks a GitHub token stored in `~/.config/gh/hosts.yml`; the `extract` pattern, covered below, tells Claude Code which part of the file is the secret. On Linux and WSL2, sandboxed commands that read the file get a sentinel in place of the token, and the proxy substitutes the real token on requests to `api.github.com`:
+On every platform, the [`network.tlsTerminate`](</docs/en/settings-reference#sandbox-network-tlsterminate>) requirement, `injectHosts`, and the settings-source restriction work the same way as for masked environment variables. The example below masks a GitHub token stored in `~/.config/gh/hosts.yml`; the `extract` pattern, covered below, tells Claude Code which part of the file is the secret. On Linux and WSL2, sandboxed commands that read the file get a sentinel in place of the token, and the proxy substitutes the real token on requests to `api.github.com`:
{
"sandbox": {
@@ -447,14 +447,14 @@
Network access is controlled through a proxy server running outside the sandbox:
- * **Domain restrictions** : Claude Code pre-allows no domains by default. The first time a command needs a new domain, Claude Code prompts for approval, or in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) sends the request to the classifier. If you choose Yes when prompted, Claude Code allows the host for the rest of the current session and doesn’t prompt again for later connections to the same host. If you choose “Yes, and don’t ask again”, Claude Code saves a `WebFetch(domain:...)` allow rule to your [local settings](</docs/en/permissions#permission-system>), so the host stays allowed in future sessions. Pre-allow domains with [`allowedDomains`](</docs/en/settings#sandbox-settings>) to avoid the prompt entirely. Claude Code also pre-allows domains from `WebFetch` allow rules, as described in Permission rules.
- * **Strict allowlist** : if you set [`strictAllowlist`](</docs/en/settings#sandbox-settings>) to `true` in user, managed, or CLI `--settings` settings, Claude Code denies sandboxed commands access to any host outside the allowlist instead of prompting. The allowlist is the same one the sandbox otherwise prompts against: `allowedDomains` plus domains from `WebFetch(domain:...)` allow rules, or only the managed settings entries when `allowManagedDomainsOnly` is set. Claude Code enforces this for sandboxed commands only; in-process tools such as `WebFetch` still follow their permission rules. Setting it in a repository’s `.claude/settings.json` or `.claude/settings.local.json` has no effect. Requires Claude Code v2.1.219 or later.
- * **Managed lockdown** : if [`allowManagedDomainsOnly`](</docs/en/settings#sandbox-settings>) is set in managed settings, non-allowed domains are blocked automatically instead of prompting, and only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings are honored.
+ * **Domain restrictions** : Claude Code pre-allows no domains by default. The first time a command needs a new domain, Claude Code prompts for approval, or in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) sends the request to the classifier. If you choose Yes when prompted, Claude Code allows the host for the rest of the current session and doesn’t prompt again for later connections to the same host. If you choose “Yes, and don’t ask again”, Claude Code saves a `WebFetch(domain:...)` allow rule to your [local settings](</docs/en/permissions#permission-system>), so the host stays allowed in future sessions. Pre-allow domains with [`allowedDomains`](</docs/en/settings-reference#sandbox-network-alloweddomains>) to avoid the prompt entirely. Claude Code also pre-allows domains from `WebFetch` allow rules, as described in Permission rules.
+ * **Strict allowlist** : if you set [`strictAllowlist`](</docs/en/settings-reference#sandbox-network-strictallowlist>) to `true` in user, managed, or CLI `--settings` settings, Claude Code denies sandboxed commands access to any host outside the allowlist instead of prompting. The allowlist is the same one the sandbox otherwise prompts against: `allowedDomains` plus domains from `WebFetch(domain:...)` allow rules, or only the managed settings entries when `allowManagedDomainsOnly` is set. Claude Code enforces this for sandboxed commands only; in-process tools such as `WebFetch` still follow their permission rules. Setting it in a repository’s `.claude/settings.json` or `.claude/settings.local.json` has no effect. Requires Claude Code v2.1.219 or later.
+ * **Managed lockdown** : if [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>) is set in managed settings, non-allowed domains are blocked automatically instead of prompting, and only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings are honored.
* **Corporate proxy** : when your network requires outbound traffic to go through a corporate proxy, set `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` as [proxy configuration](</docs/en/network-config#proxy-configuration>) describes, in the `env` block of your settings so that [background agents](</docs/en/network-config#set-network-variables-in-settings-not-the-shell>) get them too, or in the environment you launch Claude Code from. Claude Code enforces the domain allowlist and then tunnels allowed connections through that upstream proxy.
* **Custom proxy support** : advanced users can implement custom rules on outgoing traffic
* **Comprehensive coverage** : restrictions apply to all scripts, programs, and subprocesses spawned by commands
-The built-in proxy enforces the allowlist based on the requested hostname and, by default, does not terminate or inspect TLS traffic. The experimental [`network.tlsTerminate`](</docs/en/settings#sandbox-settings>) setting, available in Claude Code v2.1.199 and later, makes the built-in proxy terminate TLS itself, which `mask` credential entries require. See Security limitations for the implications of the default, and Custom proxy configuration if your threat model requires TLS inspection.
+The built-in proxy enforces the allowlist based on the requested hostname and, by default, does not terminate or inspect TLS traffic. The experimental [`network.tlsTerminate`](</docs/en/settings-reference#sandbox-network-tlsterminate>) setting, available in Claude Code v2.1.199 and later, makes the built-in proxy terminate TLS itself, which `mask` credential entries require. See Security limitations for the implications of the default, and Custom proxy configuration if your threat model requires TLS inspection.
####
@@ -548,7 +548,7 @@
Enforce sandboxing with managed settings
-To require the sandbox for every developer, deliver the `sandbox` keys through [managed settings](</docs/en/settings#settings-files>), either as a file managed by your MDM or through [server-managed settings](</docs/en/server-managed-settings>) on Claude.ai. The following managed settings configuration enables the sandbox, refuses to start Claude Code if the sandbox cannot initialize, and prevents the model from retrying commands outside the sandbox:
+To require the sandbox for every developer, deliver the `sandbox` keys through [managed settings](</docs/en/managed-settings#delivery-mechanisms>), either as a file managed by your MDM or through [server-managed settings](</docs/en/server-managed-settings>) on Claude.ai. The following managed settings configuration enables the sandbox, refuses to start Claude Code if the sandbox cannot initialize, and prevents the model from retrying commands outside the sandbox:
{
"sandbox": {
@@ -571,7 +571,7 @@
Keep developers from widening the policy
-For boolean keys such as `enabled` and `failIfUnavailable`, Claude Code uses the managed value and ignores anything a developer sets locally. For array keys such as `excludedCommands` and `allowRead`, Claude Code merges entries from every scope, so a developer can append entries that widen the policy. Set `allowManagedReadPathsOnly` to `true` in managed settings so that only `allowRead` entries from managed settings are honored. User, project, and local `allowRead` entries are ignored. This prevents developers from widening read access beyond the organization-approved paths. To lock network domains to the managed values the same way, set [`allowManagedDomainsOnly`](</docs/en/settings#sandbox-settings>). When managed settings configure `sandbox.filesystem` or list any `sandbox.credentials.files` entry with `"mode": "deny"`, only managed settings can set `filesystem.disabled`, so developers can’t switch off administrator-deployed filesystem restrictions. Whether a `mask` entry pins the key depends on how it resolves; the table under Which settings can disable it covers the four cases. `excludedCommands` has no equivalent managed-only lockdown, so a developer can always append entries that run additional commands outside the sandbox. Keep the managed list narrow.
+For boolean keys such as `enabled` and `failIfUnavailable`, Claude Code uses the managed value and ignores anything a developer sets locally. For array keys such as `excludedCommands` and `allowRead`, Claude Code merges entries from every scope, so a developer can append entries that widen the policy. Set `allowManagedReadPathsOnly` to `true` in managed settings so that only `allowRead` entries from managed settings are honored. User, project, and local `allowRead` entries are ignored. This prevents developers from widening read access beyond the organization-approved paths. To lock network domains to the managed values the same way, set [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>). When managed settings configure `sandbox.filesystem` or list any `sandbox.credentials.files` entry with `"mode": "deny"`, only managed settings can set `filesystem.disabled`, so developers can’t switch off administrator-deployed filesystem restrictions. Whether a `mask` entry pins the key depends on how it resolves; the table under Which settings can disable it covers the four cases. `excludedCommands` has no equivalent managed-only lockdown, so a developer can always append entries that run additional commands outside the sandbox. Keep the managed list narrow.
###
@@ -586,7 +586,7 @@
* Log all network requests
* Integrate with existing security infrastructure
-To point Claude Code at your proxy, set the proxy ports in [sandbox settings](</docs/en/settings#sandbox-settings>):
+To point Claude Code at your proxy, set the proxy ports in [sandbox settings](</docs/en/settings-reference#sandbox-settings>):
{
"sandbox": {
@@ -607,11 +607,11 @@
* **Commands fail with a host-not-allowed error** : many CLI tools need to reach specific hosts. Granting permission when prompted adds the host to your allowed list so the tool runs inside the sandbox in future.
* **`jest` hangs or fails**: `watchman` is incompatible with the sandbox. Run `jest --no-watchman` instead.
- * **Go-based CLIs fail TLS verification on macOS** : tools such as `gh`, `gcloud`, and `terraform` may fail TLS verification under Seatbelt. List these tools in `excludedCommands` to run them outside the sandbox. If you are using `httpProxyPort` with a MITM proxy and custom CA, set [`enableWeakerNetworkIsolation`](</docs/en/settings#sandbox-settings>) to `true` instead.
- * **`open`, `osascript`, or browser-based auth flows fail with error `-600` on macOS**: the sandbox blocks Apple Events by default. Set [`allowAppleEvents`](</docs/en/settings#sandbox-settings>) to `true` in your user, managed, or CLI settings to allow them. Project settings are ignored for this key. Enabling it removes code-execution isolation, since sandboxed commands can then launch other applications unsandboxed with no user prompt and send AppleScript commands to running applications, subject to the macOS automation-consent prompt (TCC). Alternatively, add the command to `excludedCommands` to run it outside the sandbox.
+ * **Go-based CLIs fail TLS verification on macOS** : tools such as `gh`, `gcloud`, and `terraform` may fail TLS verification under Seatbelt. List these tools in `excludedCommands` to run them outside the sandbox. If you are using `httpProxyPort` with a MITM proxy and custom CA, set [`enableWeakerNetworkIsolation`](</docs/en/settings-reference#sandbox-enableweakernetworkisolation>) to `true` instead.
+ * **`open`, `osascript`, or browser-based auth flows fail with error `-600` on macOS**: the sandbox blocks Apple Events by default. Set [`allowAppleEvents`](</docs/en/settings-reference#sandbox-allowappleevents>) to `true` in your user, managed, or CLI settings to allow them. Project settings are ignored for this key. Enabling it removes code-execution isolation, since sandboxed commands can then launch other applications unsandboxed with no user prompt and send AppleScript commands to running applications, subject to the macOS automation-consent prompt (TCC). Alternatively, add the command to `excludedCommands` to run it outside the sandbox.
* **`docker` commands fail**: `docker` is incompatible with the sandbox. Add `docker *` to `excludedCommands` to run it outside the sandbox.
- * **A git command fails with`unable to unlink old`**: `git merge`, `git checkout`, and similar commands fail this way when they need to replace a file the sandbox denies writes to, whether that file is under a protected path such as `.claude/skills`, under one of your `denyWrite` entries, or outside the directories the sandbox lets commands write to at all. On Linux and WSL2 the error ends with `Read-only file system`. After the failure, Claude may offer to rerun the command outside the sandbox; approve that retry, or run the git command yourself in another terminal. If you’ve set `allowUnsandboxedCommands` to `false`, Claude can’t offer the retry, so run the command yourself or, if the same git command fails often, add that command to [`excludedCommands`](</docs/en/settings#sandbox-settings>).
- * **Bubblewrap fails to start inside a container** : in an unprivileged container, bubblewrap cannot mount a fresh `/proc` filesystem. Set [`enableWeakerNestedSandbox`](</docs/en/settings#sandbox-settings>) to `true` so the inner sandbox bind-mounts the container’s existing `/proc` instead. Only use this setting when the outer container already provides the isolation boundary you need, since it exposes process information to sandboxed commands that a fresh `/proc` mount would hide.
+ * **A git command fails with`unable to unlink old`**: `git merge`, `git checkout`, and similar commands fail this way when they need to replace a file the sandbox denies writes to, whether that file is under a protected path such as `.claude/skills`, under one of your `denyWrite` entries, or outside the directories the sandbox lets commands write to at all. On Linux and WSL2 the error ends with `Read-only file system`. After the failure, Claude may offer to rerun the command outside the sandbox; approve that retry, or run the git command yourself in another terminal. If you’ve set `allowUnsandboxedCommands` to `false`, Claude can’t offer the retry, so run the command yourself or, if the same git command fails often, add that command to [`excludedCommands`](</docs/en/settings-reference#sandbox-excludedcommands>).
+ * **Bubblewrap fails to start inside a container** : in an unprivileged container, bubblewrap cannot mount a fresh `/proc` filesystem. Set [`enableWeakerNestedSandbox`](</docs/en/settings-reference#sandbox-enableweakernestedsandbox>) to `true` so the inner sandbox bind-mounts the container’s existing `/proc` instead. Only use this setting when the outer container already provides the isolation boundary you need, since it exposes process information to sandboxed commands that a fresh `/proc` mount would hide.
* **`--dangerously-skip-permissions` fails as root**: this flag is blocked when running as root or via sudo on Linux and macOS, because root access combined with no permission prompts can modify any file or service on the system. 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.
##
@@ -628,7 +628,7 @@
Security limitations
- * **Network filtering** : the sandbox restricts which domains processes can connect to. By default the built-in proxy does not terminate or inspect TLS on outbound traffic, so the contents of encrypted connections are not examined. The experimental [`network.tlsTerminate`](</docs/en/settings#sandbox-settings>) setting terminates TLS at the proxy for `mask` credential substitution but does not add content filtering. You are responsible for ensuring that only trusted domains are allowed in your policy.
+ * **Network filtering** : the sandbox restricts which domains processes can connect to. By default the built-in proxy does not terminate or inspect TLS on outbound traffic, so the contents of encrypted connections are not examined. The experimental [`network.tlsTerminate`](</docs/en/settings-reference#sandbox-network-tlsterminate>) setting terminates TLS at the proxy for `mask` credential substitution but does not add content filtering. You are responsible for ensuring that only trusted domains are allowed in your policy.
Allowing broad domains such as `github.com` can create paths for data exfiltration. Because the proxy makes its allow decision from the client-supplied hostname without inspecting TLS, code running inside the sandbox can potentially use [domain fronting](<https://en.wikipedia.org/wiki/Domain_fronting>) or similar techniques to reach hosts outside the allowlist. If your threat model requires stronger guarantees, configure a custom proxy that terminates TLS and inspects traffic, and install its CA certificate inside the sandbox. Stronger TLS-aware network isolation is an active area of development.
@@ -671,5 +671,5 @@
* [Sandbox environments](</docs/en/sandbox-environments>): compare the built-in sandbox with dev containers, containers, and VMs
* [Security](</docs/en/security>): comprehensive security features and best practices
* [Permissions](</docs/en/permissions>): permission configuration and access control
- * [Settings](</docs/en/settings>): complete configuration reference
+ * [Settings reference](</docs/en/settings-reference>): every settings key
* [CLI reference](</docs/en/cli-reference>): command-line options
--- a/security.md
+++ b/security.md
@@ -158,7 +158,7 @@
Team security
- * Use [managed settings](</docs/en/settings#settings-files>) to enforce organizational standards
+ * Use [managed settings](</docs/en/settings#where-settings-live>) to enforce organizational standards
* Share approved permission configurations through version control
* Train team members on security best practices
* Monitor Claude Code usage through [OpenTelemetry metrics](</docs/en/monitoring-usage>)
--- a/security-guidance.md
+++ b/security-guidance.md
@@ -51,7 +51,7 @@
}
}
-Administrators can enable the plugin organization-wide by setting [`enabledPlugins`](</docs/en/settings#plugin-settings>) in [managed settings](</docs/en/admin-setup>).
+Administrators can enable the plugin organization-wide by setting [`enabledPlugins`](</docs/en/settings-reference#enabledplugins>) in [managed settings](</docs/en/admin-setup>).
##
--- a/self-hosted-environments-configuration.md
+++ b/self-hosted-environments-configuration.md
@@ -370,11 +370,11 @@
How each session’s config is assembled
-The runner gives each session its own config directory, seeded from an in-memory snapshot of the host’s `~/.claude/` that the runner captures once at startup: `settings.json`, `CLAUDE.md`, hooks, agents, commands, and skills in your runner image apply to every session as the user-level baseline. Because the snapshot is taken at startup, config changes on a running host take effect only after a runner restart. Set `SELF_HOSTED_RUNNER_HOST_CONFIG_DIR` to seed from a different path, or point it at an empty directory to disable seeding. Repository-committed `.claude/settings.json` layers on top as project settings. Sessions also read [`managed-settings.json`](</docs/en/settings#settings-files>) from the standard system path in your runner image, but the managed tier uses one source at a time, and [server-managed settings](</docs/en/server-managed-settings>) are checked first: if your organization delivers any server-managed keys, sessions ignore the runner image’s managed file, except that `env` blocks merge per key across managed sources. See [settings precedence](</docs/en/settings#settings-precedence>). When Anthropic’s control plane supplies a session with [Claude Code hooks](</docs/en/hooks>), the runner installs them alongside, not over, your own configuration. Requires Claude Code v2.1.229 or later.
+The runner gives each session its own config directory, seeded from an in-memory snapshot of the host’s `~/.claude/` that the runner captures once at startup: `settings.json`, `CLAUDE.md`, hooks, agents, commands, and skills in your runner image apply to every session as the user-level baseline. Because the snapshot is taken at startup, config changes on a running host take effect only after a runner restart. Set `SELF_HOSTED_RUNNER_HOST_CONFIG_DIR` to seed from a different path, or point it at an empty directory to disable seeding. Repository-committed `.claude/settings.json` layers on top as project settings. Sessions also read [`managed-settings.json`](</docs/en/settings#where-settings-live>) from the standard system path in your runner image, but the managed tier uses one source at a time, and [server-managed settings](</docs/en/server-managed-settings>) are checked first: if your organization delivers any server-managed keys, sessions ignore the runner image’s managed file, except that `env` blocks merge per key across managed sources. See [settings precedence](</docs/en/settings#settings-precedence>). When Anthropic’s control plane supplies a session with [Claude Code hooks](</docs/en/hooks>), the runner installs them alongside, not over, your own configuration. Requires Claude Code v2.1.229 or later.
* **Where they land** : the runner writes each supplied hook script to a reserved `hooks/.ccr-launcher/` subdirectory of the session’s config directory and registers the scripts in a separate settings file it passes to the session with `--settings`, leaving the seeded `settings.json` and your own scripts at `hooks/<name>` untouched. The runner recreates the reserved subdirectory for each session and doesn’t seed host content at `~/.claude/hooks/.ccr-launcher/` into sessions.
* **Who authors them** : the control plane populates the scripts from fixed constants in its own deployment, never from per-session or third-party input.
- * **What still governs them** : hooks delivered through `--settings` enter the ordinary merged hook configuration, not the managed tier, so your managed settings still apply. `disableAllHooks` disables them, and they are not among the categories [`allowManagedHooksOnly`](</docs/en/settings#hook-configuration>) keeps loaded.
+ * **What still governs them** : hooks delivered through `--settings` enter the ordinary merged hook configuration, not the managed tier, so your managed settings still apply. `disableAllHooks` disables them, and they are not among the categories [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>) keeps loaded.
###
--- a/self-hosted-environments-deploy.md
+++ b/self-hosted-environments-deploy.md
@@ -48,7 +48,7 @@
Host| Port| When required
---|---|---
`downloads.claude.ai`| 443| At install time, when you install or update Claude Code on the host with the native installer; the `install.sh` script itself is served from `claude.ai`. At session runtime, only when sessions install plugins from the official Anthropic marketplace.
-`storage.googleapis.com`| 443| At session runtime, for marketplace plugin catalog fetches and Artifact publishing when the Artifact tool is enabled; Artifact publishing falls back to `api.anthropic.com` when this host is blocked.
+`storage.googleapis.com`| 443| At session runtime, for the plugin install counts and metadata shown in `/plugin`.
`code.claude.com` and `claude.com`| 443| Documentation lookups by the built-in claude-code-guide agent and pre-approved WebFetch requests during sessions. Blocking these hosts only affects documentation lookups.
`*.frame.claudeusercontent.com`| 443| Only when the [Artifact tool](</docs/en/artifacts#availability>) is available for sessions in your organization; defaults vary by plan, per the availability table there. Set `CLAUDE_CODE_DISABLE_ARTIFACT=1` on the runner to keep the tool disabled regardless of the organization setting.
`raw.githubusercontent.com`| 443| Only for the changelog fetch behind `/release-notes` and the release notes shown after a CLI version change. Suppressed by `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1`.
--- a/self-hosted-environments-testing.md
+++ b/self-hosted-environments-testing.md
@@ -90,7 +90,7 @@
`--environment` dispatch behavior
-In a non-interactive run, with `-p` or a piped prompt, Claude Code creates the session, prints the session ID and a link to it, and exits. From a terminal, `claude --environment <id> "task"` starts an attached interactive cloud session on the environment instead. The flag takes precedence over the [`remote.defaultEnvironmentId`](</docs/en/settings#available-settings>) setting. It doesn’t support `--output-format stream-json`, and can’t be combined with flags that resume, attach to, or preconfigure a session, such as `--resume`, `--continue`, `--teleport`, `--session-id`, or `--init-only`. `--cloud` is rejected with a session ID or URL, and in non-interactive runs when it carries a description. A bare `--cloud` is treated as absent. From a terminal, you can pass the task as the `--cloud` description instead of a positional prompt.
+In a non-interactive run, with `-p` or a piped prompt, Claude Code creates the session, prints the session ID and a link to it, and exits. From a terminal, `claude --environment <id> "task"` starts an attached interactive cloud session on the environment instead. The flag takes precedence over the [`remote.defaultEnvironmentId`](</docs/en/settings-reference#remote-defaultenvironmentid>) setting. It doesn’t support `--output-format stream-json`, and can’t be combined with flags that resume, attach to, or preconfigure a session, such as `--resume`, `--continue`, `--teleport`, `--session-id`, or `--init-only`. `--cloud` is rejected with a session ID or URL, and in non-interactive runs when it carries a description. A bare `--cloud` is treated as absent. From a terminal, you can pass the task as the `--cloud` description instead of a positional prompt.
##
Show diff (195 lines)
--- a/server-managed-settings.md
+++ b/server-managed-settings.md
@@ -1,4 +1,4 @@
-Server-managed settings let organization Owners centrally configure Claude Code from [**Admin Settings > Claude Code > Managed settings**](<https://claude.ai/admin-settings/claude-code>) in the claude.ai console. Claude Code clients fetch these settings automatically when users authenticate with an organization OAuth login or a directly configured API key, on platforms where server-managed delivery is supported. See Platform availability.
+Server-managed settings let organization Owners centrally configure Claude Code from [**Admin Settings > Claude Code > Managed settings**](<https://claude.ai/admin-settings/claude-code>) in the claude.ai console. Claude Code clients fetch these settings automatically when users authenticate with a Team or Enterprise OAuth login, an OAuth token supplied through `CLAUDE_CODE_OAUTH_TOKEN`, or a directly configured API key, on platforms where server-managed delivery is supported. See Platform availability.
Server-managed settings are available for [Claude for Teams](<https://claude.com/pricing?utm_source=claude_code&utm_medium=docs&utm_content=server_settings_teams#team-&-enterprise>) and [Claude for Enterprise](<https://anthropic.com/contact-sales?utm_source=claude_code&utm_medium=docs&utm_content=server_settings_enterprise>) customers.
@@ -20,12 +20,12 @@
Choose between server-managed and endpoint-managed settings
-Claude Code supports two approaches for centralized configuration. Server-managed settings deliver configuration from Anthropic’s servers. [Endpoint-managed settings](</docs/en/settings#settings-files>) are deployed directly to devices through native OS policies (macOS managed preferences, Windows registry) or managed settings files.
+Claude Code supports two approaches for centralized configuration. Server-managed settings deliver configuration from Anthropic’s servers. [Endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) are deployed directly to devices through native OS policies (macOS managed preferences, Windows registry) or managed settings files.
Approach| Best for| Security model
---|---|---
-**Server-managed settings**| Organizations without MDM, or users on unmanaged devices| Settings delivered from Anthropic’s servers at authentication time
-**[Endpoint-managed settings](</docs/en/settings#settings-files>)**| Organizations with MDM or endpoint management| Settings deployed to devices via MDM configuration profiles, registry policies, or managed settings files
+**Server-managed settings**| Organizations without MDM, or users on unmanaged devices| Settings that Claude Code fetches from Anthropic’s servers at startup and refreshes hourly during the session
+**[Endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>)**| Organizations with MDM or endpoint management| Settings deployed to devices via MDM configuration profiles, registry policies, or managed settings files
If your devices are enrolled in an MDM or endpoint management solution, endpoint-managed settings provide stronger security guarantees because the settings file can be protected from user modification at the OS level. Endpoint-managed settings don’t reach [cloud sessions](</docs/en/model-config#surface-coverage>) in Anthropic-hosted environments, so organizations using Claude Code on the web should configure server-managed settings as well. Sessions in a [self-hosted environment](</docs/en/self-hosted-environments>) read the managed settings file in the runner image, but only when server-managed settings deliver no keys, per the settings precedence below and its per-key exceptions.
@@ -45,7 +45,7 @@
Define your settings
-Add your configuration as JSON. All [settings available in `settings.json`](</docs/en/settings#available-settings>) are supported except those restricted to OS-level policy delivery; see Current limitations for that short list. This includes [hooks](</docs/en/hooks>), [environment variables](</docs/en/env-vars>), and [managed-only settings](</docs/en/permissions#managed-only-settings>) like `allowManagedPermissionRulesOnly`.This example enforces a permission deny list, prevents users from bypassing permissions, and restricts permission rules to those defined in managed settings:
+Add your configuration as JSON. All [settings available in `settings.json`](</docs/en/settings-reference#all-settings>) are supported except those restricted to OS-level policy delivery; see Current limitations for that short list. This includes [hooks](</docs/en/hooks>), [environment variables](</docs/en/env-vars>), and [managed-only settings](</docs/en/managed-settings#managed-only-settings>) like `allowManagedPermissionRulesOnly`.This example enforces a permission deny list, prevents users from bypassing permissions, and restricts permission rules to those defined in managed settings:
{
"permissions": {
@@ -75,7 +75,7 @@
}
}
-Because hooks execute shell commands, users see a security approval dialog before they’re applied.To configure the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier so it knows which repos, buckets, and domains your organization trusts, deliver an `autoMode` block the same way; see [Configure auto mode](</docs/en/auto-mode-config>) for how the `autoMode` entries affect what the classifier blocks and important warnings about the `environment`, `allow`, `soft_deny`, and `hard_deny` fields.
+Because hooks execute shell commands, users in interactive sessions see a security approval dialog before Claude Code applies them.To configure the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier so it knows which repos, buckets, and domains your organization trusts, deliver an `autoMode` block the same way; see [Configure auto mode](</docs/en/auto-mode-config>) for how the `autoMode` entries affect what the classifier blocks and important warnings about the `environment`, `allow`, `soft_deny`, and `hard_deny` fields.
3
@@ -89,7 +89,7 @@
Verify settings delivery
-To confirm that settings are being applied, ask a user to restart Claude Code. If the configuration includes settings that trigger the security approval dialog, the user sees a prompt describing the managed settings on startup. You can also verify that managed permission rules are active by having a user run `/permissions` to view their effective permission rules.
+To confirm that settings are being applied, ask a user to restart Claude Code. If the configuration includes settings that trigger the security approval dialog, the user sees a prompt describing the managed settings the next time Claude Code fetches them: at the next start, or within an hour in a running interactive session. You can also verify that managed permission rules are active by having a user run `/permissions` to view their effective permission rules.
###
@@ -110,7 +110,7 @@
Managed-only settings
-Most [settings keys](</docs/en/settings#available-settings>) work in any scope. A handful of keys are only read from managed settings and have no effect when placed in user or project settings files. See [managed-only settings](</docs/en/permissions#managed-only-settings>) for the full list.
+Most [settings keys](</docs/en/settings-reference#all-settings>) work in any scope. A handful of keys are only read from managed settings and have no effect when placed in user or project settings files. See [managed-only settings](</docs/en/managed-settings#managed-only-settings>) for the permission and plugin controls, or read the Scope column of the [All settings](</docs/en/settings-reference#all-settings>) index for the full set.
###
@@ -121,8 +121,8 @@
Server-managed settings have the following limitations:
* Settings apply uniformly to all users in the organization. Per-group configurations are not yet supported.
- * A [`managed-mcp.json`](</docs/en/managed-mcp>) file can’t be distributed through server-managed settings. Deliver the `allowedMcpServers` and `deniedMcpServers` policy keys there instead.
- * Settings restricted to OS-level policy sources, such as `policyHelper` and `wslInheritsWindowsSettings`, are not honored. Deploy them through MDM or a system `managed-settings.json` file instead.
+ * A [`managed-mcp.json`](</docs/en/managed-mcp>) file can’t be distributed through server-managed settings. Deliver the `allowedMcpServers` and `deniedMcpServers` policy keys there instead. Claude Code reads a `managed-mcp.json` deployed at its [system path](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>) separately from the managed settings tier, so the file still applies when server-managed settings are in effect.
+ * Settings restricted to OS-level policy sources, such as `policyHelper` and `wslInheritsWindowsSettings`, aren’t honored. Deploy them through MDM or a system `managed-settings.json` file instead. A `policyHelper` deployed that way runs only when its source is the one selected under [precedence within the managed tier](</docs/en/managed-settings#precedence-within-the-managed-tier>).
##
@@ -136,7 +136,7 @@
Settings precedence
-Server-managed settings and [endpoint-managed settings](</docs/en/settings#settings-files>) both occupy the highest tier in the Claude Code [settings hierarchy](</docs/en/settings#settings-precedence>). No other settings level can override them, including command line arguments, apart from the [exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>). Within the managed tier, Claude Code uses the first source that delivers a non-empty configuration. Server-managed settings are checked first, then endpoint-managed settings. Apart from the exception keys covered next, sources don’t merge: if server-managed settings deliver any keys at all, other endpoint-managed settings are ignored. If server-managed settings deliver nothing, endpoint-managed settings apply. If the winning source is an MDM or file-based source that configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), the helper’s output replaces it as the only managed configuration for the run. A `policyHelper` configured in MDM or file-based settings is not consulted while server-managed settings deliver a non-empty configuration. If you clear your server-managed configuration in the admin console with the intent of falling back to an endpoint-managed plist or registry policy, be aware that cached settings persist on client machines until the next successful fetch. Run `/status` to see which managed source is active.
+Server-managed settings and [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) both occupy the highest tier in the Claude Code [settings hierarchy](</docs/en/settings#settings-precedence>). No other settings level can override them, including command line arguments, apart from the [exceptions to managed settings precedence](</docs/en/settings#exceptions-to-managed-settings-precedence>). Within the managed tier, Claude Code uses the first source that delivers at least one policy key, checking server-managed settings first and then endpoint-managed settings; [Precedence within the managed tier](</docs/en/managed-settings#precedence-within-the-managed-tier>) has the full ranking and the carve-out for `wslInheritsWindowsSettings`. Apart from the exception keys covered next, sources don’t merge: if server-managed settings deliver a policy key, other endpoint-managed settings are ignored. If server-managed settings deliver nothing, endpoint-managed settings apply. If the selected source is an MDM policy or managed settings file whose [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings, the helper’s output replaces that source as the only managed configuration for the run. Claude Code doesn’t consult a `policyHelper` configured in MDM or file-based settings while server-managed settings deliver a policy key. If you clear your server-managed configuration in the admin console with the intent of falling back to an endpoint-managed plist or registry policy, be aware that cached settings persist on client machines until the next successful fetch. Run `/status` to see which managed source is active.
###
@@ -146,7 +146,7 @@
Two kinds of keys are exceptions to the no-merge rule:
- * **Cross-source lock keys** : a small set of keys, such as the sandbox allowlist locks, [listed in the settings reference](</docs/en/settings#precedence-within-the-managed-tier>). They are honored when any admin-controlled managed source sets them; the user-writable HKCU registry tier is excluded, and when an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), the helper’s output is the only source these checks read.
+ * **Cross-source lock keys** : a small set of keys, such as the sandbox allowlist locks, [listed on the managed settings page](</docs/en/managed-settings#precedence-within-the-managed-tier>). They are honored when any admin-controlled managed source sets them; the user-writable HKCU registry tier is excluded, and when a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings, its output is the only source these checks read. The startup `forceRemoteSettingsRefresh` check runs before the helper and reads any admin source.
* **The`env` block**: apart from the telemetry unit and routing variables paired with a credential key, both covered below, it merges per key across the admin-controlled sources. For each environment variable, the highest-priority source defining it wins, and lower admin sources fill in variables the higher sources leave unset. An endpoint-managed `env` entry therefore applies whenever the server-managed configuration leaves that variable unset, or while a cached server value for it is withheld pending server confirmation. Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applies the winning source’s whole `env` block only.
* **Telemetry unit** : the `OTEL_EXPORTER_OTLP_*` exporter keys, the `OTEL_LOG_*` content-capture toggles, `OTEL_LOGS_EXPORTER`, and the beta tracing variables `ENABLE_BETA_TRACING_DETAILED` and `BETA_TRACING_ENDPOINT` follow the highest source that sets any of them as a unit. A source that delivers the `otelHeadersHelper` credential key claims the unit too, but lands these variables only when it is the winning source: a non-winning source that delivers the key contributes none of them and still blocks lower sources from filling them in. Either way, an exporter endpoint from one source can never pair with credentials from another.
* **Credential-paired routing** : a source that pairs routing variables with a winner-only credential key, such as `apiKeyHelper` or `otelHeadersHelper`, contributes those routing variables only when it wins the slot.
@@ -160,7 +160,7 @@
Claude Code fetches settings from Anthropic’s servers at startup and polls for updates hourly during active sessions. **First launch without cached settings:**
* Claude Code fetches settings asynchronously
- * If the fetch fails, Claude Code continues without managed settings
+ * If the fetch fails, Claude Code continues without server-managed settings; endpoint-managed settings still apply
* There is a brief window before settings load where restrictions are not yet enforced
**Subsequent launches with cached settings:**
@@ -169,7 +169,7 @@
* Claude Code fetches fresh settings in the background
* Cached settings persist through network failures. The withheld environment variables remain withheld until a fetch succeeds
-Claude Code withholds the following categories of variables in the cached `env` block until the server confirms the payload for the session. This keeps a cached proxy, certificate authority, endpoint, or credential value from redirecting, intercepting, or re-authenticating the settings fetch that confirms the payload. The hardening applies only to the server-fetched settings cache: [endpoint-managed settings](</docs/en/settings#settings-files>) deployed through MDM or `managed-settings.json` are unaffected. The withholding requires Claude Code v2.1.198 or later; before v2.1.198, the whole cached `env` block applies at startup. The withheld categories are:
+Claude Code withholds several categories of variables in the cached `env` block until the server confirms the payload for the session. This keeps a cached proxy, certificate authority, endpoint, or credential value from redirecting, intercepting, or re-authenticating the settings fetch that confirms the payload. The hardening applies only to the server-fetched settings cache: [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) deployed through MDM or `managed-settings.json` are unaffected. The withholding requires Claude Code v2.1.198 or later; before v2.1.198, the whole cached `env` block applies at startup. The withheld categories include:
* Proxy and TLS configuration, such as `HTTPS_PROXY`, `NODE_EXTRA_CA_CERTS`, and the mTLS client certificate variables `CLAUDE_CODE_CLIENT_CERT` and `CLAUDE_CODE_CLIENT_KEY`
* API routing and provider selection, including `ANTHROPIC_BASE_URL`, the provider selection variables such as `CLAUDE_CODE_USE_BEDROCK` and `CLAUDE_CODE_USE_VERTEX`, and the provider endpoint URLs such as `ANTHROPIC_BEDROCK_BASE_URL`
@@ -177,7 +177,7 @@
* The configuration-directory selector `CLAUDE_CONFIG_DIR`
* Credential-source and configuration-directory selectors, in Claude Code v2.1.223 or later: the Workload Identity Federation variables such as `ANTHROPIC_FEDERATION_RULE_ID` and `ANTHROPIC_IDENTITY_TOKEN`, the profile and configuration-directory selectors `ANTHROPIC_PROFILE` and `ANTHROPIC_CONFIG_DIR`, and the operating-system directory variables `HOME`, `XDG_CONFIG_HOME`, `APPDATA`, and `USERPROFILE`
-Claude Code reads the Workload Identity Federation variables and the `ANTHROPIC_PROFILE` and `ANTHROPIC_CONFIG_DIR` selectors only at startup, so a server-delivered value for them doesn’t switch the session’s credential source even after the fetch succeeds. To deliver those selectors on Claude Code v2.1.223 or later, use [endpoint-managed settings](</docs/en/settings#settings-files>) such as MDM or `managed-settings.json`. For `CLAUDE_CONFIG_DIR` and the operating-system directory variables, the withholding itself is the protection: the cached value stays out of the environment until the server confirms the payload. Every other key in the cached `env` block, such as telemetry and OpenTelemetry configuration, applies at startup as before. Once the fetch succeeds, the withheld variables apply for the rest of the session; the startup-only selectors covered above reach the environment but don’t switch the running session’s credential source. If your organization needs a proxy to reach `api.anthropic.com`, the withholding only affects the server-delivered `env` block itself: a proxy set in an [endpoint-managed](</docs/en/settings#settings-files>) `env` block through MDM or `managed-settings.json`, in the shell environment, or in [user settings](</docs/en/settings#settings-files>) reaches the settings fetch. The endpoint-managed source requires Claude Code v2.1.223 or later: the cached server-managed proxy value is withheld until the fetch confirms it, so the endpoint-managed value fills in per key and reaches the fetch itself. Before v2.1.223, use the shell environment or user settings so the proxy applies alongside a cached server payload. The first launch has no cache, so an endpoint-managed source, the shell environment, or user settings is still required for the initial fetch. Claude Code applies settings updates automatically without a restart, except for advanced settings like OpenTelemetry configuration, which require a full restart to take effect.
+Claude Code reads the Workload Identity Federation variables and the `ANTHROPIC_PROFILE` and `ANTHROPIC_CONFIG_DIR` selectors only at startup, so a server-delivered value for them doesn’t switch the session’s credential source even after the fetch succeeds. To deliver those selectors on Claude Code v2.1.223 or later, use [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) such as MDM or `managed-settings.json`. For `CLAUDE_CONFIG_DIR` and the operating-system directory variables, the withholding itself is the protection: the cached value stays out of the environment until the server confirms the payload. Every other key in the cached `env` block, such as telemetry and OpenTelemetry configuration, applies at startup as before. Once the server confirms the payload, and you approve it if it needs security approval, the withheld variables apply for the rest of the session; the startup-only selectors covered above reach the environment but don’t switch the running session’s credential source. If your organization needs a proxy to reach `api.anthropic.com`, the withholding only affects the server-delivered `env` block itself: a proxy set in an [endpoint-managed](</docs/en/managed-settings#delivery-mechanisms>) `env` block through MDM or `managed-settings.json`, in the shell environment, or in [user settings](</docs/en/settings#where-settings-live>) reaches the settings fetch. The endpoint-managed source requires Claude Code v2.1.223 or later: the cached server-managed proxy value is withheld until the fetch confirms it, so the endpoint-managed value fills in per key and reaches the fetch itself. Before v2.1.223, use the shell environment or user settings so the proxy applies alongside a cached server payload. The first launch has no cache, so an endpoint-managed source, the shell environment, or user settings is still required for the initial fetch. Claude Code applies settings updates automatically without a restart, except for advanced settings like OpenTelemetry configuration, which require a full restart to take effect.
###
@@ -185,10 +185,10 @@
Invalid entries in delivered settings
-Delivered payloads parse tolerantly with the same rules as the other managed sources. When a payload contains an entry that fails schema validation, Claude Code strips that entry, surfaces a validation error, and applies every remaining valid setting. See [Invalid entries in managed settings](</docs/en/settings#invalid-entries-in-managed-settings>) for the field-level behavior, including how security-enforcement fields are handled. Requires Claude Code v2.1.169 or later. Server-managed delivery adds these behaviors:
+Delivered payloads parse tolerantly with the same rules as the other managed sources. When part of a payload fails schema validation, Claude Code surfaces a validation error and applies every remaining valid setting; [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value. Requires Claude Code v2.1.169 or later. Server-managed delivery adds these behaviors:
* The cache at `~/.claude/remote-settings.json` stores the salvaged payload with invalid entries removed. The raw invalid payload is never persisted.
- * When no field in the payload can be salvaged, Claude Code keeps the last-accepted cached settings and records a fatal error.
+ * When no field in the payload can be salvaged, Claude Code rejects the payload, keeps the last-accepted cached settings, and writes `Remote settings: Settings validation failed - no fields could be salvaged` to the debug log. With `forceRemoteSettingsRefresh` set, the CLI exits instead.
* The security approval dialog evaluates the salvaged payload, so a stripped invalid entry is never presented for approval and never executes.
To debug delivery issues, run `claude --debug-file <path>` and search the log for `Remote settings`. Validate a payload change with `claude doctor` on a test machine before rolling it out to the organization.
@@ -199,13 +199,13 @@
Enforce fail-closed startup
-By default, if the remote settings fetch fails at startup, the CLI continues without managed settings. For environments where this brief unenforced window is unacceptable, set `forceRemoteSettingsRefresh: true` in your managed settings. When this setting is active, the CLI blocks at startup until remote settings are freshly fetched. If the fetch fails, the CLI exits rather than proceeding without the policy. This setting self-perpetuates: once delivered from the server, it is also cached locally so that subsequent startups enforce the same behavior even before the first successful fetch of a new session. To enable this, add the key to your managed settings configuration:
+By default, if the remote settings fetch fails at startup, the CLI continues with the settings cached from the last successful fetch, or without server-managed settings on a machine that has never fetched them. For environments where either window is unacceptable, set `forceRemoteSettingsRefresh: true` in your managed settings. When this setting is active in a session that fetches server-managed settings, the CLI blocks at startup until remote settings are freshly fetched. If the fetch fails, the CLI exits rather than proceeding without the policy. This setting self-perpetuates: once delivered from the server, it is also cached locally so that subsequent startups enforce the same behavior even before the first successful fetch of a new session. A session that doesn’t fetch server-managed settings starts without waiting. To enable this, add the key to your managed settings configuration:
{
"forceRemoteSettingsRefresh": true
}
-You can also set this key in an [endpoint-managed](</docs/en/settings#settings-files>) MDM profile or system `managed-settings.json` file to enforce fail-closed behavior on first launch, before any server payload has been delivered. As of v2.1.191, this flag is an exception to the precedence rule above: it is honored when set in any admin-controlled managed source even if a cached server-managed payload is also present, so an MDM-delivered value is not ignored when server-managed settings exist. When an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), the helper’s output replaces every other managed source, this key included. The settings fetch also sends a `Cache-Control: no-cache` header so intermediate HTTP proxies don’t serve a stale response. Before enabling this setting, ensure your network policies allow connectivity to `api.anthropic.com`. If that endpoint is unreachable, the CLI exits at startup and users cannot start Claude Code. The `claude auth` subcommands such as `claude auth login` are exempt from this check, so users can re-authenticate when expired credentials are the reason the settings fetch fails.
+You can also set this key in an [endpoint-managed](</docs/en/managed-settings#delivery-mechanisms>) MDM profile or system `managed-settings.json` file to enforce fail-closed behavior on first launch, before any server payload has been delivered. In Claude Code v2.1.191 or later, this flag is an exception to the precedence rule above: it is honored when set in any admin-controlled managed source even if a cached server-managed payload is also present, so an MDM-delivered value is not ignored when server-managed settings exist. When a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings, its output replaces every other managed source for the keys Claude Code reads after startup; the startup fail-closed check itself reads this key from any admin-controlled source before the helper runs. The entry says which sources Claude Code reads the helper from and when it runs. The settings fetch also sends a `Cache-Control: no-cache` header so intermediate HTTP proxies don’t serve a stale response. Before enabling this setting, ensure your network policies allow connectivity to `api.anthropic.com`. If that endpoint is unreachable, the CLI exits at startup and users cannot start Claude Code. The `claude auth` subcommands such as `claude auth login` are exempt from this check, so users can re-authenticate when expired credentials are the reason the settings fetch fails.
###
@@ -213,9 +213,9 @@
Security approval dialogs
-Certain settings that could pose security risks require explicit user approval before Claude Code applies them:
-
- * **Shell command settings** : settings that execute shell commands
+Certain settings that could pose security risks require explicit user approval before Claude Code applies them in an interactive session:
+
+ * **Shell command settings** : settings that execute shell commands, such as `apiKeyHelper`, `statusLine`, and `otelHeadersHelper`
* **Sandbox binary settings** : `sandbox.bwrapPath`, `sandbox.socatPath`, and `sandbox.ripgrep`. Each of these settings points at an executable, and Claude Code runs that executable
* **Custom environment variables** : delivered `env` variables that require the user’s approval, such as proxy and base-URL variables; see Environment variables and the approval dialog
* **Hook configurations** : any hook definition
@@ -265,7 +265,7 @@
Platform availability
-Server-managed settings require a direct connection to `api.anthropic.com`, and delivery requires the session to authenticate with an organization OAuth login or a directly configured API key. Keys returned by an [`apiKeyHelper`](</docs/en/settings#available-settings>) script don’t trigger the settings fetch. Server-managed settings are not available when using third-party model providers:
+Server-managed settings require a direct connection to `api.anthropic.com`, and delivery requires the session to authenticate with a Team or Enterprise OAuth login, an OAuth token supplied through `CLAUDE_CODE_OAUTH_TOKEN`, or a directly configured API key. Keys returned by an [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) script don’t trigger the settings fetch. Server-managed settings are not available when using third-party model providers:
* Amazon Bedrock
* Google Cloud’s Agent Platform
@@ -273,7 +273,7 @@
* [Claude Platform on AWS](</docs/en/claude-platform-on-aws>)
* Custom API endpoints via `ANTHROPIC_BASE_URL` or third-party [LLM gateways](</docs/en/llm-gateway>)
-If you export a `CLAUDE_CODE_USE_*` provider variable or a non-default `ANTHROPIC_BASE_URL` in your shell, Claude Code skips the settings fetch for your sessions. You can’t clear the export with a server-managed `env` block, because the block arrives through the fetch that the export prevents. An [endpoint-managed settings](</docs/en/settings#settings-files>) `env` block doesn’t restore the fetch either: Claude Code checks eligibility before it applies managed `env` blocks, so the override changes the session’s provider selection but the fetch stays skipped. To restore server-managed delivery, remove the export from your shell, or set the variable to `""` in your user settings `env` block, which applies before the eligibility check. To enforce policy without relying on users to change their shells, deliver the settings through the endpoint-managed channel instead. For Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry deployments, a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) provides the equivalent remote managed-settings delivery: gateway-signed-in clients fetch managed settings from the gateway instead of `api.anthropic.com`. The failure semantics differ at startup: a gateway client that can’t reach the gateway exits with an error instead of falling back to cached settings, while the hourly background refresh is fail-open on both channels.
+If you export a `CLAUDE_CODE_USE_*` provider variable or a non-default `ANTHROPIC_BASE_URL` in your shell, Claude Code skips the settings fetch for your sessions. You can’t clear the export with a server-managed `env` block, because the block arrives through the fetch that the export prevents. An [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) `env` block doesn’t restore the fetch either: Claude Code checks eligibility before it applies managed `env` blocks, so the override changes the session’s provider selection but the fetch stays skipped. To restore server-managed delivery, remove the export from your shell, or set the variable to `""` in your user settings `env` block, which applies before the eligibility check. To enforce policy without relying on users to change their shells, deliver the settings through the endpoint-managed channel instead. For Amazon Bedrock, Google Cloud’s Agent Platform, Microsoft Foundry, and [Claude Platform on AWS](</docs/en/claude-platform-on-aws>) deployments, a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>) provides the equivalent remote managed-settings delivery: gateway-signed-in clients fetch managed settings from the gateway instead of `api.anthropic.com`. The failure semantics differ at startup: a gateway client that can’t reach the gateway exits with an error instead of falling back to cached settings, while the hourly background refresh is fail-open on both channels.
##
@@ -302,7 +302,7 @@
User configures a third-party model provider| Server-managed settings are bypassed. This includes setting `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_MANTLE`, `CLAUDE_CODE_USE_VERTEX`, `CLAUDE_CODE_USE_FOUNDRY`, `CLAUDE_CODE_USE_ANTHROPIC_AWS`, or a non-default `ANTHROPIC_BASE_URL`
Network traffic is intercepted or redirected| Disabled TLS validation or intercepted traffic can alter the settings the client receives
-To detect runtime configuration changes, use [`ConfigChange` hooks](</docs/en/hooks#configchange>) to log modifications or block unauthorized changes before they take effect. To restrict which organizations your users can access with credentials the client supplies, see [Enforce network-level access control with Tenant Restrictions](<https://support.claude.com/en/articles/13198485-enforce-network-level-access-control-with-tenant-restrictions>) in the Claude Help Center. For stronger enforcement guarantees, use [endpoint-managed settings](</docs/en/settings#settings-files>) on devices enrolled in an MDM solution.
+To log edits to local settings files, including `managed-settings.json`, use [`ConfigChange` hooks](</docs/en/hooks#configchange>). Claude Code doesn’t run them when server-managed settings arrive or refresh, and a hook can’t block a `policy_settings` change. To restrict which organizations your users can access with credentials the client supplies, see [Enforce network-level access control with Tenant Restrictions](<https://support.claude.com/en/articles/13198485-enforce-network-level-access-control-with-tenant-restrictions>) in the Claude Help Center. For stronger enforcement guarantees, use [endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>) on devices enrolled in an MDM solution.
##
@@ -312,7 +312,7 @@
Related pages for managing Claude Code configuration:
- * [Settings](</docs/en/settings>): complete configuration reference including all available settings
- * [Endpoint-managed settings](</docs/en/settings#settings-files>): managed settings deployed to devices by IT
+ * [Settings reference](</docs/en/settings-reference>): every settings key
+ * [Endpoint-managed settings](</docs/en/managed-settings#delivery-mechanisms>): managed settings deployed to devices by IT
* [Authentication](</docs/en/authentication>): set up user access to Claude Code
* [Security](</docs/en/security>): security safeguards and best practices
--- a/session-storage.md
+++ b/session-storage.md
@@ -282,7 +282,7 @@
When the store returns the transcript, the SDK writes it into a temporary config directory, runs the subprocess with `CLAUDE_CONFIG_DIR` pointing there, and deletes the directory when the run ends. The local transcript that run writes is deleted with it, which is why the store holds the only durable copy on this path. The SDK also seeds the temporary directory with files from your real config directory. What it copies differs by language:
- * **TypeScript** : credentials, `.claude.json`, and your user `settings.json`. From `settings.json` it strips the keys that misbehave under a temporary config directory: `enabledPlugins`, `extraKnownMarketplaces`, its [`additionalMarketplaces`](</docs/en/settings#extraknownmarketplaces>) alias, and any `CLAUDE_CONFIG_DIR` in the file’s `env` block. Before Agent SDK v0.3.232, the SDK didn’t strip the alias. Auth configured in settings, such as [`apiKeyHelper`](</docs/en/settings#available-settings>), works when you resume from the store. Before Agent SDK v0.3.222, the TypeScript SDK copied only credentials and `.claude.json`.
+ * **TypeScript** : credentials, `.claude.json`, and your user `settings.json`. From `settings.json` it strips the keys that misbehave under a temporary config directory: `enabledPlugins`, `extraKnownMarketplaces`, its [`additionalMarketplaces`](</docs/en/settings-reference#extraknownmarketplaces>) alias, and any `CLAUDE_CONFIG_DIR` in the file’s `env` block. Before Agent SDK v0.3.232, the SDK didn’t strip the alias. Auth configured in settings, such as [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>), works when you resume from the store. Before Agent SDK v0.3.222, the TypeScript SDK copied only credentials and `.claude.json`.
* **Python** : credentials and `.claude.json` only, so an app that authenticates through `apiKeyHelper` in your user `settings.json` fails with `Not logged in` when resuming from a store. An `apiKeyHelper` in managed or project settings still works, because Claude Code reads those files from locations that `CLAUDE_CONFIG_DIR` doesn’t affect.
When the store has nothing for the session, the SDK runs under your real config directory instead, and the outcome depends on which option you passed:
Show diff (1601 lines)
--- a/settings.md
+++ b/settings.md
@@ -1,1254 +1,359 @@
-Claude Code offers a variety of settings to configure its behavior to meet your needs. You can configure Claude Code by running the `/config` command in an interactive session, which opens a tabbed Settings interface where you can view status information and modify configuration options. From v2.1.181, you can change a single option without opening the interface by passing `key=value` to `/config`, for example `/config verbose=true`.
-
-##
-
-
-
-Configuration scopes
-
-Claude Code uses a scope system to determine where configurations apply and who they’re shared with. Understanding scopes helps you decide how to configure Claude Code for personal use, team collaboration, or enterprise deployment.
-
-###
-
-
-
-Available scopes
-
-Scope| Location| Who it affects| Shared with team?
+This page covers Claude Code running on your machine: the terminal, the [VS Code](</docs/en/vs-code>) and [JetBrains](</docs/en/jetbrains>) extensions, and the [desktop app](</docs/en/desktop>), which all read the same settings files. A cloud session on [Claude Code on the web](</docs/en/claude-code-on-the-web>) runs on a different machine and reads only some of them; see Settings in cloud sessions.
+
+Settings are the JSON keys that change how Claude Code behaves: which model it starts with, what it can run without asking, which files it can’t read, how it looks in your terminal, and what your organization enforces. Claude Code reads settings from JSON settings files such as `~/.claude/settings.json`. It looks for them in a few locations, and the file it reads a setting from decides who the setting applies to. Use this page to pick the settings file that reaches the people you want a setting to apply to, change a setting and confirm it applied, and see which value Claude Code uses when the same key is set in more than one file. The [settings reference](</docs/en/settings-reference>) lists every key you can set, with the file you set it in, its type, and its default. [Configure permissions](</docs/en/permissions>) covers what Claude Code can run without asking and how to write `allow`, `ask`, and `deny` rules.
+
+##
+
+
+
+Settings files and who they affect
+
+Claude Code reads settings from four files, and an organization can also deliver managed settings from the claude.ai console. Each source has a scope: the set of people and projects a setting saved in it applies to, whether that’s just you, everyone in a project, or everyone in your organization.
+
+Scope| File| Who it affects| Use it for
---|---|---|---
-**Managed**| Server-managed settings, plist / registry, or system-level `managed-settings.json`| All organization members for server-managed delivery; all users on the machine for plist, HKLM registry, and file delivery; the current user for HKCU registry delivery| Yes (deployed by IT)
-**User**| `~/.claude/` directory| You, across all projects| No
-**Project**| `.claude/` in repository| All collaborators on this repository| Yes (committed to git)
-**Local**| `.claude/settings.local.json` at the repository root| You, in this repository only| No (gitignored when Claude Code saves a setting to it)
-
-###
-
-
-
-When to use each scope
-
-**Managed scope** is for:
-
- * Security policies that must be enforced organization-wide
- * Compliance requirements that can’t be overridden
- * Standardized configurations deployed by IT/DevOps
-
-**User scope** is best for:
-
- * Personal preferences you want everywhere (themes, editor settings)
- * Tools and plugins you use across all projects
- * API keys and authentication (stored securely)
-
-**Project scope** is best for:
-
- * Team-shared settings (permissions, hooks, MCP servers)
- * Plugins the whole team should have
- * Standardizing tooling across collaborators
-
-**Local scope** is best for:
-
- * Personal overrides for a specific project
- * Testing configurations before sharing with the team
- * Machine-specific settings that won’t work for others
-
-###
-
-
-
-How scopes interact
-
-When the same setting appears in multiple scopes, Claude Code applies them in priority order:
-
- 1. **Managed** (highest): can’t be overridden by any other scope, apart from the exceptions to managed settings precedence
- 2. **Command line arguments** : temporary session overrides
- 3. **Local** : overrides project and user settings
- 4. **Project** : overrides user settings
- 5. **User** (lowest): applies when nothing else specifies the setting
-
-For example, if your user settings set `spinnerTipsEnabled` to `true` and project settings set it to `false`, the project value applies. Permission rules merge across scopes instead, and a few security-sensitive keys are exceptions. See Settings precedence.
-
-###
-
-
-
-What uses scopes
-
-Scopes apply to many Claude Code features:
-
-Feature| User location| Project location| Local location
----|---|---|---
-**Settings**| `~/.claude/settings.json`| `.claude/settings.json`| `.claude/settings.local.json`
-**Subagents**| `~/.claude/agents/`| `.claude/agents/`| None
-**MCP servers**| `~/.claude.json`| `.mcp.json`| `~/.claude.json`, under the [project’s entry](</docs/en/mcp#local-scope>)
-**Plugins**| `~/.claude/settings.json`| `.claude/settings.json`| `.claude/settings.local.json`
-**CLAUDE.md**| `~/.claude/CLAUDE.md`| `CLAUDE.md` or `.claude/CLAUDE.md`| `CLAUDE.local.md`
-
-On Windows, paths shown as `~/.claude` resolve to `%USERPROFILE%\.claude`.
-
-* * *
-
-##
-
-
-
-Settings files
-
-The `settings.json` file is the official mechanism for configuring Claude Code through hierarchical settings:
-
- * **User settings** are defined in `~/.claude/settings.json` and apply to all projects.
- * **Project settings** are saved in your project directory:
- * `.claude/settings.json` for settings that are checked into source control and shared with your team
- * `.claude/settings.local.json` for settings that are not checked in, useful for personal preferences and experimentation. When Claude Code saves a setting to this file in a repository that doesn’t already ignore it, Claude Code adds `**/.claude/settings.local.json` to your global git excludes file. That excludes file is `core.excludesFile` from your global git config when it’s set to an absolute or `~`-prefixed path, otherwise `$XDG_CONFIG_HOME/git/ignore`, or `~/.config/git/ignore`. If you create the file by hand or have Claude write it with the Write tool, add it to your gitignore yourself. Claude Code reads and writes this file at the root of the git repository, resolved through [worktrees](</docs/en/worktrees>) to the main checkout, so one file covers sessions started in any subdirectory or worktree of the repository. The file stays in the directory you start Claude Code from in three cases: outside a git repository, when the repository root is your home directory, and in [Agent SDK](</docs/en/agent-sdk/claude-code-features#control-filesystem-settings-with-settingsources>) sessions.
-
-Before v2.1.211, the file always lived in the starting directory. Claude Code still reads a `.claude/settings.local.json` that an earlier version left there. When both files set the same key, the repository root’s value wins, except that permission rules from both files stay in effect.
-
-Claude Code also saves permanent “don’t ask again” [permission approvals](</docs/en/permissions#permission-system>), such as Bash command approvals, to this file. Because this file is yours rather than the repository’s, its permission `allow` rules take effect without the [workspace trust](</docs/en/permissions#project-allow-rules-and-workspace-trust>) step that `.claude/settings.json` allow rules require. If the repository supplies the file, for example by committing it, workspace trust still applies.
- * **Managed settings** : For organizations that need centralized control, Claude Code supports multiple delivery mechanisms for managed settings. All use the same JSON format and cannot be overridden by user or project settings:
- * **Server-managed settings** : delivered remotely at sign-in, either from Anthropic’s servers via the claude.ai admin console or from a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>). See [server-managed settings](</docs/en/server-managed-settings>).
- * **MDM/OS-level policies** : delivered through native device management on macOS and Windows:
- * macOS: `com.anthropic.claudecode` managed preferences domain. The plist’s top-level keys mirror `managed-settings.json`, with nested settings as dictionaries and arrays as plist arrays. Deploy via configuration profiles in Jamf, Iru (Kandji), or similar MDM tools.
- * Windows: `HKLM\SOFTWARE\Policies\ClaudeCode` registry key with a `Settings` value (REG_SZ or REG_EXPAND_SZ) containing JSON (deployed via Group Policy or Intune)
- * Windows (user-level): `HKCU\SOFTWARE\Policies\ClaudeCode` (lowest policy priority, only used when no admin-level source exists)
- * **File-based** : `managed-settings.json` and `managed-mcp.json` deployed to system directories:
- * macOS: `/Library/Application Support/ClaudeCode/`
- * Linux and WSL: `/etc/claude-code/`
- * Windows: `C:\Program Files\ClaudeCode\`
-
-The legacy Windows path `C:\ProgramData\ClaudeCode\managed-settings.json` is no longer supported as of v2.1.75. Administrators who deployed settings to that location must migrate files to `C:\Program Files\ClaudeCode\managed-settings.json`.
-
-File-based managed settings also support a drop-in directory at `managed-settings.d/` in the same system directory alongside `managed-settings.json`. This lets separate teams deploy independent policy fragments without coordinating edits to a single file. Following the systemd convention, Claude Code merges `managed-settings.json` first as the base, then sorts all `*.json` files in the drop-in directory alphabetically and merges them on top. For scalar values, Claude Code lets later files override earlier ones; it concatenates and de-duplicates arrays and deep-merges objects. A later file’s `fallbackModel` chain replaces an earlier one instead of merging with it, and a later file’s `extraKnownMarketplaces` entry replaces an earlier file’s same-name entry whole. Claude Code ignores hidden files starting with `.`. Use numeric prefixes to control merge order, for example `10-telemetry.json` and `20-security.json`.
-See [managed settings](</docs/en/permissions#managed-only-settings>) and [Managed MCP configuration](</docs/en/managed-mcp>) for details. This [repository](<https://github.com/anthropics/claude-code/tree/main/examples/mdm>) includes starter deployment templates for Jamf, Iru (Kandji), Intune, and Group Policy. Use these as starting points and adjust them to fit your needs.
-
-Managed deployments can also restrict **plugin marketplace additions** using `strictKnownMarketplaces`. For more information, see [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>).
-
- * **Other configuration** is stored in `~/.claude.json`. This file contains your OAuth session, [MCP server](</docs/en/mcp>) configurations for user and local scopes, per-project state (allowed tools, trust settings), and various caches. Project-scoped MCP servers are stored separately in `.mcp.json`.
-
-Claude Code automatically creates timestamped backups of configuration files and retains the five most recent backups to prevent data loss.
-
-The following example works in any of the settings file locations above. Where you save the file determines where it applies:
-
- * To apply it to all of your projects, save it as `~/.claude/settings.json`. This file lives in your home directory rather than in any project, so Claude Code reads it in every session regardless of which project you open.
- * To share it with collaborators on one project, save it as `.claude/settings.json` in that project. Claude Code reads this file from the directory the session runs in, so it applies only to that project, and checking it into source control gives every collaborator the same settings.
-
-Example settings.json
+User| `~/.claude/settings.json`| You, in every project on this machine| Personal preferences: theme, editor mode, default model, your own permission rules
+Shared project| `.claude/settings.json`| Everyone who starts Claude Code in the folder that contains it. In a git repository, commit it so teammates get it| Team permissions, hooks, plugins, and the environment variables the project needs
+Project local| `.claude/settings.local.json`| You, in this one project only. Claude Code keeps it out of git when it creates the file; if you create it by hand, add it to `.gitignore` yourself| Personal overrides for one project, and testing before you share
+Managed| `managed-settings.json` and other [managed sources](</docs/en/managed-settings#delivery-mechanisms>)| Everyone your organization deploys it to; nothing you set overrides it, apart from a few security-sensitive exceptions| Security policy and compliance requirements
+
+In the File column, `~/.claude` is the `.claude` folder in your home directory, and a bare `.claude` is the `.claude` folder inside the project you start Claude Code in.
+
+###
+
+
+
+Compare the scope of each settings file
+
+Suppose you have three projects on your machine, `website/`, `api/`, and `acme-app/`, a teammate has their own clone of `acme-app/`, and you start a cloud session on `acme-app/`. The graphic below shows which of those folders a setting applies in when you start Claude Code from them. Click a settings file to see the folders it reaches.
+
+ * **`~/.claude/settings.json`** : every project on your machine, and nothing on your teammate’s or in the cloud session
+ * **`acme-app/.claude/settings.json`** : your `acme-app/`. It reaches your teammate’s clone and the cloud session only if you commit the file to version control; until you do, it’s a file on your disk like any other and nobody else has it
+ * **`acme-app/.claude/settings.local.json`** : your `acme-app/` only. Claude Code adds it to your global git excludes the first time it writes the file, so it stays out of your commits; if you create the file by hand, add it to `.gitignore` yourself
+ * **Managed settings** , whether a `managed-settings.json` file, an MDM policy, or [server-managed settings](</docs/en/server-managed-settings>) from the claude.ai console: every project on every machine your organization deploys it to, or that you sign in to with your organization account. Only server-managed settings reach the cloud session
+
+###
+
+
+
+Find or create your settings files
+
+Installing Claude Code doesn’t create any settings file. If your machine or project already has one, it came from one of these sources:
+
+ * **Managed** : your organization deploys it. You don’t create or edit it.
+ * **Shared project** : a project that already uses Claude Code may have one committed. If not, create it at `.claude/settings.json` in the project folder.
+ * **User** and **Project local** : create them yourself, or let Claude Code create them. It writes `~/.claude/settings.json` the first time you change an option in the `/config` menu that it stores in user settings, such as the theme, and `.claude/settings.local.json` the first time you give a standing approval on a permission prompt, such as “Yes, and don’t ask again” for a Bash command. A few `/config` options, including **Show tips** , save to `.claude/settings.local.json` instead of the user file.
+
+On Windows, `~/.claude` means `%USERPROFILE%\.claude`. To keep the home-directory files somewhere else, set [`CLAUDE_CONFIG_DIR`](</docs/en/env-vars>); Claude Code then stores your settings, session history, and plugins there instead.
+
+Claude Code also keeps a fifth file, [`~/.claude.json`](</docs/en/claude-directory#ce-claude-json>), that it writes for itself; you don’t need to edit it. It holds your sign-in session, [MCP server](</docs/en/mcp>) configurations, per-project state such as trust decisions, and the [global config keys](</docs/en/settings-reference#global-config-settings>) that `/config` writes for you.
+
+###
+
+
+
+Share settings with your team
+
+Commit `.claude/settings.json` so everyone who clones the repository gets the same permissions, hooks, telemetry, and plugins. Each teammate can still override it for themselves in their own `.claude/settings.local.json`, so personal exceptions don’t need a commit. For a complete team file, see [a team’s shared settings](</docs/en/settings-example#a-teams-shared-settings>). Some of what you commit waits until each teammate [trusts the folder](</docs/en/permissions#project-allow-rules-and-workspace-trust>), and a few keys never take effect from a repository file; Troubleshoot a setting that doesn’t apply covers both.
+
+###
+
+
+
+Keep personal settings out of a repository
+
+To change a setting for yourself in one project without changing it for your teammates, save it in `.claude/settings.local.json` inside the project. Claude Code applies that file over the committed `.claude/settings.json`, so if your team’s file sets `"model": "claude-sonnet-5"` and you want Opus, put `"model": "claude-opus-4-8"` in your local file and only your sessions change. Three things to know about the local file:
+
+ * **Claude Code writes it too.** When Claude asks permission to run a Bash command and you choose “Yes, and don’t ask again”, Claude Code saves that [permission approval](</docs/en/permissions#permission-system>) here as an `allow` rule.
+ * **You don’t need to gitignore it yourself, unless you created it by hand.** The first time Claude Code writes the file in a git repository that doesn’t already ignore it, it adds `**/.claude/settings.local.json` to your global git excludes file, so the file stays out of your commits in every repository. That file is `core.excludesFile` when your global git config sets it to an absolute or `~`-prefixed path; otherwise it’s `$XDG_CONFIG_HOME/git/ignore`, or `~/.config/git/ignore` when `XDG_CONFIG_HOME` is unset. If you created the file by hand and Claude Code hasn’t written to it yet, add it to `.gitignore` yourself.
+ * **Its allow rules don’t wait for trust while the file stays untracked.** Because the file is yours and not the repository’s, Claude Code applies its `allow` rules without the [workspace trust](</docs/en/permissions#project-allow-rules-and-workspace-trust>) step it requires for the committed file. If the file is tracked by git, the trust step applies to it too; see [When your local settings file needs trust](</docs/en/permissions#when-your-local-settings-file-needs-trust>).
+
+####
+
+
+
+Where Claude Code keeps the local file in a git repository
+
+When Claude asks permission to run a Bash command and you choose “Yes, and don’t ask again”, Claude Code saves that approval as an allow rule in `.claude/settings.local.json`. If you started Claude Code in a subdirectory or a [worktree](</docs/en/worktrees>) of a git repository, it reads and writes that file at the repository root, so the approval applies across the whole repository. The shared `.claude/settings.json` doesn’t move: Claude Code reads it only from the folder you start in, so start at the repository root to pick up a committed file there. Two details follow from the root location:
+
+ * **When the file stays in the starting directory instead** : outside a git repository, when the repository root is your home directory, on Windows, or when the repository root or its `.git` or `.claude` entry isn’t owned by your user.
+ * **Paths in the file still resolve from where you started** : a permission rule that starts with `/` or a relative sandbox path keeps covering the directory you started Claude Code in, not the repository root.
+
+Before v2.1.211, Claude Code kept the file in the starting directory. It still reads a file an earlier version left there alongside the root file; where both set the same key, the root’s value applies, and permission rules from both files apply. The Agent SDK’s [`resolveSettings()`](</docs/en/agent-sdk/typescript#resolvesettings>) helper always reads the file from the starting directory.
+
+###
+
+
+
+Check what your organization enforces
+
+If your organization manages Claude Code, some settings are decided for you and nothing you put in your own files changes them. To see which, run `/status`: the `Setting sources` line names the managed source that applies to you. Managed settings apply wherever Claude Code runs on this machine; [What a developer can change](</docs/en/managed-settings#what-a-developer-can-change>) covers local admin rights and tools other than Claude Code. Managed settings reach you through the [delivery mechanisms](</docs/en/managed-settings#delivery-mechanisms>) on the managed settings page, most commonly:
+
+ * [Server-managed settings](</docs/en/server-managed-settings>), which Claude Code fetches from the claude.ai admin console or a self-hosted [Claude apps gateway](</docs/en/claude-apps-gateway>)
+ * MDM or OS-level policies, and `managed-settings.json` files in a system directory
+ * An embedding host such as Claude Desktop, through the SDK `managedSettings` option; see [Control policy from an embedding host](</docs/en/managed-settings#parent-settings-from-embedding-hosts>)
+
+If you’re the administrator, [Set up Claude Code for your organization](</docs/en/admin-setup>) walks through choosing what to enforce, and [Deploy managed settings](</docs/en/managed-settings>) covers delivery and how to confirm a policy is in force.
+
+##
+
+
+
+Change a setting
+
+You can change a setting from the `/config` menu, by editing a settings file, or for one session from the command line. Claude Code’s system prompt isn’t published. To give Claude standing instructions, use [`CLAUDE.md` files](</docs/en/memory>) or the `--append-system-prompt` flag.
+
+###
+
+
+
+Use the /config menu
+
+Run `/config` inside Claude Code and open the **Config** tab. It lists a short set of personal options such as theme, editor mode, and verbose output, not every settings key. Select an option to change it; Claude Code saves it for you:
+
+ * **Most options** : `~/.claude/settings.json`
+ * **A few options, such as Show tips** : `.claude/settings.local.json`
+ * **The[global config options](</docs/en/settings-reference#global-config-settings>)**: `~/.claude.json`
+
+To set one option without the menu, pass `key=value`, such as `/config verbose=true`.
+
+`/config` is part of the terminal interface. The [VS Code](</docs/en/vs-code>) chat panel and the [desktop app](</docs/en/desktop>) don’t open it; change settings there by editing a settings file or through those apps’ own settings.
+
+###
+
+
+
+Edit a settings file
+
+Open the settings file for the scope you want in your editor and add or change a key. Settings files are strict JSON: a `//` comment or a trailing comma is a syntax error, and Claude Code reports the file as a Settings Error at the next start. For example, to let Claude Code run your lint and test commands without asking and stop it reading `.env` files, add this to `~/.claude/settings.json`:
+
+~/.claude/settings.json
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"allow": [
"Bash(npm run lint)",
- "Bash(npm run test *)",
- "Read(~/.zshrc)"
+ "Bash(npm run test *)"
],
"deny": [
- "Bash(curl *)",
"Read(./.env)",
- "Read(./.env.*)",
- "Read(./secrets/**)"
- ]
- },
- "env": {
- "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
- "OTEL_METRICS_EXPORTER": "otlp",
- "OTEL_EXPORTER_OTLP_PROTOCOL": "http/protobuf"
- },
- "companyAnnouncements": [
- "Welcome to Acme Corp! Review our code guidelines at docs.acme.com",
- "Reminder: Code reviews required for all PRs",
- "New security policy in effect"
- ]
- }
-
-The `$schema` line in the example above points to the [official JSON schema](<https://json.schemastore.org/claude-code-settings.json>) for Claude Code settings. Adding it to your `settings.json` enables autocomplete and inline validation in VS Code, Cursor, and any other editor that supports JSON schema validation. The published schema is updated periodically and may not include settings added in the most recent CLI releases, so a validation warning on a recently documented field does not necessarily mean your configuration is invalid.
-
-After you edit a settings file, run `/status` inside Claude Code to confirm it was loaded. The `Setting sources` line lists each settings source loaded for the current session; a source appears once it loads with at least one setting, so a file with broken JSON doesn’t appear even if it contains settings. See Verify active settings.
-
-###
-
-
-
-When edits take effect
-
-Claude Code watches your settings files and reloads them when they change, so edits to most keys apply to the running session without a restart. This includes `permissions`, `hooks`, and credential helpers like `apiKeyHelper`. The reload covers user, project, local, and managed settings, and the [`ConfigChange` hook](</docs/en/hooks#configchange>) fires for each detected change. A few keys are read once at session start and apply on the next restart instead:
-
- * `model`: use [`/model`](</docs/en/model-config#setting-your-model>) to switch mid-session
- * [`outputStyle`](</docs/en/output-styles>): part of the system prompt, which is rebuilt on `/clear` or restart
-
-###
-
-
-
-Invalid entries in managed settings
-
-Managed settings parse tolerantly. When a managed configuration contains an entry that fails schema validation, Claude Code strips that entry, records a warning, and enforces every remaining valid policy. A single typo cannot disable the rest of your organization’s policy. Run [`/doctor`](</docs/en/commands#all-commands>) to list stripped entries with their source file and field. This behavior is consistent across all three delivery mechanisms: [server-managed settings](</docs/en/server-managed-settings>), plist and registry policies deployed through MDM, and `managed-settings.json` files. Requires Claude Code v2.1.169 or later. Security-enforcement fields are handled per field instead of being stripped wholesale when they are present but invalid:
-
-Field| Behavior when present but invalid
----|---
-`allowedMcpServers`| Enforced as an empty allowlist, so no MCP servers are admitted until the value is fixed. An individual invalid entry is stripped and the valid subset is enforced.
-`allowManagedHooksOnly`| Treated as `true`, so the hook restrictions apply until the value is fixed and, unless `disableCommandPluginSources` is explicitly `false`, command-sourced plugins are disabled. Applies in v2.1.229 and later.
-`allowManagedMcpServersOnly`| Treated as `true`.
-`disableCommandPluginSources`| Treated as `true`, so command-sourced plugins stay disabled until the value is fixed. Applies in v2.1.229 and later.
-`availableModels`| Enforced as an empty allowlist, so only the Default model is available until the value is fixed. An individual non-string entry is stripped and the valid subset is enforced. Applies in v2.1.175 and later.
-`enforceAvailableModels`| Treated as `true`. Applies in v2.1.175 and later.
-`forceLoginOrgUUID`| No organization is permitted to log in until the value is fixed.
-`deniedMcpServers`| An individual invalid entry is stripped and the valid subset is enforced. A wholly invalid value is dropped with a warning, since denying every server would block servers the policy never named.
-`sandbox.credentials`| An invalid entry in `files` or `envVars` that still has a valid `path` or `name` and a `mode` of `mask` or `deny`, such as one whose `extract` pattern has no capturing group, is degraded to `mode: "deny"` with a warning, so the credential stays blocked, not masked, until you fix the entry. A degraded `files` entry pins [`filesystem.disabled`](</docs/en/sandboxing#disable-filesystem-isolation>) like an explicit `deny` entry, and the warning notes that its read block isn’t enforced if managed settings turn filesystem isolation off. An entry with an unknown `mode` or an invalid `path` or `name` is stripped. Each case warns; whether an entry is degraded or stripped, the remaining valid entries are still enforced, and a wholly invalid `credentials` value is dropped while the rest of `sandbox` still applies. Applies in v2.1.191 and later; before v2.1.221, every invalid entry was stripped.
-
-`requiredMinimumVersion` and `requiredMaximumVersion` fail open by design: an invalid value is stripped rather than enforced, so a bad policy push cannot prevent Claude Code from starting. Validation errors surface in three places:
-
- * Interactive sessions show a dialog at startup listing the invalid entries.
- * Headless runs with `-p` print a summary to stderr.
- * [`claude doctor`](</docs/en/debug-your-config>) lists each invalid entry with its source and field.
-
-Validate policy changes by running `claude doctor` on a test machine before deploying them fleet-wide. This tolerance applies only to managed settings. User, project, and local settings files remain strict: a file that fails validation is rejected as a whole and reported.
-
-###
-
-
-
-Available settings
-
-`settings.json` supports a number of options:
-
-Key| Description| Example
----|---|---
-`advisorModel`| Model for the server-side [advisor tool](</docs/en/advisor>). Accepts the model aliases `"fable"`, `"opus"`, and `"sonnet"`, or a full model ID. `"fable"` requires [Fable 5 access](</docs/en/advisor#choose-an-advisor-model>). Written automatically when you run `/advisor`, except when you pick Fable while the [usage-credits consent](</docs/en/advisor#fable-advisor-and-usage-credits>) is pending. Unset to disable the advisor.| `"opus"`
-`agent`| Run the main thread as a named subagent, and set the default agent for sessions dispatched from `claude agents`. Applies that subagent’s system prompt, tool restrictions, and model. See [Invoke subagents explicitly](</docs/en/sub-agents#invoke-subagents-explicitly>)| `"code-reviewer"`
-`agentPushNotifEnabled`| **Default** : `false`. When [Remote Control](</docs/en/remote-control>) is connected, allow Claude to send proactive push notifications to your phone, for example when a long task finishes. Appears in `/config` as **Push when Claude decides**. See [Mobile push notifications](</docs/en/remote-control#mobile-push-notifications>)| `true`
-`allowAllClaudeAiMcps`| (Managed settings only) Load the claude.ai connectors Claude Code fetches itself alongside a deployed `managed-mcp.json`, which otherwise takes exclusive control and suppresses them. Connectors delivered to cloud sessions stay suppressed. See [Managed MCP configuration](</docs/en/managed-mcp#allow-claude-ai-connectors-alongside-the-managed-set>)| `true`
-`allowedChannelPlugins`| (Managed settings only) Allowlist of channel plugins that may push messages. Replaces the default Anthropic allowlist when set. Undefined = fall back to the default, empty array = block all channel plugins. Requires `channelsEnabled: true`. See [Restrict which channel plugins can run](</docs/en/channels#restrict-which-channel-plugins-can-run>)| `[{ "marketplace": "claude-plugins-official", "plugin": "telegram" }]`
-`allowedHttpHookUrls`| Allowlist of URL patterns that HTTP hooks may target. Supports `*` as a wildcard. When set, hooks with non-matching URLs are blocked. Undefined = no restrictions, empty array = block all HTTP hooks. Arrays merge across settings sources. See Hook configuration| `["https://hooks.example.com/*"]`
-`allowedMcpServers`| When set in managed-settings.json, allowlist of MCP servers users can configure. Undefined = no restrictions, empty array = lockdown. Applies to all scopes. Denylist takes precedence. See [Managed MCP configuration](</docs/en/managed-mcp>)| `[{ "serverName": "github" }]`
-`allowManagedHooksOnly`| (Managed settings only) Restrict which hooks run; see Hook configuration for the full effect list| `true`
-`allowManagedMcpServersOnly`| (Managed settings only) Only `allowedMcpServers` from managed settings are respected. `deniedMcpServers` still merges from all sources. Users can still add MCP servers, but only the admin-defined allowlist applies. See [Managed MCP configuration](</docs/en/managed-mcp>)| `true`
-`allowManagedPermissionRulesOnly`| (Managed settings only) Prevent user and project settings from defining `allow`, `ask`, or `deny` permission rules. Only rules in managed settings apply. See [Managed-only settings](</docs/en/permissions#managed-only-settings>)| `true`
-`alwaysThinkingEnabled`| Enable [extended thinking](</docs/en/model-config#extended-thinking>) by default for all sessions. Typically configured via the `/config` command rather than editing directly. To force thinking off regardless of this setting, set [`MAX_THINKING_TOKENS=0`](</docs/en/env-vars>) in `env`, which disables thinking on the Anthropic API except on Fable 5, which cannot have thinking turned off. On [third-party providers](</docs/en/third-party-integrations>) this omits the `thinking` parameter instead, and adaptive-reasoning models may still think| `true`
-`apiKeyHelper`| Custom command, run through the system shell (`/bin/sh` on macOS and Linux, `cmd` on Windows), to generate an auth value. This value will be sent as `X-Api-Key` and `Authorization: Bearer` headers for model requests. Set the refresh interval with [`CLAUDE_CODE_API_KEY_HELPER_TTL_MS`](</docs/en/env-vars>)| `/bin/generate_temp_api_key.sh`
-`askUserQuestionTimeout`| **Default** : `"never"`. Idle time before an unanswered [`AskUserQuestion`](</docs/en/tools-reference>) dialog auto-continues with whatever options you’d already selected. Accepts `"60s"`, `"5m"`, `"10m"`, or `"never"`. With the default, questions wait until you answer them. Appears in `/config` as **Question auto-continue timeout** , which writes this key to user settings. Not read from project or local settings. Requires Claude Code v2.1.200 or later| `"5m"`
-`attribution`| Customize attribution for git commits and pull requests. See Attribution settings| `{"commit": "🤖 Generated with Claude Code", "pr": ""}`
-`autoCompactEnabled`| **Default** : `true`. Automatically compact the conversation when context approaches the limit. Appears in `/config` as **Auto-compact**. To disable via environment variable, set [`DISABLE_AUTO_COMPACT`](</docs/en/env-vars>) in `env`| `false`
-`autoCompactWindow`| How full the context window gets before Claude Code [compacts automatically](</docs/en/context-window#when-your-context-fills-up>), in tokens from `100000` to `1000000`. When unset, Claude Code uses a window tuned for your model. Set it with the [`/autocompact`](</docs/en/commands#all-commands>) command, which writes this key to user settings; the [`--autocompact`](</docs/en/cli-reference#cli-flags>) flag and the [`CLAUDE_CODE_AUTO_COMPACT_WINDOW`](</docs/en/env-vars>) environment variable can override it. [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) covers how they interact| `500000`
-`autoMemoryDirectory`| Custom directory for [auto memory](</docs/en/memory#storage-location>) storage. Accepts an absolute path or a `~/`-prefixed path. From project or local settings, Claude Code honors it under the same [workspace trust rule as hooks](</docs/en/permissions#what-runs-before-you-trust-a-folder>), since a cloned repository can supply this file| `"~/my-memory-dir"`
-`autoMemoryEnabled`| **Default** : `true`. Enable [auto memory](</docs/en/memory#enable-or-disable-auto-memory>). When `false`, Claude does not read from or write to the auto memory directory. You can also toggle this with `/memory` during a session. To disable via environment variable, set [`CLAUDE_CODE_DISABLE_AUTO_MEMORY`](</docs/en/env-vars>) in `env`| `false`
-`autoMode`| Customize what the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier blocks and allows. Contains `environment`, `allow`, `soft_deny`, and `hard_deny` arrays of prose rules. Include the literal string `"$defaults"` in an array to inherit the built-in rules at that position. See [Configure auto mode](</docs/en/auto-mode-config>). Read from user settings, the `--settings` flag, and managed settings only. Ignored in project `.claude/settings.json` and local `.claude/settings.local.json`. Before v2.1.207, `.claude/settings.local.json` was also read| `{"soft_deny": ["$defaults", "Never run terraform apply"]}`
-`autoMode.classifyAllShell`| **Default** : `false`. When `true`, suspends every Bash and PowerShell allow rule while auto mode is active so all shell commands route through the classifier, not only rules that match arbitrary-code-execution patterns. See [Route all shell commands through the classifier](</docs/en/auto-mode-config#route-all-shell-commands-through-the-classifier>). Requires Claude Code v2.1.193 or later| `true`
-`autoScrollEnabled`| **Default** : `true`. In [fullscreen rendering](</docs/en/fullscreen>), follow new output to the bottom of the conversation. Appears in `/config` as **Auto-scroll**. Permission prompts still scroll into view when this is off| `false`
-`autoUpdatesChannel`| **Default** : `"latest"`. Release channel to follow for updates. Use `"stable"` for a version that is typically about one week old and skips versions with major regressions, or `"latest"` for the most recent release. To disable auto-updates entirely, set [`DISABLE_AUTOUPDATER`](</docs/en/setup#disable-auto-updates>) in `env`| `"stable"`
-`availableModels`| Restrict which models users can select for the main session, [subagents](</docs/en/sub-agents>), [skills](</docs/en/skills>), and the [advisor](</docs/en/advisor>). See [Default model behavior](</docs/en/model-config#default-model-behavior>) for the Default option. See [Restrict model selection](</docs/en/model-config#restrict-model-selection>)| `["sonnet", "haiku"]`
-`awaySummaryEnabled`| Show a one-line session recap when you return to the terminal after a few minutes away. Set to `false` or turn off Session recap in `/config` to disable. Same as [`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`](</docs/en/env-vars>)| `true`
-`awsAuthRefresh`| Custom script that modifies the `.aws` directory (see [advanced credential configuration](</docs/en/amazon-bedrock#advanced-credential-configuration>))| `aws sso login --profile myprofile`
-`awsCredentialExport`| Custom script that outputs JSON with AWS credentials (see [advanced credential configuration](</docs/en/amazon-bedrock#advanced-credential-configuration>))| `/bin/generate_aws_grant.sh`
-`axScreenReader`| Render screen-reader friendly output: flat text without decorative borders or animations. Screen-reader mode uses the classic renderer, so the `tui` setting has no effect while it is active; attached [background sessions](</docs/en/agent-view>) still render fullscreen. The [`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars>) environment variable and the [`--ax-screen-reader`](</docs/en/cli-reference#cli-flags>) flag take precedence. Requires Claude Code v2.1.181 or later| `true`
-`blockedMarketplaces`| (Managed settings only) Blocklist of marketplace sources. Enforced on marketplace add and on plugin install, update, refresh, and auto-update, so a marketplace added before the policy was set cannot be used to fetch plugins. Blocked sources are checked before downloading, so they never touch the filesystem. A `github` entry may use the owner-wildcard form `"owner/*"` to block every repository under that GitHub owner. Requires Claude Code v2.1.223 or later. See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)| `[{ "source": "github", "repo": "untrusted/plugins" }]`
-`browserExternalPageTools`| (Managed settings only) Set to `"disabled"` to prevent Claude from using tools to read or act on external pages in the desktop app’s [Browser pane](</docs/en/desktop#browse-external-sites>). Users can still navigate to external sites themselves, and local dev server previews are unaffected| `"disabled"`
-`channelsEnabled`| (Managed settings only) Allow [channels](</docs/en/channels>) for the organization. On claude.ai Team and Enterprise plans, channels are blocked when this is unset or `false`. For [Anthropic Console](</docs/en/authentication#claude-console-authentication>) accounts using API key authentication, channels are allowed by default unless your organization deploys managed settings, in which case this key must be set to `true`| `true`
-`claudeMd`| (Managed settings only) CLAUDE.md-style instructions injected as organization-managed memory. Only honored when set in managed or policy settings and ignored in user, project, and local settings. See [organization-wide CLAUDE.md](</docs/en/memory#deploy-organization-wide-claude-md>)| `"Always run make lint before committing."`
-`claudeMdExcludes`| Glob patterns or absolute paths of `CLAUDE.md` files to skip when loading [memory](</docs/en/memory>). Patterns match against absolute file paths. Only applies to user, project, and local memory; managed policy files cannot be excluded| `["**/vendor/**/CLAUDE.md"]`
-`cleanupPeriodDays`| **Default** : `30` days, minimum `1`. Claude Code deletes [session files and other application data](</docs/en/claude-directory#cleaned-up-automatically>) older than this period at startup, as long as it can safely determine the retention period. To disable transcript writes entirely, see [Plaintext storage](</docs/en/claude-directory#plaintext-storage>).| `20`
-`companyAnnouncements`| Announcement to display to users at startup. If multiple announcements are provided, they will be cycled through at random.| `["Welcome to Acme Corp! Review our code guidelines at docs.acme.com"]`
-`crossSessionInbound`| How this session treats inbound [cross-session messages](</docs/en/cross-session-messaging#control-inbound-messages>) from your other Claude Code sessions: `"accept"` delivers them to Claude, `"hold"` shows a notice for each message without delivering it, and `"refuse"` drops them. When no value applies, Claude Code decides per message from the two sessions’ permission-mode classes; see [Control inbound messages](</docs/en/cross-session-messaging#control-inbound-messages>) for the rules. Claude Code reads managed settings first, then the `--settings` flag, then user settings, and applies the first value found; a value in project or local settings applies only when it’s stricter, on the `accept` < `hold` < `refuse` ladder, than the value those trusted sources give. When none of the trusted sources sets a value, a project or local `hold` or `refuse` still applies, replacing the per-message default. Requires Claude Code v2.1.224 or later. In sessions with cross-session messaging, appears in `/config` as **Messages from your other sessions** , which writes this key to user settings. The row requires Claude Code v2.1.232 or later, and Claude Code hides it while the `--settings` flag or managed settings set the key| `"hold"`
-`defaultShell`| **Default** : `"bash"`, or `"powershell"` on Windows when Bash isn’t available. Default shell for input-box `!` commands. Accepts `"bash"` or `"powershell"`. Setting `"powershell"` routes interactive `!` commands through PowerShell when the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is enabled: it’s on by default on Windows without Git Bash, and `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` enables it elsewhere| `"powershell"`
-`deniedMcpServers`| When set in managed-settings.json, denylist of MCP servers that are explicitly blocked. Applies to all scopes including managed servers. Denylist takes precedence over allowlist. See [Managed MCP configuration](</docs/en/managed-mcp>)| `[{ "serverName": "filesystem" }]`
-`dialogExpiry`| **Default** : `"5m"`. Deadline for dialogs Claude Code [forwards to a remote client](</docs/en/remote-control#limitations>), such as a Remote Control or SDK host, and for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>). When no answer arrives before the deadline, Claude Code cancels the dialog and continues with its no-action default. Permission prompts and [`AskUserQuestion`](</docs/en/tools-reference#askuserquestion-tool-behavior>) questions use their own flows and aren’t governed by this deadline. Accepts `"60s"`, `"5m"`, `"10m"`, or `"never"`, which disables the deadline. The [`CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS`](</docs/en/env-vars>) environment variable overrides this setting. Read from user, managed, and `--settings` sources only. Requires Claude Code v2.1.224 or later. Appears in `/config` as **Dialog expiry** , which writes this key to user settings. The row requires Claude Code v2.1.232 or later, and Claude Code hides it while the `--settings` flag or managed settings set the key| `"10m"`
-`disableAgentView`| Set to `true` to turn off [background agents and agent view](</docs/en/agent-view>): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Typically set in [managed settings](</docs/en/permissions#managed-settings>). Equivalent to setting `CLAUDE_CODE_DISABLE_AGENT_VIEW` to `1`| `true`
-`disableAllHooks`| Disable all [hooks](</docs/en/hooks#disable-or-remove-hooks>), any custom [status line](</docs/en/statusline>), and any custom file suggestion command| `true`
-`disableArtifact`| Set to `true` to disable the [Artifact](</docs/en/artifacts>) tool, which publishes session output as a private web page on claude.ai. Equivalent to setting `CLAUDE_CODE_DISABLE_ARTIFACT` to `1`| `true`
-`disableAutoMode`| Set to `"disable"` to prevent [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from being activated. Removes `auto` from the `Shift+Tab` cycle, and any session that would otherwise [start in auto mode](</docs/en/permission-modes#which-mode-a-session-starts-in>), whether from `--permission-mode auto`, a settings file, or the built-in default, starts in `default` instead. Also accepted under `permissions` as `permissions.disableAutoMode`. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `"disable"`
-`disableBrowserExternalNavigation`| (Managed settings only) Set to `true` to turn off external browsing in the desktop app’s [Browser pane](</docs/en/desktop#browse-external-sites>). Neither users nor Claude can navigate to external sites, and localhost dev server previews are unaffected. The value must be the JSON boolean `true`; the string `"true"` is ignored| `true`
-`disableBundledSkills`| Set to `true` to disable the [skills](</docs/en/skills>) and workflows included with Claude Code: bundled skills and workflows are removed entirely, while built-in commands like `/init` stay typable but are hidden from the model. `/doctor` stays typable like the built-in commands; hide it with [`DISABLE_DOCTOR_COMMAND`](</docs/en/env-vars>) instead. Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. Equivalent to setting `CLAUDE_CODE_DISABLE_BUNDLED_SKILLS` to `1`| `true`
-`disableClaudeAiConnectors`| Disable [claude.ai MCP connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) so they are not auto-fetched or connected. Set in any settings scope. `true` in any source takes precedence, so a checked-in project `.claude/settings.json` can opt a repo out of cloud connectors, but a project-level `false` cannot override a user- or policy-level `true`. Servers passed explicitly via `--mcp-config` are unaffected. To deny individual connectors instead of all of them, use [`deniedMcpServers`](</docs/en/managed-mcp>). Requires Claude Code v2.1.182 or later| `true`
-`disableCommandPluginSources`| (Managed settings only) Control the [`command` plugin source](</docs/en/plugin-marketplaces#command-sources>), which installs a plugin by running a marketplace-declared command on the user’s machine. Set to `true` to block command-sourced plugins entirely. Claude Code never runs the command, doesn’t install or update those plugins, and stops loading the ones already installed. Set to `false` to allow them explicitly. When unset, Claude Code follows `allowManagedHooksOnly`, so an organization that restricts hook execution to managed settings gets command sources disabled too. Requires Claude Code v2.1.229 or later| `true`
-`disableDeepLinkRegistration`| Set to `"disable"` to prevent Claude Code from registering the `claude-cli://` protocol handler with the operating system when you send the first prompt of an interactive session. [Deep links](</docs/en/deep-links>) let external tools open a Claude Code session with a pre-filled prompt. Useful in environments where protocol handler registration is restricted or managed separately| `"disable"`
-`disabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to reject| `["filesystem"]`
-`disableMobileSimulatorTools`| (Managed settings only) Set to `true` to block Claude’s tools for the desktop app’s [iOS Simulator pane](</docs/en/desktop-ios-simulator#turn-off-simulator-access>). Users keep manual use of the pane; only Claude’s access is removed. The value must be the JSON boolean `true`; any other value is ignored, and a malformed value such as `"true"` or `1` logs a warning| `true`
-`disableRemoteControl`| Disable [Remote Control](</docs/en/remote-control>): blocks `claude remote-control`, the `--remote-control` flag, auto-start, and the in-session toggle. Typically placed in [managed settings](</docs/en/permissions#managed-settings>) for per-device MDM enforcement, but works from any scope| `true`
-`disableSideloadFlags`| (Managed settings only) Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` CLI flags at startup, which users could otherwise pass to bypass `strictKnownMarketplaces` for a single run. Also rejects these flags from any surface that spawns the CLI with them internally, currently [Cowork](</docs/en/desktop>) local sessions in the desktop app. A `--mcp-config` whose servers are all in-process `type: "sdk"` entries is still accepted, so the Agent SDK and VS Code extension keep working. Doesn’t block `claude mcp add`, `.mcp.json`, or SDK `setMcpServers()`; pair with [`allowedMcpServers`](</docs/en/managed-mcp>) for per-server MCP control. Requires Claude Code v2.1.193 or later| `true`
-`disableSkillShellExecution`| Disable inline shell execution for `!`...`` and ````!` blocks in [skills](</docs/en/skills>) and custom commands from user, project, plugin, or additional-directory sources. Commands are replaced with `[shell command execution disabled by policy]` instead of being run. Bundled and managed skills are not affected. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `true`
-`disableWorkflows`| **Default** : `false`. Disable [dynamic workflows](</docs/en/workflows#turn-workflows-off>) and the bundled workflow commands. Equivalent to setting `CLAUDE_CODE_DISABLE_WORKFLOWS` to `1`| `true`
-`editorMode`| **Default** : `"normal"`. Key binding mode for the input prompt: `"normal"` or `"vim"`. Appears in `/config` as **Editor mode**| `"vim"`
-`effortLevel`| Persist the [effort level](</docs/en/model-config#adjust-effort-level>) across sessions. Accepts `"low"`, `"medium"`, `"high"`, or `"xhigh"`. Written automatically when you run `/effort` with one of those values. `--effort` and [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars>) override this for one session. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>) for supported models| `"xhigh"`
-`emojiCompletionEnabled`| **Default** : `true`. Show emoji suggestions when you type `:` plus a shortcode in the prompt input, and replace a completed shortcode such as `:heart:` with its emoji. Set to `false` to disable both. See [Emoji shortcodes](</docs/en/interactive-mode#emoji-shortcodes>). Requires Claude Code v2.1.217 or later| `false`
-`enableAllProjectMcpServers`| Automatically approve all MCP servers defined in project `.mcp.json` files. As of v2.1.196, `claude mcp list` and `claude mcp get` honor this key in an untrusted folder only from [settings files that aren’t checked into the repository](</docs/en/mcp#managing-your-servers>)| `true`
-`enableArtifact`| Enable or disable the [Artifact](</docs/en/artifacts>) tool for this user. When unset, the default follows the feature’s [availability](</docs/en/artifacts#availability>) for your account. The **Artifacts** row in `/config` writes this key. A managed `disableArtifact` and your organization’s [admin setting](</docs/en/artifacts#manage-artifacts-for-your-organization>) take precedence, and the key is ignored in project and local settings (`.claude/settings.json`, `.claude/settings.local.json`), which a repository could otherwise commit. Requires Claude Code v2.1.196 or later| `true`
-`enabledMcpjsonServers`| List of specific MCP servers from `.mcp.json` files to approve. As of v2.1.196, `claude mcp list` and `claude mcp get` honor this key in an untrusted folder only from [settings files that aren’t checked into the repository](</docs/en/mcp#managing-your-servers>)| `["memory", "github"]`
-`enforceAvailableModels`| Extend the `availableModels` allowlist to the Default model. When `true` in managed settings and `availableModels` is a non-empty array, a Default model outside the allowlist falls back to the first allowlisted entry that is available. See [Enforce the allowlist for the Default model](</docs/en/model-config#enforce-the-allowlist-for-the-default-model>). Requires Claude Code v2.1.175 or later| `true`
-`env`| Environment variables Claude Code sets in every session and passes to the processes it starts, such as Bash commands and hooks. To override a shell export you can’t unset, set that variable to `""` here; Claude Code treats the empty value as unset for provider selection, and processes it starts still inherit the empty value. `NO_COLOR` and `FORCE_COLOR` set here reach only subprocesses; to change Claude Code’s own interface colors, set them in your shell before launching `claude`. Claude Code ignores identity variables set here that its hosting environments own, such as `CLAUDE_CODE_REMOTE` and `CLAUDE_CODE_ACCOUNT_UUID`. It also ignores [`CLAUDE_CODE_MESSAGING_SOCKET` and `CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>), which it exports itself. Ignoring the socket variable requires Claude Code v2.1.224 or later, and ignoring the token requires v2.1.228 or later. Ignoring [`CLAUDE_CODE_PROJECT_DIR_NAME`](</docs/en/sessions#name-the-project-directory-yourself>), which it reads from the launch environment only, requires v2.1.234 or later| `{"FOO": "bar"}`
-`fallbackModel`| Fallback model(s) to try in order when the primary model is overloaded or unavailable. Claude Code switches to the next available model in the chain for the rest of the turn and shows a notice. `"default"` expands to the default model. Chains are capped at three models; extra entries are ignored. Unlike most array settings, this key does not merge across settings files: the highest-precedence file that defines it supplies the entire chain. The [`--fallback-model`](</docs/en/cli-reference#cli-flags>) flag overrides this for one session. See [Fallback model chains](</docs/en/model-config#fallback-model-chains>)| `["claude-sonnet-5", "claude-haiku-4-5"]`
-`fastMode`| Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available. Toggling with `/fast` writes `true` here in user settings and removes the key when you turn fast mode off| `true`
-`fastModePerSessionOptIn`| When `true`, fast mode does not persist across sessions. Each session starts with fast mode off, requiring users to enable it with `/fast`. The user’s fast mode preference is still saved. See [Require per-session opt-in](</docs/en/fast-mode#require-per-session-opt-in>)| `true`
-`feedbackSurveyRate`| Probability (0–1) that the [session quality survey](</docs/en/data-usage#session-quality-surveys>) appears when eligible. Set to `0` to suppress entirely, or set [`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY`](</docs/en/env-vars>) in `env`. Useful when using Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry where the default sample rate does not apply| `0.05`
-`fileCheckpointingEnabled`| **Default** : `true`. Snapshot files before each edit so [`/rewind`](</docs/en/checkpointing>) can restore them. Appears in `/config` as **Rewind code (checkpoints)**. To disable via environment variable, set [`CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING`](</docs/en/env-vars>) in `env`| `false`
-`fileSuggestion`| Configure a custom script for `@` file autocomplete. See File suggestion settings| `{"type": "command", "command": "~/.claude/file-suggestion.sh"}`
-`footerLinksRegexes`| Render extra clickable badges in the footer when a regex matches turn output. Each entry has a `pattern`, a `url` template with `{name}` placeholders filled from named capture groups, and an optional `label`. Read from user, `--settings` flag, and managed settings only. See Footer link badges for URL constraints, scheme allowlist, and limits. Requires Claude Code v2.1.176 or later| `[{"type": "regex", "pattern": "\\b(?<key>PROJ-\\d+)\\b", "url": "https://issues.example.com/browse/{key}", "label": "{key}"}]`
-`forceLoginMethod`| Use `claudeai` to restrict login to claude.ai accounts, `console` to restrict login to Claude Console accounts, or `gateway` to restrict login to a cloud gateway; see [Claude apps gateway](</docs/en/claude-apps-gateway>). On Claude Code v2.1.212 or later, every first-party login path applies the restriction, including the [VS Code extension](</docs/en/vs-code>), the Agent SDK, `claude setup-token`, and `/install-github-app`; before v2.1.212, only terminal logins applied it. See [Restrict login to your organization](</docs/en/authentication#restrict-login-to-your-organization>) for how each login path, environment credentials, and third-party providers are handled| `claudeai`
-`forceLoginGatewayUrl`| Pre-fills and locks the gateway URL on the `/login` Cloud gateway screen. Either this key or `forceLoginMethod: "gateway"` surfaces that screen; set both so the URL is filled in. Honored only at the managed policy tier; ignored in user and project settings. See [Claude apps gateway](</docs/en/claude-apps-gateway#set-the-gateway-url>)| `"https://claude-gateway.example.com"`
-`forceLoginOrgUUID`| Require claude.ai account logins to belong to a specific Anthropic organization. Accepts a single UUID string, which also pre-selects that organization during a claude.ai or Claude Console login, or an array of UUIDs where any listed organization is accepted without pre-selection. An empty array fails closed and blocks login with a misconfiguration message. See [Restrict login to your organization](</docs/en/authentication#restrict-login-to-your-organization>) for how Claude Code treats Claude Console logins, the other login paths, and environment credentials| `"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"` or `["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"]`
-`forceRemoteSettingsRefresh`| (Managed settings only) Block CLI startup until remote managed settings are freshly fetched from the server. If the fetch fails, the CLI exits rather than continuing with cached or no settings. When not set, startup continues without waiting for remote settings. See [fail-closed enforcement](</docs/en/server-managed-settings#enforce-fail-closed-startup>)| `true`
-`gcpAuthRefresh`| Custom script that refreshes GCP Application Default Credentials when they expire or cannot be loaded. See [advanced credential configuration](</docs/en/google-vertex-ai#advanced-credential-configuration>)| `gcloud auth application-default login`
-`hooks`| Configure custom commands to run at lifecycle events. See [hooks documentation](</docs/en/hooks>) for format| See [hooks](</docs/en/hooks>)
-`httpHookAllowedEnvVars`| Allowlist of environment variable names HTTP hooks may interpolate into headers. When set, each hook’s effective `allowedEnvVars` is the intersection with this list. Undefined = no restriction. Arrays merge across settings sources. See Hook configuration| `["MY_TOKEN", "HOOK_SECRET"]`
-`includeGitInstructions`| **Default** : `true`. Include built-in commit and PR workflow instructions and the git status snapshot in Claude’s system prompt. Set to `false` to remove both, for example when using your own git workflow skills. The `CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS` environment variable takes precedence over this setting when set| `false`
-`inputNeededNotifEnabled`| **Default** : `false`. When [Remote Control](</docs/en/remote-control>) is connected, send a push notification to your phone when a permission prompt or question is waiting for your input. Appears in `/config` as **Push when actions required**. See [Mobile push notifications](</docs/en/remote-control#mobile-push-notifications>)| `true`
-`isolatePeerMachines`| Require your explicit approval before Claude’s `SendMessage` reaches one of your sessions beyond this machine; see [cross-session messaging](</docs/en/cross-session-messaging#require-approval-for-cross-machine-messages>). The approval prompt appears even in [`bypassPermissions` mode](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>). A `true` from any settings scope applies, so a checked-in project file can turn the requirement on but not off. The cross-machine `SendMessage` approval requires Claude Code v2.1.224 or later| `true`
-`keybindingFlavor`| **Default** : `"classic"`. Set to `"readline"` to make `Ctrl+W` delete back to the previous whitespace, as Bash does, instead of only the previous word. See [Make Ctrl+W delete back to whitespace](</docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>). Requires Claude Code v2.1.238 or later| `"readline"`
-`language`| Configure Claude’s preferred response language (e.g., `"japanese"`, `"spanish"`, `"french"`). Claude will respond in this language by default. Also sets the language for [voice dictation](</docs/en/voice-dictation#change-the-dictation-language>) and auto-generated session titles. As of v2.1.176, when not set, session titles match the language of your conversation| `"japanese"`
-`minimumVersion`| Floor that prevents background auto-updates and `claude update` from installing a version below this one. Switching from the `"latest"` channel to `"stable"` via `/config` prompts you to stay on the current version or allow the downgrade. Choosing to stay sets this value. Also useful in [managed settings](</docs/en/permissions#managed-settings>) to pin an organization-wide minimum. For a hard floor that blocks startup entirely, see `requiredMinimumVersion`| `"2.1.100"`
-`model`| Override the default model to use for Claude Code. `--model` and [`ANTHROPIC_MODEL`](</docs/en/model-config#environment-variables>) override this for one session| `"claude-sonnet-5"`
-`modelOverrides`| Map Anthropic model IDs to provider-specific model IDs such as Amazon Bedrock inference profile ARNs. Each model picker entry uses its mapped value when calling the provider API. See [Override model IDs per version](</docs/en/model-config#override-model-ids-per-version>)| `{"claude-opus-4-6": "arn:aws:bedrock:..."}`
-`otelHeadersHelper`| Script to generate dynamic OpenTelemetry headers. Runs at startup and periodically. Set the refresh interval with [`CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`](</docs/en/env-vars>). See [Dynamic headers](</docs/en/monitoring-usage#dynamic-headers>)| `/bin/generate_otel_headers.sh`
-`outputStyle`| Configure an output style to adjust the system prompt. See [output styles documentation](</docs/en/output-styles>)| `"Explanatory"`
-`parentSettingsBehavior`| (Managed settings only) **Default** : `"first-wins"`. Controls whether Claude Code applies managed settings supplied by an embedding host process, such as the Agent SDK or an IDE extension, when an admin-deployed managed tier is also present. With `"first-wins"`, Claude Code drops the parent-supplied settings. With `"merge"`, Claude Code applies them under the admin tier through a restrictive-only filter. For the filter’s limits and how the managed sources interact, see Parent settings from embedding hosts and [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>)| `"merge"`
-`permissions`| See table below for structure of permissions.|
-`plansDirectory`| **Default** : `~/.claude/plans`. Customize where plan files are stored. Path is relative to project root.| `"./plans"`
-`pluginSuggestionMarketplaces`| (Managed settings only) Marketplace names whose plugins can appear as contextual install suggestions. No marketplace-declared suggestions surface without this allowlist; the built-in first-party frontend-design tip is unaffected. Suggestions come from each plugin’s `relevance` declaration in its marketplace entry. A name only takes effect when the marketplace is registered on the machine and its registered source is also declared in managed settings, either as the `extraKnownMarketplaces` entry for that name or as an entry of `strictKnownMarketplaces`. A marketplace registered from a different source under an allowlisted name is ignored. The official marketplace is exempt from the source requirement: allowlisting its name alone suffices, since that name can only register from the official Anthropic source.| `["acme-corp-plugins"]`
-`pluginTrustMessage`| (Managed settings only) Custom message appended to the plugin trust warning shown before installation. Use this to add organization-specific context, for example to confirm that plugins from your internal marketplace are vetted.| `"All plugins from our marketplace are approved by IT"`
-`policyHelper`| Admin-deployed executable that computes managed settings dynamically at startup. Only honored from MDM or a system `managed-settings.json` file. See Compute managed settings with a policy helper| `{"path": "/usr/local/bin/claude-policy"}`
-`preferredNotifChannel`| **Default** : `"auto"`. Method for task-complete and permission-prompt notifications: `"auto"`, `"terminal_bell"`, `"iterm2"`, `"iterm2_with_bell"`, `"kitty"`, `"ghostty"`, or `"notifications_disabled"`. `"auto"` sends a desktop notification in iTerm2, Ghostty, and Kitty and does nothing in other terminals. Set `"terminal_bell"` to ring the bell character in any terminal. Appears in `/config` as **Notifications**. See [Get a terminal bell or notification](</docs/en/terminal-config#get-a-terminal-bell-or-notification>)| `"terminal_bell"`
-`prefersReducedMotion`| Reduce or disable UI animations (spinners, shimmer, flash effects) for accessibility| `true`
-`processWrapper`| Corporate launcher command placed in front of the [background processes Claude Code starts](</docs/en/corporate-launcher#what-the-launcher-covers>). Honored from managed settings, a `--settings` file, and user settings only; the [`CLAUDE_CODE_PROCESS_WRAPPER`](</docs/en/env-vars>) environment variable takes precedence when both are set. See [Run Claude Code behind a corporate launcher](</docs/en/corporate-launcher>) for the launcher contract. Requires Claude Code v2.1.210 or later| `"/opt/corp/launcher --profile claude"`
-`promptSuggestionEnabled`| **Default** : `true`. Show [prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>), the grayed-out predictions that appear in your prompt input. Set to `false` or turn off **Prompt suggestions** in `/config` to disable. [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) takes precedence when both are set| `false`
-`prUrlTemplate`| URL template for the PR badge shown in the footer and in tool-result summaries. Substitutes `{host}`, `{owner}`, `{repo}`, `{number}`, and `{url}` from the `gh`-reported PR URL. Use to point PR links at an internal code-review tool instead of `github.com`. Does not affect `#123` autolinks in Claude’s prose, or the [GitLab merge request badge](</docs/en/interactive-mode#gitlab-merge-requests>), which keeps its GitLab URL| `"https://reviews.example.com/{owner}/{repo}/pull/{number}"`
-`remote.defaultEnvironmentId`| Default [cloud environment](</docs/en/cloud-environments>) for cloud sessions you create from the CLI, such as with `claude --cloud`. Written to user settings when you pick an environment with [`/remote-env`](</docs/en/cloud-environments#select-an-environment-from-the-cli>). For Anthropic-hosted environment IDs (`env_...`), follows the standard settings precedence, so a value in a repo’s project settings overrides the user-level pick. A [self-hosted environment](</docs/en/self-hosted-environments>) ID (`ccpool_...`) is honored only from user settings, managed settings, and the `--settings` CLI flag; Claude Code ignores one in a repo’s project or local settings with a warning, so a checked-in file can’t steer sessions onto a self-hosted environment you didn’t choose| `"env_0123abcd"`
-`remoteControlAtStartup`| Connect [Remote Control](</docs/en/remote-control>) automatically when each interactive session starts, instead of waiting for `/remote-control`. Set to `true` to turn auto-connect on, `false` to turn it off, or leave unset to follow your organization’s admin default if one is set, and otherwise Claude Code’s current default. Appears in `/config` as **Enable Remote Control for all sessions**. Claude Code ignores a `true` from project or local settings; for the full per-scope behavior, see [Enable Remote Control for all sessions](</docs/en/remote-control#enable-remote-control-for-all-sessions>) and the exceptions to managed settings precedence| `false`
-`requiredMaximumVersion`| Managed settings only. Maximum Claude Code version allowed to start. If the running version is newer, Claude Code exits at startup and instructs the user to install an approved version through the organization’s approved method; `claude install <version>` may also work. Background auto-updates and `claude update` skip versions above the ceiling, so an in-range installation stays in range. `claude update`, `claude install`, and `claude doctor` keep working above the ceiling so users can recover. Versions that predate this setting ignore it| `"2.1.150"`
-`requiredMinimumVersion`| Managed settings only. Minimum Claude Code version required to start. If the running version is older, Claude Code exits at startup and instructs the user to update through the organization’s approved method. `claude update`, `claude install`, and `claude doctor` keep working below the floor so users can recover. Differs from `minimumVersion`, which prevents downgrades but never blocks startup. Versions that predate this setting ignore it| `"2.1.150"`
-`respectGitignore`| **Default** : `true`. Control whether the `@` file picker respects `.gitignore` patterns. When `true`, files matching `.gitignore` patterns are excluded from suggestions| `false`
-`respondToBashCommands`| **Default** : `true`. Whether Claude responds after an input-box `!` shell command runs. Set to `false` to add the command output to context without a response. See [Shell mode with `!` prefix](</docs/en/interactive-mode#shell-mode-with-prefix>). Requires Claude Code v2.1.186 or later| `false`
-`showClearContextOnPlanAccept`| **Default** : `false`. Show the “clear context” option on the plan accept screen. Set to `true` to restore the option| `true`
-`showThinkingSummaries`| **Default** : `false`. Show [extended thinking](</docs/en/model-config#extended-thinking>) summaries in interactive sessions. When unset or `false`, thinking blocks are redacted by the API and shown as a collapsed stub. Redaction only changes what you see, not what the model generates: to reduce thinking spend, [lower the budget or disable thinking](</docs/en/model-config#extended-thinking>) instead. This setting has no effect in non-interactive mode (`-p`), the Agent SDK, or IDE extensions such as VS Code| `true`
-`showTurnDuration`| **Default** : `true`. Show turn duration messages after responses, e.g. “Cooked for 1m 6s”. Appears in `/config` as **Show turn duration**| `false`
-`skillListingBudgetFraction`| **Default** : `0.01`. Fraction of the model’s context window reserved for the [skill listing](</docs/en/skills#skill-descriptions-are-cut-short>) Claude sees each turn, so the default reserves 1%. When the listing exceeds the budget, descriptions for the least-used skills are dropped and only their names are listed, so Claude can still invoke them but can’t see what they do. Raise to keep more descriptions visible at the cost of more context per turn. `/doctor` estimates the listing cost against the budget| `0.02`
-`skillListingMaxDescChars`| **Default** : `1536`. Per-skill character cap on the combined `description` and `when_to_use` text in the [skill listing](</docs/en/skills#skill-descriptions-are-cut-short>) Claude sees each turn. Text longer than this is truncated. Raise to keep long descriptions intact at the cost of more context per turn; lower to fit more skills under `skillListingBudgetFraction`| `2048`
-`skillOverrides`| Per-skill visibility overrides keyed by skill name. Value is `"on"`, `"name-only"`, `"user-invocable-only"`, or `"off"`. Lets you hide or collapse a skill without editing its SKILL.md. Does not apply to plugin skills, which are managed through `/plugin`. The `/skills` menu writes these to `.claude/settings.local.json`. See [Override skill visibility from settings](</docs/en/skills#override-skill-visibility-from-settings>)| `{"legacy-context": "name-only", "deploy": "off"}`
-`skipWebFetchPreflight`| Skip the [WebFetch domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>) that sends each requested hostname to `api.anthropic.com` before fetching. Set to `true` in environments that block traffic to Anthropic, such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry deployments with restrictive egress. When skipped, WebFetch attempts any URL without consulting the blocklist| `true`
-`spellcheck`| Underline misspelled words in the prompt input as you type, using a spell checker you install. Read from user settings, the `--settings` flag, and managed settings only. See [Check spelling as you type](</docs/en/interactive-mode#check-spelling-as-you-type>). Requires Claude Code v2.1.235 or later| `{"enabled": true, "language": "en_GB"}`
-`spinnerTipsEnabled`| **Default** : `true`. Show tips in the spinner while Claude is working. Set to `false` to disable tips| `false`
-`spinnerTipsOverride`| Override spinner tips with custom strings. `tips`: array of tip strings. `excludeDefault`: if `true`, only show custom tips; if `false` or absent, custom tips are merged with built-in tips| `{ "excludeDefault": true, "tips": ["Use our internal tool X"] }`
-`spinnerVerbs`| Customize the action verbs shown while a turn is in progress. Set `mode` to `"replace"` to use only your verbs, or `"append"` to add them to the defaults| `{"mode": "append", "verbs": ["Pondering", "Crafting"]}`
-`sshConfigs`| SSH connections to show in the [Desktop](</docs/en/desktop#pre-configure-ssh-connections-for-your-team>) environment dropdown. Each entry requires `id`, `name`, and `sshHost`; `sshPort`, `sshIdentityFile`, and `startDirectory` are optional. When set in managed settings, connections are read-only for users. Read from managed and user settings only| `[{"id": "dev-vm", "name": "Dev VM", "sshHost": "user@dev.example.com"}]`
-`statusLine`| Configure a custom status line to display context. The object’s optional `padding`, `refreshInterval`, and `hideVimModeIndicator` fields control spacing, periodic re-runs, and whether the built-in vim mode indicator below the prompt is hidden. See [`statusLine` documentation](</docs/en/statusline#manually-configure-a-status-line>)| `{"type": "command", "command": "~/.claude/statusline.sh"}`
-`strictKnownMarketplaces`| (Managed settings only) Allowlist of plugin marketplace sources. Undefined = no restrictions, empty array = lockdown. Enforced on marketplace add and on plugin install, update, refresh, and auto-update, so a marketplace added before the policy was set cannot be used to fetch plugins. The `allowedMarketplaces` alias requires Claude Code v2.1.232 or later. See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>)| `[{ "source": "github", "repo": "acme-corp/plugins" }]`
-`strictPluginOnlyCustomization`| (Managed settings only) Block skills, agents, hooks, and MCP servers from user and project sources, so they can only come from plugins or managed settings. `true` locks all four surfaces; an array locks only the named ones. See `strictPluginOnlyCustomization`| `["skills", "hooks"]`
-`subagentStatusLine`| Configure a custom command that rewrites rows in the subagent task display. See [Subagent status lines](</docs/en/statusline#subagent-status-lines>)| `{"type": "command", "command": "~/.claude/subagent-statusline.sh"}`
-`switchModelsOnFlag`| **Default** : `true`. When a [safety classifier flags a request](</docs/en/model-config#automatic-model-fallback>), switch to the fallback model automatically and continue the session. Set to `false` to pause instead and choose between switching and editing the prompt. See [Ask before switching](</docs/en/model-config#ask-before-switching>). Appears in `/config` as **Switch models when a message is flagged**. Requires Claude Code v2.1.170 or later| `false`
-`syntaxHighlightingDisabled`| Disable syntax highlighting in diffs, code blocks, and file previews| `true`
-`teammateMode`| **Default** : `in-process`. How [agent team](</docs/en/agent-teams>) teammates display: `in-process`, `auto` (split panes when running inside tmux, or inside iTerm2 with `it2` on your `PATH`; in-process otherwise), `tmux` (split panes using tmux or iTerm2, detected from your terminal), or `iterm2` (iTerm2 native split panes via the `it2` CLI, added in v2.1.186). The default changed from `auto` in v2.1.179. `--teammate-mode` overrides this for one session. See [choose a display mode](</docs/en/agent-teams#choose-a-display-mode>)| `"auto"`
-`terminalProgressBarEnabled`| **Default** : `true`. Show the terminal progress bar in supported terminals: ConEmu, Ghostty 1.2.0+, and iTerm2 3.6.6+. Appears in `/config` as **Terminal progress bar**| `false`
-`theme`| **Default** : `"dark"`. Color theme for the interface: `"auto"`, `"dark"`, `"light"`, `"dark-daltonized"`, `"light-daltonized"`, `"dark-ansi"`, `"light-ansi"`, or a custom theme reference such as `"custom:<slug>"` or `"custom:<plugin-name>:<slug>"`. See [Create a custom theme](</docs/en/terminal-config#create-a-custom-theme>). Appears in `/config` as **Theme**| `"dark"`
-`tui`| Terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen renderer](</docs/en/fullscreen>) with virtualized scrollback. Use `"default"` for the classic main-screen renderer. Set via `/tui`. You can also set the [`CLAUDE_CODE_NO_FLICKER`](</docs/en/env-vars>) environment variable. Background sessions opened from [agent view](</docs/en/agent-view>) always use the fullscreen renderer regardless of this setting| `"fullscreen"`
-`ultracode`| Turn on [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) for the current session. This key isn’t read from `settings.json`. Set it through `/effort ultracode`, `--settings`, or an Agent SDK control request. To start a session with ultracode already on, launch with `claude --effort ultracode`, which requires Claude Code v2.1.203 or later| `true`
-`useAutoModeDuringPlan`| **Default** : `true`. Whether plan mode uses auto mode semantics when auto mode is available. Not read from shared project settings. Appears in `/config` as “Use auto mode during plan”| `false`
-`verbose`| **Default** : `false`. Show full tool output instead of truncated summaries. Appears in `/config` as **Verbose output**. The `--verbose` flag overrides this for one session| `true`
-`viewMode`| Default transcript view mode on startup: `"default"`, `"verbose"`, or `"focus"`. Overrides the sticky `/focus` selection when set. The `--verbose` flag overrides this for one session| `"verbose"`
-`vimInsertModeRemaps`| Map two-key INSERT-mode sequences to Escape in [vim editor mode](</docs/en/interactive-mode#vim-editor-mode>). Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target; other entries are ignored. Read from user, `--settings` flag, and managed settings only, so a repository’s checked-in settings can’t remap your keystrokes. Has no effect unless `editorMode` is `"vim"`. See [Remap INSERT-mode key sequences](</docs/en/interactive-mode#remap-insert-mode-key-sequences>). Requires Claude Code v2.1.208 or later| `{"jj": "<Esc>"}`
-`voice`| [Voice dictation](</docs/en/voice-dictation>) settings: `enabled` turns dictation on, `mode` selects `"hold"` or `"tap"`, and `autoSubmit` sends the prompt on key release in hold mode. Written automatically when you run `/voice`. Requires a Claude.ai account| `{ "enabled": true, "mode": "tap" }`
-`voiceEnabled`| Legacy alias for `voice.enabled`. Prefer the `voice` object| `true`
-`wheelScrollAccelerationEnabled`| **Default** : `true`. In [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>), accelerate mouse-wheel scroll speed during fast scrolls. Set to `false` for a constant scroll rate per wheel notch. Requires Claude Code v2.1.174 or later| `false`
-`workflowKeywordTriggerEnabled`| **Default** : `true`. Whether the keyword `ultracode` in a prompt you type triggers a [dynamic workflow](</docs/en/workflows#ask-for-a-workflow-in-your-prompt>). Set to `false` to type the word without triggering one. The `ultracode` effort setting, `/workflows`, and saved workflow commands are unaffected. Appears in `/config` as **Ultracode keyword trigger**. Added in v2.1.157; before v2.1.160 the trigger keyword was `workflow`| `false`
-`workflowSizeGuideline`| **Default** : `medium`. Sets the [agent count Claude aims for](</docs/en/workflows#set-a-size-guideline>) in the dynamic workflows it writes. Claude Code sends the value to Claude as advice, not an enforced cap. Accepts `unrestricted`, `small`, `medium`, or `large`. Takes precedence over the **Dynamic workflow size** choice in `/config`, and Claude Code hides that row while a settings file sets the key. Requires Claude Code v2.1.219 or later; on v2.1.202 through v2.1.218, set the guideline in `/config` instead| `"small"`
-`wslInheritsWindowsSettings`| (Windows managed settings only) When `true`, Claude Code on WSL reads managed settings from the Windows policy chain in addition to `/etc/claude-code`, with Windows sources taking priority. Only honored when set in the HKLM registry key or `C:\Program Files\ClaudeCode\managed-settings.json`, both of which require Windows admin to write. For HKCU policy to also apply on WSL, the flag must additionally be set in HKCU itself. Has no effect on native Windows| `true`
-
-###
-
-
-
-Global config settings
-
-These settings are stored in `~/.claude.json` rather than `settings.json`. If you add these keys to `settings.json`, Claude Code silently ignores them at startup, so double-check the table below for which file each key belongs in.
-
-Key| Description| Example
----|---|---
-`autoConnectIde`| **Default** : `false`. Automatically connect to a running IDE when Claude Code starts from an external terminal. Appears in `/config` as **Auto-connect to IDE (external terminal)** when running outside a VS Code or JetBrains terminal. The [`CLAUDE_CODE_AUTO_CONNECT_IDE`](</docs/en/env-vars>) environment variable overrides this when set| `true`
-`autoInstallIdeExtension`| **Default** : `true`. Automatically install the Claude Code IDE extension when running from a VS Code terminal. Appears in `/config` as **Auto-install IDE extension** when running inside a VS Code or JetBrains terminal. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) environment variable to `1`| `false`
-`diffTool`| **Default** : `auto`. Where to display file diffs when an IDE is connected: `auto` opens diffs in the IDE’s diff viewer, `terminal` keeps them in the terminal. Appears in `/config` as **Diff tool** only when Claude Code is connected to a VS Code or JetBrains IDE| `"terminal"`
-`externalEditorContext`| **Default** : `false`. Prepend Claude’s previous response as `#`-commented context when you open the external editor with `Ctrl+G`. Appears in `/config` as **Show last response in external editor**| `true`
-`permissionExplainerEnabled`| **Default** : `true`. Show a model-generated [explanation of the command](</docs/en/permissions#permission-system>) when you press `Ctrl+E` on a Bash or PowerShell permission prompt. Set to `false` to turn the shortcut off| `false`
-`teammateDefaultModel`| Removed in v2.1.234; Claude Code ignores a leftover value. See [Specify teammates and models](</docs/en/agent-teams#specify-teammates-and-models>)|
-
-###
-
-
-
-Worktree settings
-
-Configure how `--worktree` creates and manages git worktrees.
-
-Key| Description| Example
----|---|---
-`worktree.baseRef`| Which ref new worktrees branch from. `"fresh"` (default) branches from `origin/<default-branch>` for a clean tree matching the remote. `"head"` branches from your current local `HEAD`, so unpushed commits and feature-branch state are present in the worktree. Inside a linked worktree, `"head"` resolves to that worktree’s `HEAD`, not the main checkout’s. Applies to `--worktree`, the `EnterWorktree` tool, and subagent isolation| `"head"`
-`worktree.symlinkDirectories`| Directories to symlink from the main repository into each worktree to avoid duplicating large directories on disk. No directories are symlinked by default| `["node_modules", ".cache"]`
-`worktree.sparsePaths`| Directories to check out in each worktree via git sparse-checkout. Only the listed directories plus root-level files are written to disk, which is faster in large monorepos. While a sparse worktree exists, git enables `extensions.worktreeConfig` in the repository’s shared `.git/config`; see [Check out only the directories you need](</docs/en/large-codebases#check-out-only-the-directories-you-need>)| `["packages/my-app", "shared/utils"]`
-`worktree.bgIsolation`| Isolation mode for [background sessions](</docs/en/agent-view#how-file-edits-are-isolated>). `"worktree"` (default) blocks `Edit`/`Write` in the main checkout until `EnterWorktree` is called. Outside a git repository, a [`WorktreeCreate` hook](</docs/en/worktrees#non-git-version-control>) that fails releases the block so the session can edit the working directory in place; requires Claude Code v2.1.203 or later. `"none"` lets background jobs edit the working copy directly. Requires Claude Code v2.1.143 or later| `"none"`
-
-To copy gitignored files like `.env` into new worktrees, use a [`.worktreeinclude` file](</docs/en/worktrees#copy-gitignored-files-into-worktrees>) in your project root instead of a setting.
-
-###
-
-
-
-Permission settings
-
-Keys| Description| Example
----|---|---
-`allow`| Array of permission rules to allow tool use. Tool-name globs are supported only in the tool position after a literal `mcp__<server>__` prefix, such as `mcp__github__get_*`; the server segment must be glob-free. See Permission rule syntax below for pattern matching details| `[ "Bash(git diff *)" ]`
-`ask`| Array of permission rules to ask for confirmation upon tool use. See Permission rule syntax below| `[ "Bash(git push *)" ]`
-`deny`| Array of permission rules to deny tool use. Use this to exclude sensitive files from Claude Code access. Tool names accept glob patterns: `"*"` denies every tool and `"mcp__*"` denies every MCP tool. Deny rules can’t remove [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) while any other tool remains. See Permission rule syntax and [Bash permission limitations](</docs/en/permissions#tool-specific-permission-rules>)| `[ "WebFetch", "Bash(curl *)", "Read(./.env)", "Read(./secrets/**)" ]`
-`additionalDirectories`| Additional [working directories](</docs/en/permissions#working-directories>) for file access. Most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from these directories| `[ "../docs/" ]`
-`defaultMode`| [Permission mode](</docs/en/permission-modes>) that new sessions start in. When unset, sessions start in the [built-in default](</docs/en/permission-modes#which-mode-a-session-starts-in>) for your plan and surface. For conversations the VS Code extension starts, see [what the extension reads](</docs/en/permission-modes#switch-permission-modes>). Valid values: `default`, `acceptEdits`, `plan`, `auto`, `dontAsk`, `bypassPermissions`, and `manual` as an alias for `default`, the mode labeled Manual in the CLI, the VS Code and JetBrains extensions, and the desktop app. The `manual` alias requires Claude Code v2.1.200 or later. `auto` doesn’t take effect from project or local settings; set it in `~/.claude/settings.json` instead. Before v2.1.142, project settings could set `auto`. The `--permission-mode` CLI flag overrides this setting for a single session| `"acceptEdits"`
-`disableAutoMode`| Set to `"disable"` to prevent [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from being activated. Equivalent to the top-level `disableAutoMode` setting, which describes the full effect. Most useful in [managed settings](</docs/en/permissions#managed-settings>) where users cannot override it| `"disable"`
-`disableBypassPermissionsMode`| Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag, and Claude Code ignores an [agent definition’s](</docs/en/sub-agents#permission-modes>) `permissionMode: bypassPermissions`, so the subagent runs with the parent session’s mode. Before v2.1.223, Claude Code applied the frontmatter mode even with bypass disabled. Typically placed in [managed settings](</docs/en/permissions#managed-settings>) to enforce organizational policy, but works from any scope| `"disable"`
-`skipDangerousModePermissionPrompt`| Skip the confirmation prompt shown before entering bypass permissions mode via `--dangerously-skip-permissions` or `defaultMode: "bypassPermissions"`. Ignored when set in project settings (`.claude/settings.json`) to prevent untrusted repositories from auto-bypassing the prompt| `true`
-
-###
-
-
-
-Permission rule syntax
-
-Permission rules follow the format `Tool` or `Tool(specifier)`. Rules are evaluated in order: deny rules first, then ask, then allow. The first match determines the outcome regardless of rule specificity. See the [permission rule evaluation order](</docs/en/permissions#manage-permissions>) for details. Quick examples:
-
-Rule| Effect
----|---
-`Bash`| Matches all Bash commands
-`Bash(npm run *)`| Matches commands starting with `npm run`
-`Read(./.env)`| Matches reading the `.env` file
-`WebFetch(domain:example.com)`| Matches fetch requests to example.com
-
-For the complete rule syntax reference, including wildcard behavior, tool-specific patterns for Read, Edit, WebFetch, MCP, and Agent rules, and security limitations of Bash patterns, see [Permission rule syntax](</docs/en/permissions#permission-rule-syntax>).
-
-###
-
-
-
-Sandbox settings
-
-Configure advanced sandboxing behavior. Sandboxing isolates bash commands from your filesystem and network. See [Sandboxing](</docs/en/sandboxing>) for details.
-
-Keys| Description| Example
----|---|---
-`enabled`| Enable bash sandboxing (macOS, Linux, and WSL2). Default: false| `true`
-`failIfUnavailable`| Exit with an error at startup if `sandbox.enabled` is true but the sandbox cannot start (missing dependencies or unsupported platform). When false (default), a warning is shown and commands run unsandboxed. Intended for managed settings deployments that require sandboxing as a hard gate| `true`
-`autoAllowBashIfSandboxed`| Auto-approve bash commands when sandboxed. Default: true| `true`
-`excludedCommands`| Commands that should run outside of the sandbox| `["docker *"]`
-`allowUnsandboxedCommands`| Allow commands to run outside the sandbox via the `dangerouslyDisableSandbox` parameter. When set to `false`, the `dangerouslyDisableSandbox` escape hatch is completely disabled and all commands must run sandboxed (or be in `excludedCommands`). Useful for enterprise policies that require strict sandboxing. Default: true| `false`
-`filesystem.allowWrite`| Additional paths where sandboxed commands can write. Arrays are merged across all settings scopes: user, project, and managed paths are combined, not replaced. Also merged with paths from `Edit(...)` allow permission rules. See path prefixes below.| `["/tmp/build", "~/.kube"]`
-`filesystem.denyWrite`| Paths where sandboxed commands cannot write. Arrays are merged across all settings scopes. Also merged with paths from `Edit(...)` deny permission rules.| `["/etc", "/usr/local/bin"]`
-`filesystem.denyRead`| Paths where sandboxed commands cannot read. Arrays are merged across all settings scopes. Also merged with paths from `Read(...)` deny permission rules.| `["~/.aws/credentials"]`
-`filesystem.allowRead`| Paths to re-allow reading within `denyRead` regions. An `allowRead` path re-opens reading inside a broader `denyRead` region. Claude Code keeps an exact or wildcard `denyRead` entry blocked inside a broader `allowRead`, as the [overlap table](</docs/en/sandboxing#configure-sandboxing>) shows. Arrays are merged across all settings scopes. Use this to create workspace-only read access patterns.| `["."]`
-`filesystem.allowManagedReadPathsOnly`| (Managed settings only) Only `filesystem.allowRead` paths from managed settings are respected. `denyRead` still merges from all sources. Default: false| `true`
-`filesystem.disabled`| Skip filesystem isolation while keeping network isolation: sandboxed commands get unrestricted read and write access to the host filesystem, and network egress stays confined to `network.allowedDomains`. Only honored from user, managed, or CLI `--settings` settings. Default: false. Requires Claude Code v2.1.216 or later. See [Disable filesystem isolation](</docs/en/sandboxing#disable-filesystem-isolation>) for which sources can set it and what changes when isolation is off| `true`
-`credentials.files`| Credential files or directories to [protect from sandboxed commands](</docs/en/sandboxing#protect-credentials>). Each entry has a `path` and a `mode`. `deny` blocks reads inside the sandbox, the same read block as `filesystem.denyRead`, and requires Claude Code v2.1.187 or later. `mask` shows sandboxed commands a sentinel copy of the file on Linux and WSL2, while the sandbox proxy substitutes the real value on outbound requests to that entry’s `injectHosts`; on macOS the file is unreadable inside the sandbox instead. It requires `network.tlsTerminate` and Claude Code v2.1.221 or later. [Mask credential files](</docs/en/sandboxing#mask-credential-files>) covers which settings sources are honored and when an entry falls back to `deny`. Paths use the same prefixes as `filesystem.*` settings. Arrays are merged across all settings scopes.| `[{ "path": "~/.aws/credentials", "mode": "deny" }]`
-`credentials.files[].extract`| Regular expression for structured masking when `mode` is `mask`. Claude Code applies it across the whole file and replaces only the text captured by group 1 of each match with a sentinel, so the rest of the file stays parseable. Must contain at least one capturing group. When `decode` is also set, the captures serve as its decode candidates rather than being replaced outright; see the `decode` row. Without `extract` or `decode`, Claude Code replaces the entire file content with one sentinel. On macOS with filesystem isolation on, Claude Code applies the entry as `deny` before the pattern runs; see [Mask credential files](</docs/en/sandboxing#mask-credential-files>). Accepted but ignored when `mode` is `deny`. Requires Claude Code v2.1.221 or later.| `"oauth_token:\\s*(\\S+)"`
-`credentials.files[].onExtractNoMatch`| What happens when matching finds nothing to mask in the file: `warn`, the default, warns and leaves the file readable as-is inside the sandbox; `deny` makes the file unreadable; `error` stops sandbox setup until you fix the configuration. When the read block wouldn’t be enforced, because `filesystem.disabled` is set or a `filesystem.allowRead` entry re-opens the file’s path, Claude Code treats `deny` as `error`. Only meaningful when `mode` is `mask` and `extract` or `decode` is set, with the same macOS scoping as `extract`. Requires Claude Code v2.1.221 or later; the `decode` case requires v2.1.224 or later.| `"deny"`
-`credentials.files[].decode`| Format-aware [masking of encoded credentials](</docs/en/sandboxing#mask-credential-files>) when `mode` is `mask`. The only value is `jwt`: Claude Code finds JWT candidates in the file with a built-in pattern, or with `extract` when set, verifies each candidate is a JWT, and replaces it with a structurally valid fake token, so code inside the sandbox that decodes the token keeps working. When no candidate verifies, `onExtractNoMatch` governs the outcome. Same macOS scoping as `extract`; accepted but ignored when `mode` is `deny`. Requires Claude Code v2.1.224 or later.| `"jwt"`
-`credentials.files[].maskClaims`| Top-level payload claims to mask inside each verified JWT instead of replacing the whole token. Requires `decode` and at least one non-empty claim name. Each named claim present with a string value gets its own sentinel and Claude Code rebuilds the token around the modified payload, so the other claims stay readable inside the sandbox. When no named claim matches in any verified token, `onExtractNoMatch` governs the outcome. Requires Claude Code v2.1.224 or later.| `["api_key"]`
-`credentials.files[].maskDuplicates`| Also replace verbatim copies of each masked credential value, an `extract` capture or a `decode`-verified token, found outside the matched spans. Matches raw substrings, so reserve it for long, high-entropy secrets. Only meaningful when `mode` is `mask` and `extract` or `decode` is set. Default: false. Requires Claude Code v2.1.221 or later.| `true`
-`credentials.files[].injectHosts`| Hosts where the sandbox proxy substitutes the real value of a file `mask` entry. Behaves the same as `credentials.envVars[].injectHosts`. When unset, the proxy substitutes the value on requests to every host in `network.allowedDomains`. Accepted but ignored when `mode` is `deny`. Requires Claude Code v2.1.221 or later.| `["api.github.com"]`
-`credentials.envVars`| Environment variables to [protect from sandboxed commands](</docs/en/sandboxing#protect-credentials>). Each entry has a `name` and a `mode`; the name must start with a letter or underscore and contain only letters, digits, and underscores. `deny` removes the variable from the environment of sandboxed commands. Requires Claude Code v2.1.187 or later. `mask` replaces the variable with a per-session sentinel value inside the sandbox while the sandbox proxy substitutes the real value on outbound requests to that entry’s `injectHosts`; it requires `network.tlsTerminate` and Claude Code v2.1.199 or later. `mask` entries are only honored from user, managed, or CLI `--settings` settings, not from `.claude/settings.json` or `.claude/settings.local.json`. Arrays are merged across all settings scopes, and `deny` takes precedence when the same variable appears with both modes.| `[{ "name": "GITHUB_TOKEN", "mode": "deny" }]`
-`credentials.envVars[].extract`| Regular expression for [structured masking](</docs/en/sandboxing#mask-environment-variables>) when `mode` is `mask`. Claude Code applies it across the variable’s value and replaces only the text captured by group 1 of each match with a sentinel, so the rest of the value stays parseable, such as the password inside a `DATABASE_URL` connection string. Must contain at least one capturing group. Without `extract` or `decode`, Claude Code replaces the entire value with one sentinel. Can’t be combined with `decode`. Accepted but ignored when `mode` is `deny`. Requires Claude Code v2.1.224 or later.| `"://[^:]+:([^@]+)@"`
-`credentials.envVars[].onExtractNoMatch`| What happens when `extract` matches nothing in the value: `warn`, the default, warns and passes the variable through unmasked; `deny` unsets the variable inside the sandbox; `error` stops sandbox setup until you fix the configuration. Only meaningful when `mode` is `mask` and `extract` is set. On an entry with `decode`, only `warn` is accepted, because a value that fails JWT verification always passes through unmasked with a warning. Requires Claude Code v2.1.224 or later.| `"deny"`
-`credentials.envVars[].decode`| Format-aware [masking of encoded credentials](</docs/en/sandboxing#mask-environment-variables>) when `mode` is `mask`. The only value is `jwt`: Claude Code verifies the variable’s whole value is a JWT and replaces it with a structurally valid fake token, so code inside the sandbox that decodes the token keeps working, and the proxy substitutes the whole real token on egress. A value that doesn’t verify passes through unmasked with a warning. Can’t be combined with `extract`. Accepted but ignored when `mode` is `deny`. Requires Claude Code v2.1.224 or later.| `"jwt"`
-`credentials.envVars[].maskClaims`| Top-level payload claims to mask inside the decoded JWT instead of replacing the whole token. Requires `decode` and at least one non-empty claim name. Behaves like `credentials.files[].maskClaims`, except that when no named claim matches, the variable passes through unmasked with a warning. Requires Claude Code v2.1.224 or later.| `["api_key"]`
-`credentials.envVars[].injectHosts`| Hosts where the sandbox proxy substitutes the real value of a `mask` entry. The proxy injects only on connections `network.allowedDomains` admits, so each destination must also pass that list. When unset, the proxy substitutes the value on requests to every host in `network.allowedDomains`. Write an IPv6 destination as the bare canonical compressed address, such as `"::1"`, not the bracketed form. See [IPv6 destinations in `injectHosts`](</docs/en/sandboxing#ipv6-destinations-in-injecthosts>) for what each list matches. Accepted but ignored when `mode` is `deny`. Requires Claude Code v2.1.199 or later.| `["api.github.com"]`
-`credentials.allowPlaintextInject`| Allow `mask` substitution on plain HTTP requests as well as TLS-terminated HTTPS. On plain HTTP the upstream identity is unverified and the credential travels in cleartext, so leave this off outside trusted test networks. Only honored from user, managed, or CLI `--settings` settings, not from `.claude/settings.json` or `.claude/settings.local.json`. Default: false. Requires Claude Code v2.1.199 or later.| `true`
-`credentials.awsPairs`| Groups of masked environment variables that form one AWS credential for [SigV4 re-signing](</docs/en/sandboxing#re-sign-aws-requests>), for non-standard variable names; Claude Code links the conventional `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` trio automatically when those variables are masked whole-value. Each entry names the `credentials.envVars` entry holding each part in `accessKeyIdVar`, `secretAccessKeyVar`, and optionally `sessionTokenVar`. Each named variable must be a whole-value `mask` entry, without `extract` or `decode`, and can fill only one slot across all pairs. Only honored from user, managed, or CLI `--settings` settings. Requires Claude Code v2.1.224 or later.| `[{ "accessKeyIdVar": "MY_KEY_ID", "secretAccessKeyVar": "MY_SECRET_KEY" }]`
-`credentials.sigv4`| Policies for AWS request forms the sandbox proxy [can’t re-sign](</docs/en/sandboxing#re-sign-aws-requests>): `streaming` for aws-chunked streaming uploads, `presigned` for presigned URLs, and `sigv4a` for SigV4A asymmetric signatures. Each accepts `deny`, the default, which fails the request at the proxy, or `passthrough`, which forwards the request with its signature computed from the masked placeholder, so AWS rejects it. Applies only to requests signed with a masked pair’s placeholder access key ID. Only honored from user, managed, or CLI `--settings` settings. Requires Claude Code v2.1.224 or later.| `{ "streaming": "passthrough" }`
-`network.allowUnixSockets`| (macOS only) Unix socket paths accessible in sandbox. Ignored on Linux and WSL2, where the seccomp filter cannot inspect socket paths; use `allowAllUnixSockets` instead.| `["~/.ssh/agent-socket"]`
-`network.allowAllUnixSockets`| Allow all Unix socket connections in sandbox. On Linux and WSL2, when the optional [seccomp filter](</docs/en/sandboxing#set-up-linux-and-wsl2>) is installed, this is the only way to permit Unix sockets, since it skips the filter that otherwise blocks `socket(AF_UNIX, ...)` calls; without the filter, the sandbox doesn’t block Unix-socket calls. On WSL2, `true` also reopens the interop socket that launches Windows binaries. Default: false| `true`
-`network.allowLocalBinding`| Allow binding to localhost ports (macOS only). Default: false| `true`
-`network.allowMachLookup`| Additional XPC/Mach service names the sandbox may look up (macOS only). Supports a single trailing `*` for prefix matching. Needed for tools that communicate via XPC such as the iOS Simulator or Playwright.| `["com.apple.coresimulator.*"]`
-`network.allowedDomains`| Array of domains to allow for outbound network traffic. Supports wildcards, such as `*.example.com`. Write IPv6 literals bracketed, with an optional port: `"[::1]"` allows every port and `"[::1]:443"` one port. The bracketed form requires Claude Code v2.1.229 or later. See [IPv6 addresses in domain lists](</docs/en/sandboxing#ipv6-addresses-in-domain-lists>).| `["github.com", "*.npmjs.org"]`
-`network.deniedDomains`| Array of domains to block for outbound network traffic. Supports the same wildcard syntax as `allowedDomains`. For IPv6 literals, see [IPv6 addresses in domain lists](</docs/en/sandboxing#ipv6-addresses-in-domain-lists>). Takes precedence over `allowedDomains` when both match. Merged from all settings sources regardless of `allowManagedDomainsOnly`.| `["sensitive.cloud.example.com"]`
-`network.strictAllowlist`| Deny sandboxed commands access to hosts outside the allowlist instead of prompting for approval. The allowlist is `allowedDomains` plus domains from `WebFetch(domain:...)` allow rules, or only the managed settings entries when `allowManagedDomainsOnly` is set. Enforced for sandboxed commands only; in-process tools such as `WebFetch` aren’t gated by this setting. Only honored from user, managed, or CLI `--settings` settings, not from `.claude/settings.json` or `.claude/settings.local.json`. Default: false. Requires Claude Code v2.1.219 or later. See [Network isolation](</docs/en/sandboxing#network-isolation>)| `true`
-`network.allowManagedDomainsOnly`| (Managed settings only) Only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings are respected. Domains from user, project, and local settings are ignored. Non-allowed domains are blocked automatically without prompting the user. Denied domains are still respected from all sources. Default: false| `true`
-`network.httpProxyPort`| HTTP proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy.| `8080`
-`network.socksProxyPort`| SOCKS5 proxy port used if you wish to bring your own proxy. If not specified, Claude will run its own proxy.| `8081`
-`network.tlsTerminate`| Experimental. Terminate TLS inside the sandbox proxy so it can read the contents of HTTPS requests. Required for `mask` [credential substitution](</docs/en/sandboxing#mask-credentials>). Set `{}` to generate an ephemeral certificate authority for the session, or set `caCertPath` and `caKeyPath` to use your own. Only honored from user, managed, or CLI `--settings` settings, not from `.claude/settings.json` or `.claude/settings.local.json`. Requires Claude Code v2.1.199 or later.| `{}`
-`enableWeakerNestedSandbox`| Enable weaker sandbox for unprivileged Docker environments (Linux and WSL2 only). **Reduces security.** Default: false| `true`
-`enableWeakerNetworkIsolation`| (macOS only) Allow access to the system TLS trust service (`com.apple.trustd.agent`) in the sandbox. Required for Go-based tools like `gh`, `gcloud`, and `terraform` to verify TLS certificates when using `httpProxyPort` with a MITM proxy and custom CA. **Reduces security** by opening a potential data exfiltration path. Default: false| `true`
-`allowAppleEvents`| (macOS only) Allow sandboxed commands to send Apple Events. Required for `open`, `osascript`, and tools that open URLs in a browser, which otherwise fail with error `-600`. **Removes code-execution isolation.** Sandboxed commands can launch other applications unsandboxed with no user prompt; they can also send AppleScript commands to running applications such as Terminal, subject to the per-app macOS automation-consent prompt (TCC). Only honored from user, managed, or CLI settings, not from project settings. Default: false| `true`
-`ripgrep`| Custom `ripgrep` binary for the sandbox. Set `command` to the binary’s path. To pass arguments to that binary, also set `args`. If you don’t set `ripgrep`, the sandbox uses the same `ripgrep` binary as Claude Code. That is the bundled binary unless you set [`USE_BUILTIN_RIPGREP`](</docs/en/env-vars>) to `0`. Only honored from user, managed, or CLI settings.| `{ "command": "/usr/local/bin/rg", "args": ["--no-config"] }`
-`bwrapPath`| (Managed settings only, Linux/WSL2) Absolute path to the bubblewrap (`bwrap`) binary. Overrides automatic detection via `PATH`. Only honored from [managed settings](</docs/en/settings#settings-precedence>), not from user or project settings. Useful when `bwrap` is installed at a non-standard location in managed environments.| `/opt/admin/bwrap`
-`socatPath`| (Managed settings only, Linux/WSL2) Absolute path to the `socat` binary used for the sandbox network proxy. Overrides automatic detection via `PATH`. Only honored from managed settings.| `/opt/admin/socat`
-
-####
-
-
-
-Sandbox path prefixes
-
-Paths in `filesystem.allowWrite`, `filesystem.denyWrite`, `filesystem.denyRead`, `filesystem.allowRead`, and `credentials.files` support these prefixes:
-
-Prefix| Meaning| Example
----|---|---
-`/`| Absolute path from filesystem root| `/tmp/build` stays `/tmp/build`
-`~/`| Relative to home directory| `~/.kube` becomes `$HOME/.kube`
-`./` or no prefix| Relative to the project root for project settings, or to `~/.claude` for user settings| `./output` in `.claude/settings.json` resolves to `<project-root>/output`
-
-The older `//path` prefix for absolute paths still works. If you previously used single-slash `/path` expecting project-relative resolution, switch to `./path`. Claude Code strips a trailing slash from a directory path, so `~/.aws` and `~/.aws/` match the same directory. Before v2.1.224, Claude Code passed the trailing slash through to the sandbox, and Claude could still read or write paths under a `denyRead` or `denyWrite` entry written with one. Claude Code also removes a trailing `/**`, so `~/build/**` and `~/build` cover the same directory. For the four `filesystem` lists, whether a wildcard such as `*` works depends on which list the entry is in and on the platform:
-
- * **`allowWrite` and `denyWrite`**: on macOS, wildcards work. On Linux and WSL2, the sandbox mounts concrete paths, so Claude Code skips an entry that contains `*`, `?`, or `[` once the trailing `/**` is removed, and that entry has no effect. Claude Code adds the paths from your `Edit` permission rules to these lists, so the same limit applies to them, and the **Config** tab of `/sandbox` lists the `Edit` rules Claude Code skipped.
- * **`denyRead` and `allowRead`**: wildcards work on every platform. On Linux and WSL2, Claude Code expands a read entry to the concrete paths it matches, which it doesn’t do for the write lists.
-
-Claude Code blocks reads of the paths a wildcard `denyRead` entry such as `~/**/.env` matches, even inside a broader `allowRead` entry. When the wildcard matches a directory, Claude Code blocks reads of its contents as well. Before v2.1.236 on macOS, Claude Code re-opened the paths a wildcard `denyRead` entry matched wherever a broader `allowRead` entry covered them. On those macOS versions, Claude Code also left a matched directory’s contents readable. This syntax differs from [Read and Edit permission rules](</docs/en/permissions#read-and-edit>), which use `//path` for absolute and `/path` for project-relative. Sandbox filesystem paths use standard conventions: `/tmp/build` is an absolute path. **Configuration example:**
-
- {
- "sandbox": {
- "enabled": true,
- "autoAllowBashIfSandboxed": true,
- "excludedCommands": ["docker *"],
- "filesystem": {
- "allowWrite": ["/tmp/build", "~/.kube"],
- "denyRead": ["~/.aws/credentials"]
- },
- "network": {
- "allowedDomains": ["github.com", "*.npmjs.org", "registry.yarnpkg.com"],
- "deniedDomains": ["uploads.github.com"],
- "allowUnixSockets": [
- "/var/run/docker.sock"
- ],
- "allowLocalBinding": true
- }
- }
- }
-
-**Filesystem and network restrictions** can be configured in two ways that are merged together:
-
- * **`sandbox.filesystem` settings** (shown above): Control paths at the OS-level sandbox boundary, or set `filesystem.disabled` to `true` to turn that layer off entirely. These restrictions apply to all subprocess commands (e.g., `kubectl`, `terraform`, `npm`), not just Claude’s file tools.
- * **Permission rules** : Use `Edit` allow/deny rules to control Claude’s file tool access, `Read` deny rules to block reads (a `Read` deny rule also blocks the Edit and Write tools on the matching paths), and `WebFetch` allow/deny rules to control network domains. Paths from these rules are also merged into the sandbox configuration.
-
-###
-
-
-
-Attribution settings
-
-Claude Code adds attribution to git commits and pull requests. These are configured separately:
-
- * Commits use [git trailers](<https://git-scm.com/docs/git-interpret-trailers>) (like `Co-Authored-By`) by default, which can be customized or disabled
- * Pull request descriptions are plain text
-
-Keys| Description
----|---
-`commit`| Attribution for git commits, including any trailers. Empty string hides commit attribution
-`pr`| Attribution for pull request descriptions. Empty string hides pull request attribution
-`sessionUrl`| Whether to append the claude.ai session link as a `Claude-Session` trailer on commits and a link in pull request descriptions when running from a cloud or Remote Control session. Defaults to `true`. Set to `false` to omit the link
-
-**Default commit attribution:**
-
- Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
-
-The model name in the trailer reflects the active model for the session. **Default pull request attribution:**
-
- 🤖 Generated with [Claude Code](https://claude.com/claude-code)
-
-**Example:**
-
- {
- "attribution": {
- "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>",
- "pr": ""
- }
- }
-
-The `attribution` setting takes precedence over the deprecated `includeCoAuthoredBy` setting. To hide all attribution, set `commit` and `pr` to empty strings and `sessionUrl` to `false`.
-
-###
-
-
-
-File suggestion settings
-
-Configure a custom command for `@` file path autocomplete. The built-in file suggestion uses fast filesystem traversal, but large monorepos may benefit from project-specific indexing such as a pre-built file index or custom tooling. Claude Code can skip your custom command without warning and serve `@` autocomplete from the built-in file suggestion instead. The Hook configuration section describes the gates.
-
- {
- "fileSuggestion": {
- "type": "command",
- "command": "~/.claude/file-suggestion.sh"
- }
- }
-
-The command runs with the same environment variables as [hooks](</docs/en/hooks>), including `CLAUDE_PROJECT_DIR`. It receives JSON via stdin with a `query` field:
-
- {"query": "src/comp"}
-
-Output newline-separated file paths to stdout (currently limited to 15):
-
- src/components/Button.tsx
- src/components/Modal.tsx
- src/components/Form.tsx
-
-**Example:**
-
- #!/bin/bash
- query=$(cat | jq -r '.query')
- # Replace your-repo-file-index with your own file search command
- your-repo-file-index --query "$query" | head -20
-
-###
-
-
-
-Footer link badges
-
-The `footerLinksRegexes` setting renders extra clickable badges in the footer below the input box. Use it to turn IDs printed by project CLIs, such as review tools and issue trackers, into session links. Each entry’s `pattern` regex is matched against turn output: tool results, including file contents and fetched pages, and Claude’s own responses. `{name}` placeholders in `url` and `label` are filled from named capture groups in the pattern. The following example renders a badge whenever an issue key like `PROJ-1234` appears in turn output. The `(?<key>...)` named group captures the key, and `{key}` substitutes it into the URL and label:
-
-~/.claude/settings.json
-
- {
- "footerLinksRegexes": [
- {
- "type": "regex",
- "pattern": "\\b(?<key>PROJ-\\d+)\\b",
- "url": "https://issues.example.com/browse/{key}",
- "label": "{key}"
- }
- ]
- }
-
-With this configured, when `PROJ-1234` appears in a tool result or in Claude’s reply, a `PROJ-1234` badge appears in the footer linking to `https://issues.example.com/browse/PROJ-1234`. The following constraints apply to each entry:
-
-Constraint| Behavior
----|---
-URL origin| Captured values are URL-encoded and the constructed URL must share the template’s literal origin. A capture can fill a path segment or query value but cannot change where the link points
-URL length| Constructed URLs longer than 2048 characters are dropped
-URL scheme| Must be `https`, `http`, or a recognized editor or workspace deep-link scheme: `vscode`, `vscode-insiders`, `cursor`, `windsurf`, `zed`, `jetbrains`, `idea`, `slack`, `linear`, `notion`, `figma`
-Label| Defaults to the matched text and is truncated to 28 display columns
-Badge count| At most 5 badges render. The oldest is displaced by newer matches and `/clear` removes them
-Settings scope| Read from user settings, the `--settings` flag, and managed settings only. Ignored in project `.claude/settings.json` and local `.claude/settings.local.json`
-
-When a turn completes, Claude Code matches each entry’s `pattern` regex against the turn output on the main thread, so a slow regex blocks the UI until it finishes. Nested quantifiers such as `(a+)+$` can take exponentially long against certain inputs and freeze the session, so keep each `pattern` linear and avoid nesting `+` or `*`. Footer badges render alongside a [custom status line](</docs/en/statusline>) when one is configured; neither replaces the other. Use a status line for a script-driven row that computes its own content from session data, and footer badges to turn IDs from the conversation into links without a script.
-
-###
-
-
-
-Hook configuration
-
-These settings control which hooks are allowed to run and what HTTP hooks can access. The `allowManagedHooksOnly` setting can only be configured in managed settings. The URL and env var allowlists can be set at any settings level and merge across sources. **Behavior when`allowManagedHooksOnly` is `true`:**
-
- * Managed hooks and SDK hooks are loaded
- * Hooks from plugins force-enabled in managed settings `enabledPlugins` are loaded. This lets administrators distribute vetted hooks through an organization marketplace while blocking everything else. Trust is granted by full `plugin@marketplace` ID, so a plugin with the same name from a different marketplace stays blocked
- * User hooks, project hooks, local hooks, and all other plugin hooks are blocked
- * Claude Code also disables plugins with a [`command` source](</docs/en/plugin-marketplaces#command-sources>), including plugins force-enabled in managed settings `enabledPlugins`, unless `disableCommandPluginSources` is explicitly set to `false`
- * Claude Code also narrows [`statusLine`](</docs/en/statusline>), `fileSuggestion`, and [`subagentStatusLine`](</docs/en/statusline#subagent-status-lines>) to managed settings, following the two decisions below
-
-**Status line and file suggestion gates:** Claude Code makes two decisions for `statusLine`, `fileSuggestion`, and `subagentStatusLine`. It turns the feature off entirely when managed settings set `disableAllHooks`, or when the folder isn’t trusted under the same [workspace trust rule as hooks in settings files](</docs/en/permissions#what-runs-before-you-trust-a-folder>). It narrows the source to managed settings when `allowManagedHooksOnly` is set or when `disableAllHooks` is `true` outside managed settings after [settings precedence](</docs/en/hooks#disable-or-remove-hooks>) applies. Under narrowing, Claude Code runs a managed value if one is deployed; otherwise it skips your value without warning, the status line is disabled, and `@` autocomplete falls back to the built-in file suggestion. **Restrict HTTP hook URLs:** Limit which URLs HTTP hooks can target. Supports `*` as a wildcard for matching. When the array is defined, HTTP hooks targeting non-matching URLs are silently blocked. Hostname matching is case-insensitive and ignores a trailing FQDN dot, matching DNS semantics.
-
- {
- "allowedHttpHookUrls": ["https://hooks.example.com/*", "http://localhost:*"]
- }
-
-**Restrict HTTP hook environment variables:** Limit which environment variable names HTTP hooks can interpolate into header values. Each hook’s effective `allowedEnvVars` is the intersection of its own list and this setting.
-
- {
- "httpHookAllowedEnvVars": ["MY_TOKEN", "HOOK_SECRET"]
- }
-
-###
-
-
-
-Compute managed settings with a policy helper
-
-The `policyHelper` setting points at an executable that computes managed settings at startup, so admins can derive policy from device posture, identity, or a remote service instead of a static file. Configure it from MDM or a system `managed-settings.json` file. Claude Code ignores `policyHelper` when it appears in any other scope, including user settings, project settings, the HKCU registry hive, and [server-managed settings](</docs/en/server-managed-settings>). The setting accepts these keys:
-
-Key| Type| Description
----|---|---
-`path`| string| Absolute path to the helper executable
-`timeoutMs`| number| How long to wait for the helper before treating the run as failed
-`refreshIntervalMs`| number| How often to re-run the helper in the background. Set to `0` to disable refresh, or to at least `60000`
-
-The helper writes a JSON envelope to stdout. Put the settings under a `managedSettings` key rather than at the top level, since a bare settings object parses with `managedSettings` undefined and applies nothing:
-
- {
- "managedSettings": {
- "permissions": { "deny": ["Read(//etc/secrets/**)"] }
- },
- "claudeMd": "# Organization context\n...",
- "appendSystemPrompt": "Always cite the internal style guide."
- }
-
-Claude Code reads `policyHelper` only from the source that wins precedence within the managed tier, so a helper configured in MDM or a managed settings file does not run while server-managed settings deliver a non-empty configuration. When the helper runs and emits `managedSettings`, that object becomes the only managed settings source for the run: Claude Code ignores the MDM and file-based sources, reads the cross-source keys from the helper’s output alone, and never merges parent settings. A helper that exits 0 without emitting `managedSettings` contributes no managed settings, and the other sources apply as usual. When the helper exits non-zero at startup, Claude Code prints the error and refuses to start, so a helper that needs outage resilience should serve from its own cache and exit `0`.
-
-###
-
-
-
-Settings precedence
-
-Claude Code reads settings from these levels, highest precedence first. A few security-sensitive keys and one host-integration case don’t follow this order, in either direction; Exceptions to managed settings precedence lists them.
-
- 1. **Managed settings** ([server-managed](</docs/en/server-managed-settings>), MDM/OS-level policies, or [managed settings files](</docs/en/settings#settings-files>))
- * Your organization deploys these through server delivery, MDM configuration profiles, registry policies, or managed settings files
- * No other level overrides them, including command line arguments, apart from the exceptions to managed settings precedence
- * When your organization delivers more than one managed source, precedence within the managed tier determines what Claude Code reads from each
- 2. **Command line arguments**
- * Values you pass for one session. JSON you pass with `--settings <file-or-json>` merges with your settings files by the same rules as the other levels: a key you set here overrides the same key in local, project, or user settings, and a key you omit keeps its lower-level value
- 3. **Local project settings** (`.claude/settings.local.json`)
- * Your personal settings for this project
- 4. **Shared project settings** (`.claude/settings.json`)
- * Settings your team checks into source control
- 5. **User settings** (`~/.claude/settings.json`)
- * Your personal settings for every project
-
-The same order applies whether you run Claude Code from the CLI, the [VS Code extension](</docs/en/vs-code>), or a [JetBrains IDE](</docs/en/jetbrains>). For example, if you set `spinnerTipsEnabled` to `true` in your user settings and your team sets it to `false` in the project’s shared settings, the project value applies.
-
-**Array settings merge across scopes.** When you set the same array-valued key, such as `sandbox.filesystem.allowWrite` or `permissions.allow`, in more than one scope, Claude Code concatenates and deduplicates the arrays instead of replacing one with another, so each scope can add entries without removing another scope’s. For example, if managed settings set `allowWrite` to `["/opt/company-tools"]` and you add `["~/.kube"]` in your user settings, Claude Code allows writes to both paths.Two array keys don’t merge this way:
-
- * `fallbackModel` is an ordered chain where position carries meaning, so Claude Code takes the whole value from the highest-precedence file that defines it.
- * `availableModels`: when the highest-precedence managed source defines it, Claude Code applies that list as-is, apart from a host platform that supplies its own, and ignores entries you add in user, project, or local settings. Across non-managed scopes the arrays merge as usual. See [Merge behavior](</docs/en/model-config#merge-behavior>).
-
-####
-
-
-
-Exceptions to managed settings precedence
-
-For a few security-sensitive keys, Claude Code honors a restrictive value from a scope that otherwise couldn’t override managed settings. Find the key in this table to see which value it honors and from where.
-
-Key| Value Claude Code honors| Notes
----|---|---
-`disableClaudeAiConnectors`| `true` from any scope| Honored even when a managed source sets `false`
-`isolatePeerMachines`| `true` from any scope| Honored even when a managed source sets `false`
-`remoteControlAtStartup`| `false` from `.claude/settings.json` or `.claude/settings.local.json`| Honored even when a managed source sets `true`. Claude Code ignores a `true` in those two files: you can turn auto-connect on only from user settings, the `--settings` flag, or managed settings, and a `false` in your user settings doesn’t override a managed `true`
-`crossSessionInbound`| A stricter value from `.claude/settings.json` or `.claude/settings.local.json`, on the `accept` < `hold` < `refuse` ladder| Honored over the value from managed settings, the `--settings` flag, or user settings. Claude Code ignores a project or local value that isn’t stricter, so a checked-in `accept` never overrides the `hold` or `refuse` in your user settings
-
-A host platform that embeds Claude Code and sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>) is also an exception. Claude Code takes the host’s model configuration over the `model`, `fallbackModel`, and `modelOverrides` keys from every managed source, and over the model-selection variables in a managed `env` block, such as `ANTHROPIC_MODEL` and the `ANTHROPIC_DEFAULT_*_MODEL` family. A managed `availableModels` allowlist stays in force unless the host supplies its own.
-
-####
-
-
-
-Precedence within the managed tier
-
-Apart from the cross-source keys listed after the ranking, Claude Code uses the first of these sources that delivers a non-empty configuration and ignores the rest rather than merging them. When that winning source is an MDM policy or managed settings file that configures a `policyHelper`, the helper’s output then replaces it; that section says how. Claude Code checks the sources in this order:
-
- 1. Remote settings, delivered from claude.ai as [server-managed settings](</docs/en/server-managed-settings>) or by a [Claude apps gateway](</docs/en/claude-apps-gateway>)
- 2. MDM or OS-level policies
- 3. Managed settings files, `managed-settings.d/*.json` and `managed-settings.json` merged together
- 4. The HKCU registry, on Windows only
-
-Claude Code honors a few keys from any admin-controlled managed source, not only the one it selected above. The user-writable HKCU registry source is excluded from these checks. These cross-source keys are:
-
- * The sandbox lock keys `sandbox.network.allowManagedDomainsOnly` and `sandbox.filesystem.allowManagedReadPathsOnly`, with their associated allowlists
- * `allowAllClaudeAiMcps`
- * The sandbox binary paths `sandbox.bwrapPath` and `sandbox.socatPath`
- * The sandbox `ripgrep` binary, `sandbox.ripgrep`
- * [`forceRemoteSettingsRefresh`](</docs/en/server-managed-settings>)
- * `env`, which Claude Code merges per variable across the admin-controlled sources: each variable comes from the highest-priority source that defines it, so lower sources fill in variables the higher ones leave unset, or whose cached server value Claude Code is [withholding pending server confirmation](</docs/en/server-managed-settings#fetch-and-caching-behavior>). The telemetry unit and credential-paired routing variables follow their own rules; see [Per-key exceptions across managed sources](</docs/en/server-managed-settings#per-key-exceptions-across-managed-sources>). Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applied the selected source’s whole `env` block only
-
-####
-
-
-
-Parent settings from embedding hosts
-
-An embedding host such as Claude Desktop can supply policy through the SDK `managedSettings` option. By default, Claude Code ignores those parent settings whenever an admin-deployed managed source is present: server-managed settings, an MDM or OS-level policy, or a managed settings file. The user-writable HKCU registry source doesn’t count as admin-deployed. To have Claude Code merge parent settings alongside an admin-deployed source, set `parentSettingsBehavior` to `"merge"` in the highest-priority managed source; Claude Code reads the key from that source only. It then passes the host’s values through a restrictive-only filter, with one gap to know about: unless you also set the `allowManaged*Only` locks, allow-direction settings from the host, such as permission allow rules and sandbox allowlists, still apply. See [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) for the locks. A `policyHelper` can turn parent merging off regardless of this key; that section says when. Claude Code also applies these checks to specific parent-supplied values:
-
- * When any admin-controlled managed source sets `allowManagedPermissionRulesOnly`, Claude Code drops [parent-supplied](</docs/en/claude-apps-gateway#restrict-parent-settings>) permission allow rules and `additionalDirectories` as it reads them, even when a higher-priority source leaves the key unset. The key’s effect on your own permission rules still comes from the highest-priority source only
- * A `forceLoginOrgUUID` or `allowedMcpServers` value in the highest-priority admin source blocks a parent-supplied one, and Claude Code enforces the admin value. A value in a non-selected admin source neither applies nor blocks the parent’s. Before v2.1.223, a value in any admin source blocked the parent’s
-
-###
-
-
-
-Verify active settings
-
-Run `/status` inside Claude Code to see which settings sources are active. Inside the menu, the **Status** tab includes a `Setting sources` line that lists each layer Claude Code loaded for the current session, such as `User settings` or `Project local settings`. When [managed settings](</docs/en/admin-setup#decide-how-settings-reach-devices>) are in effect, the entry shows the delivery channel in parentheses, for example `Enterprise managed settings (remote)`, `(plist)`, `(HKLM)`, `(HKCU)`, or `(file)`. The `remote` channel covers both claude.ai server-managed settings and [Claude apps gateway](</docs/en/claude-apps-gateway>)-delivered policies. A layer appears in the list only when that source is loaded with at least one key, so an empty list means no settings sources were found. The `Setting sources` line confirms which sources are being read. It does not show which layer supplied each individual key. The **Config** tab in the same dialog is an editor for a fixed set of toggles such as theme and verbose output, not a view of your `settings.json` contents. If a user, project, or local settings file contains errors, such as invalid JSON or a value that fails validation, an interactive session shows a **Settings Error** dialog at startup. The dialog lets you fix the file with Claude’s help, exit, or continue without the broken settings. After you continue, `/status` lists the affected files. Run `claude doctor` to see the details for each error. Managed settings entries that fail validation follow the more tolerant flow described in Invalid entries in managed settings: the file isn’t rejected as a whole, and the remaining valid policies stay enforced.
-
-###
-
-
-
-Key points about the configuration system
-
- * **Memory files (`CLAUDE.md`)**: Contain instructions and context that Claude loads at startup
- * **Settings files (JSON)** : Configure permissions, environment variables, and tool behavior
- * **Skills** : Custom prompts that can be invoked with `/skill-name` or loaded by Claude automatically
- * **MCP servers** : Extend Claude Code with additional tools and integrations
- * **Precedence** : Higher-level configurations (Managed) override lower-level ones (User/Project)
- * **Inheritance** : Settings merge across scopes; scalar values from higher-priority scopes override and arrays concatenate, each with the exceptions described under Settings precedence
-
-###
-
-
-
-System prompt
-
-Claude Code’s internal system prompt is not published. To add custom instructions, use `CLAUDE.md` files or the `--append-system-prompt` flag.
-
-###
-
-
-
-Exclude sensitive files
-
-To prevent Claude Code from accessing files containing sensitive information like API keys, secrets, and environment files, use the `permissions.deny` setting in your `.claude/settings.json` file:
-
- {
- "permissions": {
- "deny": [
- "Read(./.env)",
- "Read(./.env.*)",
- "Read(./secrets/**)",
- "Read(./config/credentials.json)",
- "Read(./build)"
+ "Read(./.env.*)"
]
}
}
-This replaces the deprecated `ignorePatterns` configuration. Claude Code excludes files matching these patterns from file discovery and search results, denies read operations on them, and blocks the [Edit and Write tools](</docs/en/permissions#read-and-edit>) on the matching paths.
-
-##
-
-
-
-Subagent configuration
-
-Claude Code supports custom AI subagents that can be configured at both user and project levels. You define each subagent as a Markdown file with YAML frontmatter, saved in one of these locations:
-
- * **User subagents** : `~/.claude/agents/`, available across all your projects
- * **Project subagents** : `.claude/agents/`, specific to your project and shareable with your team
-
-Subagent files define specialized AI assistants with custom prompts and tool permissions. Learn more about creating and using subagents in the [subagents documentation](</docs/en/sub-agents>).
-
-##
-
-
-
-Plugin configuration
-
-Claude Code supports a plugin system that lets you extend functionality with skills, agents, hooks, and MCP servers. Plugins are distributed through marketplaces and can be configured at both user and repository levels.
-
-###
-
-
-
-Plugin settings
-
-Plugin-related settings in `settings.json`:
-
- {
- "enabledPlugins": {
- "formatter@acme-tools": true,
- "deployer@acme-tools": true,
- "analyzer@security-plugins": false
- },
- "extraKnownMarketplaces": {
- "acme-tools": {
- "source": {
- "source": "github",
- "repo": "acme-corp/claude-plugins"
- }
- }
- }
- }
-
-####
-
-
-
-`enabledPlugins`
-
-Controls which plugins are enabled. Format: `"plugin-name@marketplace-name": true/false`. A plugin with no entry at any scope falls back to its [`defaultEnabled`](</docs/en/plugins-reference#default-enablement>) value. **Scopes** :
-
- * **User settings** (`~/.claude/settings.json`): Personal plugin preferences
- * **Project settings** (`.claude/settings.json`): Project-specific plugins shared with team
- * **Local settings** (`.claude/settings.local.json`): Per-machine overrides, gitignored when Claude Code saves a setting to it
- * **Managed settings** (`managed-settings.json`): Organization-wide policy overrides that block installation at all scopes and hide the plugin from the marketplace
-
-Project settings take precedence over user settings, so setting a plugin to `false` in `~/.claude/settings.json` does not disable a plugin that the project’s `.claude/settings.json` enables. To opt out of a project-enabled plugin on your machine, set it to `false` in `.claude/settings.local.json` instead.Plugins force-enabled by managed settings cannot be disabled this way, since managed settings override local settings.Enabling a plugin from an external source such as a GitHub repository or npm package in a project’s `.claude/settings.json` doesn’t install it for other people. On every path that loads plugins, Claude Code reports the plugin as not installed until each user [installs it themselves](</docs/en/discover-plugins#configure-team-marketplaces>).
-
-**Example** :
-
- {
- "enabledPlugins": {
- "code-formatter@team-tools": true,
- "deployment-tools@team-tools": true,
- "experimental-features@personal": false
- }
- }
-
-####
-
-
-
-`pluginConfigs`
-
-Stores the non-sensitive option values a plugin’s [`userConfig`](</docs/en/plugins-reference#user-configuration>) prompt collects, keyed by plugin ID. Claude Code writes this key to user settings when you fill in the plugin’s configuration dialog, so you don’t need to edit it by hand. Sensitive options are stored in the macOS Keychain instead, or in `~/.claude/.credentials.json` on platforms without a supported keychain. This example stores one option for a plugin installed from the `acme-tools` marketplace:
-
- {
- "pluginConfigs": {
- "deployer@acme-tools": {
- "options": {
- "api_endpoint": "https://api.example.com"
- }
- }
- }
- }
-
-`pluginConfigs` is read from user settings, the `--settings` flag, and managed settings only. Entries in a project’s `.claude/settings.json` or `.claude/settings.local.json` are ignored, because these values are substituted into plugin hook, MCP, and LSP configurations, and a cloned repository must not be able to supply them. Before v2.1.207, project and local settings were also read.
-
-####
-
-
-
-`extraKnownMarketplaces`
-
-Defines additional marketplaces that should be made available for the repository. Typically used in repository-level settings to ensure team members have access to required plugin sources. When a repository’s `.claude/settings.json` includes `extraKnownMarketplaces`, Claude Code adds those marketplaces for a team member after they accept the workspace trust dialog for that repository, with no separate prompt. In a folder they haven’t trusted, including a `-p` run there, Claude Code ignores the entries without a message. [What runs before you trust a folder](</docs/en/permissions#what-runs-before-you-trust-a-folder>) compares this with the other content a repository can supply. **Example** :
-
- {
- "extraKnownMarketplaces": {
- "acme-tools": {
- "source": {
- "source": "github",
- "repo": "acme-corp/claude-plugins"
- }
- },
- "security-plugins": {
- "source": {
- "source": "git",
- "url": "https://git.example.com/security/plugins.git"
- }
- }
- }
- }
-
-**Marketplace source types** :
-
- * `github`: GitHub repository (uses `repo`)
- * `git`: Any git URL (uses `url`)
- * `url`: Direct URL to a `marketplace.json` file (uses `url`, plus optional `headers` for authenticated access)
- * `file`: Local path to a `marketplace.json` file (uses `path`)
- * `directory`: Local filesystem path (uses `path`, for development only)
- * `hostPattern`: regex pattern to match marketplace hosts (uses `hostPattern`)
- * `settings`: inline marketplace declared directly in settings.json without a separate hosted repository (uses `name` and `plugins`)
-
-The `git` source type works with any git hosting service, including self-hosted GitLab and Bitbucket. Claude Code clones the repository with the same authentication that `git clone` would use on that machine: configured credential helpers or SSH keys. A provider token such as `GITHUB_TOKEN` takes effect only through a credential helper that reads it. See [Private repositories](</docs/en/plugin-marketplaces#private-repositories>) for setup details. For `github` and `git` sources, set `"skipLfs": true` inside the `source` object (alongside `repo` or `url`) to skip Git LFS downloads when Claude Code clones or updates the marketplace repository. LFS pointer files remain as pointers instead of downloading their content. Use this when the repository contains large LFS objects unrelated to plugin content. Requires Claude Code v2.1.153 or later. Each marketplace entry also accepts an optional `autoUpdate` Boolean. Set `"autoUpdate": true` alongside `source` to make Claude Code refresh that marketplace and update its installed plugins in the background after startup. When omitted, official Anthropic marketplaces default to `true` and all other marketplaces default to `false`. See [Configure auto-updates](</docs/en/discover-plugins#configure-auto-updates>). When more than one settings file defines a marketplace entry under the same name, Claude Code uses the entry from the highest-precedence file whole. That entry replaces the lower-precedence entry and inherits none of its fields, so a redefinition can’t combine one file’s `source.headers` credential with a URL another file controls. Before v2.1.228, Claude Code merged same-name entries field by field, so an entry in a higher-precedence file could inherit fields it didn’t set, including another file’s `headers`. Use `source: 'settings'` to declare a small set of plugins inline without setting up a hosted marketplace repository. Plugins listed here must reference external sources such as GitHub or npm. You still need to enable each plugin separately in `enabledPlugins`.
-
- {
- "extraKnownMarketplaces": {
- "team-tools": {
- "source": {
- "source": "settings",
- "name": "team-tools",
- "plugins": [
- {
- "name": "code-formatter",
- "source": {
- "source": "github",
- "repo": "acme-corp/code-formatter"
- }
- }
- ]
- }
- }
- }
- }
-
-##### Marketplace key aliases
-
-On Claude Code v2.1.232 or later, you can also write `extraKnownMarketplaces` as `additionalMarketplaces` and `strictKnownMarketplaces` as `allowedMarketplaces`, and Claude Code treats each alias as follows.
-
- * Earlier versions ignore the alias, so keep the canonical spelling in a file that older versions also read. A managed settings file for a fleet with mixed Claude Code versions is one such file.
- * In any settings file that accepts the canonical key, Claude Code reads the alias exactly as it reads the canonical key.
- * Claude Code may rewrite `additionalMarketplaces` to `extraKnownMarketplaces` when it updates the file.
- * If you set both spellings to values in one file, Claude Code uses the canonical value and ignores the alias.
-
-####
-
-
-
-`strictKnownMarketplaces`
-
-**Managed settings only** : Controls which plugin marketplaces users are allowed to add and install plugins from. This setting can only be configured in [managed settings](</docs/en/settings#settings-files>) and provides administrators with strict control over marketplace sources. You can also write this key as `allowedMarketplaces`. Marketplace key aliases describes how Claude Code treats the alias and which version accepts it. **Managed settings file locations** :
-
- * **macOS** : `/Library/Application Support/ClaudeCode/managed-settings.json`
- * **Linux and WSL** : `/etc/claude-code/managed-settings.json`
- * **Windows** : `C:\Program Files\ClaudeCode\managed-settings.json`
-
-**Key characteristics** :
-
- * Only available in managed settings (`managed-settings.json`)
- * Cannot be overridden by user or project settings (highest precedence)
- * Enforced before network and filesystem operations, so blocked sources never run
- * Uses exact matching for most source specifications, including `ref` and `path` for git sources. `hostPattern` and `pathPattern` entries use regex matching. `github` entries with an owner-wildcard `repo` such as `"acme-corp/*"` follow their own matching rules. See Owner wildcards
-
-**Allowlist behavior** :
-
- * `undefined` (default): no restrictions, so users can add any marketplace
- * Empty array `[]`: complete lockdown that blocks every marketplace source, including the official Anthropic marketplace, so users can’t add any new marketplaces
- * List of sources: users can only add marketplaces that match an entry in the list
-
-**All supported source types** : The allowlist supports multiple marketplace source types. Most sources use exact matching. `hostPattern` and `pathPattern` use regex matching against the marketplace host and filesystem path respectively, and `github` entries can use an owner wildcard.
-
- 1. **GitHub repositories** :
-
- { "source": "github", "repo": "acme-corp/approved-plugins" }
- { "source": "github", "repo": "acme-corp/security-tools", "ref": "v2.0" }
- { "source": "github", "repo": "acme-corp/plugins", "ref": "main", "path": "marketplace" }
- { "source": "github", "repo": "acme-corp/*" }
-
-Fields: `repo` (required), `ref` (optional: branch or tag), `path` (optional: subdirectory) The `"acme-corp/*"` form is an owner wildcard that matches every repository under that GitHub owner. Owner wildcards require Claude Code v2.1.223 or later. Claude Code accepts them only in `strictKnownMarketplaces` and `blockedMarketplaces`. Everywhere else a `github` source appears, such as `extraKnownMarketplaces` or `/plugin marketplace add`, the `repo` value must name a single repository. For the matching rules, see Owner wildcards.
-
- 2. **Git repositories** :
-
- { "source": "git", "url": "https://gitlab.example.com/tools/plugins.git" }
- { "source": "git", "url": "https://bitbucket.org/acme-corp/plugins.git", "ref": "production" }
- { "source": "git", "url": "ssh://git@git.example.com/plugins.git", "ref": "v3.1", "path": "approved" }
-
-Fields: `url` (required), `ref` (optional: branch or tag), `path` (optional: subdirectory)
-
- 3. **URL-based marketplaces** :
-
- { "source": "url", "url": "https://plugins.example.com/marketplace.json" }
- { "source": "url", "url": "https://cdn.example.com/marketplace.json", "headers": { "Authorization": "Bearer ${TOKEN}" } }
-
-Fields: `url` (required), `headers` (optional: HTTP headers for authenticated access)
-
-URL-based marketplaces only download the `marketplace.json` file. They don’t download plugin files from the server. Plugins in URL-based marketplaces must use a [plugin source](</docs/en/plugin-marketplaces#plugin-sources>) other than a relative path. For plugins with relative paths, use a Git-based marketplace instead. See [Troubleshooting](</docs/en/plugin-marketplaces#plugins-with-relative-paths-fail-in-url-based-marketplaces>) for details.
-
- 4. **NPM packages** :
-
- { "source": "npm", "package": "@acme-corp/claude-plugins" }
- { "source": "npm", "package": "@acme-corp/approved-marketplace" }
-
-Fields: `package` (required, supports scoped packages)
-
- 5. **File paths** :
-
- { "source": "file", "path": "/usr/local/share/claude/acme-marketplace.json" }
- { "source": "file", "path": "/opt/acme-corp/plugins/marketplace.json" }
-
-Fields: `path` (required: absolute path to marketplace.json file)
-
- 6. **Directory paths** :
-
- { "source": "directory", "path": "/usr/local/share/claude/acme-plugins" }
- { "source": "directory", "path": "/opt/acme-corp/approved-marketplaces" }
-
-Fields: `path` (required: absolute path to directory containing `.claude-plugin/marketplace.json`)
-
- 7. **Host pattern matching** :
-
- { "source": "hostPattern", "hostPattern": "^github\\.example\\.com$" }
- { "source": "hostPattern", "hostPattern": "^gitlab\\.internal\\.example\\.com$" }
-
-Fields: `hostPattern` (required: regex pattern to match against the marketplace host) Use host pattern matching when you want to allow all marketplaces from a specific host without enumerating each repository individually. This is useful for organizations with internal GitHub Enterprise or GitLab servers where developers create their own marketplaces. Host extraction by source type:
-
- * `github`: always matches against `github.com`
- * `git`: extracts the hostname from the marketplace’s [git URL](<https://git-scm.com/docs/git-clone#_git_urls>), depending on the URL’s form:
- * A URL with a scheme, such as `https://` or `ssh://`: the hostname in the URL.
- * An SSH address without a scheme, in git’s `user@host:path` form, such as `git@git.example.com:tools/plugins.git`: the host between `@` and `:`, which is the host git connects to.
- * Any other form without a scheme: no host, so no `strictKnownMarketplaces` `hostPattern` entry matches it. For a `blockedMarketplaces` `hostPattern`, Claude Code takes a host from a wider set of forms, so a blocklist entry can still match such a form. Before v2.1.234, a `strictKnownMarketplaces` `hostPattern` also matched some forms that git doesn’t treat as SSH addresses.
- * `url`: extracts hostname from the URL
- * `npm`, `file`, `directory`: not supported for host pattern matching
-
- 8. **Path pattern matching** :
-
- { "source": "pathPattern", "pathPattern": "^/opt/approved/" }
- { "source": "pathPattern", "pathPattern": ".*" }
-
-Fields: `pathPattern` (required: regex pattern matched against the `path` field of `file` and `directory` sources) Use path pattern matching to allow filesystem-based marketplaces alongside `hostPattern` restrictions for network sources. Set `".*"` to allow all local paths, or a narrower pattern to restrict to specific directories. **Configuration examples** : Example: allow specific marketplaces only:
-
- {
- "strictKnownMarketplaces": [
- {
- "source": "github",
- "repo": "acme-corp/approved-plugins"
- },
- {
- "source": "github",
- "repo": "acme-corp/security-tools",
- "ref": "v2.0"
- },
- {
- "source": "url",
- "url": "https://plugins.example.com/marketplace.json"
- },
- {
- "source": "npm",
- "package": "@acme-corp/compliance-plugins"
- }
- ]
- }
-
-Example: disable all marketplace additions, including the official Anthropic marketplace:
-
- {
- "strictKnownMarketplaces": []
- }
-
-Example: allow only the official Anthropic marketplace. Claude Code matches a single-repository entry exactly, so this entry doesn’t cover `ref` or `path` variants of the same repository:
-
- {
- "strictKnownMarketplaces": [
- {
- "source": "github",
- "repo": "anthropics/claude-plugins-official"
- }
- ]
- }
-
-With this entry, Claude Code keeps an already-registered official marketplace available and, on a fresh machine, registers the marketplace automatically the first time you start Claude Code interactively. Automatic registration doesn’t cover every machine. It most commonly misses:
-
- * Non-interactive environments that run before the machine’s first interactive launch.
- * Machines where Claude Code already ran interactively under a policy that blocked the marketplace, such as the empty-array lockdown. Claude Code records the blocked attempt and doesn’t retry after the policy changes.
-
-On these machines, add the marketplace to `extraKnownMarketplaces` in the same `managed-settings.json` so Claude Code registers it automatically, or run `claude plugin marketplace add anthropics/claude-plugins-official`. Example: allow all marketplaces from an internal git server:
-
- {
- "strictKnownMarketplaces": [
- {
- "source": "hostPattern",
- "hostPattern": "^github\\.example\\.com$"
- }
- ]
- }
-
-**Exact matching requirements** : For most source types, Claude Code allows a user’s addition only when the marketplace source matches an entry exactly. The exceptions are owner-wildcard `github` entries and the regex-matched `hostPattern` and `pathPattern` entries. For the git-based sources `github` and `git`, exact matching includes all optional fields:
-
- * The `repo` or `url` must match exactly
- * The `ref` field must match exactly (or both be undefined)
- * The `path` field must match exactly (or both be undefined)
-
-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" }`
-
-**Owner wildcards** : A `github` entry whose `repo` value is `"<owner>/*"` matches every repository under that GitHub owner. Owner wildcards require Claude Code v2.1.223 or later. Before v2.1.223, Claude Code compared the entry literally, so an allowlist entry matched no repository and a blocklist entry blocked nothing. Single-repository entries are enforced on every version. This entry allows any marketplace repository in the `acme-corp` organization:
-
- {
- "strictKnownMarketplaces": [
- { "source": "github", "repo": "acme-corp/*" }
- ]
- }
-
-Only the whole repository-name position can be a wildcard. Claude Code compares entries such as `*`, `*/plugins`, or `acme-corp/tools-*` literally, so they match no repository. The matching rules differ between the two settings:
-
-Rule| `strictKnownMarketplaces`| `blockedMarketplaces`
+Each entry under `permissions` is a rule that names a tool and what it may do; [Configure permissions](</docs/en/permissions>) explains the syntax. The `$schema` line points to the [published JSON schema](<https://json.schemastore.org/claude-code-settings.json>) for Claude Code settings, which gives you autocomplete and inline validation in VS Code, Cursor, and any other editor that supports JSON schema. The schema can lag behind the newest CLI releases, so a validation warning on a recently documented key doesn’t mean your configuration is invalid. After you save, run `/status` inside Claude Code to confirm the file loaded; Confirm what loaded says what the `Setting sources` line shows and how a broken file is reported. For a complete personal file, team file, and organization file, each shown with a comment on every key it sets, see the [example settings files](</docs/en/settings-example>).
+
+###
+
+
+
+Change a setting for one session
+
+To try a value without saving it, set it when you start Claude Code. The value applies to that session and your settings files stay as they were. You have three ways to do it:
+
+ * **`--settings`** : pass a key as JSON, inline or as a path to a file. Claude Code applies it above your user, project, and local files and below managed settings. It can set any key your user settings file can set; it can’t set `Managed` or `Global config` keys.
+ * **A flag for that key** : some keys have their own flag, such as `--model` for `model` and `--effort` for `effortLevel`.
+ * **An environment variable** : export the key’s paired variable before you run `claude`, such as `ANTHROPIC_MODEL` for `model`.
+
+Each key’s entry on the [settings reference](</docs/en/settings-reference>) lists its per-session overrides and which one takes precedence, so check the entry for the key you want to change. Commands you run inside a session mostly save your choice: `/config` writes to your settings files, and `/model` and `/effort` save the value as your default for new sessions. Pressing `s` in the `/model` picker switches the model without saving it, and some `/effort` levels, such as `max` and `ultracode`, apply to the current session only; see [Adjust effort level](</docs/en/model-config#adjust-effort-level>). For example, to start one session on Opus without changing your default:
+
+ claude --settings '{"model": "claude-opus-4-8"}'
+
+###
+
+
+
+When edits take effect
+
+Claude Code watches your settings files and reloads them when they change, so it applies most edits to the running session without a restart, including edits to `permissions`, `hooks`, and credential helpers such as `apiKeyHelper`. The reload covers user, project, local, and managed settings, and Claude Code runs the [`ConfigChange` hook](</docs/en/hooks#configchange>) for each settings-file change it detects, not for managed settings that arrive from MDM or the claude.ai console. Managed settings that arrive through MDM or from the claude.ai console reach a running session on a schedule rather than on save; the [delivery table](</docs/en/managed-settings#choose-a-delivery-mechanism>) gives it per source. Claude Code reads some keys only once, at session start, so an edit to one of them doesn’t reach the running session. Admin-side keys that also wait for a restart, such as `requiredMinimumVersion`, are listed under [where and when a policy applies](</docs/en/managed-settings#where-and-when-a-policy-applies>). The ones you’re most likely to edit mid-session:
+
+ * [`model`](</docs/en/settings-reference#model>): use [`/model`](</docs/en/model-config#setting-your-model>) to switch mid-session. Each model has its own prompt cache, so the first request after a switch re-reads the whole conversation uncached; see [Switching models](</docs/en/prompt-caching#switching-models>)
+ * [`effortLevel`](</docs/en/settings-reference#effortlevel>): use [`/effort`](</docs/en/model-config#adjust-effort-level>) to change it mid-session
+ * [`outputStyle`](</docs/en/settings-reference#outputstyle>): part of the system prompt, so Claude Code applies the edit after `/clear` or a restart
+
+###
+
+
+
+Confirm what loaded
+
+Run `/status` inside Claude Code to see which settings sources are active. The **Status** tab includes a `Setting sources` line that lists each settings file Claude Code loaded for the current session, such as `User settings` or `Project local settings`. When [managed settings](</docs/en/admin-setup#decide-how-settings-reach-devices>) are in effect, the managed settings entry shows in parentheses how they reached your machine. The line confirms which files Claude Code read; it doesn’t show which file supplied each key. To list entries Claude Code rejected, run [`claude doctor`](</docs/en/debug-your-config>); for a model that project or managed settings set, the startup header names the file that set it. `/status` and `/config` open the same dialog on different tabs, and the **Config** tab isn’t a view of your `settings.json` contents.
+
+###
+
+
+
+Fix a broken settings file
+
+If you mistype JSON or set a key to a value Claude Code doesn’t accept, Claude Code tells you at the start of an interactive session. What it shows depends on how much of the file is affected:
+
+ * **Settings Error** : a user, project, or local file has invalid JSON or a value the schema rejects. At the start of an interactive session Claude Code shows a dialog that lets you fix the file with Claude’s help, exit, or continue without the broken settings.
+ * **Settings Warning** : only individual entries fail, such as a malformed permission rule or an unknown hook event name. Claude Code skips those values and keeps the rest of the file in effect.
+ * **Managed settings** : Claude Code keeps enforcing the rest of the file. [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>) says what it drops and which keys fall back to a stricter value until you fix them.
+ * **Configuration error** : `~/.claude.json` can’t be parsed. Claude Code copies the broken file to `~/.claude/backups/.claude.json.corrupted.<timestamp>` and asks whether to exit and fix it by hand or reset to the default configuration; a `-p` run prints the error and exits. To recover your previous state, copy back one of the five most recent `.claude.json.backup.<timestamp>` files in `~/.claude/backups/`, which Claude Code saves before it writes the file.
+
+After you continue, run `/status` to see the affected files and `claude doctor` for the details of each error. A `-p` run shows no dialog: Claude Code skips the broken file or values and continues with the rest, so after a `-p` run that ignores a setting, run `claude doctor` to see what it dropped.
+
+##
+
+
+
+Settings precedence
+
+When the same key appears in more than one place, Claude Code uses the value from the highest level that sets it. The stack below shows the levels, highest on top; a key at a higher level overrides the same key anywhere below it. In order, highest precedence first:
+
+ 1. **Managed settings** : settings your organization deploys, by a `managed-settings.json` file, an MDM policy, or [server-managed settings](</docs/en/server-managed-settings>) from the claude.ai console. Nothing you set overrides them: a key you pass with `--settings` doesn’t override the same managed key, and a flag such as `--model` picks only from the models your organization allows. A managed `model` sets the model each session starts with, and you can still switch with `/model`; the lock is [`availableModels`](</docs/en/settings-reference#availablemodels>), which constrains `/model`, `--model`, and the `model` key in your own files. When your organization delivers more than one managed source, the rules for [precedence within the managed tier](</docs/en/managed-settings#precedence-within-the-managed-tier>) say what Claude Code reads from each.
+ 2. **Command line arguments** : flags you pass when you start `claude` from a terminal, for one session; see Change a setting for one session. Claude Code merges JSON you pass with `--settings <file-or-json>` with your settings files by the same rules as the other levels: it takes a key you set here over the same key in local, project, or user settings, and keeps the lower-level value for a key you omit.
+ 3. **Project local settings** (`.claude/settings.local.json`): your personal settings for this project.
+ 4. **Shared project settings** (`.claude/settings.json`): settings your team checks into source control.
+ 5. **User settings** (`~/.claude/settings.json`): your personal settings for every project.
+
+Environment variables aren’t a level in this stack. When a behavior has both a shell variable and a settings key, which one applies is decided per pair, not by level: `ANTHROPIC_MODEL` exported in your shell applies over the `model` key from any file, while `ANTHROPIC_DEFAULT_MODEL` applies only when no file sets `model`. The [environment variables reference](</docs/en/env-vars#precedence>) says which keys have a pair and which one Claude Code reads first. An `env` block inside a settings file is an ordinary key and follows the levels above. For a few security-sensitive keys, Claude Code honors a stricter value from a lower level over a managed value; Exceptions to managed settings precedence lists them.
+
+###
+
+
+
+Lists merge instead of overriding
+
+When you set the same list key, such as `permissions.allow`, in more than one file, Claude Code combines the lists instead of picking one, so each file can add entries without removing another file’s. Two list keys follow their own rules:
+
+ * [`fallbackModel`](</docs/en/settings-reference#fallbackmodel>) is an ordered chain where position carries meaning, so Claude Code takes the whole value from the highest-precedence file that defines it.
+ * [`availableModels`](</docs/en/settings-reference#availablemodels>): when the [highest-precedence managed source](</docs/en/managed-settings#precedence-within-the-managed-tier>) defines it, Claude Code applies that list as-is and ignores entries you add in user, project, or local settings, unless an app that embeds Claude Code supplies its own model list; see Exceptions to managed settings precedence. Across non-managed scopes Claude Code merges the arrays as usual.
+
+###
+
+
+
+Precedence examples
+
+While Claude works, Claude Code shows a one-line tip under the spinner, such as “Use /config to change your default permission mode (including Plan Mode)”. Suppose you want those tips off, so you set [`spinnerTipsEnabled`](</docs/en/settings-reference#spinnertipsenabled>) to `false` in `~/.claude/settings.json`. Each scenario below is something that can turn them back on, and what you can do about it.
+
+####
+
+
+
+Team settings override personal settings
+
+Your team’s `.claude/settings.json` sets it to `true`. Claude Code uses the project value because shared project sits above user, so you see tips in that project and nowhere else. You can get your value back: add `"spinnerTipsEnabled": false` to `.claude/settings.local.json` in that project. Project local sits above shared project, so your sessions there stop showing tips and your teammates’ sessions don’t change.
+
+####
+
+
+
+Organization settings override everything
+
+Your organization’s managed settings set it to `true`. Nothing you put in user, project, or local settings turns tips off, and neither does `--settings`. Managed is the top level. You can’t get your value back. Run `/status` to see which managed source applies, and ask your administrator if the policy should change.
+
+####
+
+
+
+The command line overrides your files for one session
+
+You started the session with `claude --settings '{"spinnerTipsEnabled": true}'`. Command line sits above every file except managed, so that session shows tips even though your files say `false`. You get your value back on the next session; `--settings` lasts one session and doesn’t write to any file.
+
+####
+
+
+
+A flag or environment variable sets the same thing
+
+Some keys have a command line flag or an environment variable that overrides the settings value regardless of which file set it: `ANTHROPIC_MODEL` overrides the [`model`](</docs/en/settings-reference#model>) setting, and `--model` overrides both for a session. Whether you can get your value back depends on the key: unset the variable or drop the flag, and check the key’s entry on the [settings reference](</docs/en/settings-reference>) and the variable’s row on the [environment variables reference](</docs/en/env-vars>) for which one Claude Code uses.
+
+###
+
+
+
+Troubleshoot a setting that doesn’t apply
+
+When you set a key and Claude Code doesn’t behave as if you had, start with `/status` to see which files it loaded, then find your symptom below. [Debug your configuration](</docs/en/debug-your-config>) covers the wider checks, including a clean-configuration test.
+
+####
+
+
+
+A value you set is ignored
+
+Something else is setting the same key, or the file didn’t load:
+
+ * **A higher level sets it.** Another settings file, a `--settings` flag, or a managed source sets the key above yours; the stack says which. A flag or environment variable can also override the key on its own, decided key by key; the key’s entry on the [settings reference](</docs/en/settings-reference>) says which one Claude Code uses, and the [`env` entry](</docs/en/settings-reference#env>) covers a managed `env` value versus a shell export.
+ * **A security key keeps its strict value.** For a few keys Claude Code honors the restrictive value from any file, so a project `true` for [`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>) stays on; see Exceptions to managed settings precedence.
+ * **The file is broken.** Invalid JSON or a rejected value makes Claude Code skip the file or the entry; see Fix a broken settings file.
+
+####
+
+
+
+A managed change hasn’t reached you
+
+Managed sources reach a running session on the schedule in the [delivery table](</docs/en/managed-settings#choose-a-delivery-mechanism>), so restart the session first. If `/status` then names a different source than the one your administrator changed, a higher-priority source applies; [Which managed source Claude Code uses](</docs/en/managed-settings#which-managed-source-claude-code-uses>) gives the order.
+
+####
+
+
+
+A committed key doesn’t reach teammates
+
+Two things keep a key in `.claude/settings.json` from applying for everyone who clones it:
+
+ * **Claude Code ignores the key in a repository file.** Look for `User, local, or managed`, `User or managed`, `Managed`, or `Global config` in the Scope column of the [All settings](</docs/en/settings-reference#all-settings>) index; those keys never apply from the shared file, and `Global config` keys apply only from `~/.claude.json`.
+ * **The key waits for trust.** `permissions.allow` rules, `permissions.additionalDirectories`, `extraKnownMarketplaces`, and most [`env`](</docs/en/settings-reference#env>) values apply only after each teammate [trusts the folder](</docs/en/permissions#project-allow-rules-and-workspace-trust>). Until then they still see prompts and don’t get plugins from a marketplace the file declares. `deny` and `ask` rules apply right away.
+
+####
+
+
+
+Permission rules combine differently than you expected
+
+ * **You chose “Yes, and don’t ask again” on a permission prompt but still get prompted for the same tool.** That choice saved an `allow` rule to your local file, and an `allow` rule there doesn’t outrank an `ask` rule from a project or managed file; [how permission rules combine](</docs/en/permissions#settings-precedence>) explains the order. In the VS Code extension the approval card lets you pick the destination file, including the project’s shared file, which changes the rule for everyone; in the CLI, Claude Code writes only to your local file.
+ * **Your organization’s allow rules still apply alongside yours.** That’s expected: Claude Code merges [`permissions.allow`](</docs/en/settings-reference#permissions-allow>) across scopes, unless your organization sets [`allowManagedPermissionRulesOnly`](</docs/en/settings-reference#allowmanagedpermissionrulesonly>).
+
+###
+
+
+
+Exceptions to managed settings precedence
+
+For a few security-sensitive keys, Claude Code honors a restrictive value from a scope that otherwise couldn’t override managed settings. Find the key in this table to see which value it honors and from where.
+
+Key| Value Claude Code honors| Notes
---|---|---
-Matching source spellings| `owner/repo` form only. A git URL that clones the same repository doesn’t match| Any spelling, including git URLs that resolve to the same github.com repository
-Owner case| Case-sensitive, like exact-entry matching| Case-insensitive
-`ref`| Follows the exact-entry rules: an entry with a `ref` matches only sources with that exact ref, and an entry without one matches only sources that don’t specify a ref| An entry without a `ref` blocks all refs of the repositories it matches
-`path`| Looser than the exact-entry rules: an entry with a `path` requires that exact value, while an entry without one matches any path inside the repository| An entry without a `path` blocks all paths of the repositories it matches
-
-**Comparison with`extraKnownMarketplaces`**:
-
-Aspect| `strictKnownMarketplaces`| `extraKnownMarketplaces`
----|---|---
-**Purpose**| Organizational policy enforcement| Team convenience
-**Settings file**| `managed-settings.json` only| Any settings file
-**Behavior**| Blocks non-allowlisted additions| Auto-installs missing marketplaces
-**When enforced**| Before network/filesystem operations| After user trust prompt
-**Can be overridden**| No (highest precedence)| Yes (by higher precedence settings)
-**Source format**| Direct source object| Named marketplace with nested source
-**Use case**| Compliance, security restrictions| Onboarding, standardization
-
-**Format difference** : `strictKnownMarketplaces` uses direct source objects:
-
- {
- "strictKnownMarketplaces": [
- { "source": "github", "repo": "acme-corp/plugins" }
- ]
- }
-
-`extraKnownMarketplaces` requires named marketplaces:
-
- {
- "extraKnownMarketplaces": {
- "acme-tools": {
- "source": { "source": "github", "repo": "acme-corp/plugins" }
- }
- }
- }
-
-**Using both together** : `strictKnownMarketplaces` is a policy gate: it controls what users may add but does not register any marketplaces. To both restrict and pre-register a marketplace for all users, set both in `managed-settings.json`:
-
- {
- "strictKnownMarketplaces": [
- { "source": "github", "repo": "acme-corp/plugins" }
- ],
- "extraKnownMarketplaces": {
- "acme-tools": {
- "source": { "source": "github", "repo": "acme-corp/plugins" }
- }
- }
- }
-
-With only `strictKnownMarketplaces` set, users can still add an allowed marketplace manually via `/plugin marketplace add`. The official Anthropic marketplace is the only one Claude Code registers automatically, and only when the allowlist allows it. Automatic registration also misses some machines, most commonly non-interactive environments and machines where an earlier policy blocked the marketplace. To cover those machines, add the official marketplace to `extraKnownMarketplaces` too. **Important notes** :
-
- * Restrictions are checked before any network requests or filesystem operations
- * When blocked, users see clear error messages indicating the source is blocked by managed policy
- * The restriction is enforced on marketplace add and on plugin install, update, refresh, and auto-update. A marketplace added before the policy was set cannot be used to install or update plugins once its source no longer matches the allowlist
- * Managed settings have the highest precedence and cannot be overridden
-
-See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>) for user-facing documentation.
-
-####
-
-
-
-`strictPluginOnlyCustomization`
-
-**Managed settings only** : blocks skills, agents, hooks, and MCP servers from user and project sources, so they can only come from plugins or managed settings. Combine it with `strictKnownMarketplaces` to control the full customization supply chain: the marketplace allowlist controls which plugins users can install, and this setting blocks everything that doesn’t come from a plugin or from managed settings. The value is either `true` to lock all four surfaces, or an array naming the surfaces to lock:
-
- {
- "strictPluginOnlyCustomization": ["skills", "hooks"]
- }
-
-For each locked surface, Claude Code skips user-level and project-level sources and loads only plugin-provided and managed sources:
-
-Surface| Blocked when locked| Still loads
----|---|---
-`skills`| `~/.claude/skills/`, `.claude/skills/`| Plugin skills, bundled skills, skills in the managed policy directory
-`agents`| `~/.claude/agents/`, `.claude/agents/`| Plugin agents, built-in agents, agents in the managed policy directory
-`hooks`| Hooks in user, project, and local `settings.json`| Plugin hooks, hooks in managed settings
-`mcp`| Servers in `~/.claude.json` and `.mcp.json`| Plugin MCP servers, [`managed-mcp.json`](</docs/en/managed-mcp>) servers
-
-Surface names that a Claude Code version doesn’t recognize are ignored rather than failing the settings file, so you can add new surface names before all clients have updated.
-
-###
-
-
-
-Manage plugins
-
-Use the `/plugin` command to manage plugins interactively:
-
- * Browse available plugins from marketplaces
- * Install/uninstall plugins
- * Enable/disable plugins
- * View plugin details (skills, agents, hooks provided)
- * Add/remove marketplaces
-
-Learn more about the plugin system in the [plugins documentation](</docs/en/plugins>).
-
-##
-
-
-
-Environment variables
-
-Environment variables let you control Claude Code behavior without editing settings files. Any variable can also be configured in `settings.json` under the `env` key to apply it to every session or roll it out to your team. See the [environment variables reference](</docs/en/env-vars>) for the full list.
-
-##
-
-
-
-Tools available to Claude
-
-Claude Code has access to a set of tools for reading, editing, searching, running commands, and orchestrating subagents. Tool names are the exact strings you use in permission rules and hook matchers. See the [tools reference](</docs/en/tools-reference>) for the full list and Bash tool behavior details.
-
-##
-
-
-
-See also
-
- * [Permissions](</docs/en/permissions>): permission system, rule syntax, tool-specific patterns, and managed policies
- * [Authentication](</docs/en/authentication>): set up user access to Claude Code
- * [Debug your configuration](</docs/en/debug-your-config>): diagnose why a setting, hook, or MCP server isn’t taking effect
- * [Troubleshoot installation and login](</docs/en/troubleshoot-install>): installation, authentication, and platform issues
+[`disableClaudeAiConnectors`](</docs/en/settings-reference#disableclaudeaiconnectors>)| `true` from any scope| Honored even when a managed source sets `false`
+[`isolatePeerMachines`](</docs/en/settings-reference#isolatepeermachines>)| `true` from any scope| Honored even when a managed source sets `false`
+[`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>)| `false` from `.claude/settings.json` or `.claude/settings.local.json`| Honored even when a managed source sets `true`; a project or local `true` is ignored
+[`crossSessionInbound`](</docs/en/settings-reference#crosssessioninbound>)| A stricter value from `.claude/settings.json` or `.claude/settings.local.json`, on the `accept` < `hold` < `refuse` ladder| Honored over managed, `--settings`, and user values; a project or local value that isn’t stricter is ignored
+[`useAutoModeDuringPlan`](</docs/en/settings-reference#useautomodeduringplan>)| `false` from any managed source, `--settings`, `~/.claude/settings.json`, or `.claude/settings.local.json`| Honored even when the winning managed source sets `true`; a `false` in `.claude/settings.json` is ignored
+[`syncClaudeAiSkills`](</docs/en/settings-reference#syncclaudeaiskills>)| `false` from any managed source, `--settings`, `~/.claude/settings.json`, or `.claude/settings.local.json`| Honored even when the winning managed source sets `true`; a `false` in `.claude/settings.json` is ignored
+
+An app that runs Claude Code inside itself and sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](</docs/en/env-vars>) is also an exception. Claude Code takes that app’s model configuration over the `model`, `fallbackModel`, and `modelOverrides` keys from every managed source, and over the model-selection variables in a managed `env` block, such as `ANTHROPIC_MODEL` and the `ANTHROPIC_DEFAULT_*_MODEL` family. Claude Code keeps a managed [`availableModels`](</docs/en/settings-reference#availablemodels>) allowlist in force unless the app supplies its own.
+
+##
+
+
+
+Settings in cloud sessions
+
+A cloud session, on [Claude Code on the web](</docs/en/claude-code-on-the-web>) or from [`claude --cloud`](</docs/en/claude-code-on-the-web#from-terminal-to-web>), runs in a [cloud environment](</docs/en/cloud-environments>) on a fresh clone of your repository, not on your machine. That changes which settings reach it:
+
+ * **Shared project settings** (`.claude/settings.json`): read, because the file is part of the clone. Commit a setting there to apply it in cloud sessions.
+ * **User and project local settings** (`~/.claude/settings.json` and `.claude/settings.local.json`): not read. Both stay on your machine, and the local file isn’t in the clone.
+ * **Managed settings** : only [server-managed settings](</docs/en/server-managed-settings>) reach a cloud session; a `managed-settings.json` file or MDM profile on your device doesn’t. A [self-hosted environment](</docs/en/self-hosted-environments>) reads the managed settings file in its runner image only when server-managed settings deliver no keys; see [settings precedence](</docs/en/server-managed-settings#settings-precedence>) on that page.
+ * **`/config`** : on the web, opens the Claude Code section of your claude.ai settings instead of changing a value. To change a setting for a cloud session, set an [environment variable](</docs/en/cloud-environments#set-environment-variables>) on the environment or commit the key to the repository’s `.claude/settings.json`.
+
+[What carries over from your setup](</docs/en/cloud-environments#what-carries-over-from-your-setup>) lists the rest: `CLAUDE.md`, skills, MCP servers, plugins, and credentials.
+
+##
+
+
+
+What’s next
+
+ * [Settings reference](</docs/en/settings-reference>): every key, with where you set it and an example
+ * [Example settings files](</docs/en/settings-example>): a personal file, a team file, and an organization’s managed file
+ * [Configure permissions](</docs/en/permissions>): allow, ask, and deny rules, and what Claude Code runs without asking
+ * [Environment variables](</docs/en/env-vars>): the variables Claude Code reads and the `env` block
+ * [Debug your configuration](</docs/en/debug-your-config>): when a setting doesn’t apply
+ * [Claude directory reference](</docs/en/claude-directory>): every file Claude Code reads, including subagents, MCP servers, plugins, and `CLAUDE.md`
Show diff (388 lines)
--- a/settings-example.md
+++ b/settings-example.md
@@ -0,0 +1,385 @@
+This page holds three example `settings.json` files, one for each place you save a setting:
+
+ * A developer’s `~/.claude/settings.json`
+ * A team’s `.claude/settings.json`, committed to the repository
+ * An organization’s `managed-settings.json`
+
+Each one is a plausible file for that reader, so you can see the shape and copy the parts you want. None of them is a recommended baseline. Every value comes from the key’s entry on the [settings reference](</docs/en/settings-reference>), which has its type, default, and where it can be set. Each example has two tabs. **Copyable settings file** is the file as you’d save it. **What each key does** is the same file with a comment above each key; Claude Code doesn’t accept comments in a settings file, so copy from the first tab.
+
+##
+
+
+
+Your own settings
+
+One developer’s personal settings. It picks a model and effort, adjusts the terminal, and pre-approves a read-only command and one file read. Everything not listed keeps its default. A file like this goes in `~/.claude/settings.json`, where it applies to every project you open.
+
+ * Copyable settings file
+
+ * What each key does
+
+Save this as `~/.claude/settings.json`. It’s valid JSON with no comments, so you can paste it as is and delete the keys you don’t want.
+
+~/.claude/settings.json
+
+ {
+ "model": "claude-sonnet-5",
+ "effortLevel": "xhigh",
+ "editorMode": "vim",
+ "theme": "light-daltonized",
+ "statusLine": {
+ "type": "command",
+ "command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'",
+ "padding": 2
+ },
+ "spinnerTipsEnabled": false,
+ "preferredNotifChannel": "terminal_bell",
+ "permissions": {
+ "allow": [
+ "Bash(git diff *)",
+ "Read(~/.zshrc)"
+ ]
+ },
+ "autoUpdatesChannel": "stable",
+ "cleanupPeriodDays": 20
+ }
+
+The same file with a comment above each key. Read it here; copy from the other tab, because Claude Code doesn’t accept comments in a settings file.
+
+~/.claude/settings.json
+
+ {
+ // Start every session on Sonnet 5
+ "model": "claude-sonnet-5",
+ // Reason more deeply than the default high level; /effort saves a new level, and --effort overrides it for one session
+ "effortLevel": "xhigh",
+ // Vim keybindings in the prompt
+ "editorMode": "vim",
+ // The colorblind-friendly light theme
+ "theme": "light-daltonized",
+ // A status line below the prompt: model name and context used
+ "statusLine": {
+ "type": "command",
+ "command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'",
+ "padding": 2
+ },
+ // Hide the tips that rotate under the spinner
+ "spinnerTipsEnabled": false,
+ // Ring the terminal bell for notifications, such as a finished task or a waiting permission prompt
+ "preferredNotifChannel": "terminal_bell",
+ // Let Claude Code run git diff and read your .zshrc without asking
+ "permissions": {
+ "allow": [
+ "Bash(git diff *)",
+ "Read(~/.zshrc)"
+ ]
+ },
+ // Take updates from the stable channel
+ "autoUpdatesChannel": "stable",
+ // Delete session transcripts and other local session data older than 20 days
+ "cleanupPeriodDays": 20
+ }
+
+##
+
+
+
+A team’s shared settings
+
+One team’s shared settings, committed to the repository so everyone who clones it gets the same permissions, hooks, telemetry, and plugin marketplace. Save a file like this at `.claude/settings.json` at the top of the repository. Three things to know before you commit one:
+
+ * **Cloud sessions read it too.** A [cloud session](</docs/en/settings#settings-in-cloud-sessions>) on Claude Code on the web starts from a clone of the repository, so the committed file applies there as well.
+ * **Allow rules wait for trust.** Allow rules and `extraKnownMarketplaces` entries take effect after each person [trusts this folder itself](</docs/en/permissions#project-allow-rules-and-workspace-trust>), not only a parent folder; deny and ask rules apply in every session, trusted or not.
+ * **The hook is a script in the repo.** This file’s hook runs `.claude/hooks/block-rm.sh`; [How a hook resolves](</docs/en/hooks#how-a-hook-resolves>) walks through writing it.
+
+ * Copyable settings file
+
+ * What each key does
+
+Save this as `.claude/settings.json` at the top of the repository and commit it. It’s valid JSON with no comments, so you can paste it as is and delete the keys you don’t want.
+
+.claude/settings.json
+
+ {
+ "permissions": {
+ "allow": [
+ "Bash(npm run *)"
+ ],
+ "ask": [
+ "Bash(git push *)"
+ ],
+ "deny": [
+ "Read(./.env)",
+ "Read(./.env.*)",
+ "Read(./secrets/**)"
+ ]
+ },
+ "env": {
+ "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
+ "OTEL_METRICS_EXPORTER": "otlp",
+ "OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",
+ "OTEL_EXPORTER_OTLP_ENDPOINT": "http://collector.example.com:4317"
+ },
+ "hooks": {
+ "PreToolUse": [
+ {
+ "matcher": "Bash",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh"
+ }
+ ]
+ }
+ ]
+ },
+ "extraKnownMarketplaces": {
+ "acme-tools": {
+ "source": {
+ "source": "github",
+ "repo": "acme-corp/claude-plugins"
+ }
+ }
+ },
+ "enabledPlugins": {
+ "code-formatter@acme-tools": true
+ },
+ "sandbox": {
+ "enabled": true,
+ "filesystem": {
+ "allowWrite": [
+ "/tmp/build"
+ ]
+ },
+ "network": {
+ "allowedDomains": [
+ "registry.npmjs.org",
+ "*.example.com"
+ ]
+ }
+ },
+ "plansDirectory": "./plans"
+ }
+
+The same file with a comment above each key. Read it here; copy from the other tab, because Claude Code doesn’t accept comments in a settings file.
+
+.claude/settings.json
+
+ {
+ "permissions": {
+ // Run npm scripts without asking
+ "allow": [
+ "Bash(npm run *)"
+ ],
+ // Always confirm before pushing
+ "ask": [
+ "Bash(git push *)"
+ ],
+ // Never read env files or the secrets folder
+ "deny": [
+ "Read(./.env)",
+ "Read(./.env.*)",
+ "Read(./secrets/**)"
+ ]
+ },
+ // Send OpenTelemetry metrics to the team's collector over gRPC; replace the endpoint with your collector's URL
+ "env": {
+ "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
+ "OTEL_METRICS_EXPORTER": "otlp",
+ "OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",
+ "OTEL_EXPORTER_OTLP_ENDPOINT": "http://collector.example.com:4317"
+ },
+ // Before every Bash command, run a script in the repo that can block it
+ "hooks": {
+ "PreToolUse": [
+ {
+ "matcher": "Bash",
+ "hooks": [
+ {
+ "type": "command",
+ "command": "${CLAUDE_PROJECT_DIR}/.claude/hooks/block-rm.sh"
+ }
+ ]
+ }
+ ]
+ },
+ // Register the team's plugin marketplace on every clone
+ "extraKnownMarketplaces": {
+ "acme-tools": {
+ "source": {
+ "source": "github",
+ "repo": "acme-corp/claude-plugins"
+ }
+ }
+ },
+ // Enable one plugin from that marketplace; a plugin from an external source such as a GitHub repository still needs each person to install it once
+ "enabledPlugins": {
+ "code-formatter@acme-tools": true
+ },
+ // Sandbox commands: writable build dir; npm and example.com pre-allowed, other hosts still prompt
+ "sandbox": {
+ "enabled": true,
+ "filesystem": {
+ "allowWrite": [
+ "/tmp/build"
+ ]
+ },
+ "network": {
+ "allowedDomains": [
+ "registry.npmjs.org",
+ "*.example.com"
+ ]
+ }
+ },
+ // Keep plan files inside the repo
+ "plansDirectory": "./plans"
+ }
+
+##
+
+
+
+An organization’s managed settings
+
+A `managed-settings.json` file that shows the shape of the managed keys, with one plausible value for each. It isn’t a recommended policy: pick the keys that match your own requirements and set your own values. The example sets these keys:
+
+ * `forceLoginMethod` and `forceLoginOrgUUID` pin the login method and organization
+ * `availableModels` and `enforceAvailableModels` restrict which models sessions can use
+ * `permissions.deny` blocks two file reads and `curl`, and `disableBypassPermissionsMode` removes the bypass permission mode
+ * `allowManagedPermissionRulesOnly` and `allowManagedMcpServersOnly` make the managed permission and MCP allowlists the only ones that apply
+ * `allowedMcpServers` pins the MCP server by URL
+ * `strictKnownMarketplaces` allows one plugin marketplace
+ * `sandbox` sandboxes commands with a fixed network allowlist and no unsandboxed retry
+ * `requiredMinimumVersion` sets a minimum Claude Code version
+ * `cleanupPeriodDays` shortens retention of session transcripts and other local data to seven days
+ * `companyAnnouncements` shows a message at startup
+
+Administrators deploy a file like this as `managed-settings.json`, or the same JSON through MDM or [server-managed settings](</docs/en/server-managed-settings>). One deployed file applies to every machine or account it reaches. To give a group different values, deploy a different file or profile to that group, since [server-managed settings don’t support per-group policy yet](</docs/en/server-managed-settings#current-limitations>).
+
+ * Copyable settings file
+
+ * What each key does
+
+Deploy this as `managed-settings.json`, or the same JSON through MDM or the claude.ai console. It’s valid JSON with no comments; replace the example organization UUID, server URL, and marketplace with your own and delete the keys you don’t want.
+
+managed-settings.json
+
+ {
+ "forceLoginMethod": "claudeai",
+ "forceLoginOrgUUID": [
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ ],
+ "availableModels": [
+ "opus",
+ "sonnet"
+ ],
+ "enforceAvailableModels": true,
+ "permissions": {
+ "deny": [
+ "Bash(curl *)",
+ "Read(./.env)",
+ "Read(./secrets/**)"
+ ],
+ "disableBypassPermissionsMode": "disable"
+ },
+ "allowManagedPermissionRulesOnly": true,
+ "allowedMcpServers": [
+ {
+ "serverUrl": "https://api.githubcopilot.com/*"
+ }
+ ],
+ "allowManagedMcpServersOnly": true,
+ "strictKnownMarketplaces": [
+ {
+ "source": "github",
+ "repo": "acme-corp/approved-plugins"
+ }
+ ],
+ "sandbox": {
+ "enabled": true,
+ "failIfUnavailable": true,
+ "allowUnsandboxedCommands": false,
+ "network": {
+ "allowedDomains": [
+ "registry.npmjs.org",
+ "github.com"
+ ],
+ "allowManagedDomainsOnly": true
+ }
+ },
+ "requiredMinimumVersion": "2.1.150",
+ "cleanupPeriodDays": 7,
+ "companyAnnouncements": [
+ "Welcome to Acme Corp! Review our code guidelines at docs.example.com"
+ ]
+ }
+
+The same file with a comment above each key. Read it here; copy from the other tab, because Claude Code doesn’t accept comments in a settings file.
+
+managed-settings.json
+
+ {
+ // Only claude.ai logins, and only in this organization
+ "forceLoginMethod": "claudeai",
+ "forceLoginOrgUUID": [
+ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
+ ],
+ // Only Opus and Sonnet models; with enforceAvailableModels, the Default option obeys the list too
+ "availableModels": [
+ "opus",
+ "sonnet"
+ ],
+ "enforceAvailableModels": true,
+ "permissions": {
+ // Block curl, the project's .env file, and its secrets folder on every machine
+ "deny": [
+ "Bash(curl *)",
+ "Read(./.env)",
+ "Read(./secrets/**)"
+ ],
+ // Remove the bypass-permissions mode from every session
+ "disableBypassPermissionsMode": "disable"
+ },
+ // Only managed permission rules apply
+ "allowManagedPermissionRulesOnly": true,
+ // Only the GitHub MCP server, matched by URL rather than by name, since a user can
+ // name any server "github". Servers that don't match don't load, which includes every
+ // stdio server when the list has only URL entries; the lock below makes this managed
+ // list the only allowlist that counts
+ "allowedMcpServers": [
+ {
+ "serverUrl": "https://api.githubcopilot.com/*"
+ }
+ ],
+ "allowManagedMcpServersOnly": true,
+ // Plugins can come only from this marketplace
+ "strictKnownMarketplaces": [
+ {
+ "source": "github",
+ "repo": "acme-corp/approved-plugins"
+ }
+ ],
+ // Sandbox every command, refuse to start if the sandbox can't be set up, and
+ // never let a blocked command retry outside the sandbox; network limited to
+ // npm and GitHub, and users can't add domains
+ "sandbox": {
+ "enabled": true,
+ "failIfUnavailable": true,
+ "allowUnsandboxedCommands": false,
+ "network": {
+ "allowedDomains": [
+ "registry.npmjs.org",
+ "github.com"
+ ],
+ "allowManagedDomainsOnly": true
+ }
+ },
+ // Refuse to start on versions older than 2.1.150
+ "requiredMinimumVersion": "2.1.150",
+ // Delete session transcripts and other local session data after 7 days
+ "cleanupPeriodDays": 7,
+ // A message every user sees at startup
+ "companyAnnouncements": [
+ "Welcome to Acme Corp! Review our code guidelines at docs.example.com"
+ ]
+ }
Show diff (5648 lines)
--- a/settings-reference.md
+++ b/settings-reference.md
@@ -0,0 +1,5645 @@
+This reference page lists each key Claude Code reads from a settings file, plus the short group of keys it keeps in `~/.claude.json` instead. To pick a file, or check precedence, start with [Claude Code settings](</docs/en/settings>).
+
+##
+
+
+
+All settings
+
+Every key below links to its entry. Scope lists the [files](</docs/en/settings#settings-files-and-who-they-affect>) it can go in: `User` is `~/.claude/settings.json`, `Project` is `.claude/settings.json`, `Local` is `.claude/settings.local.json`, and `Managed` is [what your organization deploys](</docs/en/managed-settings>). `Any file` means all four, and `Global config` means `~/.claude.json`.
+
+Key| Description| Topic| Scope
+---|---|---|---
+`advisorModel`| Pick which model answers when Claude asks the [advisor tool](</docs/en/advisor>)| Model and responses| Any file
+`agent`| Start every session as a named [subagent](</docs/en/sub-agents>) with its prompt, tools, and model| Agents, sessions, and worktrees| Any file
+`agentPushNotifEnabled`| Let Claude send a [push notification to your phone](</docs/en/remote-control#mobile-push-notifications>) when it decides to| Remote, desktop, and notifications| Any file
+`allowAllClaudeAiMcps`| Load [claude.ai connectors](</docs/en/mcp>) alongside a deployed [`managed-mcp.json`](</docs/en/managed-mcp#exclusive-control-with-managed-mcp-json>)| MCP| Managed
+`allowedChannelPlugins`| Replace the default allowlist of [channel plugins](</docs/en/channels#restrict-which-channel-plugins-can-run>) that can push messages| Plugins and skills| Managed
+`allowedHttpHookUrls`| Limit which URLs [HTTP hooks](</docs/en/hooks>) can target| Hooks and automation| Any file
+`allowedMcpServers`| Allowlist which [MCP servers](</docs/en/mcp>) people can use| MCP| Any file
+`allowManagedHooksOnly`| Run only the [hooks](</docs/en/hooks>) your organization deploys| Hooks and automation| Managed
+`allowManagedMcpServersOnly`| Make the managed [MCP](</docs/en/mcp>) allowlist the only one that applies| MCP| Managed
+`allowManagedPermissionRulesOnly`| Make [managed settings](</docs/en/managed-settings>) the only source of [permission rules](</docs/en/permissions#managed-settings>)| Permission settings| Managed
+`alwaysThinkingEnabled`| Turn [extended thinking](</docs/en/model-config#extended-thinking>) off for every session| Model and responses| Any file
+`apiKeyHelper`| Generate the [API credential](</docs/en/authentication#credential-management>) with your own command| Authentication and providers| Any file
+`askUserQuestionTimeout`| Let an unanswered question [auto-continue](</docs/en/tools-reference#question-auto-continue-timeout>) after idle time| Interface and terminal| User or managed
+`attribution`| Customize the attribution Claude Code adds to commits and pull requests| Git and attribution| Any file
+`attribution.commit`| Change or hide the trailer Claude Code adds to commits| Git and attribution| Any file
+`attribution.pr`| Change or hide the attribution line in pull request descriptions| Git and attribution| Any file
+`attribution.sessionUrl`| Omit the claude.ai session link from [cloud](</docs/en/claude-code-on-the-web>) and [Remote Control](</docs/en/remote-control>) commits| Git and attribution| Any file
+`autoCompactEnabled`| Turn [automatic compaction](</docs/en/context-window>) off or on| Memory and context| Any file
+`autoCompactWindow`| Set how full the context gets before Claude Code [compacts](</docs/en/context-window>)| Memory and context| Any file
+`autoConnectIde`| Connect to a running [VS Code](</docs/en/vs-code>) or [JetBrains](</docs/en/jetbrains#from-external-terminals>) IDE automatically from an external terminal| Global config settings| Global config
+`autoInstallIdeExtension`| Turn off automatic install of the [IDE extension](</docs/en/vs-code#install-the-extension>) from a VS Code terminal| Global config settings| Global config
+`autoMemoryDirectory`| Store [auto memory](</docs/en/memory#auto-memory>) in a directory you choose| Memory and context| Any file
+`autoMemoryEnabled`| Turn [auto memory](</docs/en/memory#auto-memory>) off or on| Memory and context| Any file
+`autoMode`| Add your own allow and deny rules to the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier| Permission settings| User or managed
+`autoMode.classifyAllShell`| Send every shell command through the [auto mode classifier](</docs/en/permission-modes#what-the-classifier-blocks-by-default>), even ones a narrow allow rule matches| Permission settings| User or managed
+`autoScrollEnabled`| [Follow new output](</docs/en/fullscreen#auto-follow>) to the bottom in fullscreen rendering| Interface and terminal| Any file
+`autoUpdatesChannel`| Follow the stable [release channel](</docs/en/setup#configure-release-channel>) instead of latest| Updates and versioning| Any file
+`availableModels`| [Restrict which models](</docs/en/model-config#restrict-model-selection>) people can pick| Model and responses| Any file
+`awaySummaryEnabled`| Turn off the [session recap](</docs/en/interactive-mode#session-recap>) shown when you come back to the terminal| Remote, desktop, and notifications| Any file
+`awsAuthRefresh`| Refresh expired [Bedrock credentials](</docs/en/amazon-bedrock#advanced-credential-configuration>) in `.aws` with your own command| Authentication and providers| Any file
+`awsCredentialExport`| Supply [Bedrock credentials](</docs/en/amazon-bedrock#advanced-credential-configuration>) as JSON from your own command| Authentication and providers| Any file
+`axScreenReader`| Render [screen-reader friendly output](</docs/en/accessibility>)| Interface and terminal| Any file
+`blockedMarketplaces`| Block [plugin marketplace](</docs/en/plugin-marketplaces>) sources for your organization| Plugins and skills| Managed
+`browserExternalPageTools`| Keep Claude’s tools off external pages in the [desktop](</docs/en/desktop>) Browser pane| Tools| Managed
+`channelsEnabled`| Allow [channels](</docs/en/channels#enable-channels-for-your-organization>) for your organization| Plugins and skills| Managed
+`claudeMd`| Inject organization-wide [CLAUDE.md](</docs/en/memory#deploy-organization-wide-claude-md>) instructions from managed settings| Memory and context| Managed
+`claudeMdExcludes`| Skip specific [CLAUDE.md](</docs/en/memory#exclude-specific-claude-md-files>) files when memory loads| Memory and context| Any file
+`cleanupPeriodDays`| Choose how many days Claude Code keeps [transcripts](</docs/en/data-usage#data-retention>) before deleting them| Privacy and telemetry| Any file
+`companyAnnouncements`| Show your organization’s announcements at startup| Interface and terminal| Any file
+`crossSessionInbound`| Choose whether Claude Code delivers [messages from your other sessions](</docs/en/cross-session-messaging#control-inbound-messages>), shows a notice without delivering them, or refuses them| Agents, sessions, and worktrees| Any file
+`defaultShell`| Choose whether Bash or PowerShell runs the shell commands you type with the [`!` prefix](</docs/en/interactive-mode#shell-mode-with-prefix>)| Interface and terminal| Any file
+`deniedMcpServers`| Block specific [MCP servers](</docs/en/mcp>) in every scope| MCP| Any file
+`dialogExpiry`| Set how long Claude Code waits for [Remote Control](</docs/en/remote-control>) or an SDK host to answer a forwarded dialog before it cancels the dialog| Interface and terminal| User or managed
+`diffTool`| Choose whether Claude’s proposed file changes open in the [VS Code](</docs/en/vs-code>) or [JetBrains](</docs/en/jetbrains#features>) diff viewer or stay in the terminal| Global config settings| Global config
+`disableAgentView`| Turn off background agents and [agent view](</docs/en/agent-view>)| Agents, sessions, and worktrees| Any file
+`disableAllHooks`| Turn off [hooks](</docs/en/hooks>), a custom [status line](</docs/en/statusline>), and a custom [`@` file suggestion](</docs/en/interactive-mode#quick-commands>) command at once| Hooks and automation| Any file
+`disableArtifact`| Turn the [Artifact tool](</docs/en/artifacts>) off for everyone; use `enableArtifact` for yourself| Remote, desktop, and notifications| Any file
+`disableAutoMode`| Remove [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from the permission mode cycle| Permission settings| Any file
+`disableBrowserExternalNavigation`| Limit the [desktop](</docs/en/desktop>) Browser pane to localhost for people and Claude| Tools| Managed
+`disableBundledSkills`| Turn off the [skills](</docs/en/skills#bundled-skills>) and [workflows](</docs/en/workflows>) included with Claude Code| Plugins and skills| Any file
+`disableClaudeAiConnectors`| Turn off [claude.ai connectors](</docs/en/mcp#disable-claude-ai-connectors>) so Claude Code doesn’t fetch them| MCP| Any file
+`disableCommandPluginSources`| Block [plugins](</docs/en/plugins>) that install by running a marketplace-declared command| Plugins and skills| Managed
+`disableDeepLinkRegistration`| Stop Claude Code from registering the [`claude-cli://` handler](</docs/en/deep-links>)| Remote, desktop, and notifications| Any file
+`disabledMcpjsonServers`| Reject specific servers from a project’s [`.mcp.json`](</docs/en/mcp#project-scope>)| MCP| Any file
+`disableMobileSimulatorTools`| Block Claude’s tools in the [desktop](</docs/en/desktop>) iOS Simulator pane| Tools| Managed
+`disableRemoteControl`| Turn off [Remote Control](</docs/en/remote-control>) everywhere it can start| Remote, desktop, and notifications| Any file
+`disableSideloadFlags`| Reject the CLI flags that sideload [plugins](</docs/en/plugins>), [subagents](</docs/en/sub-agents>), and [MCP servers](</docs/en/mcp>)| Enterprise and managed settings| Managed
+`disableSkillShellExecution`| Stop [skills](</docs/en/skills>) and custom commands from running inline shell| Plugins and skills| Any file
+`disableWorkflows`| Turn [dynamic workflows](</docs/en/workflows>) off for everyone; use `enableWorkflows` for yourself| Hooks and automation| Any file
+`editorMode`| Use [vim key bindings](</docs/en/interactive-mode#vim-editor-mode>) in the input prompt| Interface and terminal| Any file
+`effortLevel`| Save the [`/effort` level](</docs/en/model-config#adjust-effort-level>) so future sessions reason more or less deeply| Model and responses| Any file
+`emojiCompletionEnabled`| Turn off [`:shortcode:` emoji suggestions and replacement](</docs/en/interactive-mode#emoji-shortcodes>) in the prompt input| Interface and terminal| Any file
+`enableAllProjectMcpServers`| Approve every server in project [`.mcp.json`](</docs/en/mcp#project-server-approvals-and-workspace-trust>) files without a prompt| MCP| Any file
+`enableArtifact`| Turn the [Artifact tool](</docs/en/artifacts>) on or off for yourself| Remote, desktop, and notifications| User or managed
+`enabledMcpjsonServers`| Approve specific servers from a project’s [`.mcp.json`](</docs/en/mcp#project-server-approvals-and-workspace-trust>)| MCP| Any file
+`enabledPlugins`| Turn individual [plugins](</docs/en/plugins>) on or off per scope| Plugins and skills| Any file
+`enableWorkflows`| Turn [dynamic workflows](</docs/en/workflows>) on or off against your plan’s default| Hooks and automation| Any file
+`enforceAvailableModels`| Keep the [`/model` Default choice](</docs/en/model-config#enforce-the-allowlist-for-the-default-model>) inside your `availableModels` allowlist| Model and responses| Any file
+`env`| Set [environment variables](</docs/en/env-vars#in-settings-files>) for every session and its subprocesses| Memory and context| Any file
+`externalEditorContext`| Show Claude’s last response as comments when you press [Ctrl+G](</docs/en/interactive-mode#general-controls>) to edit| Global config settings| Global config
+`extraKnownMarketplaces`| Register [marketplaces](</docs/en/plugin-marketplaces>) for a repository or an organization| Plugins and skills| Any file
+`fallbackModel`| Name [backup models](</docs/en/model-config#fallback-model-chains>) for when the primary is overloaded| Model and responses| Any file
+`fastMode`| Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available| Model and responses| Any file
+`fastModePerSessionOptIn`| Require people to turn [fast mode](</docs/en/fast-mode>) on each session| Model and responses| Any file
+`feedbackSurveyRate`| Change how often the [session quality survey](</docs/en/data-usage#session-quality-surveys>) appears| Privacy and telemetry| Any file
+`fileCheckpointingEnabled`| Turn off or on the file snapshots that [`/rewind`](</docs/en/checkpointing>) restores| Memory and context| Any file
+`fileSuggestion`| Supply [`@` file autocomplete](</docs/en/interactive-mode#quick-commands>) from your own command| Interface and terminal| Any file
+`footerLinksRegexes`| Make issue or review IDs in output into [clickable links](</docs/en/statusline#clickable-links>) below the input box| Interface and terminal| User or managed
+`forceLoginGatewayUrl`| Set the [gateway URL](</docs/en/claude-apps-gateway#set-the-gateway-url>) the login screen connects to| Authentication and providers| Managed
+`forceLoginMethod`| [Restrict login](</docs/en/authentication#restrict-login-to-your-organization>) to claude.ai, Claude Console, or a [cloud gateway](</docs/en/claude-apps-gateway>)| Authentication and providers| Any file
+`forceLoginOrgUUID`| [Pin claude.ai logins to your organization](</docs/en/authentication#restrict-login-to-your-organization>); only a managed source enforces it| Authentication and providers| Any file
+`forceRemoteSettingsRefresh`| Block startup until [server-managed settings](</docs/en/server-managed-settings>) are freshly fetched| Enterprise and managed settings| Managed
+`gcpAuthRefresh`| Refresh [Google Cloud credentials](</docs/en/google-vertex-ai#advanced-credential-configuration>) with your own command| Authentication and providers| Any file
+`hooks`| Run your own commands as [hooks](</docs/en/hooks>) at points in Claude Code’s lifecycle| Hooks and automation| Any file
+`httpHookAllowedEnvVars`| Limit which env vars [HTTP hooks](</docs/en/hooks>) can put in headers| Hooks and automation| Any file
+`includeCoAuthoredBy`| Deprecated; use `attribution` to hide or change commit and PR attribution| Git and attribution| Any file
+`includeGitInstructions`| Remove the built-in commit and PR instructions from the [system prompt](</docs/en/sub-agents#what-loads-at-startup>)| Git and attribution| Any file
+`inputNeededNotifEnabled`| Get a [push notification](</docs/en/remote-control#mobile-push-notifications>) when Claude is waiting on you| Remote, desktop, and notifications| Any file
+`isolatePeerMachines`| Ask you before Claude [messages one of your sessions on another machine](</docs/en/cross-session-messaging#require-approval-for-cross-machine-messages>)| Agents, sessions, and worktrees| Any file
+`keybindingFlavor`| Make `Ctrl+W` [delete back to the previous whitespace](</docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>), as Bash does| Interface and terminal| Any file
+`language`| Have Claude respond in a language other than English| Model and responses| Any file
+`minimumVersion`| Keep [auto-updates](</docs/en/setup#pin-a-minimum-version>) from installing anything below a version| Updates and versioning| Any file
+`model`| Change the [model](</docs/en/model-config#set-a-default-model-for-new-sessions>) Claude Code starts with| Model and responses| Any file
+`modelOverrides`| [Map model IDs](</docs/en/model-config#override-model-ids-per-version>) to your provider’s IDs, such as Bedrock ARNs| Model and responses| Any file
+`otelHeadersHelper`| Generate rotating [OpenTelemetry](</docs/en/monitoring-usage#dynamic-headers>) headers with your own command| Authentication and providers| Any file
+`outputStyle`| Change Claude’s role, tone, and output format with an [output style](</docs/en/output-styles>)| Model and responses| Any file
+`parentSettingsBehavior`| Apply or drop restrictions an [SDK or IDE host](</docs/en/managed-settings#let-an-embedding-host-add-policy>) passes when you deploy [managed settings](</docs/en/managed-settings>)| Enterprise and managed settings| Managed
+`permissionExplainerEnabled`| Turn off the Ctrl+E command explanation on shell [permission prompts](</docs/en/permissions#permission-system>)| Global config settings| Global config
+`permissions`| Set allow, ask, and deny rules and the starting [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.defaultMode`| Set the [permission mode](</docs/en/permission-modes#which-mode-a-session-starts-in>) new sessions start in| Permission settings| Any file
+`permissions.deny`| Block listed [tool uses](</docs/en/permissions#permission-rule-syntax>), including reads of files that hold secrets| Permission settings| Any file
+`permissions.disableBypassPermissionsMode`| Prevent anyone from entering [bypassPermissions mode](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| Permission settings| Any file
+`plansDirectory`| Choose where [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>) writes plan files| Memory and context| Any file
+`pluginConfigs`| Store the answers you gave a [plugin](</docs/en/plugins>)’s configuration dialog| Plugins and skills| User or managed
+`pluginSuggestionMarketplaces`| Choose which [marketplaces](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>) can surface plugin install suggestions in `/plugin`| Plugins and skills| Managed
+`pluginTrustMessage`| Add your own text to the [plugin](</docs/en/plugins>) trust warning| Plugins and skills| Managed
+`policyHelper`| Run an executable that computes [managed settings](</docs/en/managed-settings#compute-the-policy-with-a-helper-program>) at startup| Enterprise and managed settings| Managed
+`policyHelper.path`| Name the [helper executable](</docs/en/managed-settings#compute-the-policy-with-a-helper-program>) Claude Code runs| Enterprise and managed settings| Managed
+`policyHelper.refreshIntervalMs`| Re-run the [helper](</docs/en/managed-settings#compute-the-policy-with-a-helper-program>) in the background on an interval| Enterprise and managed settings| Managed
+`policyHelper.timeoutMs`| Set how long Claude Code waits for the [helper](</docs/en/managed-settings#compute-the-policy-with-a-helper-program>)| Enterprise and managed settings| Managed
+`preferredNotifChannel`| Choose a [terminal bell or desktop notification](</docs/en/terminal-config#get-a-terminal-bell-or-notification>) for task completion| Remote, desktop, and notifications| Any file
+`prefersReducedMotion`| [Reduce or turn off](</docs/en/accessibility#accessibility-settings>) spinner, shimmer, and flash animations| Interface and terminal| Any file
+`processWrapper`| Run Claude Code’s background processes through a [corporate launcher](</docs/en/corporate-launcher>) on macOS and Linux| Agents, sessions, and worktrees| User or managed
+`promptSuggestionEnabled`| Hide the grayed-out [prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>) in the input box| Interface and terminal| Any file
+`prUrlTemplate`| Point PR links at an internal code-review tool instead of github.com| Git and attribution| Any file
+`remote.defaultEnvironmentId`| Pick the default [cloud environment](</docs/en/cloud-environments>) for `claude --cloud`; a self-hosted `ccpool_` ID is read only from user and managed settings and `--settings`| Remote, desktop, and notifications| Any file
+`remoteControlAtStartup`| Connect [Remote Control](</docs/en/remote-control#enable-remote-control-for-all-sessions>) automatically when a session starts| Remote, desktop, and notifications| Any file
+`requiredMaximumVersion`| [Refuse to start](</docs/en/setup#pin-a-minimum-version>) on a version newer than your organization allows| Updates and versioning| Managed
+`requiredMinimumVersion`| [Refuse to start](</docs/en/setup#pin-a-minimum-version>) on a version older than your organization requires| Updates and versioning| Managed
+`respectGitignore`| Keep gitignored files out of the [`@` file picker](</docs/en/interactive-mode#quick-commands>)| Interface and terminal| Any file
+`respondToBashCommands`| Stop Claude from responding after a [`!` shell command](</docs/en/interactive-mode#shell-mode-with-prefix>) runs| Interface and terminal| Any file
+`sandbox`| [Isolate Bash commands](</docs/en/sandboxing>) from your filesystem and network on macOS, Linux, and WSL2| Sandbox settings| Any file
+`sandbox.allowAppleEvents`| Let [sandboxed](</docs/en/sandboxing>) commands send Apple Events on macOS| Sandbox settings| User or managed
+`sandbox.allowUnsandboxedCommands`| Let Claude retry a blocked command outside the [sandbox](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>), or forbid it| Sandbox settings| Any file
+`sandbox.autoAllowBashIfSandboxed`| Run [sandboxed](</docs/en/sandboxing#auto-allow-mode>) commands without a permission prompt| Sandbox settings| Any file
+`sandbox.bwrapPath`| Point the [sandbox](</docs/en/sandboxing>) at a bubblewrap binary outside `PATH`| Sandbox settings| Managed
+`sandbox.credentials`| Hide or mask credential files and variables inside the [sandbox](</docs/en/sandboxing#protect-credentials>)| Sandbox settings| Any file
+`sandbox.credentials.allowPlaintextInject`| Let [masked credentials](</docs/en/sandboxing#mask-credentials>) reach plain HTTP services on trusted test networks| Sandbox settings| User or managed
+`sandbox.credentials.awsPairs`| Link custom-named AWS key variables into one credential for [re-signing](</docs/en/sandboxing#re-sign-aws-requests>)| Sandbox settings| User or managed
+`sandbox.credentials.envVars`| Unset or mask an environment variable inside the [sandbox](</docs/en/sandboxing#mask-environment-variables>)| Sandbox settings| Any file
+`sandbox.credentials.files`| Block or mask reads of a credential file inside the [sandbox](</docs/en/sandboxing#mask-credential-files>)| Sandbox settings| Any file
+`sandbox.credentials.sigv4`| Choose whether streaming, presigned, or [SigV4A AWS requests](</docs/en/sandboxing#re-sign-aws-requests>) fail or pass through| Sandbox settings| User or managed
+`sandbox.enabled`| Turn on [Bash sandboxing](</docs/en/sandboxing#get-started>) on macOS, Linux, and WSL2| Sandbox settings| Any file
+`sandbox.enableWeakerNestedSandbox`| Run the Linux [sandbox](</docs/en/sandboxing>) inside an unprivileged container| Sandbox settings| Any file
+`sandbox.enableWeakerNetworkIsolation`| Let `gh`, `gcloud`, and `terraform` verify TLS behind a MITM proxy inside the [sandbox](</docs/en/sandboxing#troubleshooting>) on macOS| Sandbox settings| Any file
+`sandbox.excludedCommands`| Name commands that always run outside the [sandbox](</docs/en/sandboxing>)| Sandbox settings| Any file
+`sandbox.failIfUnavailable`| Refuse to start when the [sandbox](</docs/en/sandboxing>) can’t, instead of running unsandboxed| Sandbox settings| Any file
+`sandbox.filesystem`| Control which paths [sandboxed](</docs/en/sandboxing#filesystem-isolation>) commands can read and write| Sandbox settings| Any file
+`sandbox.filesystem.allowManagedReadPathsOnly`| Stop developers from re-opening [read paths your organization blocked](</docs/en/sandboxing#keep-developers-from-widening-the-policy>)| Sandbox settings| Managed
+`sandbox.filesystem.allowRead`| Re-open reading inside a region `denyRead` blocks| Sandbox settings| Any file
+`sandbox.filesystem.allowWrite`| Add paths [sandboxed](</docs/en/sandboxing>) commands can write to| Sandbox settings| Any file
+`sandbox.filesystem.denyRead`| Block [sandboxed](</docs/en/sandboxing>) commands from reading specific paths| Sandbox settings| Any file
+`sandbox.filesystem.denyWrite`| Block [sandboxed](</docs/en/sandboxing>) commands from writing to specific paths| Sandbox settings| Any file
+`sandbox.filesystem.disabled`| [Turn off filesystem isolation](</docs/en/sandboxing#disable-filesystem-isolation>) while keeping network isolation| Sandbox settings| User or managed
+`sandbox.ignoreViolations`| Silence violation reports for paths a command is expected to probe| Sandbox settings| Any file
+`sandbox.network`| Control which hosts, ports, and sockets [sandboxed](</docs/en/sandboxing#network-isolation>) commands reach| Sandbox settings| Any file
+`sandbox.network.allowAllUnixSockets`| Let [sandboxed](</docs/en/sandboxing>) commands connect to every Unix socket| Sandbox settings| Any file
+`sandbox.network.allowedDomains`| Pre-allow domains so [sandboxed](</docs/en/sandboxing>) commands don’t prompt for them| Sandbox settings| Any file
+`sandbox.network.allowLocalBinding`| Let [sandboxed](</docs/en/sandboxing>) commands bind to localhost ports on macOS| Sandbox settings| Any file
+`sandbox.network.allowMachLookup`| Let macOS [sandboxed](</docs/en/sandboxing>) tools like the iOS Simulator or Playwright reach their XPC services| Sandbox settings| Any file
+`sandbox.network.allowManagedDomainsOnly`| Lock the network allowlist to [managed settings](</docs/en/sandboxing#keep-developers-from-widening-the-policy>)| Sandbox settings| Managed
+`sandbox.network.allowUnixSockets`| List Unix socket paths [sandboxed](</docs/en/sandboxing>) commands can use on macOS| Sandbox settings| Any file
+`sandbox.network.deniedDomains`| Block domains for [sandboxed](</docs/en/sandboxing>) commands, even inside an allowed wildcard| Sandbox settings| Any file
+`sandbox.network.httpProxyPort`| Route [sandbox](</docs/en/sandboxing#custom-proxy-configuration>) HTTP traffic through your own proxy| Sandbox settings| Any file
+`sandbox.network.socksProxyPort`| Route [sandbox](</docs/en/sandboxing#custom-proxy-configuration>) SOCKS traffic through your own proxy| Sandbox settings| Any file
+`sandbox.network.strictAllowlist`| Deny hosts outside the [allowlist](</docs/en/sandboxing#network-isolation>) instead of prompting| Sandbox settings| User or managed
+`sandbox.network.tlsTerminate`| Have the [sandbox](</docs/en/sandboxing#network-isolation>) proxy terminate TLS so it can read HTTPS requests| Sandbox settings| User or managed
+`sandbox.ripgrep`| Use your own ripgrep binary inside the [sandbox](</docs/en/sandboxing>)| Sandbox settings| User or managed
+`sandbox.socatPath`| Point the [sandbox](</docs/en/sandboxing>) proxy at a `socat` binary outside `PATH`| Sandbox settings| Managed
+`showClearContextOnPlanAccept`| Show a “clear context” option on the [plan accept screen](</docs/en/permission-modes#review-and-approve-a-plan>)| Interface and terminal| Any file
+`showThinkingSummaries`| See summaries of Claude’s [thinking](</docs/en/model-config#extended-thinking>) instead of a collapsed stub| Model and responses| Any file
+`showTurnDuration`| Hide the “Cooked for” duration after each response| Interface and terminal| Any file
+`skillListingBudgetFraction`| Reserve more or less context for the [skill listing](</docs/en/skills#skill-descriptions-are-cut-short>)| Memory and context| Any file
+`skillListingMaxDescChars`| Cap each skill’s description length in the [skill listing](</docs/en/skills#skill-descriptions-are-cut-short>)| Memory and context| Any file
+`skillOverrides`| [Hide or collapse a skill](</docs/en/skills#override-skill-visibility-from-settings>) without editing its SKILL.md| Plugins and skills| Any file
+`skipAutoPermissionPrompt`| Skip the one-time notice Claude Code shows when you first enter [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) yourself rather than through the built-in default| Permission settings| User or managed
+`skipDangerousModePermissionPrompt`| Skip the confirmation dialog before [bypassPermissions mode](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)| Permission settings| User, local, or managed
+`skipWebFetchPreflight`| Skip the [WebFetch hostname check](</docs/en/tools-reference#webfetch-tool-behavior>) when Anthropic is unreachable| Privacy and telemetry| Any file
+`spellcheck`| Underline misspelled words in the prompt input with a [spell checker](</docs/en/interactive-mode#check-spelling-as-you-type>) you install| Interface and terminal| User or managed
+`spinnerTipsEnabled`| Hide tips in the spinner while Claude works| Interface and terminal| Any file
+`spinnerTipsOverride`| Replace or extend spinner tips with your own strings| Interface and terminal| Any file
+`spinnerVerbs`| Add or replace the verbs shown while a turn runs| Interface and terminal| Any file
+`sshConfigs`| Add [SSH connections](</docs/en/desktop#pre-configure-ssh-connections-for-your-team>) to the Desktop environment dropdown| Remote, desktop, and notifications| User or managed
+`sshHostAllowlist`| Limit which hosts [Desktop SSH sessions](</docs/en/desktop#restrict-which-ssh-hosts-users-can-connect-to>) can reach| Remote, desktop, and notifications| Managed
+`statusLine`| Run your own command to render a [status line](</docs/en/statusline>) below the prompt| Interface and terminal| Any file
+`strictKnownMarketplaces`| Allowlist the [marketplace](</docs/en/plugin-marketplaces>) sources users can add and install from| Plugins and skills| Managed
+`strictPluginOnlyCustomization`| Block [skills](</docs/en/skills>), [agents](</docs/en/sub-agents>), [hooks](</docs/en/hooks>), and [MCP servers](</docs/en/mcp>) from user and project sources| Plugins and skills| Managed
+`strictPluginOnlyCustomization.agents`| Lock [agents](</docs/en/sub-agents>) to plugin and managed sources| Plugins and skills| Managed
+`strictPluginOnlyCustomization.hooks`| Lock [hooks](</docs/en/hooks>) to plugin and managed sources| Plugins and skills| Managed
+`strictPluginOnlyCustomization.mcp`| Lock [MCP servers](</docs/en/mcp>) to plugin and managed sources| Plugins and skills| Managed
+`strictPluginOnlyCustomization.skills`| Lock [skills](</docs/en/skills>) to plugin and managed sources| Plugins and skills| Managed
+`subagentStatusLine`| Rewrite rows in the [subagent](</docs/en/sub-agents>) task display with your own command| Interface and terminal| Any file
+`switchModelsOnFlag`| Switch models automatically or pause when a [safety classifier](</docs/en/model-config#ask-before-switching>) flags a request| Model and responses| Any file
+`syncClaudeAiSkills`| Stop downloading the [skills enabled on your claude.ai account](</docs/en/skills#how-synced-skills-behave>) and hide the ones already synced| Plugins and skills| User, local, or managed
+`syntaxHighlightingDisabled`| Turn off syntax highlighting in diffs and code blocks| Interface and terminal| Any file
+`teammateDefaultModel`| Removed in v2.1.234; [teammates](</docs/en/agent-teams#specify-teammates-and-models>) follow the lead’s model| Global config settings| Global config
+`teammateMode`| Choose how [agent team teammates display](</docs/en/agent-teams#choose-a-display-mode>)| Agents, sessions, and worktrees| Any file
+`terminalProgressBarEnabled`| Hide the terminal progress bar in terminals that support it| Interface and terminal| Any file
+`terminalTitleFromRename`| Stop [`/rename`](</docs/en/sessions#name-your-sessions>) and `--name` from changing the terminal tab title| Interface and terminal| Any file
+`theme`| Pick the interface [color theme](</docs/en/terminal-config#match-the-color-theme>), built-in or custom| Interface and terminal| Any file
+`tui`| Choose the [fullscreen](</docs/en/fullscreen>) or classic terminal renderer| Interface and terminal| Any file
+`ultracode`| Have Claude plan a [workflow](</docs/en/workflows#let-claude-decide-with-ultracode>) for each substantive task without being asked| Model and responses| Any file
+`useAutoModeDuringPlan`| Let the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier review shell commands in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>); set `false` to get prompts instead| Permission settings| User, local, or managed
+`verbose`| Show [full tool output](</docs/en/cli-reference#cli-flags>) instead of truncated summaries; `viewMode` takes precedence when both are set| Interface and terminal| Any file
+`viewMode`| Start every session in [default, verbose, or focus view](</docs/en/cli-reference#cli-flags>)| Interface and terminal| Any file
+`vimInsertModeRemaps`| Map a two-key [INSERT-mode sequence](</docs/en/interactive-mode#remap-insert-mode-key-sequences>) such as `jj` to Escape| Interface and terminal| User or managed
+`voice`| Turn on [voice dictation](</docs/en/voice-dictation>) and pick hold or tap mode| Interface and terminal| Any file
+`voiceEnabled`| Turn on [voice dictation](</docs/en/voice-dictation>) with the older single-key form| Interface and terminal| Any file
+`wheelScrollAccelerationEnabled`| Turn off [mouse-wheel acceleration](</docs/en/fullscreen#mouse-wheel-scrolling>) in fullscreen rendering| Interface and terminal| Any file
+`workflowKeywordTriggerEnabled`| Let the word `ultracode` in a prompt start a [workflow](</docs/en/workflows>); set `false` to type it without starting one| Hooks and automation| Any file
+`workflowSizeGuideline`| Set the agent count Claude aims for in [dynamic workflows](</docs/en/workflows>)| Hooks and automation| Any file
+`worktree`| Configure how Claude Code creates git [worktrees](</docs/en/worktrees>)| Agents, sessions, and worktrees| Any file
+`worktree.baseRef`| Branch new [worktrees](</docs/en/worktrees>) from the remote default branch or your local HEAD| Agents, sessions, and worktrees| Any file
+`worktree.bgIsolation`| Let background sessions edit the working copy without a [worktree](</docs/en/worktrees>)| Agents, sessions, and worktrees| Any file
+`worktree.sparsePaths`| Check out only the directories you need in each [worktree](</docs/en/worktrees>)| Agents, sessions, and worktrees| Any file
+`worktree.symlinkDirectories`| Symlink large directories into each [worktree](</docs/en/worktrees>) instead of duplicating them| Agents, sessions, and worktrees| Any file
+`wslInheritsWindowsSettings`| Have WSL read [managed settings](</docs/en/managed-settings>) from the Windows policy chain| Enterprise and managed settings| Managed
+
+##
+
+
+
+Model and responses
+
+Choose which models Claude Code uses and how it responds. For how these settings interact with the `/model` command and environment variables, see [Model configuration](</docs/en/model-config>).
+
+###
+
+
+
+`advisorModel`
+
+Pick which model answers when Claude calls the server-side [advisor tool](</docs/en/advisor>). Unset it to turn the advisor off. The advisor must be at least as capable as your main model; when it isn’t, Claude Code sends requests without the advisor. See [Choose an advisor model](</docs/en/advisor#choose-an-advisor-model>). You don’t usually edit this key by hand. Run `/advisor` to open a picker that shows the current choice, the models that can advise, and **No advisor**. Claude Code saves your pick to this key in `~/.claude/settings.json`. In a session attached to a remote worker, the pick applies to that session only. To pick Fable, first accept the [usage-credits consent](</docs/en/advisor#fable-advisor-and-usage-credits>) by running `/model fable`. Until you do, picking Fable in `/advisor` saves nothing and Claude Code tells you to run `/model fable` first.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of the aliases `"fable"`, `"opus"`, or `"sonnet"`, which resolve to Claude Code’s current default version of that model family, or a full model ID such as `"claude-opus-5"`
+ * **Default** : unset, so the advisor is off
+ * **Per-session overrides** : `--advisor` takes precedence over this key for one session. [`CLAUDE_CODE_DISABLE_ADVISOR_TOOL`](</docs/en/env-vars>) turns the advisor off, and this key can’t turn it back on
+
+settings.json
+
+ {
+ "advisorModel": "opus"
+ }
+
+The key has no effect on Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry. `"fable"` requires [Fable 5 access](</docs/en/advisor#choose-an-advisor-model>).
+
+###
+
+
+
+`alwaysThinkingEnabled`
+
+Turn [extended thinking](</docs/en/model-config#extended-thinking>) off for every session by setting this to `false`. Thinking is on by default, so `true` changes nothing. Most people set this through `/config` rather than by editing the file. On models that always think, such as Fable 5, `false` has no effect. On [third-party providers](</docs/en/third-party-integrations>) Claude Code omits the `thinking` parameter instead of turning thinking off, so adaptive-reasoning models may still think.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: no effect; thinking is already on
+ * `false`: Claude Code turns extended thinking off for every session
+ * **Default** : unset, so thinking is on for models that support it
+ * **Per-session overrides** : [`MAX_THINKING_TOKENS`](</docs/en/env-vars>) takes precedence over this key for one session: `0` turns thinking off, under the same model and provider limits as `false`, and a positive value turns thinking on even when this key is `false`. On adaptive-reasoning models the number itself is ignored
+
+settings.json
+
+ {
+ "alwaysThinkingEnabled": false
+ }
+
+###
+
+
+
+`availableModels`
+
+Restrict which models people can select for the main session, [subagents](</docs/en/sub-agents>), [skills](</docs/en/skills>), and the [advisor](</docs/en/advisor>). A managed list constrains `/model`, `--model`, and the `model` key in a developer’s own files; a model outside it can’t be selected. On its own this doesn’t touch the Default option; pair it with `enforceAvailableModels` for that.
+
+ * **Scope** : `Any file`. Deploy it in managed settings to enforce it for an organization.
+ * **Type** : array of model aliases or IDs
+ * **Default** : unset, so every model is available
+
+This example lets people select only Sonnet and Haiku models:
+
+settings.json
+
+ {
+ "availableModels": ["sonnet", "haiku"]
+ }
+
+See [Restrict model selection](</docs/en/model-config#restrict-model-selection>).
+
+###
+
+
+
+`effortLevel`
+
+Keep an [effort level](</docs/en/model-config#adjust-effort-level>) across sessions. Lower levels are faster and cheaper on straightforward tasks, and higher levels reason more deeply on complex problems. Claude Code writes this key to your user settings when you run `/effort low`, `medium`, `high`, or `xhigh` in an interactive session on your machine. In a `-p` run, the Agent SDK, or a session attached to a remote worker, `/effort` applies to that session only. The message `/effort` prints says which happened.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"low"`: the least reasoning, for short, scoped, latency-sensitive tasks that aren’t intelligence-sensitive
+ * `"medium"`: reduces token usage for cost-sensitive work that can trade off some intelligence
+ * `"high"`: balances token usage and intelligence
+ * `"xhigh"`: deeper reasoning at higher token spend
+ * **Default** : unset
+ * **Per-session overrides** : `--effort` takes precedence over this key for one session, and [`CLAUDE_CODE_EFFORT_LEVEL`](</docs/en/env-vars>) takes precedence over both
+
+settings.json
+
+ {
+ "effortLevel": "xhigh"
+ }
+
+On Opus 4.7, Opus 4.8, and Fable 5, Claude Code holds that model’s default effort until you change effort once with `/effort`, `--effort`, or the `/model` picker. After that, it reads this key. See [Adjust effort level](</docs/en/model-config#adjust-effort-level>).
+
+###
+
+
+
+`enforceAvailableModels`
+
+The `/model` picker has a **Default** option that resolves to your [organization default model](</docs/en/model-config#organization-default-model>) when one applies, and otherwise to your account type’s default. An `availableModels` allowlist limits the models you can name, but on its own it leaves **Default** alone, so **Default** can still resolve to a model outside the list. This key closes that gap. Requires Claude Code v2.1.175 or later. When your organization deploys any managed settings, Claude Code reads this key from the managed source alone and ignores it in your other files.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: when **Default** would resolve to a model outside `availableModels`, Claude Code resolves it to the first available model in the list
+ * `false`: **Default** resolves as usual, even to a model outside `availableModels`
+ * **Default** : `false`
+
+This example restricts named selections to Sonnet and Haiku models and makes **Default** resolve to the first of them that is available:
+
+settings.json
+
+ {
+ "availableModels": ["sonnet", "haiku"],
+ "enforceAvailableModels": true
+ }
+
+This key has no effect when `availableModels` is unset or empty. See [Enforce the allowlist for the Default model](</docs/en/model-config#enforce-the-allowlist-for-the-default-model>). Requires Claude Code v2.1.175 or later.
+
+###
+
+
+
+`fallbackModel`
+
+Name backup models for Claude Code to try, in order, when your primary model is overloaded or unavailable. Claude Code switches to the next available model in the chain for the rest of the turn and shows a notice. Without a chain, Claude Code retries the same model and then surfaces the server’s error, and you retry or switch models yourself. A switch means one turn with a cold [prompt cache](</docs/en/prompt-caching#switching-models>) on the fallback model; your next message tries the primary model first again.
+
+ * **Scope** : `Any file`
+ * **Type** : array of model aliases or IDs; `"default"` expands to the default model
+ * **Default** : unset, so a failed request isn’t retried on another model
+ * **Per-session overrides** : `--fallback-model` takes precedence over this key for one session
+
+This example tries Sonnet 5 first, then Haiku 4.5, when your primary model fails:
+
+settings.json
+
+ {
+ "fallbackModel": ["claude-sonnet-5", "claude-haiku-4-5"]
+ }
+
+Unlike most array settings, this key doesn’t merge across settings files: the highest-precedence file that defines it supplies the whole chain. If your project file sets `["claude-sonnet-5"]` and your user file sets `["claude-haiku-4-5"]`, the chain is `["claude-sonnet-5"]` only. Claude Code keeps at most three distinct allowed models from the list and ignores the rest. See [Fallback model chains](</docs/en/model-config#fallback-model-chains>).
+
+###
+
+
+
+`fastMode`
+
+Turn [fast mode](</docs/en/fast-mode>) on for sessions where it’s available, for interactive work like rapid iteration or live debugging where you want speed at a higher cost per token. You don’t usually edit this key by hand: running `/fast` writes `fastMode: true` to `~/.claude/settings.json`, and running it again to turn fast mode off removes the key. Fast mode runs only on Opus 5 and Opus 4.8: turning it on from another model switches you to Opus, and switching to an unsupported model turns it off. See [Switch models while fast mode is on](</docs/en/fast-mode#switch-models-while-fast-mode-is-on>).
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code turns fast mode on for sessions where it’s available
+ * `false`: fast mode stays off
+ * **Default** : unset, so fast mode is off
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_FAST_MODE`](</docs/en/env-vars>) turns fast mode off for one session, and this key can’t turn it back on
+
+settings.json
+
+ {
+ "fastMode": true
+ }
+
+###
+
+
+
+`fastModePerSessionOptIn`
+
+Normally, running `/fast` saves `fastMode` to a person’s user settings, so fast mode is on at the start of every later session. Set this key to `true` to stop that: a saved `fastMode: true` no longer turns fast mode on at session start, and each person has to run `/fast` in each session they want it. Claude Code leaves the `fastMode` key in their file, so turning this key off restores the old behavior. Owners on Team or Enterprise plans can deploy it organization-wide through [server-managed settings](</docs/en/server-managed-settings>).
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: a saved `fastMode: true` no longer turns fast mode on at session start, so each person runs `/fast` in each session they want it; a `fastMode: true` passed with `--settings` still counts for that session unless managed settings set this key
+ * `false`: a saved `fastMode: true` turns fast mode on at the start of every later session
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "fastModePerSessionOptIn": true
+ }
+
+See [Require per-session opt-in](</docs/en/fast-mode#require-per-session-opt-in>).
+
+###
+
+
+
+`language`
+
+Have Claude respond in a language other than English by default. There is no fixed list for responses: Claude Code adds the value verbatim to the system prompt as an instruction to always respond in that language, so any language name Claude can read works. Claude Code doesn’t check the value, so a misspelled name reaches Claude as written rather than producing an error. The same value sets the language for [voice dictation](</docs/en/voice-dictation#change-the-dictation-language>), which does have a fixed list of [supported dictation languages](</docs/en/voice-dictation#change-the-dictation-language>), and for auto-generated session titles.
+
+ * **Scope** : `Any file`
+ * **Type** : string, any language name, such as `"japanese"`, `"spanish"`, or `"french"`; Claude Code doesn’t validate it
+ * **Default** : unset; session titles then match the language of your conversation
+
+settings.json
+
+ {
+ "language": "japanese"
+ }
+
+###
+
+
+
+`model`
+
+Set the model every new session uses, so you don’t have to pick one with `/model` each time. Setting it here doesn’t stop you from switching mid-session. If your admin set an [organization default model](</docs/en/model-config#organization-default-model>) to override user selection, you get that model even when you set this key in user, project, or local settings.
+
+ * **Scope** : `Any file`
+ * **Type** : string, a model alias or full model ID
+ * **Default** : unset, so Claude Code uses your account’s default model
+ * **Per-session overrides** : `--model` takes precedence over [`ANTHROPIC_MODEL`](</docs/en/env-vars>), and both take precedence over this key for one session, including over a managed `model`; an `availableModels` list still applies to the pick
+
+settings.json
+
+ {
+ "model": "claude-sonnet-5"
+ }
+
+A value here outranks [`ANTHROPIC_DEFAULT_MODEL`](</docs/en/model-config#set-a-default-model-for-new-sessions>), which Claude Code uses only when nothing else selects a model.
+
+###
+
+
+
+`modelOverrides`
+
+Map Anthropic model IDs to provider-specific model IDs, such as Amazon Bedrock inference profile ARNs. Each model picker entry then uses its mapped value when calling the provider API. Administrators use this on [Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry](</docs/en/model-config#override-model-ids-per-version>) to route each model version to a specific inference profile, version name, or deployment for governance, cost allocation, or regional routing.
+
+ * **Scope** : `Any file`
+ * **Type** : object mapping model ID to provider model ID
+ * **Default** : unset
+
+This example routes every call for Opus 4.6 to the named Bedrock inference profile:
+
+settings.json
+
+ {
+ "modelOverrides": {
+ "claude-opus-4-6": "arn:aws:bedrock:us-east-1:123456789012:inference-profile/example"
+ }
+ }
+
+See [Override model IDs per version](</docs/en/model-config#override-model-ids-per-version>).
+
+###
+
+
+
+`outputStyle`
+
+Select an [output style](</docs/en/output-styles>) by name. An output style is a saved set of instructions that Claude Code adds to the system prompt to change Claude’s role, tone, and output format, such as the built-in Explanatory and Learning styles or one you wrote yourself. Claude Code builds the style into the system prompt once per conversation. An edit to this key takes effect after you run `/clear` or start a new session.
+
+ * **Scope** : `Any file`
+ * **Type** : string, the name of a [built-in](</docs/en/output-styles#built-in-output-styles>) or [custom](</docs/en/output-styles#create-a-custom-output-style>) output style
+ * **Default** : unset, so Claude Code uses the default style
+
+This example selects the built-in Explanatory style, which adds educational insights between tasks:
+
+settings.json
+
+ {
+ "outputStyle": "Explanatory"
+ }
+
+###
+
+
+
+`showThinkingSummaries`
+
+See summaries of Claude’s [extended thinking](</docs/en/model-config#extended-thinking>) in interactive sessions. Set it if you want the full summaries when you expand thinking with `Ctrl+O`. When unset or `false`, the Anthropic API redacts thinking blocks and Claude Code shows a collapsed stub; third-party providers don’t redact.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: you see full thinking summaries when you expand thinking with `Ctrl+O`
+ * `false`: the Anthropic API redacts thinking blocks and Claude Code shows a collapsed stub
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "showThinkingSummaries": true
+ }
+
+Redaction only changes what you see, not what the model generates: to reduce thinking spend, [lower the budget or disable thinking](</docs/en/model-config#extended-thinking>) instead. This setting has no effect in non-interactive mode (`-p`), the Agent SDK, or IDE extensions such as VS Code.
+
+###
+
+
+
+`switchModelsOnFlag`
+
+Choose what happens when a [safety classifier flags a request](</docs/en/model-config#automatic-model-fallback>): switch to the fallback model and continue, or pause so you can choose between switching and editing the prompt.
+
+ * **Scope** : `Any file`. Appears in `/config` as **Switch models when a message is flagged**.
+ * **Type** : Boolean
+ * `true`: Claude Code switches to the fallback model and continues
+ * `false`: in an interactive session Claude Code pauses so you can choose between switching and editing the prompt; where no dialog can show, such as a `-p` run, the flagged request ends as an error
+ * **Default** : `true`, switch automatically
+
+settings.json
+
+ {
+ "switchModelsOnFlag": false
+ }
+
+See [Ask before switching](</docs/en/model-config#ask-before-switching>). Requires Claude Code v2.1.170 or later.
+
+###
+
+
+
+`ultracode`
+
+Start sessions with [ultracode](</docs/en/workflows#let-claude-decide-with-ultracode>) on. With it on, Claude plans a workflow for each substantive task instead of waiting for you to ask. Claude plans workflows only when [dynamic workflows](</docs/en/workflows>) are enabled for you and your model supports `xhigh` effort. Either way, `ultracode: true` runs the session at `xhigh` effort. Claude Code reads this key but never writes it: `/effort ultracode` turns ultracode on for the current session only.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: sessions start at `xhigh` effort, with ultracode on when dynamic workflows are enabled for you and your model supports `xhigh`
+ * `false`: sessions start with ultracode off
+ * **Default** : unset, so ultracode is off
+ * **Per-session overrides** : `/effort ultracode` turns ultracode on for one session without this key. So does `--effort ultracode`, which requires Claude Code v2.1.203 or later
+
+settings.json
+
+ {
+ "ultracode": true
+ }
+
+Ultracode runs the session at `xhigh` effort and takes precedence over `effortLevel`. An Agent SDK `apply_flag_settings` control request also accepts the key.
+
+##
+
+
+
+Permission settings
+
+Decide what Claude can do without asking, which permission mode a session starts in, and what auto mode’s classifier allows. For rule syntax and the permission model, see [Configure permissions](</docs/en/permissions>).
+
+###
+
+
+
+`allowManagedPermissionRulesOnly`
+
+Make managed settings the only source of `allow`, `ask`, and `deny` permission rules. Claude Code then ignores rules in user, project, local, and `--settings` files, ignores `--allowedTools`, hides the always-allow choices in permission prompts, and stops saving new rules.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: managed settings are the only source of `allow`, `ask`, and `deny` rules; Claude Code ignores rules from other files and `--allowedTools`, hides always-allow choices, and stops saving new rules
+ * `false`: Claude Code applies permission rules from user, project, local, and `--settings` files in addition to the managed ones
+ * **Default** : unset, so Claude Code applies permission rules from user, project, and local settings and from `--settings`, in addition to the managed ones
+
+managed-settings.json
+
+ {
+ "allowManagedPermissionRulesOnly": true
+ }
+
+This key doesn’t lock down the MCP server allowlist; for that, set `allowManagedMcpServersOnly`. See [Managed-only settings](</docs/en/managed-settings#managed-only-settings>).
+
+###
+
+
+
+`autoMode`
+
+Add your own rules to what the [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) classifier blocks and allows. Use it to tell the classifier which repos, buckets, and domains your organization trusts, so it stops blocking routine internal operations. The classifier ships with [built-in allow and deny rules](</docs/en/auto-mode-config#inspect-the-defaults-and-your-effective-config>). Include the literal string `"$defaults"` in an array to keep those built-in rules at that position and add yours around them; leave it out to replace them with yours.
+
+ * **Scope** : `User or managed`
+ * **Type** : object with `environment`, `allow`, `soft_deny`, and `hard_deny` arrays of prose rules, plus the `classifyAllShell` Boolean
+ * **Default** : unset, so the classifier uses only its [built-in rules](</docs/en/auto-mode-config#inspect-the-defaults-and-your-effective-config>)
+
+This example keeps the built-in `soft_deny` rules, through `"$defaults"`, and adds one more that blocks `terraform apply`:
+
+settings.json
+
+ {
+ "autoMode": {
+ "soft_deny": ["$defaults", "Never run terraform apply"]
+ }
+ }
+
+When more than one of those files sets the same array, Claude Code concatenates the entries. For the rule format and how each array is applied, see [Configure auto mode](</docs/en/auto-mode-config>).
+
+###
+
+
+
+`autoMode.classifyAllShell`
+
+Send every Bash and PowerShell command through the auto mode classifier while auto mode is active. By default, auto mode suspends only allow rules that could run arbitrary code: tool-wide and wildcard rules such as `Bash(*)`, and interpreter or shell-wrapper prefixes such as `Bash(python *)`. A command that any other allow rule matches, such as `Bash(npm test)`, skips the classifier, and a destructive argument the rule’s prefix didn’t anticipate can get through unseen. Setting this key suspends every shell allow rule for the session so the classifier sees every command. Requires Claude Code v2.1.193 or later.
+
+ * **Scope** : `User or managed`. Read wherever `autoMode` is read.
+ * **Type** : Boolean
+ * `true`: while auto mode is active, Claude Code sends every Bash and PowerShell command through the classifier and suspends your shell allow rules; outside auto mode the rules still apply
+ * `false`: auto mode suspends only allow rules that could run arbitrary code, such as `Bash(*)` and `Bash(python *)`; a command that any other allow rule matches skips the classifier, and every other shell command goes through it
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "autoMode": {
+ "classifyAllShell": true
+ }
+ }
+
+See [Route all shell commands through the classifier](</docs/en/auto-mode-config#route-all-shell-commands-through-the-classifier>). Requires Claude Code v2.1.193 or later.
+
+###
+
+
+
+`disableAutoMode`
+
+Remove [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) from the `Shift+Tab` cycle. Any session that would otherwise [start in auto mode](</docs/en/permission-modes#which-mode-a-session-starts-in>), whether from `--permission-mode auto`, a settings file, or the built-in default, starts in `default` instead. Administrators set it in managed settings to prevent developers in their organization from using auto mode.
+
+ * **Scope** : `Any file`. Most useful in [managed settings](</docs/en/managed-settings>), where users can’t override it. Also accepted under `permissions` as `permissions.disableAutoMode`.
+ * **Type** : the string `"disable"`
+ * **Default** : unset
+
+settings.json
+
+ {
+ "disableAutoMode": "disable"
+ }
+
+###
+
+
+
+`permissions`
+
+Control which tools Claude can use without asking, which ones always prompt, and which ones are blocked, and set the [permission mode](</docs/en/permission-modes>) a session starts in. Every `permissions.*` key below nests under this object.
+
+ * **Scope** : `Any file`
+ * **Type** : object with `allow`, `ask`, `deny`, `additionalDirectories`, `defaultMode`, `disableBypassPermissionsMode`, and `disableAutoMode`
+ * **Default** : unset
+
+This example approves `npm run` commands without asking, prompts before `git push`, blocks reads of `.env`, and starts sessions in `acceptEdits`:
+
+settings.json
+
+ {
+ "permissions": {
+ "allow": ["Bash(npm run *)"],
+ "ask": ["Bash(git push *)"],
+ "deny": ["Read(./.env)"],
+ "defaultMode": "acceptEdits"
+ }
+ }
+
+The three rule arrays share one syntax; see Permission rule syntax under `permissions.allow`. For how permission rules from different files combine, see [how permission rules merge across scopes](</docs/en/permissions#settings-precedence>); for how settings keys in general combine, see [Settings precedence](</docs/en/settings#settings-precedence>) on the settings guide.
+
+###
+
+
+
+`useAutoModeDuringPlan`
+
+Choose whether Claude Code uses the auto mode classifier to review shell commands in plan mode. With the default `true`, the classifier reviews each command during planning when auto mode is available and you see no prompt. Set `false` to get a permission prompt for every command outside the built-in read-only set. Appears in `/config` as **Use auto mode during plan**.
+
+ * **Scope** : `User, local, or managed`. A repository can’t turn it off for you.
+ * **Type** : Boolean
+ * `true`: the same as unset; when auto mode is available, the classifier reviews each shell command during planning instead of prompting you for it. A `false` in any of these files still turns it off
+ * `false`: you get a permission prompt for every command outside the built-in read-only set
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "useAutoModeDuringPlan": false
+ }
+
+###
+
+
+
+`permissions.allow`
+
+List the tool uses Claude Code approves without asking you. In an MCP rule, `*` can appear only in the tool name after the `mcp__<server>__` prefix, such as `mcp__github__get_*`; it can’t appear in the server name.
+
+ * **Scope** : `Any file`
+ * **Type** : array of permission rule strings
+ * **Default** : unset
+ * **Per-session overrides** : `--allowedTools` adds allow rules for one session, and a deny rule from any settings file still blocks a tool it names
+
+This example approves `git diff` and lets Claude Code read your `.zshrc` without asking:
+
+settings.json
+
+ {
+ "permissions": {
+ "allow": ["Bash(git diff *)", "Read(~/.zshrc)"]
+ }
+ }
+
+Claude Code applies `allow` rules from a project’s `.claude/settings.json` only after you accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for that folder.
+
+####
+
+
+
+Permission rule syntax
+
+Permission rules follow the format `Tool` or `Tool(specifier)`. Claude Code evaluates `deny` rules first, then `ask`, then `allow`, and the first match decides regardless of how specific each rule is; see the [permission rule evaluation order](</docs/en/permissions#manage-permissions>). Each row shows one rule shape and what it matches.
+
+Rule| What it matches
+---|---
+`Bash`| Every Bash command
+`Bash(npm run *)`| Commands starting with `npm run`
+`Read(./.env)`| Reads of the `.env` file
+`WebFetch(domain:example.com)`| Fetch requests to example.com
+
+For the complete rule syntax, including wildcard behavior, tool-specific patterns for Read, Edit, WebFetch, MCP, and Agent rules, and the security limitations of Bash patterns, see [Permission rule syntax](</docs/en/permissions#permission-rule-syntax>).
+
+###
+
+
+
+`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.
+
+ * **Scope** : `Any file`
+ * **Type** : array of permission rule strings
+ * **Default** : unset
+
+settings.json
+
+ {
+ "permissions": {
+ "ask": ["Bash(git push *)"]
+ }
+ }
+
+###
+
+
+
+`permissions.deny`
+
+List the tool uses Claude Code blocks. Use it for files that hold API keys, secrets, or environment values: Claude Code excludes matching files from file discovery and search results, denies reads of them, and blocks the [Edit and Write tools](</docs/en/permissions#read-and-edit>) on the matching paths. Read and Edit deny rules apply to Claude’s built-in file tools and to file commands Claude Code recognizes in Bash, such as `cat`, `head`, `tail`, and `sed`; they don’t apply to arbitrary subprocesses, so for OS-level enforcement [enable the sandbox](</docs/en/sandboxing>).
+
+ * **Scope** : `Any file`
+ * **Type** : array of permission rule strings
+ * **Default** : unset
+ * **Per-session overrides** : `--disallowedTools` adds deny rules for one session alongside this key
+
+This example denies reads of `.env` files, the `secrets` directory, and a credentials file, and blocks `curl` commands:
+
+settings.json
+
+ {
+ "permissions": {
+ "deny": [
+ "Read(./.env)",
+ "Read(./.env.*)",
+ "Read(./secrets/**)",
+ "Read(./config/credentials.json)",
+ "Bash(curl *)"
+ ]
+ }
+ }
+
+Tool names accept glob patterns, so `"*"` denies every tool and `"mcp__*"` denies every MCP tool. Claude Code ignores a deny rule for the [`EndConversation`](</docs/en/tools-reference#endconversation-tool-behavior>) tool as long as any other tool is still available to Claude. For what a `Bash` deny rule can and can’t catch, see [Bash permission limitations](</docs/en/permissions#tool-specific-permission-rules>). This key replaces the deprecated `ignorePatterns` configuration.
+
+###
+
+
+
+`permissions.additionalDirectories`
+
+Give Claude file access to directories outside the one you started in, as additional [working directories](</docs/en/permissions#working-directories>). Most `.claude/` configuration is [not discovered](</docs/en/permissions#additional-directories-grant-file-access-not-configuration>) from these directories.
+
+ * **Scope** : `Any file`
+ * **Type** : array of directory paths
+ * **Default** : unset
+ * **Per-session overrides** : `--add-dir` and `/add-dir` add directories for one session alongside this key
+
+settings.json
+
+ {
+ "permissions": {
+ "additionalDirectories": ["../docs/"]
+ }
+ }
+
+Like `allow` rules, entries in a project’s `.claude/settings.json` take effect only after you accept the [workspace trust dialog](</docs/en/permissions#project-allow-rules-and-workspace-trust>) for that folder.
+
+###
+
+
+
+`permissions.defaultMode`
+
+Set the [permission mode](</docs/en/permission-modes>) new sessions start in. When you leave it unset, sessions start in the [built-in default](</docs/en/permission-modes#which-mode-a-session-starts-in>) for your plan and surface.
+
+ * **Scope** : `Any file`. `auto` doesn’t take effect from project or local settings, so set it in `~/.claude/settings.json` instead. Conversations the VS Code extension starts read only user, managed, and `--settings` values.
+ * **Type** : string, one of:
+ * `"default"`: Claude Code runs only reads without asking
+ * `"acceptEdits"`: Claude Code also runs file edits and common filesystem commands such as `mkdir` and `mv` without asking
+ * `"plan"`: Claude Code reads and plans but blocks edits until you approve a plan
+ * `"auto"`: Claude Code runs everything, with background safety checks
+ * `"dontAsk"`: Claude Code runs only pre-approved tools and auto-denies every call that would otherwise prompt
+ * `"bypassPermissions"`: Claude Code runs everything without asking
+ * `"manual"`: an alias for `"default"`, in Claude Code v2.1.200 or later
+ * **Default** : unset
+ * **Per-session overrides** : `--permission-mode`, and its equivalent `--dangerously-skip-permissions` for `bypassPermissions`, take precedence over this key for one session
+
+settings.json
+
+ {
+ "permissions": {
+ "defaultMode": "acceptEdits"
+ }
+ }
+
+Permission rules layer on top of every mode: `deny` rules block in every mode, including `bypassPermissions`. See [Permission modes](</docs/en/permission-modes>). `manual` names the permission mode labeled Manual in the CLI and the VS Code extension; the alias requires Claude Code v2.1.200 or later. Before v2.1.142, project settings could set `auto`. In Claude Code on the web, Claude Code honors only `acceptEdits`, `plan`, `default`, and `auto` from this key. For conversations the VS Code extension starts, see [which setting the extension reads for the starting permission mode](</docs/en/permission-modes#switch-permission-modes>).
+
+###
+
+
+
+`permissions.disableBypassPermissionsMode`
+
+Prevent anyone from entering `bypassPermissions` mode. Claude Code then rejects the `--dangerously-skip-permissions` flag, and ignores an [agent definition’s](</docs/en/sub-agents#permission-modes>) `permissionMode: bypassPermissions`, so the subagent runs with the parent session’s permission mode.
+
+ * **Scope** : `Any file`. Typically set in [managed settings](</docs/en/managed-settings>) to enforce organizational policy.
+ * **Type** : the string `"disable"`
+ * **Default** : unset
+ * **Per-session overrides** : this key takes precedence over `--dangerously-skip-permissions`, which Claude Code rejects while the key is set
+
+settings.json
+
+ {
+ "permissions": {
+ "disableBypassPermissionsMode": "disable"
+ }
+ }
+
+Before v2.1.223, Claude Code applied the frontmatter permission mode even with bypass disabled.
+
+###
+
+
+
+`skipAutoPermissionPrompt`
+
+Skip the one-time notice describing [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) that Claude Code shows when you first enter auto mode yourself, for example through your own settings or the mode selector, rather than when the built-in default starts a session in it. Claude Code shows that notice once and then records that it was shown, so this key only matters where the notice hasn’t appeared yet.
+
+ * **Scope** : `User or managed`. A repository can’t set it for you.
+ * **Type** : Boolean
+ * `true`: Claude Code skips the notice
+ * `false`: the same as unset; the notice appears once unless another of these files sets `true`
+ * **Default** : unset, so the notice appears once
+
+settings.json
+
+ {
+ "skipAutoPermissionPrompt": true
+ }
+
+###
+
+
+
+`skipDangerousModePermissionPrompt`
+
+Skip the confirmation dialog Claude Code shows before a session enters `bypassPermissions` mode, whether from `--dangerously-skip-permissions` or from `defaultMode: "bypassPermissions"`. Claude Code writes `true` here in your user settings when you accept that dialog once.
+
+ * **Scope** : `User, local, or managed`. An untrusted repository can’t skip the dialog for you.
+ * **Type** : Boolean
+ * `true`: Claude Code skips the confirmation dialog before a session enters `bypassPermissions` mode
+ * `false`: the same as unset; the dialog appears unless another of these files sets `true`
+ * **Default** : unset, so the dialog appears
+
+settings.json
+
+ {
+ "skipDangerousModePermissionPrompt": true
+ }
+
+##
+
+
+
+Sandbox settings
+
+Isolate the commands Claude runs from your filesystem, your network, and your credentials. For how sandboxing works and platform requirements, see [Sandboxing](</docs/en/sandboxing>).
+
+###
+
+
+
+`sandbox`
+
+Isolate the Bash commands Claude runs from your filesystem and network with [sandboxing](</docs/en/sandboxing>). Turn the sandbox on with `enabled`, then narrow or widen what sandboxed commands can touch with the `filesystem`, `network`, and `credentials` sub-objects. The sandbox runs on macOS, Linux, and WSL2.
+
+ * **Scope** : `Any file`
+ * **Type** : object with `enabled`, `failIfUnavailable`, `autoAllowBashIfSandboxed`, `excludedCommands`, `allowUnsandboxedCommands`, `enableWeakerNestedSandbox`, `enableWeakerNetworkIsolation`, `allowAppleEvents`, `bwrapPath`, `socatPath`, `ignoreViolations`, and `ripgrep`, plus the `filesystem`, `network`, and `credentials` objects
+ * **Default** : unset, so Claude Code runs commands without a sandbox
+
+This turns the sandbox on, skips permission prompts for sandboxed commands, runs `docker` outside the sandbox, opens two extra write paths, hides your AWS credentials file, and pre-allows GitHub and npm:
+
+settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "autoAllowBashIfSandboxed": true,
+ "excludedCommands": ["docker *"],
+ "filesystem": {
+ "allowWrite": ["/tmp/build", "~/.kube"],
+ "denyRead": ["~/.aws/credentials"]
+ },
+ "network": {
+ "allowedDomains": ["github.com", "*.npmjs.org"]
+ }
+ }
+ }
+
+Boolean keys take the value from the highest-precedence settings file that sets them, so a managed `enabled` or `failIfUnavailable` overrides anything a developer sets. Array keys merge across every settings file, so a developer can append entries; see [Keep developers from widening the policy](</docs/en/sandboxing#keep-developers-from-widening-the-policy>) for the managed-only locks. To require the sandbox for an organization, see [Enforce sandboxing with managed settings](</docs/en/sandboxing#enforce-sandboxing-with-managed-settings>).
+
+###
+
+
+
+`sandbox.enabled`
+
+Turn on [sandboxing](</docs/en/sandboxing>) for Bash commands. When you pick a mode in the `/sandbox` panel, Claude Code writes this key to `.claude/settings.local.json` for the current project; set it in `~/.claude/settings.json` to sandbox every project.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code sandboxes Bash commands
+ * `false`: Bash commands run unsandboxed
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "enabled": true
+ }
+ }
+
+On Linux and WSL2 the sandbox needs `bubblewrap` and `socat`; see [Set up Linux and WSL2](</docs/en/sandboxing#set-up-linux-and-wsl2>). When the sandbox can’t start, Claude Code shows a warning and runs commands unsandboxed unless you also set `failIfUnavailable`.
+
+###
+
+
+
+`sandbox.failIfUnavailable`
+
+Make Claude Code exit with an error at startup when `sandbox.enabled` is `true` but the sandbox can’t start, because a dependency is missing or the platform is unsupported. Without it, Claude Code shows a warning and runs commands unsandboxed. Use it in managed settings when your organization requires sandboxing as a hard gate.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code exits with an error at startup when `sandbox.enabled` is `true` but the sandbox can’t start
+ * `false`: Claude Code shows a warning and runs commands unsandboxed
+ * **Default** : `false`
+
+This makes every managed machine sandbox commands or refuse to start:
+
+managed-settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "failIfUnavailable": true
+ }
+ }
+
+See [Enforce sandboxing with managed settings](</docs/en/sandboxing#enforce-sandboxing-with-managed-settings>).
+
+###
+
+
+
+`sandbox.autoAllowBashIfSandboxed`
+
+Let Claude Code run sandboxed Bash commands without a permission prompt. Commands that can’t run in the sandbox still go through the regular permission flow, and `deny` rules and content-scoped `ask` rules such as `Bash(git push *)` still apply; a bare `Bash` ask rule is skipped for sandboxed commands. Set it to `false` to send sandboxed commands through the regular permission flow too, which the `/sandbox` **Mode** tab calls regular permissions mode.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code runs sandboxed Bash commands without a permission prompt, subject to `deny` rules and content-scoped `ask` rules; `CLAUDE_CODE_SUBPROCESS_ENV_SCRUB` turns auto-allow off
+ * `false`: sandboxed commands go through the regular permission flow, so your allow rules and permission mode decide. The `/sandbox` **Mode** tab calls this regular permissions mode
+ * **Default** : `true`
+
+This keeps the sandbox on and sends sandboxed commands through the regular permission flow:
+
+settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "autoAllowBashIfSandboxed": false
+ }
+ }
+
+See [Sandbox modes](</docs/en/sandboxing#sandbox-modes>) for what auto-allow mode still prompts on and how it behaves in plan mode.
+
+###
+
+
+
+`sandbox.excludedCommands`
+
+Name commands that Claude Code always runs outside the sandbox, such as tools that don’t work under it. Each entry uses the same syntax as the content of a `Bash(...)` [permission rule](</docs/en/permissions#permission-rule-syntax>): an exact command, a prefix such as `docker *`, or a wildcard pattern. When any part of a compound command matches an entry, Claude Code runs the whole command unsandboxed.
+
+ * **Scope** : `Any file`
+ * **Type** : array of command patterns
+ * **Default** : unset, so every command Claude Code can sandbox runs sandboxed
+
+settings.json
+
+ {
+ "sandbox": {
+ "excludedCommands": ["docker *"]
+ }
+ }
+
+Excluded commands still go through the regular permission flow. Exclusion is a convenience, not a security boundary: prefer `filesystem.allowWrite` when a tool only needs to write somewhere specific. Entries merge across every settings file, and there is no managed-only lock for this list, so keep a managed list narrow.
+
+###
+
+
+
+`sandbox.allowUnsandboxedCommands`
+
+Let Claude retry a command outside the sandbox with the `dangerouslyDisableSandbox` parameter after the sandbox blocks it. Set it to `false` so Claude Code ignores that parameter completely and every command must run sandboxed or appear in `excludedCommands`, which the `/sandbox` **Overrides** tab shows as **Strict sandbox mode**. Use `false` in managed settings for policies that require strict sandboxing.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude can retry a command outside the sandbox with the `dangerouslyDisableSandbox` parameter after the sandbox blocks it
+ * `false`: Claude Code ignores that parameter, so every command runs sandboxed or appears in `excludedCommands`
+ * **Default** : `true`
+
+This enforces strict sandbox mode for everyone the managed settings cover:
+
+managed-settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "allowUnsandboxedCommands": false
+ }
+ }
+
+An unsandboxed retry goes through the regular permission flow: a prompt in Manual mode, the classifier in auto mode. See [The unsandboxed retry escape hatch](</docs/en/sandboxing#the-unsandboxed-retry-escape-hatch>).
+
+###
+
+
+
+`sandbox.filesystem`
+
+Control which paths sandboxed commands can read and write. By default they can write to the working directory, any directories you add with `--add-dir`, and the session temp directory, and can read the rest of the filesystem, including credential files. Widen or narrow that with the four path lists, or switch the filesystem layer off with `disabled`. See [Filesystem isolation](</docs/en/sandboxing#filesystem-isolation>) for the default boundaries.
+
+ * **Scope** : `Any file`
+ * **Type** : object with `allowWrite`, `denyWrite`, `denyRead`, and `allowRead` arrays, plus the `allowManagedReadPathsOnly` and `disabled` Booleans
+ * **Default** : unset, so the default read and write boundaries apply
+
+This lets sandboxed commands write to a build directory and your kubeconfig, and hides your AWS credentials file:
+
+settings.json
+
+ {
+ "sandbox": {
+ "filesystem": {
+ "allowWrite": ["/tmp/build", "~/.kube"],
+ "denyRead": ["~/.aws/credentials"]
+ }
+ }
+ }
+
+Claude Code enforces these lists at the OS sandbox boundary, so they apply to every subprocess a sandboxed command starts, such as `kubectl`, `terraform`, or `npm`, not only to Claude’s file tools. Your [permission rules](</docs/en/sandboxing#permission-rules>) feed the same lists: `Edit` allow and deny rules join `allowWrite` and `denyWrite`, `Read` deny rules join `denyRead`, and `WebFetch` allow and deny rules join the `network` domain lists. Every list merges across settings files. When you edit a list during a session, Claude Code [applies the change to the running session](</docs/en/settings#when-edits-take-effect>).
+
+####
+
+
+
+Sandbox path prefixes
+
+Paths in `allowWrite`, `denyWrite`, `denyRead`, `allowRead`, and `credentials.files` resolve by their prefix:
+
+Prefix| Meaning| Example
+---|---|---
+`/`| Absolute path from filesystem root| `/tmp/build` stays `/tmp/build`
+`~/`| Relative to home directory| `~/.kube` becomes `$HOME/.kube`
+`./` or no prefix| Relative to the project root for project settings, or to `~/.claude` for user settings| `./output` in `.claude/settings.json` resolves to `<project-root>/output`
+
+The `//path` prefix for absolute paths also works. If you use single-slash `/path` expecting project-relative resolution, switch to `./path`. This syntax differs from [Read and Edit permission rules](</docs/en/permissions#read-and-edit>), which use `//path` for absolute and `/path` for project-relative: sandbox filesystem paths use standard conventions, so `/tmp/build` is an absolute path. Claude Code strips a trailing slash from a directory path, so `~/.aws` and `~/.aws/` match the same directory. Before v2.1.224, Claude Code passed the trailing slash through to the sandbox, and Claude could still read or write paths under a `denyRead` or `denyWrite` entry written with one. Claude Code also removes a trailing `/**`, so `~/build/**` and `~/build` cover the same directory. Whether a wildcard such as `*` works depends on which list the entry is in and on the platform:
+
+ * **`allowWrite` and `denyWrite`**: on macOS, wildcards work. On Linux and WSL2, the sandbox mounts concrete paths, so Claude Code skips an entry that contains `*`, `?`, or `[` once the trailing `/**` is removed, and that entry has no effect. Claude Code adds the paths from your `Edit` permission rules to these lists, so the same limit applies to them, and the **Config** tab of `/sandbox` warns about `Edit` and `Read` permission rules that contain wildcards.
+ * **`denyRead` and `allowRead`**: wildcards work on every platform. On Linux and WSL2, Claude Code expands a read entry to the concrete paths it matches, which it doesn’t do for the write lists.
+
+###
+
+
+
+`sandbox.filesystem.allowWrite`
+
+Add paths where sandboxed commands can write, beyond the working directory and the session temp directory. Use it when a subprocess such as `kubectl` or a build tool needs to write outside the project.
+
+ * **Scope** : `Any file`
+ * **Type** : array of path strings, using the sandbox path prefixes
+ * **Default** : unset, so sandboxed commands can write only to the working directory and the session temp directory
+
+This lets a build write under `/tmp/build` and lets `kubectl` update your kubeconfig:
+
+settings.json
+
+ {
+ "sandbox": {
+ "filesystem": {
+ "allowWrite": ["/tmp/build", "~/.kube"]
+ }
+ }
+ }
+
+Entries merge across every settings file: user, project, local, and managed paths combine rather than replace each other, and Claude Code adds the paths from your `Edit(...)` allow permission rules. An `allowWrite` entry can’t lift a [protected path](</docs/en/sandboxing#protected-paths>).
+
+###
+
+
+
+`sandbox.filesystem.denyWrite`
+
+Block sandboxed commands from writing to specific paths, including paths inside a directory that is otherwise writable.
+
+ * **Scope** : `Any file`
+ * **Type** : array of path strings, using the sandbox path prefixes
+ * **Default** : unset
+
+This keeps sandboxed commands from changing system configuration or installing binaries:
+
+settings.json
+
+ {
+ "sandbox": {
+ "filesystem": {
+ "denyWrite": ["/etc", "/usr/local/bin"]
+ }
+ }
+ }
+
+Entries merge across every settings file, and Claude Code adds the paths from your `Edit(...)` deny permission rules.
+
+###
+
+
+
+`sandbox.filesystem.denyRead`
+
+Block sandboxed commands from reading specific paths, such as credential files that the default read policy would otherwise expose. To protect a credential file and keep it usable through the sandbox proxy, see `sandbox.credentials` instead.
+
+ * **Scope** : `Any file`
+ * **Type** : array of path strings, using the sandbox path prefixes
+ * **Default** : unset, so sandboxed commands keep the [default read access](</docs/en/sandboxing#filesystem-isolation>), which includes credential files such as `~/.aws/credentials`
+
+settings.json
+
+ {
+ "sandbox": {
+ "filesystem": {
+ "denyRead": ["~/.aws/credentials"]
+ }
+ }
+ }
+
+Entries merge across every settings file, and Claude Code adds the paths from your `Read(...)` deny permission rules. When `filesystem.disabled` is `true`, Claude Code doesn’t enforce these entries.
+
+###
+
+
+
+`sandbox.filesystem.allowRead`
+
+Re-open reading for specific paths inside a region that `denyRead` blocks, to build workspace-only read access. An exact or wildcard `denyRead` entry stays blocked inside a broader `allowRead`, as the [overlap table](</docs/en/sandboxing#configure-sandboxing>) shows. When a wildcard `denyRead` entry such as `~/**/.env` matches a directory, Claude Code blocks reads of its contents as well. Before v2.1.236 on macOS, Claude Code re-opened the paths a wildcard `denyRead` entry matched wherever a broader `allowRead` entry covered them, and left a matched directory’s contents readable.
+
+ * **Scope** : `Any file`
+ * **Type** : array of path strings, using the sandbox path prefixes
+ * **Default** : unset
+
+This blocks reads of your home directory except the project itself:
+
+settings.json
+
+ {
+ "sandbox": {
+ "filesystem": {
+ "denyRead": ["~/"],
+ "allowRead": ["."]
+ }
+ }
+ }
+
+Place a `.` entry in project settings: it resolves to the project root there and to `~/.claude` in user settings. Entries merge across every settings file unless `allowManagedReadPathsOnly` is set.
+
+###
+
+
+
+`sandbox.filesystem.allowManagedReadPathsOnly`
+
+Honor only the `allowRead` entries that come from managed settings, so developers can’t re-open read access to paths your organization blocked. `denyRead` entries still merge from every settings file.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: Claude Code honors only the `allowRead` entries from managed settings
+ * `false`: `allowRead` entries merge from every settings file
+ * **Default** : `false`
+
+This blocks reads of the home directory, re-opens `~/work`, and stops developers from re-opening anything else:
+
+managed-settings.json
+
+ {
+ "sandbox": {
+ "filesystem": {
+ "denyRead": ["~/"],
+ "allowRead": ["~/work"],
+ "allowManagedReadPathsOnly": true
+ }
+ }
+ }
+
+See [Keep developers from widening the policy](</docs/en/sandboxing#keep-developers-from-widening-the-policy>).
+
+###
+
+
+
+`sandbox.filesystem.disabled`
+
+Skip filesystem isolation while keeping network isolation. Sandboxed commands get unrestricted read and write access to the host filesystem, and their network egress stays confined to `network.allowedDomains`. Use it when you sandbox to control where commands connect rather than what they write. Requires Claude Code v2.1.216 or later.
+
+ * **Scope** : `User or managed`. When managed settings configure `sandbox.filesystem` at all, or list a `sandbox.credentials.files` entry with `"mode": "deny"`, only managed settings can set it.
+ * **Type** : Boolean
+ * `true`: Claude Code skips filesystem isolation and keeps network isolation
+ * `false`: filesystem isolation stays on
+ * **Default** : `false`, so filesystem isolation stays on
+
+This leaves the filesystem open and confines network egress to GitHub and npm:
+
+settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "filesystem": {
+ "disabled": true
+ },
+ "network": {
+ "allowedDomains": ["github.com", "*.npmjs.org"]
+ }
+ }
+ }
+
+With the layer off, Claude Code doesn’t enforce `denyRead` or `credentials.files` `deny` entries, while `credentials.envVars` entries and applied `mask` entries keep working. `autoAllowBashIfSandboxed` still defaults to `true`, so set it to `false` to keep prompting. See [Disable filesystem isolation](</docs/en/sandboxing#disable-filesystem-isolation>) for the full list of sources that can set it and what changes when isolation is off. Requires Claude Code v2.1.216 or later.
+
+###
+
+
+
+`sandbox.ignoreViolations`
+
+Silence sandbox violation reports for paths you expect a command to probe and be refused, such as a tool that checks `/etc/hosts` on startup, so those denials don’t show up as violations or in what Claude sees. The sandbox still blocks the access; only the report is suppressed. Keys are substrings to match against the command, with `*` matching every command, and values are substrings of the violation to ignore for that command, such as a filesystem path.
+
+ * **Scope** : `Any file`
+ * **Type** : object mapping a command substring to an array of violation substrings, usually paths
+ * **Default** : unset, so every violation is reported
+
+settings.json
+
+ {
+ "sandbox": {
+ "ignoreViolations": {
+ "*": ["/etc/hosts"]
+ }
+ }
+ }
+
+###
+
+
+
+`sandbox.enableWeakerNestedSandbox`
+
+Run the Linux sandbox inside an unprivileged Docker container, where bubblewrap can’t mount a fresh `/proc`. Instead the inner sandbox bind-mounts the container’s existing `/proc`, which exposes process information that a fresh mount would hide. This reduces security; use it only when the outer container already provides the isolation you need.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: the inner sandbox bind-mounts the container’s existing `/proc` instead of mounting a fresh one
+ * `false`: the sandbox mounts a fresh `/proc`, which doesn’t work in an unprivileged Docker container
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "enableWeakerNestedSandbox": true
+ }
+ }
+
+Linux and WSL2 only. See [Bubblewrap fails to start inside a container](</docs/en/sandboxing#troubleshooting>).
+
+###
+
+
+
+`sandbox.enableWeakerNetworkIsolation`
+
+Let sandboxed commands on macOS reach the system TLS trust service, `com.apple.trustd.agent`. Go-based tools such as `gh`, `gcloud`, and `terraform` need it to verify TLS certificates when you use `network.httpProxyPort` with a MITM proxy and a custom CA. This reduces security by opening a potential data exfiltration path through the trust service.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: sandboxed commands on macOS can reach `com.apple.trustd.agent`
+ * `false`: sandboxed commands on macOS can’t reach the system TLS trust service
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "enableWeakerNetworkIsolation": true
+ }
+ }
+
+If you don’t use a MITM proxy, list the failing tools in `excludedCommands` instead; see [Go-based CLIs fail TLS verification on macOS](</docs/en/sandboxing#troubleshooting>).
+
+###
+
+
+
+`sandbox.allowAppleEvents`
+
+Let sandboxed commands on macOS send Apple Events, which `open`, `osascript`, and tools that open URLs in a browser need; without it they fail with error `-600`. This removes code-execution isolation: sandboxed commands can launch other applications unsandboxed with no user prompt, and can send AppleScript commands to running applications such as Terminal, subject to the per-app macOS automation-consent prompt (TCC).
+
+ * **Scope** : `User or managed`
+ * **Type** : Boolean
+ * `true`: sandboxed commands on macOS can send Apple Events
+ * `false`: sandboxed commands on macOS can’t send Apple Events, so `open` and `osascript` fail with error `-600`
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "allowAppleEvents": true
+ }
+ }
+
+To keep isolation and still run one such tool, add it to `excludedCommands` instead. See [Apple Events on macOS](</docs/en/sandboxing#security-limitations>).
+
+###
+
+
+
+`sandbox.ripgrep`
+
+Point the sandbox at a ripgrep binary of your own instead of the one Claude Code uses, for example when your platform needs a differently built `rg`.
+
+ * **Scope** : `User or managed`
+ * **Type** : object with `command`, the path to the ripgrep binary, and optional `args`, an array of arguments to prepend
+ * **Default** : unset, so the sandbox uses the same ripgrep binary as Claude Code. That is the bundled binary unless you set [`USE_BUILTIN_RIPGREP`](</docs/en/env-vars>) to `0`
+
+settings.json
+
+ {
+ "sandbox": {
+ "ripgrep": {
+ "command": "/usr/local/bin/rg"
+ }
+ }
+ }
+
+###
+
+
+
+`sandbox.bwrapPath`
+
+Point the sandbox at a bubblewrap binary installed outside `PATH`, such as a vendored copy on an air-gapped host. Claude Code uses the path both for the startup dependency check and when it wraps each sandboxed command.
+
+ * **Scope** : `Managed`. Claude Code reads it only from managed settings so that a user, project, or local file can’t point the sandbox at a different binary.
+ * **Type** : string, an absolute path; Claude Code drops a relative path and falls back to `PATH` lookup
+ * **Default** : unset, so Claude Code finds `bwrap` on `PATH`
+
+managed-settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "bwrapPath": "/opt/admin/bwrap"
+ }
+ }
+
+Linux and WSL2 only.
+
+###
+
+
+
+`sandbox.socatPath`
+
+Point the sandbox network proxy at a `socat` binary installed outside `PATH`.
+
+ * **Scope** : `Managed`
+ * **Type** : string, an absolute path; Claude Code drops a relative path and falls back to `PATH` lookup
+ * **Default** : unset, so Claude Code finds `socat` on `PATH`
+
+managed-settings.json
+
+ {
+ "sandbox": {
+ "enabled": true,
+ "socatPath": "/opt/admin/socat"
+ }
+ }
+
+Linux and WSL2 only.
+
+###
+
+
+
+`sandbox.credentials`
+
+Declare the credential files and environment variables to [protect from sandboxed commands](</docs/en/sandboxing#protect-credentials>). Each entry names a file `path` or a variable `name` and a `mode`: `deny` hides the credential inside the sandbox, and `mask` shows sandboxed commands a placeholder while the [sandbox proxy](</docs/en/sandboxing#mask-credentials>) substitutes the real value on outbound requests. Claude Code protects only the entries you list; there is no built-in credential deny list. Requires Claude Code v2.1.187 or later.
+
+ * **Scope** : `Any file`. `deny` entries merge from every scope, and Claude Code honors `mask` entries, `allowPlaintextInject`, `awsPairs`, and `sigv4` only from user settings, managed settings, and the `--settings` flag.
+ * **Type** : object with `files`, `envVars`, `allowPlaintextInject`, `awsPairs`, and `sigv4`
+ * **Default** : unset, so no credentials are protected
+
+This hides your AWS credentials file and removes `GITHUB_TOKEN` from sandboxed commands:
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "files": [{ "path": "~/.aws/credentials", "mode": "deny" }],
+ "envVars": [{ "name": "GITHUB_TOKEN", "mode": "deny" }]
+ }
+ }
+ }
+
+The `deny` file protection is part of the filesystem layer, so it doesn’t apply when you [disable filesystem isolation](</docs/en/sandboxing#disable-filesystem-isolation>); the environment variable protection still does. Requires Claude Code v2.1.187 or later.
+
+####
+
+
+
+Invalid credential entries in managed settings
+
+When a managed `sandbox.credentials` entry fails validation, Claude Code keeps protecting the credential where it can:
+
+ * An entry in `files` or `envVars` that still has a valid `path` or `name` and a `mode` of `mask` or `deny`, such as one whose `extract` pattern has no capturing group, is degraded to `mode: "deny"` with a warning, so the credential stays blocked, not masked, until you fix the entry. A degraded `files` entry pins [`filesystem.disabled`](</docs/en/sandboxing#disable-filesystem-isolation>) like an explicit `deny` entry, and the warning notes that its read block isn’t enforced if managed settings turn filesystem isolation off.
+ * An entry with an unknown `mode` or an invalid `path` or `name` is stripped.
+ * Each case warns; whether an entry is degraded or stripped, the remaining valid entries are still enforced, and a wholly invalid `credentials` value is dropped while the rest of `sandbox` still applies.
+
+Applies in v2.1.191 and later; before v2.1.221, every invalid entry was stripped. For the other managed keys with per-field handling, see [Invalid entries in managed settings](</docs/en/managed-settings#invalid-entries-in-managed-settings>).
+
+###
+
+
+
+`sandbox.credentials.files`
+
+Protect credential files or directories from sandboxed commands. With `"mode": "deny"`, Claude Code blocks reads of the path inside the sandbox, the same read block as `sandbox.filesystem.denyRead`. With `"mode": "mask"`, sandboxed commands on Linux and WSL2 read a sentinel copy of the file, and the sandbox proxy substitutes the real value on outbound requests to that entry’s `injectHosts`; on macOS the file is unreadable inside the sandbox instead. Requires Claude Code v2.1.187 or later, and `"mode": "mask"` requires v2.1.221 or later.
+
+ * **Scope** : `Any file`. Claude Code drops `mask` entries from project `.claude/settings.json` and local `.claude/settings.local.json`.
+ * **Type** : array of objects, each with `path` and a `mode` of `"deny"` or `"mask"`, plus the optional mask fields for files
+ * **Default** : unset, so no credential files are protected
+
+This hides your AWS credentials file and masks the `gh` hosts file, substituting the real value only on requests to `api.github.com`:
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "files": [
+ { "path": "~/.aws/credentials", "mode": "deny" },
+ { "path": "~/.config/gh/hosts.yml", "mode": "mask", "injectHosts": ["api.github.com"] }
+ ]
+ }
+ }
+ }
+
+Paths use the same prefixes as the `sandbox.filesystem.*` settings, and Claude Code merges the arrays from every settings scope. `mask` substitution runs only through the sandbox proxy, so set `sandbox.network.tlsTerminate`, or `allowPlaintextInject` for plain-HTTP test networks. `mask` applies to a single file, so list each credential file individually. Claude Code accepts but ignores the `mask` fields on a `deny` entry. [Mask credential files](</docs/en/sandboxing#mask-credential-files>) covers which settings sources are honored and when an entry falls back to `deny`. Requires Claude Code v2.1.187 or later; `mask` entries require v2.1.221 or later.
+
+####
+
+
+
+Mask fields for files
+
+A `mask` entry accepts these optional fields. Without `extract` or `decode`, Claude Code replaces the entire file content with one sentinel. On macOS with filesystem isolation on, Claude Code applies a `mask` entry as `deny` before `extract` or `decode` runs; see [Mask credential files](</docs/en/sandboxing#mask-credential-files>).
+
+Field| Type| What it does
+---|---|---
+`extract`| string, a regular expression with at least one capturing group| Mask only the text captured by group 1 of each match, so the rest of the file stays parseable. With `decode` also set, Claude Code checks each capture as a possible JWT instead of replacing it outright. Requires v2.1.221 or later
+`onExtractNoMatch`| `"warn"`, `"deny"`, or `"error"`; default `"warn"`| What happens when `extract` or `decode` finds nothing to mask. `warn` leaves the file readable as-is inside the sandbox, `deny` makes it unreadable, and `error` stops sandbox setup until you fix the configuration. Claude Code treats `deny` as `error` when the read block wouldn’t be enforced, because you [disable filesystem isolation](</docs/en/sandboxing#disable-filesystem-isolation>) or a `sandbox.filesystem.allowRead` entry re-opens the path. Requires v2.1.221 or later; the `decode` case requires v2.1.224 or later
+`decode`| the string `"jwt"`| Find JSON Web Tokens (JWTs) in the file, with a built-in pattern or with `extract` when set, verify each candidate, and replace it with a structurally valid fake token, so code inside the sandbox that decodes the token keeps working. When no candidate verifies, `onExtractNoMatch` governs the outcome. Requires v2.1.224 or later
+`maskClaims`| array of strings, at least one claim name; requires `decode`| Mask only the named top-level payload claims inside each verified JWT and rebuild the token around the modified payload, so the other claims stay readable. When no named claim matches, `onExtractNoMatch` governs the outcome. Requires v2.1.224 or later
+`maskDuplicates`| Boolean, default `false`| Also replace verbatim copies of each masked value elsewhere in the file, such as a secret pasted into a comment. Claude Code matches raw substrings, so reserve it for long, high-entropy secrets. Consulted only when `extract` or `decode` is set. Requires v2.1.221 or later
+`injectHosts`| array of strings, each a host that `sandbox.network.allowedDomains` also admits| Narrow the hosts where the sandbox proxy substitutes the real value. When unset, the proxy substitutes it on requests to every host in `sandbox.network.allowedDomains`. Requires v2.1.221 or later
+
+This masks only the `oauth_token` value in the `gh` hosts file, replaces every other copy of it in the file, makes the file unreadable if the pattern matches nothing, and substitutes the real token only on requests to `api.github.com`:
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "files": [
+ {
+ "path": "~/.config/gh/hosts.yml",
+ "mode": "mask",
+ "extract": "oauth_token:\\s*(\\S+)",
+ "maskDuplicates": true,
+ "onExtractNoMatch": "deny",
+ "injectHosts": ["api.github.com"]
+ }
+ ]
+ }
+ }
+ }
+
+###
+
+
+
+`sandbox.credentials.envVars`
+
+Protect environment variables from sandboxed commands. With `"mode": "deny"`, Claude Code removes the variable from the environment of sandboxed commands. With `"mode": "mask"`, sandboxed commands see a per-session sentinel value, and the sandbox proxy substitutes the real value on outbound requests to that entry’s `injectHosts`, so tools such as `gh` and `npm` keep authenticating without ever holding the real credential. Requires Claude Code v2.1.187 or later, and `"mode": "mask"` requires v2.1.199 or later.
+
+ * **Scope** : `Any file`. Claude Code drops `mask` entries from project `.claude/settings.json` and local `.claude/settings.local.json`.
+ * **Type** : array of objects, each with `name` and a `mode` of `"deny"` or `"mask"`, plus the optional mask fields for environment variables
+ * **Default** : unset, so no environment variables are protected
+
+This removes `NPM_TOKEN` from sandboxed commands and masks `GITHUB_TOKEN`, substituting the real value only on requests to `api.github.com`:
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "envVars": [
+ { "name": "NPM_TOKEN", "mode": "deny" },
+ { "name": "GITHUB_TOKEN", "mode": "mask", "injectHosts": ["api.github.com"] }
+ ]
+ }
+ }
+ }
+
+The `name` must start with a letter or underscore and contain only letters, digits, and underscores. Claude Code merges the arrays from every settings scope, and `deny` takes precedence when the same variable appears with both modes. `mask` substitution runs only through the sandbox proxy, so set `sandbox.network.tlsTerminate`, or `allowPlaintextInject` for plain-HTTP test networks; see [Mask environment variables](</docs/en/sandboxing#mask-environment-variables>). Claude Code accepts but ignores the `mask` fields on a `deny` entry. Requires Claude Code v2.1.187 or later; `mask` entries require v2.1.199 or later.
+
+####
+
+
+
+Mask fields for environment variables
+
+A `mask` entry accepts these optional fields. Without `extract` or `decode`, Claude Code replaces the entire value with one sentinel. `extract` and `decode` can’t be combined on the same entry.
+
+Field| Type| What it does
+---|---|---
+`extract`| string, a regular expression with at least one capturing group| Mask only the text captured by group 1 of each match, such as the password inside a `DATABASE_URL` connection string, so the rest of the value stays parseable. Requires v2.1.224 or later
+`onExtractNoMatch`| `"warn"`, `"deny"`, or `"error"`; default `"warn"`. On an entry with `decode`, only `"warn"` is accepted| What happens when `extract` matches nothing. `warn` passes the variable through unmasked, `deny` unsets it inside the sandbox, and `error` stops sandbox setup until you fix the configuration. Requires v2.1.224 or later
+`decode`| the string `"jwt"`| Verify the whole value is a JWT and replace it with a structurally valid fake token, so code inside the sandbox that decodes the token keeps working; the proxy substitutes the whole real token on egress. A value that doesn’t verify passes through unmasked with a warning. Requires v2.1.224 or later
+`maskClaims`| array of strings, at least one claim name; requires `decode`| Mask only the named top-level payload claims inside the decoded JWT and rebuild the token around the modified payload, so the other claims stay readable. When no named claim matches, the variable passes through unmasked with a warning. Requires v2.1.224 or later
+`injectHosts`| array of strings, each a host that `sandbox.network.allowedDomains` also admits| Narrow the hosts where the sandbox proxy substitutes the real value. When unset, the proxy substitutes it on requests to every host in `sandbox.network.allowedDomains`. Write an IPv6 destination as the bare compressed address, such as `"::1"`, not the bracketed form; see [IPv6 destinations in `injectHosts`](</docs/en/sandboxing#ipv6-destinations-in-injecthosts>). Requires v2.1.199 or later
+
+This masks only the password inside `DATABASE_URL`, unsets the variable if the pattern matches nothing, and masks a JWT in `SERVICE_JWT` while leaving every claim except `api_key` readable:
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "envVars": [
+ {
+ "name": "DATABASE_URL",
+ "mode": "mask",
+ "extract": "://[^:]+:([^@]+)@",
+ "onExtractNoMatch": "deny"
+ },
+ {
+ "name": "SERVICE_JWT",
+ "mode": "mask",
+ "decode": "jwt",
+ "maskClaims": ["api_key"]
+ }
+ ]
+ }
+ }
+ }
+
+###
+
+
+
+`sandbox.credentials.allowPlaintextInject`
+
+Allow `mask` substitution on plain HTTP requests as well as TLS-terminated HTTPS. On plain HTTP the upstream identity is unverified and the credential travels in cleartext, so leave this off outside trusted test networks. Requires Claude Code v2.1.199 or later.
+
+ * **Scope** : `User or managed`
+ * **Type** : Boolean
+ * `true`: Claude Code allows `mask` substitution on plain HTTP requests as well as TLS-terminated HTTPS
+ * `false`: Claude Code allows `mask` substitution only on TLS-terminated HTTPS
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "allowPlaintextInject": true
+ }
+ }
+ }
+
+Requires Claude Code v2.1.199 or later.
+
+###
+
+
+
+`sandbox.credentials.awsPairs`
+
+Group masked environment variables that form one AWS credential for [SigV4 re-signing](</docs/en/sandboxing#re-sign-aws-requests>) when your credential lives in variables with non-standard names. Claude Code links the conventional `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN` trio automatically when you mask their whole values, so you need this key only for other names. Requires Claude Code v2.1.224 or later.
+
+ * **Scope** : `User or managed`
+ * **Type** : array of objects, each with `accessKeyIdVar`, `secretAccessKeyVar`, and optionally `sessionTokenVar`, naming `sandbox.credentials.envVars` entries
+ * **Default** : unset, so only the conventional trio is paired
+
+This links three custom-named variables into one AWS credential for re-signing:
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "awsPairs": [
+ {
+ "accessKeyIdVar": "MY_KEY_ID",
+ "secretAccessKeyVar": "MY_SECRET_KEY",
+ "sessionTokenVar": "MY_SESSION_TOKEN"
+ }
+ ]
+ }
+ }
+ }
+
+Each named variable must be a whole-value `mask` entry in `sandbox.credentials.envVars`, without `extract` or `decode`, and can fill only one slot across all pairs.
+
+###
+
+
+
+`sandbox.credentials.sigv4`
+
+Choose what the sandbox proxy does with AWS request forms it [can’t re-sign](</docs/en/sandboxing#re-sign-aws-requests>): `streaming` for aws-chunked streaming uploads, `presigned` for presigned URLs, and `sigv4a` for SigV4A asymmetric signatures. This applies only to requests signed with a masked pair’s placeholder access key ID. Requires Claude Code v2.1.224 or later.
+
+ * **Scope** : `User or managed`
+ * **Type** : object with `streaming`, `presigned`, and `sigv4a`, each one of:
+ * `"deny"`: the proxy fails the request
+ * `"passthrough"`: the proxy forwards the request signed with the masked placeholder, so the tool receives AWS’s own rejection
+ * **Default** : unset, so every form is `"deny"`
+
+This forwards streaming uploads instead of failing them at the proxy:
+
+settings.json
+
+ {
+ "sandbox": {
+ "credentials": {
+ "sigv4": {
+ "streaming": "passthrough"
+ }
+ }
+ }
+ }
+
+With `deny`, the proxy fails the request. With `passthrough`, the proxy forwards the request with its signature computed from the masked placeholder, so AWS rejects it and the calling tool receives AWS’s own response instead of a proxy error.
+
+###
+
+
+
+`sandbox.network`
+
+Control which hosts, ports, and sockets sandboxed commands can reach. The sandbox routes outbound traffic through a proxy that enforces these lists; see [Network isolation](</docs/en/sandboxing#network-isolation>) for how the proxy decides and when it prompts.
+
+ * **Scope** : `Any file`. `strictAllowlist`, `allowManagedDomainsOnly`, and `tlsTerminate` are read from fewer sources, as their entries say.
+ * **Type** : object with the sub-keys below
+ * **Default** : unset, so no domains are pre-allowed and the sandbox prompts for each new host
+
+This pre-allows GitHub and npm, blocks `uploads.github.com`, and lets commands bind to localhost:
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "allowedDomains": ["github.com", "*.npmjs.org"],
+ "deniedDomains": ["uploads.github.com"],
+ "allowLocalBinding": true
+ }
+ }
+ }
+
+Claude Code merges the array sub-keys across settings scopes and deduplicates them, so a project can add domains to your user list. `WebFetch(domain:...)` allow and deny [permission rules](</docs/en/sandboxing#permission-rules>) feed the same allow and deny lists.
+
+###
+
+
+
+`sandbox.network.allowUnixSockets`
+
+List the Unix socket paths sandboxed commands can connect to on macOS. Claude Code ignores this list on Linux and WSL2, where the seccomp filter can’t inspect socket paths; use `allowAllUnixSockets` there instead.
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings, each a socket path
+ * **Default** : unset, so the macOS sandbox blocks every Unix socket
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "allowUnixSockets": ["~/.ssh/agent-socket"]
+ }
+ }
+ }
+
+A socket path can grant broad access: allowing `/var/run/docker.sock`, for example, lets a sandboxed command control the Docker daemon. See [Security limitations](</docs/en/sandboxing#security-limitations>).
+
+###
+
+
+
+`sandbox.network.allowAllUnixSockets`
+
+Let sandboxed commands connect to every Unix socket. On Linux and WSL2, the sandbox’s [seccomp filter](</docs/en/sandboxing#set-up-linux-and-wsl2>) blocks `socket(AF_UNIX, ...)` calls, so this is the only way to permit Unix sockets there. When the filter is missing, which `/sandbox` reports on its Dependencies tab, the sandbox doesn’t block Unix-socket calls. See [Set up Linux and WSL2](</docs/en/sandboxing#set-up-linux-and-wsl2>) for where the filter comes from.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: sandboxed commands can connect to every Unix socket
+ * `false`: the sandbox blocks Unix-socket connections: on macOS except the paths in `allowUnixSockets`, and on Linux and WSL2 through the seccomp filter when it’s present
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "allowAllUnixSockets": true
+ }
+ }
+ }
+
+On WSL2, `true` also reopens the interop socket that launches Windows binaries such as `cmd.exe` and `powershell.exe`.
+
+###
+
+
+
+`sandbox.network.allowLocalBinding`
+
+Let sandboxed commands bind to localhost ports on macOS, for example to start a dev server.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: sandboxed commands can bind to localhost ports on macOS
+ * `false`: sandboxed commands on macOS can’t bind to localhost ports
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "allowLocalBinding": true
+ }
+ }
+ }
+
+###
+
+
+
+`sandbox.network.allowMachLookup`
+
+List additional XPC and Mach service names the macOS sandbox may look up. Tools that communicate over XPC, such as the iOS Simulator or Playwright, need their services listed here.
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings, each a service name; a single trailing `*` matches a prefix, and `"*"` alone matches every service
+ * **Default** : unset
+
+This allows every service under the `com.apple.coresimulator.` prefix:
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "allowMachLookup": ["com.apple.coresimulator.*"]
+ }
+ }
+ }
+
+###
+
+
+
+`sandbox.network.allowedDomains`
+
+Pre-allow domains for outbound traffic from sandboxed commands, so the sandbox doesn’t prompt for them. Wildcards such as `*.example.com` match subdomains, and an optional `:port` suffix limits an entry to one port; an entry without a port matches every port.
+
+ * **Scope** : `Any file`. Only managed settings when `allowManagedDomainsOnly` is set.
+ * **Type** : array of strings, each a domain, wildcard pattern, or IP literal, with an optional `:port` suffix
+ * **Default** : unset, so the sandbox prompts the first time a command reaches a new host
+
+This pre-allows GitHub on every port, every npm subdomain, and one API host on port 443 only:
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "allowedDomains": ["github.com", "*.npmjs.org", "api.example.com:443"]
+ }
+ }
+ }
+
+Write IPv6 literals bracketed, with an optional port: `"[::1]"` allows every port and `"[::1]:443"` one port. The bracketed form requires Claude Code v2.1.229 or later. See [IPv6 addresses in domain lists](</docs/en/sandboxing#ipv6-addresses-in-domain-lists>).
+
+###
+
+
+
+`sandbox.network.deniedDomains`
+
+Block domains for outbound traffic from sandboxed commands, using the same wildcard, port, and IPv6 syntax as `allowedDomains`. A denied domain stays blocked even when an `allowedDomains` entry matches it too.
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings, each a domain, wildcard pattern, or IP literal, with an optional `:port` suffix
+ * **Default** : unset
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "deniedDomains": ["sensitive.cloud.example.com"]
+ }
+ }
+ }
+
+Claude Code merges this list from every settings source even when `allowManagedDomainsOnly` is set, so a developer can always tighten the deny list. For IPv6 literals, see [IPv6 addresses in domain lists](</docs/en/sandboxing#ipv6-addresses-in-domain-lists>).
+
+###
+
+
+
+`sandbox.network.strictAllowlist`
+
+Deny sandboxed commands access to hosts outside the allowlist instead of prompting for approval. The allowlist is `allowedDomains` plus domains from `WebFetch(domain:...)` allow rules, or only the managed settings entries when `allowManagedDomainsOnly` is set. Requires Claude Code v2.1.219 or later.
+
+ * **Scope** : `User or managed`. A repository can’t turn it on or off.
+ * **Type** : Boolean
+ * `true`: Claude Code denies sandboxed commands access to hosts outside the allowlist
+ * `false`: unless another trusted settings file sets `true`, Claude Code decides a host outside the allowlist by permission mode instead of denying it outright: it runs the classifier in auto mode, denies in `dontAsk` mode, allows in `bypassPermissions` mode and in plan mode when bypass is available, and otherwise asks you
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "strictAllowlist": true
+ }
+ }
+ }
+
+Claude Code enforces this for sandboxed commands only; in-process tools such as `WebFetch` still follow their [permission rules](</docs/en/sandboxing#permission-rules>). When any of the honored sources sets it to `true`, it stays on. See [Network isolation](</docs/en/sandboxing#network-isolation>). Requires Claude Code v2.1.219 or later.
+
+###
+
+
+
+`sandbox.network.allowManagedDomainsOnly`
+
+Lock the network allowlist to what managed settings define. Claude Code then honors only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings, ignores domains from user, project, local, and `--settings` settings, and blocks a non-allowed domain automatically instead of prompting.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: Claude Code honors only `allowedDomains` and `WebFetch(domain:...)` allow rules from managed settings and blocks a non-allowed domain instead of prompting
+ * `false`: domains from user, project, local, and `--settings` settings merge into the allowlist
+ * **Default** : `false`
+
+This locks the allowlist to GitHub and npm and ignores any domains developers add:
+
+managed-settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "allowManagedDomainsOnly": true,
+ "allowedDomains": ["github.com", "*.npmjs.org"]
+ }
+ }
+ }
+
+Denied domains still merge from every source. See [Keep developers from widening the policy](</docs/en/sandboxing#keep-developers-from-widening-the-policy>).
+
+###
+
+
+
+`sandbox.network.httpProxyPort`
+
+Point the sandbox at your own HTTP proxy instead of the one Claude Code runs. Organizations do this to inspect HTTPS traffic, apply their own filtering rules, or log every request. When unset, Claude Code starts its own proxy for HTTP traffic.
+
+ * **Scope** : `Any file`
+ * **Type** : number, a local TCP port
+ * **Default** : unset, so Claude Code runs its own proxy
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "httpProxyPort": 8080
+ }
+ }
+ }
+
+Set `socksProxyPort` too if your proxy should carry SOCKS traffic as well; with only one of the two set, Claude Code still runs its own proxy for the other protocol. See [Custom proxy configuration](</docs/en/sandboxing#custom-proxy-configuration>).
+
+###
+
+
+
+`sandbox.network.socksProxyPort`
+
+Point the sandbox at your own SOCKS5 proxy instead of the one Claude Code runs. When unset, Claude Code starts its own proxy for SOCKS traffic.
+
+ * **Scope** : `Any file`
+ * **Type** : number, a local TCP port
+ * **Default** : unset, so Claude Code runs its own proxy
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "socksProxyPort": 8081
+ }
+ }
+ }
+
+See [Custom proxy configuration](</docs/en/sandboxing#custom-proxy-configuration>).
+
+###
+
+
+
+`sandbox.network.tlsTerminate`
+
+Make the sandbox proxy terminate TLS so it can read the contents of HTTPS requests. This is experimental, and `mask` [credential substitution](</docs/en/sandboxing#mask-credentials>) requires it. Set `{}` to generate an ephemeral certificate authority for the session, or set `caCertPath` and `caKeyPath` to use your own.
+
+ * **Scope** : `User or managed`. A repository can’t switch it on or supply a certificate authority.
+ * **Type** : object with optional `caCertPath` and `caKeyPath` strings, each a file path
+ * **Default** : unset, so the proxy doesn’t terminate or inspect TLS
+
+settings.json
+
+ {
+ "sandbox": {
+ "network": {
+ "tlsTerminate": {}
+ }
+ }
+ }
+
+When more than one honored source sets it, Claude Code uses the value from the highest-precedence source: managed settings, then the `--settings` flag, then user settings. Requires Claude Code v2.1.199 or later.
+
+##
+
+
+
+Memory and context
+
+Control what Claude Code loads into context, how it compacts, and where it keeps memory and plans. See [Manage context](</docs/en/context-window>) and [Memory](</docs/en/memory>).
+
+###
+
+
+
+`autoCompactEnabled`
+
+Have Claude Code [compact the conversation automatically](</docs/en/context-window#when-your-context-fills-up>) when context approaches the limit. Appears in `/config` as **Auto-compact** , and toggling it there writes this key to your user settings.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code compacts the conversation automatically when context approaches the limit
+ * `false`: Claude Code doesn’t compact automatically
+ * **Default** : `true`
+ * **Per-session overrides** : [`DISABLE_AUTO_COMPACT`](</docs/en/env-vars>) turns auto-compact off for one session; whichever of the two turns it off, the other can’t turn it back on
+
+settings.json
+
+ {
+ "autoCompactEnabled": false
+ }
+
+The manual `/compact` command keeps working while auto-compact is off.
+
+###
+
+
+
+`autoCompactWindow`
+
+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
+ * **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
+
+settings.json
+
+ {
+ "autoCompactWindow": 500000
+ }
+
+Set it with the [`/autocompact`](</docs/en/commands#all-commands>) command, which writes this key to your user settings. [Set the auto-compact window](</docs/en/model-config#set-the-auto-compact-window>) covers how the command, flag, variable, and setting interact.
+
+###
+
+
+
+`autoMemoryDirectory`
+
+Store [auto memory](</docs/en/memory#storage-location>) in a directory of your choice instead of the per-project default.
+
+ * **Scope** : `Any file`
+ * **Type** : string, an absolute or `~/`-prefixed directory path
+ * **Default** : unset, so Claude Code uses `~/.claude/projects/<project>/memory/`
+
+settings.json
+
+ {
+ "autoMemoryDirectory": "~/my-memory-dir"
+ }
+
+From project or local settings, Claude Code honors this key under the same [workspace trust rule as hooks](</docs/en/permissions#what-runs-before-you-trust-a-folder>), since a cloned repository can supply those files.
+
+###
+
+
+
+`autoMemoryEnabled`
+
+Turn [auto memory](</docs/en/memory#enable-or-disable-auto-memory>) on or off. When `false`, Claude doesn’t read from or write to the auto memory directory. You can also toggle it with `/memory` during a session, which writes this key to your user settings.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: the same as unset; auto memory stays on unless something that outranks this key turns it off for the session, such as `--bare`, safe mode, or `CLAUDE_CODE_DISABLE_AUTO_MEMORY`
+ * `false`: Claude doesn’t read from or write to the auto memory directory
+ * **Default** : `true`
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_AUTO_MEMORY`](</docs/en/env-vars>) takes precedence over this key for one session, in either direction
+
+settings.json
+
+ {
+ "autoMemoryEnabled": false
+ }
+
+###
+
+
+
+`claudeMd`
+
+Inject CLAUDE.md-style instructions as organization-managed memory without deploying a separate file. Claude Code loads the text as a managed memory entry ahead of user and project CLAUDE.md files.
+
+ * **Scope** : `Managed`
+ * **Type** : string, the text of a CLAUDE.md file; write it as you would the file, Markdown included, with line breaks as `\n`
+ * **Default** : unset
+
+This example deploys two rules as a short Markdown list:
+
+managed-settings.json
+
+ {
+ "claudeMd": "# Engineering rules\n\n- Always run make lint before committing.\n- Never push directly to main."
+ }
+
+See [Deploy organization-wide CLAUDE.md](</docs/en/memory#deploy-organization-wide-claude-md>).
+
+###
+
+
+
+`claudeMdExcludes`
+
+Skip specific `CLAUDE.md` files when Claude Code loads [memory](</docs/en/memory#exclude-specific-claude-md-files>). In a large monorepo, use it to skip CLAUDE.md files from other teams that aren’t relevant to your work; [Exclude irrelevant CLAUDE.md files](</docs/en/large-codebases#exclude-irrelevant-claude-md-files>) in the large-codebases guide walks through that case. Patterns match against absolute file paths.
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings, each a glob pattern or absolute path
+ * **Default** : unset, so Claude Code loads every CLAUDE.md it finds
+
+settings.json
+
+ {
+ "claudeMdExcludes": ["**/vendor/**/CLAUDE.md"]
+ }
+
+Exclusions apply only to user, project, and local memory files; managed policy CLAUDE.md files can’t be excluded.
+
+###
+
+
+
+`env`
+
+Set environment variables for every session and for the subprocesses Claude Code starts from it. Any variable in the [environment variables reference](</docs/en/env-vars>) can go here, which is how you apply one to every session or roll it out to your team.
+
+ * **Scope** : `Any file`
+ * **Type** : object mapping variable names to string values
+ * **Default** : unset
+
+This example turns off automatic compaction and routes API requests through a proxy:
+
+settings.json
+
+ {
+ "env": {
+ "DISABLE_AUTO_COMPACT": "1",
+ "ANTHROPIC_BASE_URL": "https://proxy.example.com"
+ }
+ }
+
+####
+
+
+
+How `env` values interact with your shell
+
+ * A value here overwrites the same variable exported in your shell, and when more than one settings file sets a variable, the [highest-precedence](</docs/en/settings#settings-precedence>) one applies.
+ * To cancel a shell export, set the variable to `""`. Claude Code treats an empty value as unset for provider selection, and subprocesses inherit the empty value.
+ * `NO_COLOR` and `FORCE_COLOR` set here reach only subprocesses. To change Claude Code’s own interface colors, set them in your shell before launching `claude`.
+ * Values here are plain text in the settings file and reach every subprocess Claude Code starts. For an OTLP bearer token that rotates, use `otelHeadersHelper`; for API credentials, use `apiKeyHelper`.
+
+####
+
+
+
+When Claude Code applies `env` values
+
+ * From user settings, `--settings`, and managed settings: at startup, and again in the running session when a saved change alters the merged `env`.
+ * From project and local settings: after you trust the workspace, or at startup in `-p` mode, which never shows the trust dialog, and again when a saved change alters the merged `env`.
+ * Variables Claude Code classifies as safe, such as model selection, timeouts and limits, feature toggles, and telemetry settings: at startup from every settings file.
+
+####
+
+
+
+Variables Claude Code ignores in `env`
+
+ * Project and local settings can’t set a few variables, 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`; set those in user or managed settings.
+ * Identity variables that Claude Code’s hosting environments own, such as `CLAUDE_CODE_REMOTE` and `CLAUDE_CODE_ACCOUNT_UUID`, are ignored from every file.
+ * [`CLAUDE_CODE_MESSAGING_SOCKET` and `CLAUDE_CODE_MESSAGING_TOKEN`](</docs/en/env-vars#variables>), which Claude Code exports itself, are ignored from every file. Ignoring the socket variable requires Claude Code v2.1.224 or later, and ignoring the token requires v2.1.228 or later.
+ * [`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.
+
+###
+
+
+
+`fileCheckpointingEnabled`
+
+Have Claude Code snapshot files before each edit so [`/rewind`](</docs/en/checkpointing>) can restore them. Appears in `/config` as **Rewind code (checkpoints)** , and toggling it there writes this key to your user settings.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code snapshots files before each edit so `/rewind` can restore them
+ * `false`: Claude Code doesn’t snapshot files, so `/rewind` can’t restore them
+ * **Default** : `true`
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING`](</docs/en/env-vars>) turns checkpointing off for one session; whichever of the two turns it off, the other can’t turn it back on
+
+settings.json
+
+ {
+ "fileCheckpointingEnabled": false
+ }
+
+In a `-p` run or an Agent SDK session, Claude Code ignores this key. The SDK turns checkpointing on with its `enableFileCheckpointing` option, and a bare `-p` run needs `CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING=true`. See [File checkpointing in the Agent SDK](</docs/en/agent-sdk/file-checkpointing>).
+
+###
+
+
+
+`plansDirectory`
+
+Choose where Claude Code stores the plan files it writes in [plan mode](</docs/en/permission-modes#analyze-before-you-edit-with-plan-mode>). Claude Code resolves the path relative to the project root and keeps the default when the path resolves outside it.
+
+ * **Scope** : `Any file`
+ * **Type** : string, a path relative to the project root
+ * **Default** : unset, so Claude Code uses `~/.claude/plans`
+
+settings.json
+
+ {
+ "plansDirectory": "./plans"
+ }
+
+###
+
+
+
+`skillListingBudgetFraction`
+
+Each turn, Claude sees a [listing of your skills](</docs/en/skills#skill-descriptions-are-cut-short>) with their descriptions, and Claude Code caps that listing at a share of the context window. When the listing is over the cap, Claude Code keeps every skill’s name but drops the descriptions of the least-used skills, so Claude can still invoke those skills but is less likely to choose one on its own. Raise this key to keep more descriptions visible at the cost of more context per turn.
+
+ * **Scope** : `Any file`
+ * **Type** : number, a fraction greater than `0` and at most `1`
+ * **Default** : `0.01`, which reserves 1% of the context window
+
+settings.json
+
+ {
+ "skillListingBudgetFraction": 0.02
+ }
+
+To see how much context the listing uses and which skills contribute most, run `/doctor`.
+
+###
+
+
+
+`skillListingMaxDescChars`
+
+Each turn, Claude sees a [listing of your skills](</docs/en/skills#skill-descriptions-are-cut-short>) that shows each skill’s `description` and `when_to_use` text. This key caps how many characters of that text Claude Code shows per skill; longer text is cut at the cap.
+
+ * **Scope** : `Any file`
+ * **Type** : number of characters, a positive integer
+ * **Default** : `1536`
+
+settings.json
+
+ {
+ "skillListingMaxDescChars": 2048
+ }
+
+Raise it to keep long descriptions intact at the cost of more context per turn; lower it to fit more skills under `skillListingBudgetFraction`.
+
+##
+
+
+
+Interface and terminal
+
+Change how Claude Code looks and behaves in your terminal: theme, editor mode, status line, spinner, notifications inside the session, and accessibility. See [Terminal configuration](</docs/en/terminal-config>).
+
+###
+
+
+
+`askUserQuestionTimeout`
+
+Let an unanswered [`AskUserQuestion`](</docs/en/tools-reference>) dialog auto-continue after a period of idle time, submitting whatever options you had already selected. Set it when you step away and want Claude to continue without you. With the default, questions wait until you answer them. Requires Claude Code v2.1.200 or later.
+
+ * **Scope** : `User or managed`
+ * **Type** : string, one of `"60s"`, `"5m"`, `"10m"`, or `"never"`
+ * **Default** : `"never"`
+ * **Per-session overrides** : [`CLAUDE_AFK_TIMEOUT_MS`](</docs/en/env-vars>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "askUserQuestionTimeout": "5m"
+ }
+
+Appears in `/config` as **Question auto-continue timeout** , which writes this key to user settings; Claude Code hides the row while managed settings or the `--settings` flag set the key. Requires Claude Code v2.1.200 or later.
+
+###
+
+
+
+`autoScrollEnabled`
+
+Follow new output to the bottom of the conversation in [fullscreen rendering](</docs/en/fullscreen>). Turn it off to stay where you scrolled while Claude keeps working; permission prompts still scroll into view.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: the conversation follows new output to the bottom
+ * `false`: you stay where you scrolled while Claude keeps working; permission prompts still appear below the transcript
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "autoScrollEnabled": false
+ }
+
+Appears in `/config` as **Auto-scroll** when fullscreen rendering is on, which writes this key to user settings.
+
+###
+
+
+
+`axScreenReader`
+
+Render screen-reader friendly output: flat text without decorative borders or animations. Screen-reader mode uses the classic renderer, so the `tui` setting has no effect while it is active; attached [background sessions](</docs/en/agent-view>) still render fullscreen. Requires Claude Code v2.1.181 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code renders flat text without decorative borders or animations, using the classic renderer
+ * `false`: Claude Code renders normally
+ * **Default** : unset, so screen-reader mode is off
+ * **Per-session overrides** : [`--ax-screen-reader`](</docs/en/cli-reference#cli-flags>) takes precedence over [`CLAUDE_AX_SCREEN_READER`](</docs/en/env-vars>), and both take precedence over this key for one session
+
+settings.json
+
+ {
+ "axScreenReader": true
+ }
+
+Requires Claude Code v2.1.181 or later.
+
+###
+
+
+
+`companyAnnouncements`
+
+Show your organization’s announcements to users at startup. When you list more than one, Claude Code picks one at random for each session; on a person’s very first launch it shows the first entry.
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings
+ * **Default** : unset, so no announcement shows
+
+settings.json
+
+ {
+ "companyAnnouncements": [
+ "Welcome to Acme Corp! Review our code guidelines at docs.example.com"
+ ]
+ }
+
+###
+
+
+
+`defaultShell`
+
+Choose whether Bash or PowerShell runs the shell commands you type with the [`!` prefix](</docs/en/interactive-mode#shell-mode-with-prefix>) in the input box, the ones Claude Code runs directly and adds to the session. `"powershell"` works only while the [PowerShell tool](</docs/en/tools-reference#powershell-tool>) is on. The tool is on by default on Windows without Git Bash, and on Windows with Git Bash for claude.ai and Console accounts. In Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry sessions, and on macOS, Linux, and WSL, set `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` to turn the tool on. Set that variable to `0` to turn the tool off.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"bash"`: Claude Code runs your `!` commands in Bash
+ * `"powershell"`: Claude Code runs your `!` commands in PowerShell
+ * **Default** : `"bash"`, or `"powershell"` on Windows when Bash isn’t available
+
+settings.json
+
+ {
+ "defaultShell": "powershell"
+ }
+
+If the shell you name isn’t available, Claude Code uses the other one: `"powershell"` falls back to Bash when the PowerShell tool is off, and `"bash"` falls back to PowerShell when Bash isn’t installed.
+
+###
+
+
+
+`dialogExpiry`
+
+Set the deadline for dialogs Claude Code [forwards to a remote client](</docs/en/remote-control#limitations>), such as a Remote Control or SDK host, for the approval dialog for a [held cross-session message](</docs/en/cross-session-messaging#control-inbound-messages>), and for the mid-session [Fable 5 usage-credits consent prompt](</docs/en/model-config#fable-5-and-usage-credits>) in a session that may have nobody at the terminal. When no answer arrives before the deadline, Claude Code cancels the dialog and continues with its no-action default. Requires Claude Code v2.1.224 or later.
+
+ * **Scope** : `User or managed`
+ * **Type** : string, one of `"60s"`, `"5m"`, `"10m"`, or `"never"`, which disables the deadline
+ * **Default** : `"5m"`
+ * **Per-session overrides** : [`CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS`](</docs/en/env-vars>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "dialogExpiry": "10m"
+ }
+
+Permission prompts and [`AskUserQuestion`](</docs/en/tools-reference#askuserquestion-tool-behavior>) questions use their own flows and aren’t governed by this deadline. Appears in `/config` as **Dialog expiry** , which writes this key to user settings; the row requires Claude Code v2.1.232 or later, and Claude Code hides it while managed settings or the `--settings` flag set the key.
+
+###
+
+
+
+`editorMode`
+
+Choose the key binding mode for the input prompt.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"normal"`: standard key bindings in the prompt input
+ * `"vim"`: vim-style editing with NORMAL, INSERT, and VISUAL modes
+ * **Default** : `"normal"`
+
+settings.json
+
+ {
+ "editorMode": "vim"
+ }
+
+Appears in `/config` as **Editor mode** , which writes this key to user settings.
+
+###
+
+
+
+`emojiCompletionEnabled`
+
+Show emoji suggestions when you type `:` plus a shortcode in the prompt input, and replace a completed shortcode such as `:heart:` with its emoji. Set it to `false` to turn off both.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code shows emoji suggestions after `:` and replaces a completed shortcode with its emoji
+ * `false`: Claude Code neither suggests emoji nor replaces shortcodes
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "emojiCompletionEnabled": false
+ }
+
+See [Emoji shortcodes](</docs/en/interactive-mode#emoji-shortcodes>). Requires Claude Code v2.1.217 or later.
+
+###
+
+
+
+`fileSuggestion`
+
+Run your own command to supply `@` file path autocomplete instead of the built-in file suggestion. The built-in suggestion uses fast filesystem traversal; a large monorepo may do better with project-specific indexing such as a pre-built file index.
+
+ * **Scope** : `Any file`. Under the status line and file suggestion gates, Claude Code turns the command off or runs only a managed value, and skips yours without warning.
+ * **Type** : object with `type`, always `"command"`, and `command`, the shell command to run
+ * **Default** : unset, so Claude Code uses the built-in file suggestion
+
+settings.json
+
+ {
+ "fileSuggestion": {
+ "type": "command",
+ "command": "~/.claude/file-suggestion.sh"
+ }
+ }
+
+After you save this, type `@` followed by part of a path in the prompt: the suggestions come from your command’s output.
+
+####
+
+
+
+Command input and output
+
+Claude Code runs the command with the same environment variables as [hooks](</docs/en/hooks>), including `CLAUDE_PROJECT_DIR`, and stops waiting after five seconds. The command receives JSON on stdin with a `query` field holding what you’ve typed so far:
+
+ {"query": "src/comp"}
+
+Print newline-separated file paths to stdout. Claude Code shows at most 15:
+
+ src/components/Button.tsx
+ src/components/Modal.tsx
+ src/components/Form.tsx
+
+The following script reads the query and hands it to a repository file index:
+
+ #!/bin/bash
+ query=$(cat | jq -r '.query')
+ # Replace your-repo-file-index with your own file search command
+ your-repo-file-index --query "$query" | head -20
+
+###
+
+
+
+`footerLinksRegexes`
+
+Render extra clickable badges in the footer below the input box when a regex matches turn output: tool results, including file contents and fetched pages, and Claude’s own responses. Use it to turn IDs printed by project CLIs, such as review tools and issue trackers, into session links. Requires Claude Code v2.1.176 or later.
+
+ * **Scope** : `User or managed`
+ * **Type** : array of objects, each with `type` set to `"regex"`, a `pattern` regex, a `url` template, and an optional `label`; `{name}` placeholders in `url` and `label` are filled from named capture groups in `pattern`
+ * **Default** : unset, so no badges render
+
+This example matches issue keys such as `PROJ-1234` and builds each link from the captured key:
+
+settings.json
+
+ {
+ "footerLinksRegexes": [
+ {
+ "type": "regex",
+ "pattern": "\\b(?<key>PROJ-\\d+)\\b",
+ "url": "https://issues.example.com/browse/{key}",
+ "label": "{key}"
+ }
+ ]
+ }
+
+With this configured, when `PROJ-1234` appears in a tool result or in Claude’s reply, a `PROJ-1234` badge appears in the footer linking to `https://issues.example.com/browse/PROJ-1234`. Requires Claude Code v2.1.176 or later.
+
+####
+
+
+
+Badge constraints
+
+Each entry’s URL, label, and badge count are bounded as follows:
+
+Constraint| Behavior
+---|---
+URL origin| Captured values are URL-encoded and the constructed URL must share the template’s literal origin. A capture can fill a path segment or query value but can’t change where the link points
+URL length| Constructed URLs longer than 2048 characters are dropped
+URL scheme| Must be `https`, `http`, or a recognized editor or workspace deep-link scheme: `vscode`, `vscode-insiders`, `cursor`, `windsurf`, `zed`, `jetbrains`, `idea`, `slack`, `linear`, `notion`, `figma`
+Label| Defaults to the matched text and is truncated to 28 display columns
+Badge count| At most 5 badges render. The oldest is displaced by newer matches and `/clear` removes them
+
+When a turn completes, Claude Code matches each entry’s `pattern` regex against the turn output on the main thread, so a slow regex blocks the UI until it finishes. Nested quantifiers such as `(a+)+$` can take exponentially long against certain inputs and freeze the session, so keep each `pattern` linear and avoid nesting `+` or `*`. Footer badges render alongside a [custom status line](</docs/en/statusline>) when one is configured; neither replaces the other. Use a status line for a script-driven row that computes its own content from session data, and footer badges to turn IDs from the conversation into links without a script.
+
+###
+
+
+
+`keybindingFlavor`
+
+Choose which convention `Ctrl+W` follows in the prompt input. Set it to `"readline"` to make `Ctrl+W` delete back to the previous whitespace, as Bash does, so a path or a `--flag=value` goes in one press. Requires Claude Code v2.1.238 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"classic"`: `Ctrl+W` deletes the previous word
+ * `"readline"`: `Ctrl+W` deletes back to the previous whitespace
+ * **Default** : `"classic"`
+
+settings.json
+
+ {
+ "keybindingFlavor": "readline"
+ }
+
+See [Make editing keys follow readline conventions](</docs/en/interactive-mode#make-ctrl-w-delete-back-to-whitespace>) for the per-key behavior.
+
+###
+
+
+
+`prefersReducedMotion`
+
+Reduce or turn off interface animations such as the spinner, shimmer, and flash effects. Appears in `/config` as **Reduce motion**.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code reduces or turns off interface animations such as the spinner, shimmer, and flash effects
+ * `false`: the same as unset; Claude Code shows its animations
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "prefersReducedMotion": true
+ }
+
+###
+
+
+
+`promptSuggestionEnabled`
+
+Show or hide [prompt suggestions](</docs/en/interactive-mode#prompt-suggestions>), the grayed-out predictions that appear in your prompt input. Set it to `false`, or turn off **Prompt suggestions** in `/config`, to hide them.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: you see prompt suggestions in your prompt input
+ * `false`: Claude Code hides prompt suggestions
+ * **Default** : `true`
+ * **Per-session overrides** : [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](</docs/en/env-vars>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "promptSuggestionEnabled": false
+ }
+
+Prompt suggestions need a claude.ai or Console account with telemetry on. On Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, or with telemetry turned off, such as by [`DISABLE_TELEMETRY`](</docs/en/env-vars>), this key has no effect and only `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=1` turns them on.
+
+###
+
+
+
+`respectGitignore`
+
+Control whether the `@` file picker leaves out files that match `.gitignore` patterns. Appears in `/config` as **Respect .gitignore in file picker**.
+
+ * **Scope** : `Any file`. When no settings file sets it, Claude Code falls back to `respectGitignore` in `~/.claude.json`, which the `/config` toggle writes.
+ * **Type** : Boolean
+ * `true`: the `@` file picker leaves out files that match `.gitignore` patterns
+ * `false`: the `@` file picker includes files that match `.gitignore` patterns
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "respectGitignore": false
+ }
+
+###
+
+
+
+`respondToBashCommands`
+
+Choose whether Claude responds after you run a shell command with the [`!` prefix](</docs/en/interactive-mode#shell-mode-with-prefix>) in the input box. By default, Claude Code adds the command’s output to the conversation and Claude replies to it. Set this key to `false` to add the output to context without a reply, so you can run several commands and ask about them together. Requires Claude Code v2.1.186 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code adds the command’s output to the conversation and Claude replies to it
+ * `false`: Claude Code adds the output to context without a reply
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "respondToBashCommands": false
+ }
+
+See [Shell mode with `!` prefix](</docs/en/interactive-mode#shell-mode-with-prefix>). Requires Claude Code v2.1.186 or later.
+
+###
+
+
+
+`showClearContextOnPlanAccept`
+
+When Claude finishes a plan in [plan mode](</docs/en/permission-modes#review-and-approve-a-plan>), it shows an approval menu. Planning can use a lot of context, so this key adds a first option to that menu, **Yes, clear context and …** , that approves the plan, clears the conversation context, and starts implementing from the plan alone. The rest of the label names the permission mode the session continues in, and shows how much of your context the planning used.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: the plan approval menu gets a first option, **Yes, clear context and …** , that approves the plan and clears the conversation context
+ * `false`: the plan approval menu shows no clear-context option
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "showClearContextOnPlanAccept": true
+ }
+
+###
+
+
+
+`showTurnDuration`
+
+Show or hide the turn duration message after each response, such as “Cooked for 1m 6s”. Appears in `/config` as **Show turn duration**.
+
+ * **Scope** : `Any file`. A value in `~/.claude.json` from an older version applies when no settings file sets it.
+ * **Type** : Boolean
+ * `true`: you see the turn duration message after each response
+ * `false`: Claude Code hides the turn duration message
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "showTurnDuration": false
+ }
+
+###
+
+
+
+`spellcheck`
+
+Underline misspelled words in the prompt input as you type, using a spell checker you install. Claude Code checks only the text in the input box. [Check spelling as you type](</docs/en/interactive-mode#check-spelling-as-you-type>) covers installing aspell, hunspell, or ispell and what the checker covers. Requires Claude Code v2.1.235 or later.
+
+ * **Scope** : `User or managed`. The block from the highest tier that sets it applies as a whole.
+ * **Type** : object with `enabled` (Boolean), `checker` (`"aspell"`, `"hunspell"`, `"ispell"`, or `"auto"`), `language` (string, passed to the checker as its dictionary name), and `color` (string, a terminal color name, `#rrggbb`, `rgb(r,g,b)`, `ansi256(n)`, or `ansi:<name>`)
+ * **Default** : unset, so spell checking is off; `checker` defaults to `"auto"`, the first of the three found on `PATH`; `language` defaults to the checker’s own dictionary; `color` defaults to the theme’s error color
+
+settings.json
+
+ {
+ "spellcheck": { "enabled": true, "language": "en_GB" }
+ }
+
+###
+
+
+
+`spinnerTipsEnabled`
+
+While Claude works, the spinner line rotates through short tips about Claude Code features, such as “Use Plan Mode to prepare for a complex request before making changes. Press Shift+Tab twice to enable.” Set this key to `false` to hide them. Appears in `/config` as **Show tips**.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: you see tips in the spinner while Claude is working
+ * `false`: Claude Code hides spinner tips
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "spinnerTipsEnabled": false
+ }
+
+###
+
+
+
+`spinnerTipsOverride`
+
+Replace or extend the spinner tips, the short hints Claude Code rotates through while Claude works, with your own strings, such as a team reminder to run a review skill. Set `excludeDefault` to `true` and list at least one tip to show only your tips; when it’s `false` or absent, or `tips` is empty, Claude Code keeps the built-in tips and adds yours.
+
+ * **Scope** : `Any file`
+ * **Type** : object with a `tips` array of strings and an optional `excludeDefault` Boolean
+ * **Default** : unset, so Claude Code shows only the built-in tips
+
+This example replaces the built-in tips with a single tip of your own:
+
+settings.json
+
+ {
+ "spinnerTipsOverride": {
+ "excludeDefault": true,
+ "tips": ["Run /review before opening a PR"]
+ }
+ }
+
+###
+
+
+
+`spinnerVerbs`
+
+While a turn is in progress, the spinner shows a rotating verb such as “Accomplishing”, “Architecting”, or “Baking”. Use this key to add your own verbs to that rotation or replace the built-in list with yours.
+
+ * **Scope** : `Any file`
+ * **Type** : object with a `verbs` array of strings and `mode`, one of:
+ * `"append"`: Claude Code adds your verbs to the built-in set
+ * `"replace"`: Claude Code shows only your verbs
+ * **Default** : unset, so Claude Code uses the built-in verbs
+
+This example adds two verbs to the built-in set:
+
+settings.json
+
+ {
+ "spinnerVerbs": {
+ "mode": "append",
+ "verbs": ["Pondering", "Crafting"]
+ }
+ }
+
+In `"replace"` mode with an empty `verbs` array, Claude Code keeps the built-in verbs.
+
+###
+
+
+
+`statusLine`
+
+Run your own command to render a [status line](</docs/en/statusline>) below the prompt with context such as the model, cost, or git branch. Optional fields adjust spacing, add periodic re-runs, and hide the built-in vim mode indicator when your script renders `vim.mode` itself.
+
+ * **Scope** : `Any file`. When `allowManagedHooksOnly` is on, or `disableAllHooks` is set outside managed settings, only the managed settings value runs.
+ * **Type** : object with `type` set to `"command"` and a `command` string, plus optional `padding` as a number of characters, `refreshInterval` as a number of seconds, minimum `1`, and `hideVimModeIndicator` as a Boolean
+ * **Default** : unset, so no status line
+
+This example prints the model name and context usage, and adds two characters of horizontal spacing:
+
+settings.json
+
+ {
+ "statusLine": {
+ "type": "command",
+ "command": "jq -r '\"[\\(.model.display_name)] \\(.context_window.used_percentage // 0)% context\"'",
+ "padding": 2
+ }
+ }
+
+The example needs [`jq`](<https://jqlang.org/>) installed and runs in a shell. For PowerShell and Git Bash equivalents, see [Windows configuration](</docs/en/statusline#windows-configuration>); for the full setup, see [Manually configure a status line](</docs/en/statusline#manually-configure-a-status-line>).
+
+###
+
+
+
+`subagentStatusLine`
+
+When Claude runs [subagents](</docs/en/sub-agents>), Claude Code lists them in a task display below the prompt, one row per subagent showing `name · description · token count`. This key lets you run your own command to rewrite those rows, for example to show each subagent’s context usage as a percentage. On each refresh, Claude Code sends the visible rows as one JSON object on stdin, with a `tasks` array carrying each subagent’s `id`, `name`, `status`, `model`, `tokenCount`, and more, and replaces the row for each `id` you write back as a `{"id", "content"}` line. Rows you don’t write back keep the default rendering.
+
+ * **Scope** : `Any file`. When `allowManagedHooksOnly` is on, or `disableAllHooks` is set outside managed settings, only the managed settings value runs.
+ * **Type** : object with `type` set to `"command"` and a `command` string
+ * **Default** : unset, so Claude Code renders the default rows
+
+settings.json
+
+ {
+ "subagentStatusLine": {
+ "type": "command",
+ "command": "jq -c '.tasks[] | {id, content: \"\\(.name): \\(.tokenCount) tokens\"}'"
+ }
+ }
+
+See [Subagent status lines](</docs/en/statusline#subagent-status-lines>).
+
+###
+
+
+
+`syntaxHighlightingDisabled`
+
+Claude Code colors code by language in the diffs, code blocks, and file previews it shows in the terminal, with its built-in highlighter; no plugin or language server is involved. Set this key to `true` to show them as plain text instead, for example if the colors clash with your terminal theme or slow a screen reader.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code turns off syntax highlighting in diffs, code blocks, and file previews
+ * `false`: Claude Code highlights syntax
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "syntaxHighlightingDisabled": true
+ }
+
+###
+
+
+
+`terminalProgressBarEnabled`
+
+Some terminals can show a progress indicator on the tab or in the taskbar for the program running in them. While Claude is working, Claude Code reports an in-progress state to the terminal and clears it when the turn ends, so you can see from another tab or window whether Claude is still busy. It does so only in terminals that support the indicator: ConEmu, Ghostty 1.2.0 or later, and iTerm2 3.6.6 or later. Set this key to `false` to stop reporting it. Appears in `/config` as **Terminal progress bar**.
+
+ * **Scope** : `Any file`. A value in `~/.claude.json` from an older version applies when no settings file sets it.
+ * **Type** : Boolean
+ * `true`: you see the terminal progress bar in terminals that support it
+ * `false`: Claude Code hides the terminal progress bar
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "terminalProgressBarEnabled": false
+ }
+
+###
+
+
+
+`terminalTitleFromRename`
+
+Claude Code sets your terminal tab’s title. By default it uses a title it generates from the conversation, and once you give the session a [name](</docs/en/sessions#name-your-sessions>) with `/rename` or `--name`, the tab shows that name instead. Set this key to `false` to keep the generated title on the tab even after you name the session. The name itself still applies, so `/resume <name>` and the session picker find it.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: the terminal tab title shows the session name you set
+ * `false`: the tab keeps the title Claude Code generates from your conversation
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "terminalTitleFromRename": false
+ }
+
+To stop Claude Code from updating the terminal title at all, set [`CLAUDE_CODE_DISABLE_TERMINAL_TITLE`](</docs/en/env-vars>) to `1` instead.
+
+###
+
+
+
+`theme`
+
+Pick the color theme for the interface. Appears in `/config` as **Theme**.
+
+ * **Scope** : `Any file`. A value in `~/.claude.json` from an older version applies when no settings file sets it.
+ * **Type** : string, one of:
+ * `"auto"`: matches your terminal’s light or dark background
+ * `"dark"`: the dark theme
+ * `"light"`: the light theme
+ * `"dark-daltonized"`: the dark theme with colorblind-friendly colors
+ * `"light-daltonized"`: the light theme with colorblind-friendly colors
+ * `"dark-ansi"`: the dark theme using only your terminal’s ANSI color palette
+ * `"light-ansi"`: the light theme using only your terminal’s ANSI color palette
+ * `"custom:<slug>"` or `"custom:<plugin-name>:<slug>"`: a custom theme from `~/.claude/themes/` or a plugin
+ * **Default** : `"dark"`
+
+settings.json
+
+ {
+ "theme": "light-daltonized"
+ }
+
+See [Create a custom theme](</docs/en/terminal-config#create-a-custom-theme>).
+
+###
+
+
+
+`tui`
+
+Choose the terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen renderer](</docs/en/fullscreen>) with virtualized scrollback, or `"default"` for the classic main-screen renderer. Running `/tui fullscreen` or `/tui default` writes this key for you.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"default"`: the classic main-screen renderer
+ * `"fullscreen"`: the flicker-free alt-screen renderer with virtualized scrollback
+ * **Default** : unset, so Claude Code [picks the renderer for you](</docs/en/fullscreen#fullscreen-by-default>)
+ * **Per-session overrides** : [`CLAUDE_CODE_NO_FLICKER`](</docs/en/env-vars>) and [`CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN`](</docs/en/env-vars>) take precedence over this key for one session: `CLAUDE_CODE_NO_FLICKER=1` turns fullscreen on, and `CLAUDE_CODE_NO_FLICKER=0` or `CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1` turns it off; when both are set, Claude Code turns it off
+
+settings.json
+
+ {
+ "tui": "fullscreen"
+ }
+
+Under tmux `-CC` or over SSH to Windows, Claude Code keeps the classic renderer unless you set `CLAUDE_CODE_NO_FLICKER=1`. Background sessions opened from [agent view](</docs/en/agent-view>) always use the fullscreen renderer regardless of this setting.
+
+###
+
+
+
+`verbose`
+
+By default, the transcript collapses each tool call to a short summary, such as the command Claude ran and a line count of its output, and you press `Ctrl+O` to switch the whole transcript to the expanded view when you want the details. Set this key to `true` to show every tool call’s full input and output inline as it happens, which is useful when you’re debugging a hook, an MCP server, or a long shell command. Appears in `/config` as **Verbose output**.
+
+ * **Scope** : `Any file`. A value in `~/.claude.json` from an older version applies when no settings file sets it.
+ * **Type** : Boolean
+ * `true`: you see full tool output
+ * `false`: you see truncated summaries of tool output
+ * **Default** : `false`
+ * **Per-session overrides** : [`--verbose`](</docs/en/cli-reference#cli-flags>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "verbose": true
+ }
+
+A `viewMode` value or a sticky `/focus` selection overrides this key every session.
+
+###
+
+
+
+`viewMode`
+
+Set the transcript view Claude Code starts in: `"default"`, `"verbose"`, or `"focus"`. When set, it overrides both the sticky `/focus` selection and the `verbose` setting.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"default"`: the normal transcript with truncated tool output
+ * `"verbose"`: the transcript with full tool output
+ * `"focus"`: only your last prompt, a one-line summary of tool calls with edit diffstats, and the final response. Focus view needs the fullscreen renderer
+ * **Default** : unset, so the `verbose` setting and your last `/focus` choice apply
+ * **Per-session overrides** : [`--verbose`](</docs/en/cli-reference#cli-flags>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "viewMode": "focus"
+ }
+
+###
+
+
+
+`vimInsertModeRemaps`
+
+Map two-key INSERT-mode sequences to Escape in [vim editor mode](</docs/en/interactive-mode#vim-editor-mode>). Each key is exactly two printable characters typed in sequence, and `"<Esc>"` is the only supported target; Claude Code ignores other entries. Requires Claude Code v2.1.208 or later.
+
+ * **Scope** : `User or managed`. A repository can’t remap your keystrokes.
+ * **Type** : object mapping a two-character sequence to `"<Esc>"`
+ * **Default** : unset
+
+settings.json
+
+ {
+ "vimInsertModeRemaps": {
+ "jj": "<Esc>"
+ }
+ }
+
+Has no effect unless `editorMode` is `"vim"`. See [Remap INSERT-mode key sequences](</docs/en/interactive-mode#remap-insert-mode-key-sequences>). Requires Claude Code v2.1.208 or later.
+
+###
+
+
+
+`voice`
+
+Turn on [voice dictation](</docs/en/voice-dictation>) and choose how the dictation key behaves. Claude Code writes this object for you when you run `/voice`.
+
+ * **Scope** : `Any file`
+ * **Type** : object with `enabled` as a Boolean, `autoSubmit` as a Boolean that applies in hold mode only, and `mode`, one of:
+ * `"hold"`: you hold the dictation key while speaking and release it to stop
+ * `"tap"`: you tap the key once to start recording and again to send
+ * **Default** : unset, so dictation is off; when `enabled` is `true` and `mode` is unset, Claude Code uses `"hold"`
+
+This example turns dictation on and makes the key tap once to start recording and again to send:
+
+settings.json
+
+ {
+ "voice": {
+ "enabled": true,
+ "mode": "tap"
+ }
+ }
+
+`autoSubmit` sends the prompt when you release the key in hold mode. Voice dictation requires a claude.ai account.
+
+###
+
+
+
+`voiceEnabled`
+
+Deprecated since v2.1.92, when the `voice` object replaced it. Claude Code still reads it so older settings files keep working, but new configurations should set `voice.enabled`.
+
+Turn voice dictation on with the single Boolean form that predates the `voice` object. When both are set, `voice.enabled` applies.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: voice dictation is on when you’re logged in with a claude.ai account and your organization’s policy allows voice, unless `voice.enabled` is set
+ * `false`: voice dictation is off, unless `voice.enabled` is set
+ * **Default** : unset
+
+settings.json
+
+ {
+ "voiceEnabled": true
+ }
+
+###
+
+
+
+`wheelScrollAccelerationEnabled`
+
+Accelerate mouse-wheel scroll speed during fast scrolls in [fullscreen rendering](</docs/en/fullscreen#mouse-wheel-scrolling>). Set it to `false` for a constant scroll rate per wheel notch. Requires Claude Code v2.1.174 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code accelerates mouse-wheel scroll speed during fast scrolls
+ * `false`: Claude Code scrolls at a constant rate per wheel notch
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "wheelScrollAccelerationEnabled": false
+ }
+
+Requires Claude Code v2.1.174 or later.
+
+##
+
+
+
+Git and attribution
+
+Control the attribution Claude Code adds to commits and pull requests and how it works with git.
+
+###
+
+
+
+`attribution`
+
+Customize the attribution Claude Code adds to git commits and pull requests. Commits get a [git trailer](<https://git-scm.com/docs/git-interpret-trailers>) such as `Co-Authored-By` by default; pull request descriptions get plain text. Set each part separately with the sub-keys below.
+
+ * **Scope** : `Any file`
+ * **Type** : object with `commit` and `pr` strings and a `sessionUrl` Boolean
+ * **Default** : unset, so Claude Code uses the standard attribution shown under each sub-key
+
+This example replaces the commit attribution, removes pull request attribution, and drops the session link:
+
+settings.json
+
+ {
+ "attribution": {
+ "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>",
+ "pr": "",
+ "sessionUrl": false
+ }
+ }
+
+To hide all attribution, set `commit` and `pr` to empty strings and `sessionUrl` to `false`. Once you set `commit` or `pr`, Claude Code ignores the deprecated `includeCoAuthoredBy` setting and uses its default text for whichever of the two you left unset.
+
+###
+
+
+
+`includeCoAuthoredBy`
+
+Deprecated since v2.0.62, when `attribution` replaced it. Claude Code still reads it, but new configurations should set `attribution`.
+
+Use `attribution` instead, which replaces this key and lets you change or hide the commit trailer, the pull request text, and the session link separately. Claude Code still honors `includeCoAuthoredBy: false` from settings files that predate `attribution`, but ignores it once you set `attribution.commit` or `attribution.pr`.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: the same as unset; Claude Code adds the commit trailer and the pull request attribution text
+ * `false`: Claude Code omits both the commit trailer and the pull request attribution text, unless `attribution` sets `commit` or `pr`, in which case the `attribution` rules apply
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "includeCoAuthoredBy": false
+ }
+
+To hide all attribution today, set `attribution.commit` and `attribution.pr` to empty strings and `attribution.sessionUrl` to `false`.
+
+###
+
+
+
+`includeGitInstructions`
+
+At session start, Claude Code adds two git-related pieces to Claude’s prompt: its built-in instructions for how to write commits and pull requests, in the Bash tool’s description, and a git status snapshot of your repository in the system prompt, meaning the current branch, the main branch, `git status` output, and recent commits. Set this key to `false` to leave both out, for example when you use your own git workflow skills.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code includes its built-in commit and pull request workflow instructions and the git status snapshot. Cloud sessions never include the snapshot
+ * `false`: Claude Code leaves both out
+ * **Default** : `true`
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS`](</docs/en/env-vars>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "includeGitInstructions": false
+ }
+
+###
+
+
+
+`prUrlTemplate`
+
+Point the PR links Claude Code renders, in the footer badge and in tool-result summaries, at an internal code-review tool instead of `github.com`. Claude Code substitutes `{host}`, `{owner}`, `{repo}`, `{number}`, and `{url}` from the `gh`-reported PR URL. The [GitLab merge request badge](</docs/en/interactive-mode#gitlab-merge-requests>) keeps its GitLab URL.
+
+ * **Scope** : `Any file`
+ * **Type** : string, a URL template using any of the five placeholders
+ * **Default** : unset, so links use the `gh`-reported URL
+
+settings.json
+
+ {
+ "prUrlTemplate": "https://reviews.example.com/{owner}/{repo}/pull/{number}"
+ }
+
+Claude Code applies the template only to the links it renders itself; a PR number Claude writes in a message, such as `#123`, stays as Claude wrote it. A URL that doesn’t have the `/pull/<number>` shape is left unchanged.
+
+###
+
+
+
+`attribution.commit`
+
+Set the attribution text Claude Code adds to git commits, including any trailers. Set it to an empty string to hide commit attribution.
+
+ * **Scope** : `Any file`
+ * **Type** : string
+ * **Default** : unset, so Claude Code adds `Co-Authored-By: <model name> <noreply@anthropic.com>`, where the model name reflects the active model for the session, such as `Claude Sonnet 5`, or `Claude` alone when the session’s model isn’t a public model
+
+This example replaces the default trailer with a custom line and a custom `Co-Authored-By` trailer:
+
+settings.json
+
+ {
+ "attribution": {
+ "commit": "Generated with AI\n\nCo-Authored-By: AI <ai@example.com>"
+ }
+ }
+
+###
+
+
+
+`attribution.pr`
+
+Set the attribution text Claude Code adds to pull request descriptions. Set it to an empty string to hide pull request attribution.
+
+ * **Scope** : `Any file`
+ * **Type** : string
+ * **Default** : unset, so Claude Code adds `🤖 Generated with [Claude Code](https://claude.com/claude-code)`
+
+settings.json
+
+ {
+ "attribution": {
+ "pr": ""
+ }
+ }
+
+###
+
+
+
+`attribution.sessionUrl`
+
+Choose whether Claude Code appends the claude.ai session link when it commits or opens a pull request from a [cloud](</docs/en/claude-code-on-the-web>) or [Remote Control](</docs/en/remote-control>) session. Claude Code adds the link as a `Claude-Session` trailer on commits and as a link in pull request descriptions. Set it to `false` to omit the link.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code appends the claude.ai session link when it commits or opens a pull request from a cloud or Remote Control session
+ * `false`: Claude Code omits the link
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "attribution": {
+ "sessionUrl": false
+ }
+ }
+
+##
+
+
+
+Hooks and automation
+
+Register hooks, restrict which hooks run, and control workflows. For hook events and payloads, see the [hooks reference](</docs/en/hooks>).
+
+###
+
+
+
+`allowedHttpHookUrls`
+
+Limit which URLs [HTTP hooks](</docs/en/hooks#http-hook-fields>) can target. When you define this key, Claude Code runs an HTTP hook only if its URL matches one of the patterns and blocks the rest without running them; an empty array blocks every HTTP hook.
+
+ * **Scope** : `Any file`. Arrays merge across settings files.
+ * **Type** : array of URL patterns, with `*` as a wildcard
+ * **Default** : unset, so any URL is allowed
+
+This example allows any URL under `https://hooks.example.com/` and any `http://localhost` URL:
+
+settings.json
+
+ {
+ "allowedHttpHookUrls": ["https://hooks.example.com/*", "http://localhost:*"]
+ }
+
+Hostname matching is case-insensitive and treats `hooks.example.com.`, with the trailing dot that marks a fully qualified domain name, the same as `hooks.example.com`, which is how DNS treats them. The allowlist applies to hooks from every source, including managed settings.
+
+###
+
+
+
+`allowManagedHooksOnly`
+
+Restrict hook execution to hooks your organization deploys.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: only managed hooks run, plus Agent SDK hooks and hooks from plugins your managed settings force-enable. See What runs under `allowManagedHooksOnly`
+ * `false`: hooks from every settings file and plugin run
+ * **Default** : unset, so hooks from every settings file and plugin run
+
+managed-settings.json
+
+ {
+ "allowManagedHooksOnly": true
+ }
+
+####
+
+
+
+What runs under `allowManagedHooksOnly`
+
+When you set it to `true`, Claude Code changes which hooks and hook-like commands load:
+
+ * **Managed and SDK hooks run** : hooks from managed settings and hooks the [Agent SDK](</docs/en/agent-sdk/overview>) registers in process
+ * **Force-enabled plugin hooks run** : hooks from plugins your managed settings force-enable through `enabledPlugins`. Claude Code matches on the full `plugin@marketplace` ID, so a plugin with the same name from a different marketplace stays blocked. This lets you distribute vetted hooks through an organization marketplace while blocking everything else
+ * **Everything else is blocked** : user, project, and local hooks, hooks from other plugins, and hooks declared in agent frontmatter
+ * **Command-sourced plugins are disabled** : Claude Code also disables plugins with a [`command` source](</docs/en/plugin-marketplaces#command-sources>), including plugins force-enabled in managed `enabledPlugins`, unless you set `disableCommandPluginSources` to `false` explicitly
+ * **Status line and file suggestion narrow to managed settings** : Claude Code reads [`statusLine`](</docs/en/statusline>), `fileSuggestion`, and [`subagentStatusLine`](</docs/en/statusline#subagent-status-lines>) from managed settings only, following the status line and file suggestion gates
+
+The [`/goal`](</docs/en/goal>) command can’t run while this key is set, because it depends on hooks.
+
+###
+
+
+
+`disableAllHooks`
+
+Turn off [hooks](</docs/en/hooks#disable-or-remove-hooks>), any custom [status line](</docs/en/statusline>), and any custom file suggestion command. Use it to turn all of these off temporarily without deleting them from your settings.
+
+ * **Scope** : `Any file`. Only managed settings can disable managed hooks.
+ * **Type** : Boolean
+ * `true`: Claude Code turns off hooks, any custom status line, and any custom file suggestion command
+ * `false`: hooks, the status line, and the file suggestion command run
+ * **Default** : unset, so hooks run
+
+settings.json
+
+ {
+ "disableAllHooks": true
+ }
+
+The reach depends on which file carries the key:
+
+ * **In managed settings** : Claude Code disables every hook, including managed ones
+ * **In any other settings file** : Claude Code disables user, project, local, and plugin hooks; managed hooks and hooks from plugins force-enabled in managed `enabledPlugins` keep running
+
+The [`/goal`](</docs/en/goal>) command can’t run while hooks are disabled, and the `/hooks` menu shows a notice instead of your hooks.
+
+####
+
+
+
+Status line and file suggestion gates
+
+Claude Code makes two decisions for `statusLine`, `fileSuggestion`, and `subagentStatusLine`, in this order:
+
+ * **Off entirely** : when managed settings set `disableAllHooks`, or when the folder isn’t trusted under the same [workspace trust rule as hooks in settings files](</docs/en/permissions#what-runs-before-you-trust-a-folder>)
+ * **Narrowed to managed settings** : when `allowManagedHooksOnly` is set, when `disableAllHooks` is `true` outside managed settings after [settings precedence](</docs/en/hooks#disable-or-remove-hooks>) applies, or when you start Claude Code with `--safe-mode`
+
+Under narrowing, Claude Code runs a managed value if one is deployed. Otherwise it skips your value without warning: the status line is disabled, and `@` autocomplete falls back to the built-in file suggestion.
+
+###
+
+
+
+`disableWorkflows`
+
+Turn off [dynamic workflows](</docs/en/workflows#turn-workflows-off>) and the bundled workflow commands for everyone your settings reach, such as an organization through managed settings. To turn workflows on or off just for yourself, use `enableWorkflows` instead, which the **Dynamic workflows** toggle in `/config` writes to your user settings.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code turns off dynamic workflows and the bundled workflow commands for everyone your settings reach
+ * `false`: the same as unset; whether workflows are on then follows `enableWorkflows` and your plan’s default
+ * **Default** : `false`
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_WORKFLOWS`](</docs/en/env-vars>) turns workflows off for one session; whichever of the two turns them off, the other can’t turn them back on
+
+settings.json
+
+ {
+ "disableWorkflows": true
+ }
+
+###
+
+
+
+`enableWorkflows`
+
+Turn [dynamic workflows](</docs/en/workflows>) on or off for yourself when your plan’s default isn’t what you want. Appears in `/config` as **Dynamic workflows** , which writes this key to your user settings and removes it again when you toggle back to your plan’s default. To turn workflows off for everyone from managed settings, use `disableWorkflows` instead.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code turns dynamic workflows on for you
+ * `false`: Claude Code turns dynamic workflows off for you
+ * **Default** : unset, so workflows are on unless you’re on the Pro plan, where they’re off
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_WORKFLOWS`](</docs/en/env-vars>) turns workflows off for one session, and `true` here can’t turn them back on while it’s set
+
+settings.json
+
+ {
+ "enableWorkflows": true
+ }
+
+`disableWorkflows` and your organization’s workflows policy also take precedence: `enableWorkflows: true` can’t turn workflows back on while any source turns workflows off. Claude Code hides the `/config` row while a source other than your user settings sets `enableWorkflows`, or sets `disableWorkflows` to `true`.
+
+###
+
+
+
+`hooks`
+
+Run your own commands, prompts, agents, HTTP requests, or MCP tools as [hooks](</docs/en/hooks>) at points in Claude Code’s lifecycle, such as before a tool call or when a session starts; the [hooks reference](</docs/en/hooks#hook-events>) lists every event, its payload, and its exit codes. Each event maps to a list of matcher groups, and each group lists the handlers to run when the matcher applies.
+
+ * **Scope** : `Any file`. Hooks merge across files rather than replacing each other, and hooks from managed settings can’t be removed from other files.
+ * **Type** : object keyed by [hook event](</docs/en/hooks#hook-events>); each value is an array of `{ "matcher", "hooks" }` groups whose `hooks` entries have a `type` of `"command"`, `"prompt"`, `"agent"`, `"http"`, or `"mcp_tool"`
+ * **Default** : unset, so no hooks run
+
+This example runs a script before every Bash tool call:
+
+settings.json
+
+ {
+ "hooks": {
+ "PreToolUse": [
+ {
+ "matcher": "Bash",
+ "hooks": [
+ { "type": "command", "command": "~/.claude/hooks/check-bash.sh" }
+ ]
+ }
+ ]
+ }
+ }
+
+For every event, matcher pattern, and handler field, see the [hooks reference](</docs/en/hooks#configuration>). To turn hooks off, see `disableAllHooks`; to limit hooks to the ones your organization deploys, see `allowManagedHooksOnly`.
+
+###
+
+
+
+`httpHookAllowedEnvVars`
+
+An [HTTP hook](</docs/en/hooks#http-hook-fields>) can put the value of an environment variable into a request header, for example an `Authorization: Bearer $HOOK_TOKEN` header, but only for variables the hook lists in its own `allowedEnvVars`. This key sets an outer limit on that list for every HTTP hook: a hook can use a variable only if both its own `allowedEnvVars` and this key name it. Use it to stop a hook from reading a secret it shouldn’t, even when the hook’s definition asks for it.
+
+ * **Scope** : `Any file`. Arrays merge across settings files.
+ * **Type** : array of environment variable names
+ * **Default** : unset, so each hook’s own `allowedEnvVars` list applies
+
+This example limits header interpolation to `MY_TOKEN` and `HOOK_SECRET`:
+
+settings.json
+
+ {
+ "httpHookAllowedEnvVars": ["MY_TOKEN", "HOOK_SECRET"]
+ }
+
+The allowlist applies to hooks from every source, including managed settings.
+
+###
+
+
+
+`workflowKeywordTriggerEnabled`
+
+Choose whether typing the keyword `ultracode` in a prompt triggers a [dynamic workflow](</docs/en/workflows#ask-for-a-workflow-in-your-prompt>). Set it to `false` to type the word without triggering one. Requires Claude Code v2.1.157 or later.
+
+ * **Scope** : `Any file`. Appears in `/config` as **Ultracode keyword trigger**.
+ * **Type** : Boolean
+ * `true`: typing `ultracode` in a prompt triggers a dynamic workflow
+ * `false`: you can type the word without triggering one
+ * **Default** : `true`
+
+settings.json
+
+ {
+ "workflowKeywordTriggerEnabled": false
+ }
+
+The `ultracode` effort setting, `/workflows`, and saved workflow commands are unaffected. Requires Claude Code v2.1.157 or later. Before v2.1.160, the trigger keyword was `workflow`.
+
+###
+
+
+
+`workflowSizeGuideline`
+
+Set the [agent count Claude aims for](</docs/en/workflows#set-a-size-guideline>) in the dynamic workflows it writes. Claude Code sends the value to Claude as advice, not an enforced cap: `"small"` asks for fewer than 5 agents, `"medium"` fewer than 15, and `"large"` fewer than 50. Choose `"small"` when you want to bound what a workflow spends. Requires Claude Code v2.1.219 or later.
+
+ * **Scope** : `Any file`. A value there takes precedence over the **Dynamic workflow size** choice in `/config`, which Claude Code stores in `~/.claude.json`, and Claude Code hides that row while a settings file sets the key.
+ * **Type** : string, one of:
+ * `"unrestricted"`: no guideline, so Claude sizes the workflow to the task
+ * `"small"`: Claude aims for fewer than 5 agents
+ * `"medium"`: Claude aims for fewer than 15 agents
+ * `"large"`: Claude aims for fewer than 50 agents
+ * **Default** : `"medium"`
+
+settings.json
+
+ {
+ "workflowSizeGuideline": "small"
+ }
+
+Requires Claude Code v2.1.219 or later; on v2.1.202 through v2.1.218, set the guideline in `/config` instead.
+
+##
+
+
+
+Plugins and skills
+
+Enable plugins, register marketplaces, restrict which plugin sources an organization allows, and control which skills load. For installing and building plugins, see [Plugins](</docs/en/plugins>).
+
+###
+
+
+
+`disableBundledSkills`
+
+Turn off the [skills](</docs/en/skills>) and workflows included with Claude Code. Claude Code removes bundled skills and workflows entirely, while built-in commands such as `/init` stay typable but are hidden from the model.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code removes bundled skills and workflows and hides built-in commands such as `/init` from the model
+ * `false`: bundled skills load
+ * **Default** : unset, so bundled skills load
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_BUNDLED_SKILLS`](</docs/en/env-vars>) set to `1` turns bundled skills off for one session; whichever of the two turns them off, the other can’t turn them back on
+
+settings.json
+
+ {
+ "disableBundledSkills": true
+ }
+
+Skills from plugins, `.claude/skills/`, and `.claude/commands/` are unaffected. `/doctor` stays typable like the built-in commands; to hide it, set [`DISABLE_DOCTOR_COMMAND`](</docs/en/env-vars>) instead.
+
+###
+
+
+
+`disableSkillShellExecution`
+
+Turn off inline shell execution for `!`...`` and ````!` blocks in [skills](</docs/en/skills>) and custom commands from user, project, plugin, or additional-directory sources. Claude Code replaces each command with `[shell command execution disabled by policy]` instead of running it.
+
+ * **Scope** : `Any file`. A `true` in managed settings can’t be overridden by `false` elsewhere.
+ * **Type** : Boolean
+ * `true`: Claude Code replaces each inline shell command with `[shell command execution disabled by policy]` instead of running it
+ * `false`: inline shell runs
+ * **Default** : unset, so inline shell runs
+
+settings.json
+
+ {
+ "disableSkillShellExecution": true
+ }
+
+Bundled skills and skills deployed through managed settings are unaffected.
+
+###
+
+
+
+`skillOverrides`
+
+Hide or collapse a [skill](</docs/en/skills#override-skill-visibility-from-settings>) without editing its `SKILL.md`. Claude Code applies the value under each skill’s name to the skill list Claude sees and to your `/` autocomplete.
+
+ * **Scope** : `Any file`. The `/skills` menu writes to `.claude/settings.local.json`.
+ * **Type** : object mapping skill name to one of:
+ * `"on"`: Claude sees the skill and you can type `/name`
+ * `"name-only"`: Claude sees the skill by name without its description
+ * `"user-invocable-only"`: Claude doesn’t see the skill, but you can still type `/name`
+ * `"off"`: Claude doesn’t see the skill and `/name` is hidden from autocomplete
+ * **Default** : unset, so every skill is `"on"`
+
+This example lists `legacy-context` to Claude by name only and hides `deploy` from Claude and from `/` autocomplete:
+
+settings.json
+
+ {
+ "skillOverrides": {
+ "legacy-context": "name-only",
+ "deploy": "off"
+ }
+ }
+
+`"name-only"` lists the skill to the model without its description, `"user-invocable-only"` hides it from the model but keeps `/name` typable, and `"off"` hides it from both. Overrides don’t apply to plugin skills, which you manage through `/plugin`.
+
+###
+
+
+
+`syncClaudeAiSkills`
+
+Turn off the download of the [skills you enable on claude.ai](</docs/en/skills#how-synced-skills-behave>). Claude Code downloads them into `~/.claude/skills/synced/` when you run it in [non-interactive mode](</docs/en/headless>) with the `-p` flag and [`CLAUDE_CODE_SYNC_SKILLS`](</docs/en/env-vars#variables>) set. Set `false` to stop that download and hide the skills it already synced. Claude Code honors only `false`: `true` is the same as unset and doesn’t turn syncing on.
+
+ * **Scope** : `User, local, or managed`. A repository can’t turn it off for you.
+ * **Type** : Boolean
+ * `false`: Claude Code stops downloading synced skills and hides the ones already in `~/.claude/skills/synced/`. In user or managed settings, it also moves them to `~/.claude/skills/.trash/`
+ * `true`: the same as unset
+ * **Default** : unset, so a non-interactive run with `CLAUDE_CODE_SYNC_SKILLS` set downloads the skills
+
+This example keeps a machine from downloading the account’s skills, whatever a session sets in its environment:
+
+settings.json
+
+ {
+ "syncClaudeAiSkills": false
+ }
+
+###
+
+
+
+`allowedChannelPlugins`
+
+Choose which [channel](</docs/en/channels>) plugins can push messages into sessions in your organization. When you set it, Claude Code uses your list in place of the default Anthropic allowlist; each entry names a plugin and the marketplace it comes from.
+
+ * **Scope** : `Managed`
+ * **Type** : array of objects, each with `marketplace` and `plugin` strings
+ * **Default** : unset, so Claude Code uses the default Anthropic allowlist
+
+This example turns channels on and allows only the Telegram plugin from the official Anthropic marketplace:
+
+managed-settings.json
+
+ {
+ "channelsEnabled": true,
+ "allowedChannelPlugins": [
+ { "marketplace": "claude-plugins-official", "plugin": "telegram" }
+ ]
+ }
+
+An empty array blocks every channel plugin. This key takes effect once channels pass the `channelsEnabled` gate for the account: on Team and Enterprise plans, and on Console accounts with managed settings, that means `channelsEnabled: true`. See [Restrict which channel plugins can run](</docs/en/channels#restrict-which-channel-plugins-can-run>).
+
+###
+
+
+
+`blockedMarketplaces`
+
+Block plugin marketplace sources for your organization. Claude Code checks the blocklist on marketplace add and on plugin install, update, refresh, and auto-update, so a marketplace someone added before you set the policy can’t be used to fetch plugins either. Blocked sources are checked before download, so they never touch the filesystem.
+
+ * **Scope** : `Managed`
+ * **Type** : array of marketplace source objects, in the same forms as `strictKnownMarketplaces`
+ * **Default** : unset, so no marketplace is blocked
+
+This example blocks one GitHub repository as a marketplace source:
+
+managed-settings.json
+
+ {
+ "blockedMarketplaces": [
+ { "source": "github", "repo": "untrusted/plugins" }
+ ]
+ }
+
+A `github` entry may use the owner-wildcard form `"owner/*"` to block every repository under that GitHub owner, which requires Claude Code v2.1.223 or later. Add `{ "source": "skills-dir" }` to stop Claude Code loading [`@skills-dir` plugins](</docs/en/plugins-reference#skills-directory-plugins>) from `~/.claude/skills/` without restricting any marketplace. See [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>).
+
+###
+
+
+
+`channelsEnabled`
+
+Allow [channels](</docs/en/channels>) for your organization. On claude.ai Team and Enterprise plans, Claude Code blocks channels until you set this to `true`. For [Anthropic Console](</docs/en/authentication#claude-console-authentication>) accounts that authenticate with an API key, channels are allowed by default. If your organization deploys managed settings, Claude Code blocks channels on those accounts too until you set this key to `true`.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: Claude Code allows channels for your organization
+ * `false`: the same as unset; whether channels are blocked depends on your plan, as the Default says
+ * **Default** : unset; channels are blocked on Team and Enterprise plans and on Console accounts with managed settings, and allowed on Pro and Max plans and on Console accounts without managed settings
+
+managed-settings.json
+
+ {
+ "channelsEnabled": true
+ }
+
+To restrict which plugins can register as channels once they’re enabled, set `allowedChannelPlugins`. See [Enterprise controls](</docs/en/channels#enterprise-controls>).
+
+###
+
+
+
+`disableCommandPluginSources`
+
+Block the [`command` plugin source](</docs/en/plugin-marketplaces#command-sources>), which installs a plugin by running a marketplace-declared command on the user’s machine. When you set it to `true`, Claude Code never runs the command, doesn’t install or update command-sourced plugins, and stops loading the ones already installed. Set it to `false` to allow them explicitly. Requires Claude Code v2.1.229 or later.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: Claude Code never runs the marketplace-declared command, doesn’t install or update command-sourced plugins, and stops loading the ones already installed
+ * `false`: Claude Code allows command-sourced plugins explicitly
+ * **Default** : unset, so Claude Code follows `allowManagedHooksOnly`: an organization that restricts hook execution to managed settings gets command sources disabled too
+
+managed-settings.json
+
+ {
+ "disableCommandPluginSources": true
+ }
+
+Requires Claude Code v2.1.229 or later.
+
+###
+
+
+
+`pluginSuggestionMarketplaces`
+
+Name the marketplaces whose plugins can appear as contextual install suggestions, in spinner tips and pinned at the top of the `/plugin` **Discover** tab. The built-in first-party frontend-design tip is unaffected. Suggestions come from each plugin’s `relevance` declaration in its marketplace entry.
+
+ * **Scope** : `Managed`
+ * **Type** : array of marketplace names
+ * **Default** : unset, so no marketplace-declared suggestions surface
+
+managed-settings.json
+
+ {
+ "pluginSuggestionMarketplaces": ["acme-corp-plugins"]
+ }
+
+A name takes effect only when the marketplace is registered on the machine and its registered source is also declared in the same managed settings, either as the `extraKnownMarketplaces` entry for that name or as an entry of `strictKnownMarketplaces`. Claude Code ignores a marketplace registered from a different source under an allowlisted name. The official marketplace is exempt from the source requirement: allowlisting its name alone suffices, since that name can only register from the official Anthropic source. See [Suggest plugins by context](</docs/en/plugin-relevance>).
+
+###
+
+
+
+`pluginTrustMessage`
+
+Add your organization’s own text to the plugin trust warning Claude Code shows before installation, for example to confirm that plugins from your internal marketplace are vetted.
+
+ * **Scope** : `Managed`
+ * **Type** : string
+ * **Default** : unset, so Claude Code shows the standard warning alone
+
+managed-settings.json
+
+ {
+ "pluginTrustMessage": "All plugins from our marketplace are approved by IT"
+ }
+
+###
+
+
+
+`strictKnownMarketplaces`
+
+Restrict which plugin marketplace sources people in your organization can add and install plugins from. Claude Code enforces the allowlist on marketplace add and on plugin install, update, refresh, and auto-update, before any network or filesystem operation, so a marketplace someone added before you set the policy can’t be used to fetch plugins once its source no longer matches. Blocked users see an error naming the managed policy.
+
+ * **Scope** : `Managed`
+ * **Type** : array of marketplace source objects; see Allowed source types
+ * **Default** : unset, so users can add any marketplace. An empty array is a complete lockdown that blocks every marketplace source, including the official Anthropic marketplace
+
+This example allows two GitHub repositories, one pinned to the `v2.0` ref, and one hosted `marketplace.json` URL:
+
+managed-settings.json
+
+ {
+ "strictKnownMarketplaces": [
+ { "source": "github", "repo": "acme-corp/approved-plugins" },
+ { "source": "github", "repo": "acme-corp/security-tools", "ref": "v2.0" },
+ { "source": "url", "url": "https://plugins.example.com/marketplace.json" }
+ ]
+ }
+
+You can also write this key as `allowedMarketplaces`; Marketplace key aliases describes how Claude Code treats the alias and which version accepts it. This key is a policy gate: it controls what users may add but registers nothing. To restrict and pre-register in one file, see Combine with `extraKnownMarketplaces`. For the user-facing view, see [Managed marketplace restrictions](</docs/en/plugin-marketplaces#managed-marketplace-restrictions>).
+
+####
+
+
+
+Allowed source types
+
+Each entry below shows one allowlist entry per source type and the fields it accepts. Most types match exactly; `hostPattern` and `pathPattern` match by regex, and `github` entries can use an owner wildcard.
+
+Source| Example entry| Fields
+---|---|---
+`github`| `{ "source": "github", "repo": "acme-corp/plugins", "ref": "main", "path": "marketplace" }`| `repo` required; `ref` is a branch or tag; `path` is a subdirectory
+`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
+`npm`| `{ "source": "npm", "package": "@acme-corp/claude-plugins" }`| `package` required, the npm package that contains `marketplace.json`
+`file`| `{ "source": "file", "path": "/opt/acme-corp/plugins/marketplace.json" }`| `path` required, the absolute path to a `marketplace.json` file
+`directory`| `{ "source": "directory", "path": "/opt/acme-corp/approved-marketplaces" }`| `path` required, the absolute path to a directory containing `.claude-plugin/marketplace.json`
+`hostPattern`| `{ "source": "hostPattern", "hostPattern": "^github\\.example\\.com$" }`| `hostPattern` required, a regex matched against the marketplace host
+`pathPattern`| `{ "source": "pathPattern", "pathPattern": "^/opt/approved/" }`| `pathPattern` required, a regex matched against the `path` of `file` and `directory` sources
+`skills-dir`| `{ "source": "skills-dir" }`| No fields. Opts the `~/.claude/skills/` plugin scan back in
+
+Three source types carry rules beyond the table:
+
+ * **`url`** : a URL marketplace downloads only the `marketplace.json` file, not plugin files, so its plugins must use a [plugin source](</docs/en/plugin-marketplaces#plugin-sources>) other than a relative path. For plugins with relative paths, use a Git-based marketplace instead. See [Plugins with relative paths fail in URL-based marketplaces](</docs/en/plugin-marketplaces#plugins-with-relative-paths-fail-in-url-based-marketplaces>).
+ * **`hostPattern`** : use it to allow every marketplace on an internal GitHub Enterprise or GitLab server without listing each repository. Claude Code matches `github` sources against `github.com`, takes the hostname from `url` sources, and takes it from `git` sources depending on the [git URL](<https://git-scm.com/docs/git-clone#_git_urls>)’s form:
+ * A URL with a scheme, such as `https://` or `ssh://`: the hostname in the URL.
+ * An SSH address without a scheme, in git’s `user@host:path` form, such as `git@git.example.com:tools/plugins.git`: the host between `@` and `:`, which is the host git connects to.
+ * Any other form without a scheme: no host, so no `strictKnownMarketplaces` `hostPattern` entry matches it. For a `blockedMarketplaces` `hostPattern`, Claude Code takes a host from a wider set of forms, so a blocklist entry can still match such a form. Before v2.1.234, a `strictKnownMarketplaces` `hostPattern` also matched some forms that git doesn’t treat as SSH addresses.
+`file` and `directory` sources have no host and never match a `hostPattern` entry.
+ * **`pathPattern`** : use it to allow filesystem marketplaces alongside `hostPattern` entries for network sources. `".*"` allows every local path; a narrower pattern such as `"^/opt/approved/"` restricts to a directory.
+
+Any allowlist, even an empty one, also stops Claude Code loading [`@skills-dir` plugins](</docs/en/plugins-reference#skills-directory-plugins>) from `~/.claude/skills/`. Add the `{ "source": "skills-dir" }` entry to keep loading them; the entry has no meaning outside this key and `blockedMarketplaces`.
+
+####
+
+
+
+Owner wildcards
+
+A `github` entry whose `repo` value is `"<owner>/*"` matches every repository under that GitHub owner. Owner wildcards require Claude Code v2.1.223 or later and work only in `strictKnownMarketplaces` and `blockedMarketplaces`. Everywhere else a `github` source appears, such as `extraKnownMarketplaces` or `/plugin marketplace add`, the `repo` value must name a single repository. Before v2.1.223, Claude Code compared the entry literally, so an allowlist entry matched no repository and a blocklist entry blocked nothing; single-repository entries are enforced on every version. This entry allows any marketplace repository in the `acme-corp` organization:
+
+managed-settings.json
+
+ {
+ "strictKnownMarketplaces": [
+ { "source": "github", "repo": "acme-corp/*" }
+ ]
+ }
+
+Only the whole repository-name position can be a wildcard. Claude Code compares entries such as `*`, `*/plugins`, or `acme-corp/tools-*` literally, so they match no repository. The matching rules differ between the two settings:
+
+Rule| `strictKnownMarketplaces`| `blockedMarketplaces`
+---|---|---
+Matching source spellings| `owner/repo` form only. A git URL that clones the same repository doesn’t match| Any spelling, including git URLs that resolve to the same github.com repository
+Owner case| Case-sensitive, like exact-entry matching| Case-insensitive
+`ref`| Follows the exact-entry rules: an entry with a `ref` matches only sources with that exact ref, and an entry without one matches only sources that don’t specify a ref| An entry without a `ref` blocks all refs of the repositories it matches
+`path`| Looser than the exact-entry rules: an entry with a `path` requires that exact value, while an entry without one matches any path inside the repository| An entry without a `path` blocks all paths of the repositories it matches
+
+####
+
+
+
+Exact matching
+
+For every source type except owner-wildcard `github` entries and the regex-matched `hostPattern` and `pathPattern` entries, Claude Code allows a user’s addition only when the marketplace source matches an entry exactly. For the git-based sources `github` and `git`, exact matching includes the optional fields:
+
+ * The `repo` or `url` must match exactly
+ * The `ref` field must match exactly, or both must be undefined
+ * The `path` field must match exactly, or both must be undefined
+
+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" }`
+
+####
+
+
+
+Allow only the official marketplace
+
+To allow the official Anthropic marketplace and nothing else, list its repository:
+
+managed-settings.json
+
+ {
+ "strictKnownMarketplaces": [
+ { "source": "github", "repo": "anthropics/claude-plugins-official" }
+ ]
+ }
+
+With this entry, Claude Code keeps an already-registered official marketplace available and, on a fresh machine, registers the marketplace automatically the first time you start Claude Code interactively. Automatic registration most commonly misses:
+
+ * Non-interactive environments that run before the machine’s first interactive launch.
+ * Machines where Claude Code already ran interactively under a policy that blocked the marketplace, such as the empty-array lockdown. Claude Code records the blocked attempt and doesn’t retry after the policy changes.
+
+On these machines, add the marketplace to `extraKnownMarketplaces` in the same `managed-settings.json` so Claude Code registers it automatically, or run `claude plugin marketplace add anthropics/claude-plugins-official`.
+
+####
+
+
+
+Combine with `extraKnownMarketplaces`
+
+The two keys do different jobs. This table compares them:
+
+Aspect| `strictKnownMarketplaces`| `extraKnownMarketplaces`
+---|---|---
+Purpose| Organizational policy enforcement| Team convenience
+Settings file| Managed settings only| Any settings file
+Behavior| Blocks non-allowlisted additions| Registers missing marketplaces
+When enforced| Before network and filesystem operations| Immediately from user or managed settings; after the workspace trust dialog for a repository’s files
+Can be overridden| No, highest precedence| Yes, by higher-precedence settings
+Source format| Direct source object| Named marketplace with a nested `source` object
+
+To both restrict and pre-register a marketplace for all users, set both in `managed-settings.json`:
+
+managed-settings.json
+
+ {
+ "strictKnownMarketplaces": [
+ { "source": "github", "repo": "acme-corp/plugins" }
+ ],
+ "extraKnownMarketplaces": {
+ "acme-tools": {
+ "source": { "source": "github", "repo": "acme-corp/plugins" }
+ }
+ }
+ }
+
+With only `strictKnownMarketplaces` set, users can still add an allowed marketplace themselves with `/plugin marketplace add`. The official Anthropic marketplace is the only one Claude Code registers automatically, and only when the allowlist allows it. Allow only the official marketplace lists the machines it misses.
+
+###
+
+
+
+`strictPluginOnlyCustomization`
+
+Block skills, agents, hooks, and MCP servers from user and project sources, so they can come only from plugins or managed settings. Combine it with `strictKnownMarketplaces` to control the full customization supply chain: the marketplace allowlist controls which plugins users can install.
+
+ * **Scope** : `Managed`
+ * **Type** : `true` to lock all four kinds of customization, or an array naming the kinds to lock, from `"skills"`, `"agents"`, `"hooks"`, and `"mcp"`
+ * **Default** : unset, so nothing is locked
+
+This example locks skills and hooks and leaves agents and MCP servers unlocked:
+
+managed-settings.json
+
+ {
+ "strictPluginOnlyCustomization": ["skills", "hooks"]
+ }
+
+The four sub-key entries below list what each surface blocks and what still loads. Claude Code ignores surface names it doesn’t recognize rather than failing the settings file, so you can add new surface names before every client has updated.
+
+###
+
+
+
+`strictPluginOnlyCustomization.skills`
+
+Lock the `skills` surface. Claude Code stops loading skills from `~/.claude/skills/` and `.claude/skills/`, custom commands from `~/.claude/commands/` and `.claude/commands/`, skills under `--add-dir` directories, and skills synced from your claude.ai account, and keeps loading plugin skills, bundled skills, and skills in the managed policy directory.
+
+ * **Scope** : `Managed`
+ * **Type** : the string `"skills"` in the `strictPluginOnlyCustomization` array
+ * **Default** : not locked
+
+managed-settings.json
+
+ {
+ "strictPluginOnlyCustomization": ["skills"]
+ }
+
+###
+
+
+
+`strictPluginOnlyCustomization.agents`
+
+Lock the `agents` surface. Claude Code stops loading agents from `~/.claude/agents/` and `.claude/agents/`, and keeps loading plugin agents, built-in agents, and agents in the managed policy directory.
+
+ * **Scope** : `Managed`
+ * **Type** : the string `"agents"` in the `strictPluginOnlyCustomization` array
+ * **Default** : not locked
+
+managed-settings.json
+
+ {
+ "strictPluginOnlyCustomization": ["agents"]
+ }
+
+###
+
+
+
+`strictPluginOnlyCustomization.hooks`
+
+Lock the `hooks` surface. Claude Code stops running hooks from user, project, and local `settings.json`, and keeps running plugin hooks and hooks in managed settings.
+
+ * **Scope** : `Managed`
+ * **Type** : the string `"hooks"` in the `strictPluginOnlyCustomization` array
+ * **Default** : not locked
+
+managed-settings.json
+
+ {
+ "strictPluginOnlyCustomization": ["hooks"]
+ }
+
+###
+
+
+
+`strictPluginOnlyCustomization.mcp`
+
+Lock the `mcp` surface. Claude Code stops loading MCP servers from `~/.claude.json` and `.mcp.json`, and keeps loading plugin MCP servers and [`managed-mcp.json`](</docs/en/managed-mcp>) servers.
+
+ * **Scope** : `Managed`
+ * **Type** : the string `"mcp"` in the `strictPluginOnlyCustomization` array
+ * **Default** : not locked
+
+managed-settings.json
+
+ {
+ "strictPluginOnlyCustomization": ["mcp"]
+ }
+
+###
+
+
+
+`enabledPlugins`
+
+Turn individual [plugins](</docs/en/plugins>) on or off, keyed by `plugin-name@marketplace-name`. A plugin with no entry at any scope falls back to its [`defaultEnabled`](</docs/en/plugins-reference#default-enablement>) value. When you enable or disable a plugin with `/plugin` or `claude plugin enable`, Claude Code writes this key for you.
+
+ * **Scope** : `Any file`
+ * **Type** : object mapping `plugin-name@marketplace-name` to a Boolean
+ * **Default** : unset, so each plugin follows its `defaultEnabled` value
+
+This example enables two plugins from the `team-tools` marketplace and disables one from `personal`:
+
+settings.json
+
+ {
+ "enabledPlugins": {
+ "code-formatter@team-tools": true,
+ "deployment-tools@team-tools": true,
+ "experimental-features@personal": false
+ }
+ }
+
+Each scope serves a different purpose:
+
+ * **User settings** : your personal plugin preferences
+ * **Project settings** : plugins shared with everyone in the repository
+ * **Local settings** : per-machine overrides, gitignored when Claude Code saves a setting there
+ * **Managed settings** : organization-wide policy. A plugin set to `false` here is blocked from installation at every scope and hidden from the marketplace
+
+Project settings take precedence over user settings, so setting a plugin to `false` in `~/.claude/settings.json` doesn’t disable a plugin that the project’s `.claude/settings.json` enables. To opt out of a project-enabled plugin on your machine, set it to `false` in `.claude/settings.local.json` instead. Plugins force-enabled by managed settings can’t be disabled this way, since managed settings override local settings. Enabling a plugin from an external source such as a GitHub repository or npm package in a project’s `.claude/settings.json` doesn’t install it for other people. On every path that loads plugins, Claude Code reports the plugin as not installed until each user [installs it themselves](</docs/en/discover-plugins#configure-team-marketplaces>).
+
+###
+
+
+
+`extraKnownMarketplaces`
+
+Register additional plugin marketplaces by name, so that people who open the repository, or everyone your managed settings reach, get the marketplace without adding it themselves. Claude Code registers each marketplace it doesn’t already know. Whether a plugin that `enabledPlugins` names from it installs depends on the plugin’s source and which file enables it; that entry has the rules.
+
+ * **Scope** : `Any file`. Claude Code honors entries in a repository’s `.claude/settings.json` or `.claude/settings.local.json` only after you accept the workspace trust dialog for that folder; in a folder you haven’t trusted, including a `-p` run there, it ignores them without a message.
+ * **Type** : object mapping a marketplace name to an object with a `source` object and an optional `autoUpdate` Boolean
+ * **Default** : unset
+
+This example registers a GitHub marketplace and a marketplace from a self-hosted git URL:
+
+settings.json
+
+ {
+ "extraKnownMarketplaces": {
+ "acme-tools": {
+ "source": {
+ "source": "github",
+ "repo": "acme-corp/claude-plugins"
+ }
+ },
+ "security-plugins": {
+ "source": {
+ "source": "git",
+ "url": "https://git.example.com/security/plugins.git"
+ }
+ }
+ }
+ }
+
+[What runs before you trust a folder](</docs/en/permissions#what-runs-before-you-trust-a-folder>) compares the trust gate with the other content a repository can supply. You can also write this key as `additionalMarketplaces`; see Marketplace key aliases. Set `"autoUpdate": true` alongside `source` to make Claude Code refresh that marketplace and update its installed plugins in the background after startup. When omitted, `claude-plugins-official` and most other official Anthropic marketplaces default to `true`, and third-party marketplaces default to `false`. See [Configure auto-updates](</docs/en/discover-plugins#configure-auto-updates>). When more than one settings file defines a marketplace entry under the same name, Claude Code uses the entry from the [highest-precedence file](</docs/en/settings#settings-precedence>) whole. That entry replaces the lower-precedence entry and inherits none of its fields, so a redefinition can’t combine one file’s `source.headers` credential with a URL another file controls. Before v2.1.228, Claude Code merged same-name entries field by field, so an entry in a higher-precedence file could inherit fields it didn’t set, including another file’s `headers`.
+
+####
+
+
+
+Marketplace source types
+
+The `source` object takes one of these forms:
+
+ * **`github`** : a GitHub repository, with `repo`
+ * **`git`** : any git URL, with `url`
+ * **`url`** : a direct URL to a `marketplace.json` file, with `url` and optional `headers` for authenticated access
+ * **`file`** : a local path to a `marketplace.json` file, with `path`
+ * **`directory`** : a local filesystem path, with `path`, for development only
+ * **`settings`** : an inline marketplace declared directly in the settings file without a hosted repository, with `name` and `plugins`
+
+The `git` source type works with any git hosting service, including self-hosted GitLab and Bitbucket. Claude Code clones the repository with the same authentication that `git clone` would use on that machine: configured credential helpers or SSH keys. A provider token such as `GITHUB_TOKEN` takes effect only through a credential helper that reads it. See [Private repositories](</docs/en/plugin-marketplaces#private-repositories>) for setup details. For `github` and `git` sources, set `"skipLfs": true` inside the `source` object, alongside `repo` or `url`, to skip Git LFS downloads when Claude Code clones or updates the marketplace repository. LFS pointer files remain as pointers instead of downloading their content. Use this when the repository contains large LFS objects unrelated to plugin content. Requires Claude Code v2.1.153 or later. Plugins listed in a `settings` source must reference external sources such as GitHub or npm, and the `name` must match the marketplace key. You still enable each plugin separately in `enabledPlugins`. This example declares one plugin inline:
+
+settings.json
+
+ {
+ "extraKnownMarketplaces": {
+ "team-tools": {
+ "source": {
+ "source": "settings",
+ "name": "team-tools",
+ "plugins": [
+ {
+ "name": "code-formatter",
+ "source": {
+ "source": "github",
+ "repo": "acme-corp/code-formatter"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+
+####
+
+
+
+Marketplace key aliases
+
+On Claude Code v2.1.232 or later, you can write `extraKnownMarketplaces` as `additionalMarketplaces` and `strictKnownMarketplaces` as `allowedMarketplaces`. Claude Code treats each alias as follows:
+
+ * Earlier versions ignore the alias, so keep the canonical spelling in a file that older versions also read, such as a managed settings file for a fleet with mixed Claude Code versions.
+ * In any settings file that accepts the canonical key, Claude Code reads the alias exactly as it reads the canonical key.
+ * Claude Code may rewrite `additionalMarketplaces` to `extraKnownMarketplaces` when it updates the file.
+ * If you set both spellings in one file, Claude Code uses the canonical value and ignores the alias.
+
+###
+
+
+
+`pluginConfigs`
+
+Store the non-sensitive answers you give a plugin’s [`userConfig`](</docs/en/plugins-reference#user-configuration>) configuration dialog, keyed by plugin ID. Claude Code writes this key to your user settings when you fill in the dialog, so you don’t need to edit it by hand. Sensitive options go to the macOS Keychain instead, or to `~/.claude/.credentials.json` on platforms without a supported keychain.
+
+ * **Scope** : `User or managed`
+ * **Type** : object mapping a plugin ID to an object with an `options` field, mapping each option name to a string, number, Boolean, or array of strings, and an optional `mcpServers` field holding per-server user configuration values in the same shape
+ * **Default** : unset
+
+This example stores the `api_endpoint` option for the `deployer` plugin from `acme-tools`:
+
+settings.json
+
+ {
+ "pluginConfigs": {
+ "deployer@acme-tools": {
+ "options": {
+ "api_endpoint": "https://api.example.com"
+ }
+ }
+ }
+ }
+
+Claude Code ignores project and local entries because it substitutes these values into plugin hook, MCP, and LSP configurations, and a cloned repository must not be able to supply them. Before v2.1.207, project and local settings were also read.
+
+##
+
+
+
+MCP
+
+Control which MCP servers Claude Code connects to and which an organization allows. See [Connect to external tools with MCP](</docs/en/mcp>) and [Managed MCP configuration](</docs/en/managed-mcp>).
+
+###
+
+
+
+`allowAllClaudeAiMcps`
+
+Load the [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) Claude Code fetches itself alongside a deployed `managed-mcp.json`. Without this key, `managed-mcp.json` takes exclusive control of MCP servers and suppresses those connectors.
+
+ * **Scope** : `Managed`. Users can’t re-enable connectors that exclusive control suppressed.
+ * **Type** : Boolean
+ * `true`: Claude Code loads the claude.ai connectors alongside a deployed `managed-mcp.json`
+ * `false`: a deployed `managed-mcp.json` takes exclusive control of MCP servers and suppresses claude.ai connectors
+ * **Default** : `false`, so a deployed `managed-mcp.json` suppresses claude.ai connectors
+
+managed-settings.json
+
+ {
+ "allowAllClaudeAiMcps": true
+ }
+
+`allowedMcpServers` and `deniedMcpServers` still apply to the connectors this key loads. Connectors delivered to [cloud sessions](</docs/en/claude-code-on-the-web>) stay suppressed. See [Allow claude.ai connectors alongside the managed set](</docs/en/managed-mcp#allow-claude-ai-connectors-alongside-the-managed-set>). Requires Claude Code v2.1.149 or later.
+
+###
+
+
+
+`allowedMcpServers`
+
+Allowlist the MCP servers people can use. Claude Code blocks any server that doesn’t match an entry, whichever settings file or `.mcp.json` defined it, including servers from `managed-mcp.json`. Built-in servers such as Claude in Chrome, IDE-provided servers, and servers the CLI itself configures are exempt from the allowlist; the denylist still applies to them.
+
+ * **Scope** : `Any file`. Entries from every file merge into one allowlist unless `allowManagedMcpServersOnly` is set. Deploy it in managed settings to enforce it.
+ * **Type** : array of objects, each with exactly one key: `serverName`, a string limited to letters, numbers, hyphens, and underscores; `serverCommand`, an array of the command and its arguments matched exactly; or `serverUrl`, a URL pattern with `*` wildcards
+ * **Default** : unset, so every server is allowed; an empty array blocks every server
+
+This example allows only the stdio server that the listed `npx` command starts:
+
+settings.json
+
+ {
+ "allowedMcpServers": [
+ { "serverCommand": ["npx", "-y", "@modelcontextprotocol/server-filesystem"] }
+ ]
+ }
+
+A `deniedMcpServers` entry takes precedence, so a server on both lists is blocked. Once the list contains any `serverCommand` entry, a stdio server must match a `serverCommand` entry, and once it contains any `serverUrl` entry, a remote server must match a `serverUrl` entry: a `serverName` match no longer admits that kind of server. See [Policy-based control with allowlists and denylists](</docs/en/managed-mcp#policy-based-control-with-allowlists-and-denylists>).
+
+###
+
+
+
+`allowManagedMcpServersOnly`
+
+Make the managed allowlist the only one that applies. Claude Code then reads `allowedMcpServers` from managed settings alone and ignores allowlists in user, project, and local settings; `deniedMcpServers` still merges from every file, so users can still block servers for themselves. Administrators set it so a user’s own settings can’t broaden what the managed allowlist permits.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: Claude Code reads `allowedMcpServers` from managed settings alone and ignores allowlists in user, project, and local settings
+ * `false`: allowlists from every settings file merge
+ * **Default** : `false`, so allowlists from every settings file merge
+
+This example locks the allowlist to managed settings and allows only the server named `github`:
+
+managed-settings.json
+
+ {
+ "allowManagedMcpServersOnly": true,
+ "allowedMcpServers": [
+ { "serverName": "github" }
+ ]
+ }
+
+Users can still add MCP servers of their own; only servers that match the managed allowlist load. See [Restrict the allowlist to managed settings only](</docs/en/managed-mcp#restrict-the-allowlist-to-managed-settings-only>).
+
+###
+
+
+
+`deniedMcpServers`
+
+Block specific MCP servers. Claude Code refuses to load a matching server in every scope, including servers from `managed-mcp.json` and [claude.ai connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>).
+
+ * **Scope** : `Any file`. Entries from every file merge into one denylist, and `allowManagedMcpServersOnly` doesn’t change that. Deploy it in managed settings to enforce it.
+ * **Type** : array of objects, each with exactly one key: `serverName`, any non-empty string, so a claude.ai connector’s display name such as `"claude.ai Slack"` works; `serverCommand`, an array of the command and its arguments matched exactly; or `serverUrl`, a URL pattern with `*` wildcards
+ * **Default** : unset, so no server is blocked; an empty array also blocks nothing
+
+settings.json
+
+ {
+ "deniedMcpServers": [
+ { "serverName": "filesystem" }
+ ]
+ }
+
+The denylist takes precedence over `allowedMcpServers`, so a server on both lists is blocked. See [Policy-based control with allowlists and denylists](</docs/en/managed-mcp#policy-based-control-with-allowlists-and-denylists>).
+
+###
+
+
+
+`disableClaudeAiConnectors`
+
+Turn off [claude.ai MCP connectors](</docs/en/mcp#use-mcp-servers-from-claude-ai>) so Claude Code neither fetches nor connects them. A `true` in any settings file applies: a checked-in project `.claude/settings.json` can opt a repository out of cloud connectors, but a project-level `false` can’t override a user- or managed-level `true`. Requires Claude Code v2.1.182 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code neither fetches nor connects claude.ai MCP connectors
+ * `false`: the same as unset; Claude Code fetches your connectors unless another settings file or `ENABLE_CLAUDEAI_MCP_SERVERS` turns them off
+ * **Default** : `false`, so Claude Code fetches your connectors
+ * **Per-session overrides** : [`ENABLE_CLAUDEAI_MCP_SERVERS`](</docs/en/env-vars>) set to `false` turns connectors off for one session; whichever of the two turns them off, the other can’t turn them back on
+
+settings.json
+
+ {
+ "disableClaudeAiConnectors": true
+ }
+
+Servers you pass explicitly with `--mcp-config` are unaffected. To block individual connectors instead of all of them, use `deniedMcpServers`. See [Disable claude.ai connectors](</docs/en/mcp#disable-claude-ai-connectors>). Requires Claude Code v2.1.182 or later.
+
+###
+
+
+
+`disabledMcpjsonServers`
+
+Reject specific servers defined in a project’s `.mcp.json` file so Claude Code never connects them or asks you to approve them. A rejection in any settings file applies, including a project `.claude/settings.json` checked into the repository.
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings, the server names as they appear in `.mcp.json`
+ * **Default** : unset
+
+settings.json
+
+ {
+ "disabledMcpjsonServers": ["filesystem"]
+ }
+
+Claude Code writes this key to `.claude/settings.local.json` when you reject a server in the approval dialog. `claude mcp get <name>` shows a rejected server as `✘ Rejected (see disabledMcpjsonServers in settings)`. Rejection takes precedence over `enabledMcpjsonServers` and `enableAllProjectMcpServers`.
+
+###
+
+
+
+`enableAllProjectMcpServers`
+
+Approve every MCP server defined in project `.mcp.json` files without a prompt. Claude Code writes this key to `.claude/settings.local.json` when you choose to approve all servers in the approval dialog.
+
+ * **Scope** : `Any file`. In a folder whose trust dialog you haven’t accepted, Claude Code honors it from user settings, managed settings, and `--settings` and ignores it in the shared project file, both in the session and for `claude mcp list` and `claude mcp get`; [Project server approvals and workspace trust](</docs/en/mcp#project-server-approvals-and-workspace-trust>) says when an untracked `.claude/settings.local.json` counts too.
+ * **Type** : Boolean
+ * `true`: Claude Code approves every MCP server defined in project `.mcp.json` files without a prompt
+ * `false`: Claude Code asks you to approve each server. In a trusted folder, a `false` in a higher-precedence file overrides a `true` in a lower one; in a folder you haven’t trusted, a `true` in any honored file is enough
+ * **Default** : unset, so Claude Code asks you to approve each server
+
+settings.json
+
+ {
+ "enableAllProjectMcpServers": true
+ }
+
+A `disabledMcpjsonServers` entry still rejects a server.
+
+###
+
+
+
+`enabledMcpjsonServers`
+
+Approve specific servers defined in project `.mcp.json` files so Claude Code connects them without asking. Claude Code writes this key to `.claude/settings.local.json` when you approve a server in the approval dialog.
+
+ * **Scope** : `Any file`. In a folder whose trust dialog you haven’t accepted, Claude Code honors it from user settings, managed settings, and `--settings` and ignores it in the shared project file, both in the session and for `claude mcp list` and `claude mcp get`; [Project server approvals and workspace trust](</docs/en/mcp#project-server-approvals-and-workspace-trust>) says when an untracked `.claude/settings.local.json` counts too.
+ * **Type** : array of strings, the server names as they appear in `.mcp.json`
+ * **Default** : unset
+
+This example approves the `memory` and `github` servers from the project’s `.mcp.json`:
+
+settings.json
+
+ {
+ "enabledMcpjsonServers": ["memory", "github"]
+ }
+
+A `disabledMcpjsonServers` entry still rejects a server.
+
+##
+
+
+
+Agents, sessions, and worktrees
+
+Set the default agent, control teammates and cross-session messaging, and configure worktrees. See [Subagents](</docs/en/sub-agents>) and [Worktrees](</docs/en/worktrees>).
+
+###
+
+
+
+`agent`
+
+Run the main thread as a named [subagent](</docs/en/sub-agents#invoke-subagents-explicitly>), so Claude Code applies that subagent’s system prompt, tool restrictions, and model to your session. The same key sets the default agent for sessions you dispatch from `claude agents`.
+
+ * **Scope** : `Any file`
+ * **Type** : string, the name of a built-in or custom agent
+ * **Default** : unset, so the main thread runs as Claude Code’s default agent
+ * **Per-session overrides** : `--agent` takes precedence over this key for one session
+
+settings.json
+
+ {
+ "agent": "code-reviewer"
+ }
+
+A plugin’s own `settings.json` can also supply this key; see [Ship default settings with your plugin](</docs/en/plugins#ship-default-settings-with-your-plugin>).
+
+###
+
+
+
+`crossSessionInbound`
+
+Choose what this session does with [messages arriving from your other Claude Code sessions](</docs/en/cross-session-messaging#control-inbound-messages>). When no value applies, Claude Code decides per message from the two sessions’ permission-mode classes. Requires Claude Code v2.1.224 or later.
+
+ * **Scope** : `Any file`. A project or local value applies only when it’s stricter than the value managed settings, the `--settings` flag, or user settings give.
+ * **Type** : string, one of:
+ * `"accept"`: Claude Code delivers the message to Claude
+ * `"hold"`: Claude Code shows a notice for the message without delivering it
+ * `"refuse"`: Claude Code drops the message
+ * **Default** : unset, so Claude Code decides per message
+
+settings.json
+
+ {
+ "crossSessionInbound": "hold"
+ }
+
+Claude Code reads managed settings first, then the `--settings` flag, then user settings, and applies the first value found. `refuse` is stricter than `hold`, and `hold` is stricter than `accept`. When none of the trusted sources sets a value, a project or local `hold` or `refuse` still applies, replacing the per-message default. In sessions with cross-session messaging, this key appears in `/config` as **Messages from your other sessions** , which writes it to user settings; the row requires Claude Code v2.1.232 or later, and Claude Code hides it while the `--settings` flag or managed settings set the key.
+
+###
+
+
+
+`disableAgentView`
+
+Turn off [background agents and agent view](</docs/en/agent-view>): `claude agents`, `--bg`, `/background`, and the on-demand supervisor. Set it in [managed settings](</docs/en/managed-settings>) to enforce it for an organization.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code turns off `claude agents`, `--bg`, `/background`, and the on-demand supervisor
+ * `false`: agent view is available
+ * **Default** : unset, so agent view is available
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_AGENT_VIEW`](</docs/en/env-vars>) turns agent view off for one session; whichever of the two turns it off, the other can’t turn it back on
+
+settings.json
+
+ {
+ "disableAgentView": true
+ }
+
+###
+
+
+
+`isolatePeerMachines`
+
+Require your explicit approval before Claude’s `SendMessage` reaches one of your sessions beyond this machine; see [Require approval for cross-machine messages](</docs/en/cross-session-messaging#require-approval-for-cross-machine-messages>). The approval prompt appears even in [`bypassPermissions` mode](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>).
+
+ * **Scope** : `Any file`. A `true` from any scope applies, so a checked-in project file can turn the requirement on but not off.
+ * **Type** : Boolean
+ * `true`: Claude Code asks for your approval before Claude’s `SendMessage` reaches one of your sessions beyond this machine
+ * `false`: cross-machine messages don’t prompt
+ * **Default** : unset, so cross-machine messages don’t prompt
+
+settings.json
+
+ {
+ "isolatePeerMachines": true
+ }
+
+The cross-machine `SendMessage` approval requires Claude Code v2.1.224 or later.
+
+###
+
+
+
+`processWrapper`
+
+On macOS and Linux, place a corporate launcher command in front of the [background processes Claude Code starts](</docs/en/corporate-launcher#what-the-launcher-covers>). Claude Code runs the launcher with its own command line appended, so the launcher must exec into Claude Code; see [Run Claude Code behind a corporate launcher](</docs/en/corporate-launcher>) for the launcher contract. Requires Claude Code v2.1.210 or later.
+
+ * **Scope** : `User or managed`
+ * **Type** : string, the launcher command as an argv prefix, such as an absolute path with optional arguments
+ * **Default** : unset, so background processes start unwrapped
+ * **Per-session overrides** : [`CLAUDE_CODE_PROCESS_WRAPPER`](</docs/en/env-vars>) takes precedence over this key for one session
+
+settings.json
+
+ {
+ "processWrapper": "/opt/corp/launcher --profile claude"
+ }
+
+Claude Code ignores the launcher on Windows and starts every process unwrapped. Requires Claude Code v2.1.210 or later.
+
+###
+
+
+
+`teammateMode`
+
+Choose where Claude Code shows [agent team](</docs/en/agent-teams>) teammates: inside your main terminal pane, or in split panes when your terminal supports them. See [Choose a display mode](</docs/en/agent-teams#choose-a-display-mode>).
+
+ * **Scope** : `Any file`. Claude Code also reads a value left in `~/.claude.json` by older versions.
+ * **Type** : string, one of:
+ * `"in-process"`: teammates run inside your main terminal pane
+ * `"auto"`: split panes when you’re running inside tmux, or inside iTerm2 with `it2` on your `PATH` or tmux installed; in-process otherwise
+ * `"tmux"`: split panes using tmux or iTerm2, detected from your terminal
+ * `"iterm2"`: iTerm2 native split panes through the `it2` CLI, in Claude Code v2.1.186 or later
+ * **Default** : `"in-process"`
+ * **Per-session overrides** : `--teammate-mode` takes precedence over this key for one session
+
+settings.json
+
+ {
+ "teammateMode": "auto"
+ }
+
+Before v2.1.179, the default was `auto`. The `iterm2` value requires Claude Code v2.1.186 or later.
+
+###
+
+
+
+`worktree`
+
+Configure how Claude Code creates and manages [git worktrees](</docs/en/worktrees>) for `--worktree`, the `EnterWorktree` tool, and isolated subagents and background sessions.
+
+ * **Scope** : `Any file`
+ * **Type** : object with `baseRef`, `symlinkDirectories`, `sparsePaths`, and `bgIsolation`
+ * **Default** : unset
+
+This example branches new worktrees from your current `HEAD` and symlinks `node_modules` into each one:
+
+settings.json
+
+ {
+ "worktree": {
+ "baseRef": "head",
+ "symlinkDirectories": ["node_modules"]
+ }
+ }
+
+To copy gitignored files like `.env` into new worktrees, add a [`.worktreeinclude` file](</docs/en/worktrees#copy-gitignored-files-into-worktrees>) to your project root instead of a setting.
+
+###
+
+
+
+`worktree.baseRef`
+
+Choose which ref new worktrees branch from. `"fresh"` branches from `origin/<default-branch>` for a clean tree matching the remote; `"head"` branches from your current local `HEAD`, so unpushed commits and feature-branch state are present in the worktree.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"fresh"`: new worktrees branch from `origin/<default-branch>`
+ * `"head"`: new worktrees branch from your current local `HEAD`, including unpushed commits
+ * **Default** : `"fresh"`
+
+settings.json
+
+ {
+ "worktree": {
+ "baseRef": "head"
+ }
+ }
+
+Inside a linked worktree, `"head"` resolves to that worktree’s `HEAD`, not the main checkout’s.
+
+###
+
+
+
+`worktree.symlinkDirectories`
+
+Symlink directories from the main repository into each worktree so you don’t duplicate large directories on disk.
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings, directory paths relative to the repository root
+ * **Default** : unset, so Claude Code symlinks no directories
+
+This example symlinks `node_modules` and `.cache` from the main repository into every new worktree:
+
+settings.json
+
+ {
+ "worktree": {
+ "symlinkDirectories": ["node_modules", ".cache"]
+ }
+ }
+
+###
+
+
+
+`worktree.sparsePaths`
+
+Check out only the listed directories in each worktree through git sparse-checkout. Claude Code writes only those directories plus root-level files to disk, which is faster in large monorepos; see [Check out only the directories you need](</docs/en/large-codebases#check-out-only-the-directories-you-need>).
+
+ * **Scope** : `Any file`
+ * **Type** : array of strings, directory paths relative to the repository root
+ * **Default** : unset, so each worktree checks out the whole tree
+
+This example checks out only `packages/my-app` and `shared/utils`, plus root-level files, in each worktree:
+
+settings.json
+
+ {
+ "worktree": {
+ "sparsePaths": ["packages/my-app", "shared/utils"]
+ }
+ }
+
+While a sparse worktree exists, git enables `extensions.worktreeConfig` in the repository’s shared `.git/config`.
+
+###
+
+
+
+`worktree.bgIsolation`
+
+Choose how [background sessions](</docs/en/agent-view#how-file-edits-are-isolated>) isolate their file edits. With `"worktree"`, Claude Code blocks `Edit` and `Write` in the main checkout until the session calls `EnterWorktree`; with `"none"`, background jobs edit the working copy directly. Set `"none"` for a repository where git worktrees are impractical. Requires Claude Code v2.1.143 or later.
+
+ * **Scope** : `Any file`
+ * **Type** : string, one of:
+ * `"worktree"`: Claude Code blocks `Edit` and `Write` in the main checkout until the session calls `EnterWorktree`
+ * `"none"`: background jobs edit the working copy directly
+ * **Default** : `"worktree"`
+
+settings.json
+
+ {
+ "worktree": {
+ "bgIsolation": "none"
+ }
+ }
+
+Outside a git repository, a [`WorktreeCreate` hook](</docs/en/worktrees#non-git-version-control>) that fails releases the block so the session can edit the working directory in place; that release requires Claude Code v2.1.203 or later.
+
+##
+
+
+
+Remote, desktop, and notifications
+
+Configure Remote Control, cloud environments, the desktop app, and the notifications Claude Code sends when it needs you. See [Remote Control](</docs/en/remote-control>).
+
+###
+
+
+
+`agentPushNotifEnabled`
+
+Allow Claude to send a push notification to your phone when it decides one is worth sending, for example when a long task finishes. Claude Code syncs this choice to your account, and pushes arrive while [Remote Control](</docs/en/remote-control>) is connected. Appears in `/config` as **Push when Claude decides**.
+
+ * **Scope** : `Any file`. Claude Code also reads a value left in `~/.claude.json` by older versions.
+ * **Type** : Boolean
+ * `true`: Claude can send a push notification to your phone when it decides one is worth sending
+ * `false`: Claude doesn’t send those notifications
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "agentPushNotifEnabled": true
+ }
+
+See [Mobile push notifications](</docs/en/remote-control#mobile-push-notifications>).
+
+###
+
+
+
+`awaySummaryEnabled`
+
+Show a one-line session recap when you return to the terminal after a few minutes away. Set it to `false`, or turn off **Session recap** in `/config`, to stop the recap.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: you see a one-line session recap when you return after a few minutes away
+ * `false`: Claude Code shows no recap
+ * **Default** : unset, so the recap is on
+ * **Per-session overrides** : [`CLAUDE_CODE_ENABLE_AWAY_SUMMARY`](</docs/en/env-vars>) takes precedence over this key for one session, in either direction
+
+settings.json
+
+ {
+ "awaySummaryEnabled": false
+ }
+
+Claude Code never shows the recap in non-interactive mode.
+
+###
+
+
+
+`disableArtifact`
+
+Turn off the [Artifact](</docs/en/artifacts>) tool, which publishes session output as a private web page on claude.ai, for everyone your settings reach, such as an organization through managed settings. To turn the tool off just for yourself, use `enableArtifact` instead, which the **Artifacts** toggle in `/config` writes to your user settings. Don’t put either key in a project’s `.claude/settings.json`: Claude Code ignores `enableArtifact` there, and a `disableArtifact` there is overridden by any higher-precedence file rather than acting as a lock.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code turns off the Artifact tool for everyone your settings reach
+ * `false`: the Artifact tool follows `enableArtifact` and your account’s availability
+ * **Default** : `false`
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_ARTIFACT`](</docs/en/env-vars>) set to `1` turns the tool off for one session; whichever of the two turns it off, the other can’t turn it back on
+
+settings.json
+
+ {
+ "disableArtifact": true
+ }
+
+A managed `disableArtifact` takes precedence over a user’s `enableArtifact` choice.
+
+###
+
+
+
+`disableDeepLinkRegistration`
+
+Stop Claude Code from registering the `claude-cli://` protocol handler with the operating system, which it otherwise does after you send the first prompt of an interactive session. [Deep links](</docs/en/deep-links>) let external tools open a Claude Code session with a pre-filled prompt. Set this in environments where protocol handler registration is restricted or managed separately.
+
+ * **Scope** : `Any file`
+ * **Type** : the string `"disable"`
+ * **Default** : unset, so Claude Code registers the handler
+
+settings.json
+
+ {
+ "disableDeepLinkRegistration": "disable"
+ }
+
+###
+
+
+
+`disableRemoteControl`
+
+Turn off [Remote Control](</docs/en/remote-control>): Claude Code then refuses `claude remote-control`, the `--remote-control` flag, auto-start, and the in-session toggle, and reports that your organization’s policy disabled it. Place it in [managed settings](</docs/en/managed-settings>) for per-device MDM enforcement.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code refuses `claude remote-control`, the `--remote-control` flag, auto-start, and the in-session toggle
+ * `false`: Remote Control stays available
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "disableRemoteControl": true
+ }
+
+###
+
+
+
+`enableArtifact`
+
+Turn the [Artifact](</docs/en/artifacts>) tool on or off for yourself. When unset, the default follows the feature’s [availability](</docs/en/artifacts#availability>) for your account. The **Artifacts** row in `/config` writes this key, so you don’t usually edit it by hand. To turn artifacts off for everyone from managed settings, use `disableArtifact` instead. Requires Claude Code v2.1.196 or later.
+
+ * **Scope** : `User or managed`. Claude Code ignores the key in project and local settings so that a repository you clone can’t turn the tool on for you.
+ * **Type** : Boolean
+ * `true`: Claude Code turns the Artifact tool on for you where it’s available for your account
+ * `false`: Claude Code turns the Artifact tool off for you
+ * **Default** : unset, so the tool follows your account’s availability
+
+settings.json
+
+ {
+ "enableArtifact": false
+ }
+
+A managed `disableArtifact` and your organization’s [admin setting](</docs/en/artifacts#manage-artifacts-for-your-organization>) take precedence over this key. Requires Claude Code v2.1.196 or later.
+
+###
+
+
+
+`inputNeededNotifEnabled`
+
+Get a push notification on your phone when a permission prompt or question is waiting for your input. Claude Code sends these only while [Remote Control](</docs/en/remote-control>) is connected. Appears in `/config` as **Push when actions required**.
+
+ * **Scope** : `Any file`. Claude Code also reads a value left in `~/.claude.json` by older versions.
+ * **Type** : Boolean
+ * `true`: you get a push notification on your phone when a permission prompt or question is waiting, while Remote Control is connected
+ * `false`: Claude Code sends no such notifications
+ * **Default** : `false`
+
+settings.json
+
+ {
+ "inputNeededNotifEnabled": true
+ }
+
+See [Mobile push notifications](</docs/en/remote-control#mobile-push-notifications>).
+
+###
+
+
+
+`preferredNotifChannel`
+
+Choose how Claude Code notifies you when a task completes or a permission prompt is waiting. Appears in `/config` as **Local notifications**.
+
+ * **Scope** : `Any file`. Claude Code also reads a value left in `~/.claude.json` by older versions.
+ * **Type** : string, one of:
+ * `"auto"`: Claude Code sends a desktop notification in iTerm2, Ghostty, and Kitty, rings the bell in Terminal.app only when its audible bell is off, and does nothing elsewhere
+ * `"terminal_bell"`: Claude Code rings the bell character in any terminal
+ * `"iterm2"`: Claude Code sends an iTerm2 desktop notification
+ * `"iterm2_with_bell"`: Claude Code sends an iTerm2 desktop notification and rings the bell
+ * `"kitty"`: Claude Code sends a Kitty desktop notification
+ * `"ghostty"`: Claude Code sends a Ghostty desktop notification
+ * `"notifications_disabled"`: Claude Code sends no notification
+ * **Default** : `"auto"`
+
+settings.json
+
+ {
+ "preferredNotifChannel": "terminal_bell"
+ }
+
+With `"auto"`, Claude Code sends a desktop notification in iTerm2, Ghostty, and Kitty. In Terminal.app it rings the bell character only when you have turned Terminal’s audible bell off, and in other terminals it does nothing. Set `"terminal_bell"` to ring the bell character in any terminal. See [Get a terminal bell or notification](</docs/en/terminal-config#get-a-terminal-bell-or-notification>).
+
+###
+
+
+
+`remote.defaultEnvironmentId`
+
+Pick the default [cloud environment](</docs/en/cloud-environments>) for cloud sessions you create from the CLI, such as with `claude --cloud`. Claude Code writes this key to your user settings when you pick an environment with [`/remote-env`](</docs/en/cloud-environments#select-an-environment-from-the-cli>).
+
+ * **Scope** : `Any file`. For a self-hosted environment ID, user or managed settings, or the `--settings` flag only.
+ * **Type** : string, an environment ID such as `env_...` or `ccpool_...`
+ * **Default** : unset, so Claude Code uses the Anthropic-hosted environment when one is in your list, and otherwise the first environment it finds
+ * **Per-session overrides** : `--environment` takes precedence over this key for the one cloud session it creates
+
+settings.json
+
+ {
+ "remote": {
+ "defaultEnvironmentId": "env_0123abcd"
+ }
+ }
+
+An Anthropic-hosted environment ID, which starts with `env_`, follows the standard settings precedence, so a value in a repository’s project settings overrides your user-level pick. A [self-hosted environment](</docs/en/self-hosted-environments>) ID, which starts with `ccpool_`, is honored only from user settings, managed settings, and the `--settings` flag; Claude Code ignores one in a repository’s project or local settings, and `/remote-env` shows which value it ignored, so a checked-in file can’t steer sessions onto a self-hosted environment you didn’t choose.
+
+###
+
+
+
+`remoteControlAtStartup`
+
+Connect [Remote Control](</docs/en/remote-control>) automatically when each interactive session starts, instead of waiting for `/remote-control`. Set it to `true` to turn auto-connect on, `false` to turn it off. Appears in `/config` as **Enable Remote Control for all sessions**.
+
+ * **Scope** : `Any file`. Claude Code also reads a value left in `~/.claude.json` by older versions.
+ * **Type** : Boolean
+ * `true`: Claude Code connects Remote Control automatically when each interactive session starts
+ * `false`: Claude Code waits for `/remote-control`
+ * **Default** : unset, so auto-connect follows your organization’s admin default when one is set, and otherwise Claude Code’s current default
+ * **Per-session overrides** : `--remote-control` turns Remote Control on for one session even when this key is `false`, and no flag turns it off for one session
+
+settings.json
+
+ {
+ "remoteControlAtStartup": true
+ }
+
+Claude Code ignores a `true` from project or local settings, so a repository can turn auto-connect off for its checkout but can’t turn it on. For the full per-scope behavior, see [Enable Remote Control for all sessions](</docs/en/remote-control#enable-remote-control-for-all-sessions>) and the [security keys where the stricter value applies](</docs/en/settings#security-keys-where-the-stricter-value-applies>).
+
+###
+
+
+
+`sshConfigs`
+
+Add SSH connections to the [Desktop](</docs/en/desktop#pre-configure-ssh-connections-for-your-team>) environment dropdown. Administrators use it to distribute shared connections to a team. Connections you define in managed settings show as managed, so users can select them but can’t edit or delete them in the app.
+
+ * **Scope** : `User or managed`. The desktop app reads this key.
+ * **Type** : array of objects, each with required `id`, `name`, and `sshHost` and optional `sshPort` and `sshIdentityFile`
+ * **Default** : unset
+
+This example adds one connection named `Dev VM` that connects to `user@dev.example.com`:
+
+settings.json
+
+ {
+ "sshConfigs": [
+ {
+ "id": "dev-vm",
+ "name": "Dev VM",
+ "sshHost": "user@dev.example.com"
+ }
+ ]
+ }
+
+###
+
+
+
+`sshHostAllowlist`
+
+Limit the hosts a [Desktop SSH session](</docs/en/desktop#restrict-which-ssh-hosts-users-can-connect-to>) can connect to. Only the Desktop app reads this key; the CLI doesn’t. Patterns are case-insensitive: `*` matches any host, `*.example.com` matches `example.com` and every subdomain, and anything else is an exact match against the hostname after `~/.ssh/config` resolution. An empty array turns SSH sessions off.
+
+ * **Scope** : `Managed`
+ * **Type** : array of hostname patterns
+ * **Default** : unset, so any host is allowed
+
+This example allows `devboxes.example.com` and its subdomains, plus the exact host `bastion.example.com`:
+
+managed-settings.json
+
+ {
+ "sshHostAllowlist": ["*.devboxes.example.com", "bastion.example.com"]
+ }
+
+##
+
+
+
+Authentication and providers
+
+Supply credentials through helper scripts and, for organizations, force a login method or organization. See [Authentication](</docs/en/authentication>).
+
+###
+
+
+
+`apiKeyHelper`
+
+Run your own command to produce the credential Claude Code sends with model requests. Claude Code runs the command through the system shell, `/bin/sh` on macOS and Linux and `cmd` on Windows, and sends its output as both the `X-Api-Key` and `Authorization: Bearer` headers. Use it for dynamic or rotating credentials, such as short-lived tokens fetched from a vault.
+
+ * **Scope** : `Any file`
+ * **Type** : string, a shell command line
+ * **Default** : unset, so Claude Code doesn’t run a helper
+
+settings.json
+
+ {
+ "apiKeyHelper": "/bin/generate_temp_api_key.sh"
+ }
+
+Claude Code caches the value and reruns the command after the interval you set with [`CLAUDE_CODE_API_KEY_HELPER_TTL_MS`](</docs/en/env-vars>). In interactive sessions, when the command comes from project or local settings, Claude Code doesn’t run it until you accept the workspace trust prompt. See [Credential management](</docs/en/authentication#credential-management>).
+
+###
+
+
+
+`awsAuthRefresh`
+
+Run your own command, such as `aws sso login`, to refresh the credentials in your `.aws` directory when the ones Claude Code has for [Amazon Bedrock](</docs/en/amazon-bedrock>) stop working. Claude Code checks the current credentials against STS first and runs the command only when that check fails, then reads the refreshed `.aws` directory.
+
+ * **Scope** : `Any file`
+ * **Type** : string, a shell command line
+ * **Default** : unset, so Claude Code doesn’t refresh AWS credentials for you
+
+settings.json
+
+ {
+ "awsAuthRefresh": "aws sso login --profile myprofile"
+ }
+
+Use this key when your refresh flow writes to `.aws`; use `awsCredentialExport` when it prints credentials instead. See [advanced credential configuration](</docs/en/amazon-bedrock#advanced-credential-configuration>).
+
+###
+
+
+
+`awsCredentialExport`
+
+Run your own command that prints AWS credentials as JSON, so Claude Code can call [Amazon Bedrock](</docs/en/amazon-bedrock>) with credentials that don’t live in your `.aws` directory. Claude Code accepts the `aws sts` output shape and the flat `aws configure export-credentials` shape, and scopes the credentials to its own Bedrock client, so the shell commands Claude runs still see your ambient credentials.
+
+ * **Scope** : `Any file`
+ * **Type** : string, a shell command line
+ * **Default** : unset, so Claude Code uses the ambient AWS credential chain
+
+settings.json
+
+ {
+ "awsCredentialExport": "/bin/generate_aws_grant.sh"
+ }
+
+Unlike `awsAuthRefresh`, Claude Code always runs this command when it’s set, without checking the ambient credentials first. See [advanced credential configuration](</docs/en/amazon-bedrock#advanced-credential-configuration>).
+
+###
+
+
+
+`forceLoginMethod`
+
+Restrict which kind of account people can log in with. Set `"claudeai"` to allow only claude.ai accounts, `"console"` to allow only Claude Console accounts, or `"gateway"` to send people to a [cloud gateway](</docs/en/claude-apps-gateway>) instead of a first-party login. Administrators set it in managed settings and pair it with `forceLoginOrgUUID` to keep developers’ claude.ai logins inside one organization.
+
+ * **Scope** : `Any file`. Claude Code honors `"gateway"` only from a managed source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. It treats `"gateway"` as unset in user, project, local, HKCU, and server-managed settings, the same rule as `forceLoginGatewayUrl`.
+ * **Type** : string, one of:
+ * `"claudeai"`: only claude.ai accounts can log in
+ * `"console"`: only Claude Console accounts can log in
+ * `"gateway"`: Claude Code sends people to a cloud gateway instead of a first-party login
+ * **Default** : unset, so people pick a login method
+
+settings.json
+
+ {
+ "forceLoginMethod": "claudeai"
+ }
+
+Every first-party login path applies the restriction, including the [VS Code extension](</docs/en/vs-code>), the Agent SDK, `claude setup-token`, and `/install-github-app`, except the terminal’s interactive login screen, reached by `/login` or first-run onboarding, which pre-selects the method without enforcing it. Before v2.1.212, only terminal logins applied it. See [Restrict login to your organization](</docs/en/authentication#restrict-login-to-your-organization>) for how each login path, environment credentials, and third-party providers are handled.
+
+###
+
+
+
+`forceLoginGatewayUrl`
+
+Set the gateway URL the `/login` Cloud gateway screen connects to, so people reach your [cloud gateway](</docs/en/claude-apps-gateway>) without typing its address. The screen has no URL field: with this key set, it shows your gateway URL and connects when the person presses Enter; without it, it tells them to contact their IT administrator. When `forceLoginMethod` is unset, this key alone opens the Cloud gateway screen. `forceLoginMethod: "gateway"` also opens it and removes the login-method picker, and a `claudeai` or `console` value there takes precedence over this key. Set both keys so the screen connects instead of showing an error.
+
+ * **Scope** : `Managed`. Read only from a source on the machine: `managed-settings.json`, the macOS plist or Windows HKLM registry, or a policy helper. Claude Code ignores it in HKCU and server-managed settings.
+ * **Type** : string, a full URL including the scheme
+ * **Default** : unset, so the Cloud gateway screen shows an error telling people to contact their IT administrator
+
+managed-settings.json
+
+ {
+ "forceLoginGatewayUrl": "https://claude-gateway.example.com"
+ }
+
+A value that isn’t a valid URL is dropped on its own; the rest of the managed settings file still applies. See [Set the gateway URL](</docs/en/claude-apps-gateway#set-the-gateway-url>).
+
+###
+
+
+
+`forceLoginOrgUUID`
+
+From a managed source, require claude.ai account logins to belong to one Anthropic organization, a single UUID, or to any of several, an array. From any settings file, a single UUID also pre-selects that organization during a claude.ai or Claude Console login; an array pre-selects nothing.
+
+ * **Scope** : `Any file`. Only a managed source enforces the restriction; a single UUID in any other settings file pre-selects the organization during login without restricting it.
+ * **Type** : string, one UUID, or array of strings, several UUIDs
+ * **Default** : unset, so any organization can log in
+
+This example accepts logins from either of two organizations without pre-selecting one:
+
+managed-settings.json
+
+ {
+ "forceLoginOrgUUID": ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"]
+ }
+
+An empty array in a managed source blocks every login with a misconfiguration message, and so does a value Claude Code can’t parse. See [Restrict login to your organization](</docs/en/authentication#restrict-login-to-your-organization>) for how Claude Code treats Claude Console logins, the other login paths, and environment credentials.
+
+###
+
+
+
+`gcpAuthRefresh`
+
+Run your own command to refresh Google Cloud Application Default Credentials when Claude Code finds they’ve expired or can’t be loaded, so [Google Cloud’s Agent Platform](</docs/en/google-vertex-ai>) requests keep working without you re-authenticating by hand.
+
+ * **Scope** : `Any file`
+ * **Type** : string, a shell command line
+ * **Default** : unset, so Claude Code’s credential error tells you to run `gcloud auth application-default login` yourself
+
+settings.json
+
+ {
+ "gcpAuthRefresh": "gcloud auth application-default login"
+ }
+
+See [advanced credential configuration](</docs/en/google-vertex-ai#advanced-credential-configuration>).
+
+###
+
+
+
+`otelHeadersHelper`
+
+Run your own command to generate the headers Claude Code sends with OpenTelemetry exports, for backends whose tokens rotate. Claude Code runs it at startup and periodically after that, and expects a JSON object of string header values on stdout.
+
+ * **Scope** : `Any file`
+ * **Type** : string, an executable path or a shell command line
+ * **Default** : unset, so Claude Code adds no helper-generated headers
+
+settings.json
+
+ {
+ "otelHeadersHelper": "/bin/generate_otel_headers.sh"
+ }
+
+Set the refresh interval with [`CLAUDE_CODE_OTEL_HEADERS_HELPER_DEBOUNCE_MS`](</docs/en/env-vars>). See [Dynamic headers](</docs/en/monitoring-usage#dynamic-headers>) for the script requirements and where Claude Code reports a failing helper.
+
+##
+
+
+
+Updates and versioning
+
+Choose an update channel and, for organizations, pin the versions people can run. See [Update Claude Code](</docs/en/setup#update-claude-code>).
+
+###
+
+
+
+`autoUpdatesChannel`
+
+Choose which [release channel](</docs/en/setup#configure-release-channel>) background auto-updates and `claude update` follow. Set `"stable"` for a version that is typically about one week old and skips releases with major regressions, or `"latest"` for the most recent release.
+
+ * **Scope** : `Any file`. Set it in managed settings to enforce one channel across your organization.
+ * **Type** : string, one of:
+ * `"latest"`: updates follow the most recent release
+ * `"stable"`: updates follow a version that is typically about one week old and skips releases with major regressions
+ * **Default** : unset, so Claude Code follows `"latest"`
+
+settings.json
+
+ {
+ "autoUpdatesChannel": "stable"
+ }
+
+Claude Code writes `"stable"` to your user settings when you pick it under **Auto-update channel** in `/config`, and removes the key when you switch back to latest there. `claude install stable` and `claude install latest` also save the channel you name. Switching from `"latest"` to `"stable"` in `/config` asks whether to allow a downgrade or stay on your current version; staying sets `minimumVersion`. Homebrew installs ignore this key: the `claude-code` cask tracks stable and `claude-code@latest` tracks latest, and `claude update` defers to `brew upgrade`. To turn auto-updates off entirely, set [`DISABLE_AUTOUPDATER`](</docs/en/setup#disable-auto-updates>) in `env`.
+
+###
+
+
+
+`minimumVersion`
+
+Keep background auto-updates and `claude update` from installing any version below this one, so moving to the `"stable"` channel doesn’t downgrade you from a newer `"latest"` build. Claude Code writes this key for you when you choose to stay on your current version while switching channels in `/config`, and clears it when you switch back to `"latest"`.
+
+ * **Scope** : `Any file`. Set it in managed settings to pin an organization-wide minimum that user and project settings can’t lower.
+ * **Type** : string, a version number such as `"2.1.100"`
+ * **Default** : unset, so updates can install any version the channel offers
+
+This example follows the stable channel and refuses to install any version below 2.1.100:
+
+settings.json
+
+ {
+ "autoUpdatesChannel": "stable",
+ "minimumVersion": "2.1.100"
+ }
+
+This key only constrains updates. To make Claude Code refuse to start below a version, use `requiredMinimumVersion` instead. See [Pin a minimum version](</docs/en/setup#pin-a-minimum-version>).
+
+###
+
+
+
+`requiredMaximumVersion`
+
+Set the newest Claude Code version your organization allows to start. When the running version is newer, Claude Code exits at startup and tells the user to install an approved version through your organization’s approved method; `claude install <version>` may also work. Requires Claude Code v2.1.163 or later.
+
+ * **Scope** : `Managed`. Claude Code gives no warning when it ignores the key elsewhere.
+ * **Type** : string, a version number such as `"2.1.150"`; a value that isn’t a valid version is ignored
+ * **Default** : unset, so no ceiling applies
+
+managed-settings.json
+
+ {
+ "requiredMaximumVersion": "2.1.150"
+ }
+
+Background auto-updates and `claude update` skip versions above the ceiling, so an installation inside the range stays inside it. `claude update`, `claude install`, and `claude doctor` keep working above the ceiling so users can recover. Pair it with `requiredMinimumVersion` to enforce a range. Requires Claude Code v2.1.163 or later.
+
+###
+
+
+
+`requiredMinimumVersion`
+
+Set the oldest Claude Code version your organization allows to start. When the running version is older, Claude Code exits at startup and tells the user to update through your organization’s approved method. The check runs at startup only, so a session that’s already running continues. Requires Claude Code v2.1.163 or later.
+
+ * **Scope** : `Managed`. Claude Code gives no warning when it ignores the key elsewhere.
+ * **Type** : string, a version number such as `"2.1.150"`; a value that isn’t a valid version is ignored
+ * **Default** : unset, so no floor applies
+
+managed-settings.json
+
+ {
+ "requiredMinimumVersion": "2.1.150"
+ }
+
+`claude update`, `claude install`, and `claude doctor` keep working below the floor so users can recover. Unlike `minimumVersion`, which only prevents downgrades, this key blocks startup. Pair it with `requiredMaximumVersion` to enforce a range. Requires Claude Code v2.1.163 or later.
+
+##
+
+
+
+Tools
+
+Turn off specific tools in the [Claude Code desktop app](</docs/en/desktop>). The terminal CLI ignores these keys. For the tools themselves, see [Tools available to Claude](</docs/en/tools-reference>).
+
+###
+
+
+
+`browserExternalPageTools`
+
+Stop Claude from using its tools to read or act on external pages in the desktop app’s [Browser pane](</docs/en/desktop#browse-external-sites>). People in your organization can still open external sites themselves, and local dev server previews keep working with Claude’s tools. The desktop app reads this key; the terminal CLI ignores it.
+
+ * **Scope** : `Managed`
+ * **Type** : string, `"disabled"`; the desktop app also accepts `"disable"`, in either case
+ * **Default** : unset, so Claude’s tools work on external pages
+
+managed-settings.json
+
+ {
+ "browserExternalPageTools": "disabled"
+ }
+
+Any other value leaves Claude’s tools on, and a non-empty string that isn’t one of the two accepted values logs a warning. To block external sites for people and Claude alike, set `disableBrowserExternalNavigation` instead. See [Restrict external browsing for your organization](</docs/en/desktop#restrict-external-browsing-for-your-organization>).
+
+###
+
+
+
+`disableBrowserExternalNavigation`
+
+Turn off external browsing in the desktop app’s [Browser pane](</docs/en/desktop#browse-external-sites>) for people and Claude alike. Localhost dev server previews keep working. The desktop app reads this key; the terminal CLI ignores it.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean; only the JSON Boolean `true` takes effect
+ * `true`: the desktop app turns off external browsing in the Browser pane for people and Claude alike; localhost previews keep working
+ * `false`: external browsing stays on
+ * **Default** : unset, so external browsing is on
+
+managed-settings.json
+
+ {
+ "disableBrowserExternalNavigation": true
+ }
+
+The desktop app ignores any other value, and a value that isn’t a Boolean, such as the string `"true"` or `1`, also logs a warning. To leave external browsing on but keep Claude’s tools off external pages, set `browserExternalPageTools` instead. See [Restrict external browsing for your organization](</docs/en/desktop#restrict-external-browsing-for-your-organization>).
+
+###
+
+
+
+`disableMobileSimulatorTools`
+
+Block Claude’s tools for the desktop app’s [iOS Simulator pane](</docs/en/desktop-ios-simulator#turn-off-simulator-access>). People keep manual use of the pane; only Claude’s access is removed, and nobody can turn it back on from inside the app. The desktop app reads this key; the terminal CLI ignores it.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean; only the JSON Boolean `true` takes effect
+ * `true`: the desktop app blocks Claude’s tools for the iOS Simulator pane
+ * `false`: Claude’s simulator tools follow each person’s settings toggle in the desktop app
+ * **Default** : unset, so Claude’s simulator tools follow each person’s settings toggle in the desktop app
+
+managed-settings.json
+
+ {
+ "disableMobileSimulatorTools": true
+ }
+
+The desktop app ignores any other value, and a value that isn’t a Boolean, such as the string `"true"` or `1`, also logs a warning.
+
+##
+
+
+
+Privacy and telemetry
+
+Control how long Claude Code keeps session data and what it sends. The switches that turn off usage metrics and error reports are environment variables, not settings keys: set `DISABLE_TELEMETRY`, `DISABLE_ERROR_REPORTING`, or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` in the `env` key or in the shell. [Telemetry services](</docs/en/data-usage#telemetry-services>) says what each one stops. The session survey is the exception: `feedbackSurveyRate` below turns it off from a settings file.
+
+###
+
+
+
+`cleanupPeriodDays`
+
+Set how many days Claude Code keeps [session transcripts and other application data](</docs/en/claude-directory#cleaned-up-automatically>) before deleting them. Claude Code runs the deletion as a background sweep after a session starts, as long as it can safely determine the retention period.
+
+ * **Scope** : `Any file`
+ * **Type** : number of days, a whole number, minimum `1`
+ * **Default** : `30`
+
+settings.json
+
+ {
+ "cleanupPeriodDays": 20
+ }
+
+Setting `0` fails validation, so pick a large value such as `3650` for long retention. To stop Claude Code from writing transcripts at all, see [Plaintext storage](</docs/en/claude-directory#plaintext-storage>).
+
+###
+
+
+
+`feedbackSurveyRate`
+
+Set the probability that the [session quality survey](</docs/en/data-usage#session-quality-surveys>) appears when a session is eligible for it. Set `0` to keep the survey from appearing.
+
+ * **Scope** : `Any file`
+ * **Type** : number between `0` and `1`
+ * **Default** : unset, so Claude Code uses the rate Anthropic sets remotely, or its built-in rate of `0.005` on Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry, which don’t receive remote configuration
+ * **Per-session overrides** : [`CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY`](</docs/en/env-vars>) set to `1` turns the survey off for one session whatever rate this key sets
+
+settings.json
+
+ {
+ "feedbackSurveyRate": 0.05
+ }
+
+The same rate applies to the survey in the VS Code extension.
+
+###
+
+
+
+`skipWebFetchPreflight`
+
+Skip the [WebFetch domain safety check](</docs/en/data-usage#webfetch-domain-safety-check>), which sends each requested hostname to `api.anthropic.com` before fetching. Set `true` in environments that block traffic to Anthropic, such as Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry deployments with restrictive egress.
+
+ * **Scope** : `Any file`
+ * **Type** : Boolean
+ * `true`: Claude Code skips the WebFetch domain safety check
+ * `false`: the check runs before the first fetch to each hostname in a session, and again for a hostname whose earlier check was blocked or failed
+ * **Default** : unset, so the check runs before the first fetch to each hostname in a session
+
+settings.json
+
+ {
+ "skipWebFetchPreflight": true
+ }
+
+With the check skipped, WebFetch attempts any URL without consulting the blocklist, so pair it with [`WebFetch` permission rules](</docs/en/permissions#webfetch>) if you need to restrict which domains Claude can reach.
+
+##
+
+
+
+Enterprise and managed settings
+
+Keys an organization uses to compute, refresh, and combine managed settings. See [Set up managed settings](</docs/en/admin-setup>).
+
+###
+
+
+
+`disableSideloadFlags`
+
+Reject the `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` CLI flags at startup, which users could otherwise pass to bypass `strictKnownMarketplaces` for a single run. Claude Code exits with an error naming the rejected flags, and applies the same check to surfaces that start the CLI with these flags internally, currently [Cowork](</docs/en/desktop>) local sessions in the desktop app. In [cloud sessions](</docs/en/claude-code-on-the-web>), Claude Code drops the MCP servers the server delivered through `--mcp-config`, other than in-process `type: "sdk"` entries, and starts the session. Requires Claude Code v2.1.193 or later.
+
+ * **Scope** : `Managed`
+ * **Type** : Boolean
+ * `true`: Claude Code rejects `--plugin-dir`, `--plugin-url`, `--agents`, and `--mcp-config` at startup and exits with an error naming them, except that in cloud sessions it drops the MCP servers the server delivered through `--mcp-config`, other than in-process `type: "sdk"` entries, and starts the session
+ * `false`: Claude Code accepts those flags
+ * **Default** : `false`
+
+managed-settings.json
+
+ {
+ "disableSideloadFlags": true
+ }
+
+Claude Code still accepts a `--mcp-config` whose servers are all in-process `type: "sdk"` entries, so the Agent SDK and VS Code extension keep working. Users can still add servers with `claude mcp add` or a `.mcp.json` file; for per-server control, set [`allowedMcpServers`](</docs/en/managed-mcp>) as well. Requires Claude Code v2.1.193 or later. In cloud sessions, Claude Code also ignores server-delivered mid-session MCP updates, the path behind cloud session configuration and SDK `setMcpServers()` on remote workers. In-process `type: "sdk"` entries stay exempt there too. Before v2.1.239, a server-delivered `--mcp-config` blocked a cloud session from starting.
+
+###
+
+
+
+`forceRemoteSettingsRefresh`
+
+Block CLI startup until Claude Code has freshly fetched [server-managed settings](</docs/en/server-managed-settings>). If the fetch fails, Claude Code exits instead of continuing with cached or no settings. When the key is unset, startup continues without waiting for remote settings. A Cloud gateway session always waits, and exits if the gateway can’t be reached. Set it when your environment can’t accept even a brief window in which a session runs without its managed policy.
+
+ * **Scope** : `Managed`. Claude Code honors a `true` from any admin-controlled managed source, even one that isn’t the highest-priority source.
+ * **Type** : Boolean
+ * `true`: Claude Code blocks startup until it has freshly fetched server-managed settings, and exits if the fetch fails
+ * `false`: startup continues without waiting for remote settings
+ * **Default** : `false`
+
+managed-settings.json
+
+ {
+ "forceRemoteSettingsRefresh": true
+ }
+
+Set it in an MDM profile or the managed settings file to enforce fail-closed startup before the first server payload arrives. Claude Code applies the check only in sessions that fetch server-managed settings, so a session that [doesn’t fetch them](</docs/en/server-managed-settings#platform-availability>) starts without waiting. The `claude auth` subcommands are exempt, so users can re-authenticate when expired credentials are why the fetch fails. See [Enforce fail-closed startup](</docs/en/server-managed-settings#enforce-fail-closed-startup>).
+
+###
+
+
+
+`parentSettingsBehavior`
+
+Choose whether Claude Code applies managed settings supplied by an embedding host process, such as the Agent SDK or an IDE extension, when an admin-deployed managed tier is also present. With `"first-wins"`, Claude Code drops the host-supplied settings; with `"merge"`, it applies them under the admin tier through a restrictive-only filter. Set `"merge"` when a host needs to pass its own restrictions to the sessions it launches, for example Claude Desktop delivering a gateway’s egress allowlist.
+
+ * **Scope** : `Managed`. Claude Code reads it from the highest-priority admin-controlled managed source.
+ * **Type** : string, one of:
+ * `"first-wins"`: Claude Code drops the host-supplied settings when an admin-deployed managed tier is present
+ * `"merge"`: Claude Code applies the host-supplied settings under the admin tier through a restrictive-only filter
+ * **Default** : `"first-wins"`
+
+managed-settings.json
+
+ {
+ "parentSettingsBehavior": "merge"
+ }
+
+This key has no effect when no admin-deployed managed tier exists: the host’s settings then apply as the only managed tier, still filtered to restrictive values. For the filter’s limits and how the managed sources interact, see [Parent settings from embedding hosts](</docs/en/managed-settings#parent-settings-from-embedding-hosts>) and [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>).
+
+###
+
+
+
+`policyHelper`
+
+Run an executable you deploy that computes managed settings at startup, so you can derive policy from device posture, identity, or a remote service instead of a static file. Claude Code runs the helper before it accepts the first prompt and treats the settings it emits as the managed settings for the session.
+
+ * **Scope** : `Managed`. Read from the macOS plist, the Windows HKLM registry, or the managed settings file. Claude Code reads the key from the highest-priority managed source that delivers settings and runs the helper only when that source is one of those three; it ignores the key in server-managed settings, the HKCU registry, and host-supplied parent settings.
+ * **Type** : object with `path`, `timeoutMs`, and `refreshIntervalMs`
+ * **Default** : unset, so no helper runs
+
+This example runs the helper with a 5-second timeout and re-runs it every five minutes:
+
+managed-settings.json
+
+ {
+ "policyHelper": {
+ "path": "/usr/local/bin/claude-policy",
+ "timeoutMs": 5000,
+ "refreshIntervalMs": 300000
+ }
+ }
+
+####
+
+
+
+Write the helper output
+
+Claude Code runs the helper with no arguments, sets `CLAUDE_CODE_VERSION` in its environment, and reads a JSON envelope from stdout, capped at 1 MB. Put the settings under a `managedSettings` key. A bare settings object with no `managedSettings` key parses with `managedSettings` undefined and applies nothing, and Claude Code reports no error:
+
+ {
+ "managedSettings": {
+ "permissions": { "deny": ["Read(//etc/secrets/**)"] }
+ }
+ }
+
+When the helper emits `managedSettings`, that object becomes the only managed settings source for the run: Claude Code ignores the MDM, file, and HKCU sources, reads the [cross-source keys](</docs/en/managed-settings#keys-read-from-every-admin-source>) from the helper’s output alone, and never merges [parent settings](</docs/en/managed-settings#parent-settings-from-embedding-hosts>). The startup `forceRemoteSettingsRefresh` check runs before the helper and reads any admin source. A helper that exits 0 without emitting `managedSettings` contributes no managed settings, and the other sources apply as usual. When the helper exits non-zero at startup, Claude Code prints the error and refuses to start, so a helper that needs outage resilience should serve from its own cache and exit `0`.
+
+###
+
+
+
+`policyHelper.path`
+
+Name the helper executable Claude Code runs. Claude Code refuses to start when the path isn’t absolute, or on Windows when it doesn’t end in `.exe`.
+
+ * **Scope** : `Managed`. Read from the macOS plist, the Windows HKLM registry, or the managed settings file, wherever `policyHelper` is read.
+ * **Type** : string, an absolute path in normalized form, without `.` or `..` segments
+ * **Default** : none; required when `policyHelper` is set
+
+managed-settings.json
+
+ {
+ "policyHelper": {
+ "path": "/usr/local/bin/claude-policy"
+ }
+ }
+
+###
+
+
+
+`policyHelper.timeoutMs`
+
+Set how long Claude Code waits for the helper before treating the run as failed. A timed-out run fails the same way as a non-zero exit, so at startup Claude Code refuses to start.
+
+ * **Scope** : `Managed`. Read from the macOS plist, the Windows HKLM registry, or the managed settings file, wherever `policyHelper` is read.
+ * **Type** : integer, milliseconds, minimum `1000`
+ * **Default** : `10000`
+
+managed-settings.json
+
+ {
+ "policyHelper": {
+ "path": "/usr/local/bin/claude-policy",
+ "timeoutMs": 5000
+ }
+ }
+
+###
+
+
+
+`policyHelper.refreshIntervalMs`
+
+Have Claude Code re-run the helper in the background on an interval so policy changes reach a running session. When a refresh succeeds, its output replaces the previous managed settings without a restart; when a refresh fails, Claude Code keeps the policy it already has.
+
+ * **Scope** : `Managed`. Read from the macOS plist, the Windows HKLM registry, or the managed settings file, wherever `policyHelper` is read.
+ * **Type** : integer, milliseconds: `0` to disable refresh, otherwise at least `60000`
+ * **Default** : unset, so Claude Code runs the helper once at startup
+
+This example re-runs the helper every five minutes:
+
+managed-settings.json
+
+ {
+ "policyHelper": {
+ "path": "/usr/local/bin/claude-policy",
+ "refreshIntervalMs": 300000
+ }
+ }
+
+###
+
+
+
+`wslInheritsWindowsSettings`
+
+Have Claude Code on WSL read managed settings from the Windows policy chain, with HKLM and the Windows managed settings file taking priority over `/etc/claude-code` and HKCU below it. While the chain is on, Claude Code reads `/etc/claude-code` only when no managed settings file or drop-in under `C:\Program Files\ClaudeCode\` delivers a policy key other than `wslInheritsWindowsSettings` itself. Set it to extend the policy you already deploy on Windows to WSL sessions on the same machine, so they follow the same rules as host sessions. Claude Code honors it only when set in the HKLM registry key or in a managed settings file or drop-in under `C:\Program Files\ClaudeCode\`, both of which require Windows admin to write.
+
+ * **Scope** : `Managed`. In an admin-controlled Windows source.
+ * **Type** : Boolean
+ * `true`: Claude Code on WSL reads managed settings from the Windows policy chain, and reads `/etc/claude-code` only when no managed settings file or drop-in under `C:\Program Files\ClaudeCode\` delivers a policy key other than `wslInheritsWindowsSettings`
+ * `false`: WSL reads only `/etc/claude-code`
+ * **Default** : `false`, so WSL reads only `/etc/claude-code`
+
+managed-settings.json
+
+ {
+ "wslInheritsWindowsSettings": true
+ }
+
+Once an admin source turns the chain on, HKCU policy joins it on WSL only when HKCU also sets the key to `true`. That copy doesn’t turn the chain on by itself. A Windows source that contains only this key doesn’t count as a policy source, so a lower-priority source still supplies the policy. This key has no effect on native Windows.
+
+##
+
+
+
+Global config settings
+
+Save these keys in `~/.claude.json`, not in a settings file. Claude Code ignores them anywhere else. Claude Code and `/config` write most of them for you, and you can also edit them by hand.
+
+###
+
+
+
+`autoConnectIde`
+
+Connect to a running IDE automatically when you start Claude Code from an external terminal. Appears in `/config` as **Auto-connect to IDE (external terminal)** when you run Claude Code outside a VS Code or JetBrains terminal.
+
+ * **Scope** : `Global config`
+ * **Type** : Boolean
+ * `true`: Claude Code connects to a running IDE automatically when you start it from an external terminal
+ * `false`: Claude Code doesn’t connect automatically from an external terminal; inside a VS Code or JetBrains terminal, or with `--ide`, it still connects
+ * **Default** : `false`
+ * **Per-session overrides** : [`CLAUDE_CODE_AUTO_CONNECT_IDE`](</docs/en/env-vars>) takes precedence over this key for one session, in either direction
+
+~/.claude.json
+
+ {
+ "autoConnectIde": true
+ }
+
+Claude Code ignores this key in `settings.json`.
+
+###
+
+
+
+`autoInstallIdeExtension`
+
+Install the Claude Code IDE extension automatically when you run Claude Code from a VS Code terminal. Appears in `/config` as **Auto-install IDE extension** when you run Claude Code inside a VS Code or JetBrains terminal.
+
+ * **Scope** : `Global config`
+ * **Type** : Boolean
+ * `true`: Claude Code installs the IDE extension automatically when you run it from a VS Code terminal
+ * `false`: Claude Code doesn’t install the extension automatically
+ * **Default** : `true`
+ * **Per-session overrides** : [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) set to `1` skips the install for one session even when this key is `true`
+
+~/.claude.json
+
+ {
+ "autoInstallIdeExtension": false
+ }
+
+Claude Code ignores this key in `settings.json`.
+
+###
+
+
+
+`diffTool`
+
+Choose where Claude Code shows the diff of an `Edit` or `Write` change it proposes when a [VS Code](</docs/en/vs-code>) or [JetBrains](</docs/en/jetbrains#features>) IDE is connected: `"auto"` opens it in the IDE’s diff viewer, `"terminal"` keeps it in the terminal. Appears in `/config` as **Diff tool** only while Claude Code is connected to a VS Code or JetBrains IDE.
+
+ * **Scope** : `Global config`
+ * **Type** : string, one of:
+ * `"auto"`: Claude Code opens the diff in the IDE’s diff viewer when a VS Code or JetBrains IDE is connected
+ * `"terminal"`: Claude Code keeps the diff in the terminal
+ * **Default** : `"auto"`
+
+~/.claude.json
+
+ {
+ "diffTool": "terminal"
+ }
+
+Claude Code ignores this key in `settings.json`.
+
+###
+
+
+
+`externalEditorContext`
+
+When you press `Ctrl+G`, Claude Code opens the prompt you’re typing in your [external editor](</docs/en/interactive-mode#general-controls>). With this key on, the editor buffer starts with Claude’s previous response as `#` comment lines, so you can read it while you write, and Claude Code strips those lines when you save. Appears in `/config` as **Show last response in external editor**.
+
+ * **Scope** : `Global config`
+ * **Type** : Boolean
+ * `true`: the editor buffer starts with Claude’s previous response as `#` comment lines, which Claude Code strips when you save
+ * `false`: the editor buffer opens with only your prompt
+ * **Default** : `false`
+
+~/.claude.json
+
+ {
+ "externalEditorContext": true
+ }
+
+With it on, the buffer Claude Code opens looks like this, and only the text below the marker line is sent as your prompt:
+
+ # ─── Claude's last response (for reference; removed on save) ───
+ # I added the retry loop to fetchUser in src/api.ts and a test
+ # for the timeout case. Want me to wire the same retry into
+ # fetchOrders?
+ # ─── Write your reply below this line ──────────────────────────
+
+ Yes, and cap it at three attempts.
+
+Claude Code keeps the last 50 lines of the response and marks the cut with `# … (earlier output truncated)`. Claude Code ignores this key in `settings.json`.
+
+###
+
+
+
+`permissionExplainerEnabled`
+
+When Claude asks permission to run a Bash or PowerShell command, you can press `Ctrl+E` on the prompt to get a model-generated [explanation of the command](</docs/en/permissions#permission-system>): what it does, why Claude is running it, and what could go wrong, labeled **Low risk** , **Med risk** , or **High risk**. Claude Code asks the model for the explanation only when you press the shortcut, and showing it doesn’t run the command. Set this key to `false` to turn the shortcut off.
+
+ * **Scope** : `Global config`
+ * **Type** : Boolean
+ * `true`: you can press `Ctrl+E` on a Bash or PowerShell permission prompt to get a model-generated explanation of the command
+ * `false`: Claude Code turns the `Ctrl+E` shortcut off
+ * **Default** : `true`
+
+~/.claude.json
+
+ {
+ "permissionExplainerEnabled": false
+ }
+
+Claude Code ignores this key in `settings.json`.
+
+###
+
+
+
+`teammateDefaultModel`
+
+Removed in v2.1.234, together with its `/config` row **Default teammate model**. Setting it has no effect on current versions.
+
+Through v2.1.233, you set this key to the model for [agent team](</docs/en/agent-teams#specify-teammates-and-models>) teammates your prompt didn’t name a model for: an alias such as `"sonnet"`, or `null` to follow the lead’s model. For the model Claude Code picks for such teammates now, see [specify teammates and models](</docs/en/agent-teams#specify-teammates-and-models>).
+
+ * **Scope** : `Global config`. On v2.1.233 and earlier.
+ * **Type** : string, a model alias or full model ID, or `null`
+ * **Default** : unset
+
+##
+
+
+
+See also
+
+ * [Configure permissions](</docs/en/permissions>): rule syntax, permission modes, and workspace trust
+ * [Environment variables](</docs/en/env-vars>): every `CLAUDE_*`, `ANTHROPIC_*`, and provider variable Claude Code reads
+ * [Tools available to Claude](</docs/en/tools-reference>): the built-in tools and which need approval
+ * [Example settings files](</docs/en/settings-example>): a personal file, a team file, and an organization’s managed file
+ * [Set up managed settings](</docs/en/admin-setup>): how organizations decide what to enforce
+ * [Deploy managed settings](</docs/en/managed-settings>): delivery mechanisms, precedence within the managed tier, and invalid entries in managed settings
+ * [Debug your configuration](</docs/en/debug-your-config>): `claude doctor` and the Settings Error dialog
--- a/setup.md
+++ b/setup.md
@@ -100,7 +100,7 @@
}
}
-When Git for Windows is installed, the PowerShell tool is rolling out progressively as an additional option alongside Bash. Set `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` to opt in or `0` to opt out. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) for setup and limitations. **Option 2: WSL** Open your WSL distribution and run the Linux installer from the install instructions above. You install and launch `claude` inside the WSL terminal, not from PowerShell or CMD.
+When Git for Windows is installed, the PowerShell tool is available alongside Bash: on by default for claude.ai and Console accounts, and enabled with `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` in Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry sessions. Set it to `0` to turn the tool off. See [PowerShell tool](</docs/en/tools-reference#powershell-tool>) for setup and limitations. **Option 2: WSL** Open your WSL distribution and run the Linux installer from the install instructions above. You install and launch `claude` inside the WSL terminal, not from PowerShell or CMD.
###
@@ -116,7 +116,7 @@
echo "https://dl-cdn.alpinelinux.org/alpine/v3.22/community" >> /etc/apk/repositories
-Run `apk update` to refresh the package index, and retry the `apk add` command. Then set `USE_BUILTIN_RIPGREP` to `0` in your [`settings.json`](</docs/en/settings#available-settings>) file:
+Run `apk update` to refresh the package index, and retry the `apk add` command. Then set `USE_BUILTIN_RIPGREP` to `0` in your [`settings.json`](</docs/en/settings-reference#all-settings>) file:
{
"env": {
@@ -183,7 +183,7 @@
"autoUpdatesChannel": "stable"
}
-For enterprise deployments, you can enforce a consistent release channel across your organization using [managed settings](</docs/en/permissions#managed-settings>). Homebrew installations choose a channel by cask name instead of this setting: `claude-code` tracks stable and `claude-code@latest` tracks latest.
+For enterprise deployments, you can enforce a consistent release channel across your organization using [managed settings](</docs/en/managed-settings>). Homebrew installations choose a channel by cask name instead of this setting: `claude-code` tracks stable and `claude-code@latest` tracks latest.
###
@@ -198,7 +198,7 @@
"minimumVersion": "2.1.100"
}
-In [managed settings](</docs/en/permissions#managed-settings>), this enforces an organization-wide minimum that user and project settings cannot override. The `minimumVersion` pin only constrains updates. To make Claude Code refuse to start outside a version range, use the managed settings `requiredMinimumVersion` and `requiredMaximumVersion` instead. Updates also respect the `requiredMaximumVersion` ceiling. See [available settings](</docs/en/settings#available-settings>).
+In [managed settings](</docs/en/managed-settings>), this enforces an organization-wide minimum that user and project settings cannot override. The `minimumVersion` pin only constrains updates. To make Claude Code refuse to start outside a version range, use the managed settings `requiredMinimumVersion` and `requiredMaximumVersion` instead. Updates also respect the `requiredMaximumVersion` ceiling. See [`requiredMinimumVersion`](</docs/en/settings-reference#requiredminimumversion>) and [`requiredMaximumVersion`](</docs/en/settings-reference#requiredmaximumversion>).
###
@@ -206,7 +206,7 @@
Disable auto-updates
-Set `DISABLE_AUTOUPDATER` to `"1"` in the `env` key of your [`settings.json`](</docs/en/settings#available-settings>) file:
+Set `DISABLE_AUTOUPDATER` to `"1"` in the `env` key of your [`settings.json`](</docs/en/settings-reference#all-settings>) file:
{
"env": {
--- a/slack.md
+++ b/slack.md
@@ -95,7 +95,7 @@
Automatic detection
-When you mention @Claude in a Slack channel or thread, Claude automatically analyzes your message to determine if it’s a coding task. If Claude detects coding intent, it will route your request to Claude Code on the web instead of responding as a regular chat assistant. You can also explicitly tell Claude to handle a request as a coding task, even if it doesn’t automatically detect it.
+In Code + Chat routing mode, when you mention @Claude in a Slack channel or thread, Claude automatically detects whether your message is a coding task. Coding tasks go to Claude Code on the web. Anything else gets a regular chat reply. In Code only mode, every @mention goes to Claude Code. You can also explicitly tell Claude to handle a request as a coding task, even if it doesn’t automatically detect it.
Claude Code in Slack only works in channels (public or private). It does not work in direct messages (DMs).
--- a/statusline.md
+++ b/statusline.md
@@ -5,7 +5,7 @@
* Work across multiple sessions and need to distinguish them
* Want git branch and status always visible
-The status line renders in its own row above the built-in footer badges and does not replace them. With a custom status line configured, Claude Code stops showing most of the footer’s keyboard hints, including `esc to interrupt`, the `? for shortcuts` fallback, and the `hold space to speak` [voice dictation](</docs/en/voice-dictation>) hint. To add clickable link badges to the footer when an ID appears in the conversation, without writing a script, configure [`footerLinksRegexes`](</docs/en/settings#footer-link-badges>) instead. Here’s an example of a multi-line status line that displays git info on the first line and a color-coded context bar on the second.
+The status line renders in its own row above the built-in footer badges and does not replace them. With a custom status line configured, Claude Code stops showing most of the footer’s keyboard hints, including `esc to interrupt`, the `? for shortcuts` fallback, and the `hold space to speak` [voice dictation](</docs/en/voice-dictation>) hint. To add clickable link badges to the footer when an ID appears in the conversation, without writing a script, configure [`footerLinksRegexes`](</docs/en/settings-reference#footerlinksregexes>) instead. Here’s an example of a multi-line status line that displays git info on the first line and a color-coded context bar on the second.
This page walks through setting up a basic status line, explains how the data flows from Claude Code to your script, lists all the fields you can display, and provides ready-to-use examples for common patterns like git status, cost tracking, and progress bars.
@@ -35,7 +35,7 @@
Manually configure a status line
-Add a `statusLine` field to your user settings (`~/.claude/settings.json`, where `~` is your home directory) or [project settings](</docs/en/settings#settings-files>). Set `type` to `"command"` and point `command` to a script path or an inline shell command. For a full walkthrough of creating a script, see Build a status line step by step.
+Add a `statusLine` field to your user settings (`~/.claude/settings.json`, where `~` is your home directory) or [project settings](</docs/en/settings#where-settings-live>). Set `type` to `"command"` and point `command` to a script path or an inline shell command. For a full walkthrough of creating a script, see Build a status line step by step.
{
"statusLine": {
@@ -124,7 +124,7 @@
How status lines work
-Claude Code runs your script and pipes JSON session data to it via stdin. Your script reads the JSON, extracts what it needs, and prints text to stdout. Claude Code displays whatever your script prints. **When it updates** Your script runs once when a session starts, including when you resume one. After that, it runs again when:
+Claude Code runs your script with JSON session data on stdin and displays whatever the script prints to stdout. **When it updates** Your script runs once when a session starts, including when you resume one. After that, it runs again when:
* A new assistant message arrives
* `/compact` finishes
@@ -992,7 +992,7 @@
}
}
-The command runs once per refresh tick and receives all visible subagent rows as a single JSON object on stdin. The input includes the [base hook fields](</docs/en/hooks#common-input-fields>), a `columns` field with the usable row width, and a `tasks` array. Each task has `id`, `name`, `type`, `status`, `description`, `label`, `startTime`, `model`, `effort`, `contextWindowSize`, `tokenCount`, `tokenSamples`, and `cwd`. The per-task `model` field is the resolved model ID the task runs on. `contextWindowSize` is that model’s context window in tokens, computed the same way as the main status line’s `context_window.context_window_size`, so you can render a per-row percentage from `tokenCount`. Both fields require Claude Code v2.1.205 or later and are omitted for a task whose model isn’t resolved yet. The per-task `effort` field is the reasoning effort set for that subagent, in its [definition frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>) or on the individual invocation. The value is either one of the effort level strings `low`, `medium`, `high`, `xhigh`, or `max`, or a numeric token budget. The field reports the configured value as written: if the model doesn’t support that level, the effort Claude Code actually applies may differ. The field requires Claude Code v2.1.214 or later and is absent when the subagent inherits the session’s effort level. Write one JSON line to stdout per row you want to override, in the form `{"id": "<task id>", "content": "<row body>"}`. The `content` string is rendered as-is, including ANSI colors and OSC 8 hyperlinks. Omit a task’s `id` to keep the default rendering for that row; emit an empty `content` string to hide it. The same trust, `disableAllHooks`, and [`allowManagedHooksOnly`](</docs/en/settings#hook-configuration>) gates that apply to `statusLine` apply here. Plugins can ship a default `subagentStatusLine` in their [`settings.json`](</docs/en/plugins-reference#standard-plugin-layout>), but unlike hooks, plugin values don’t run under `allowManagedHooksOnly` even when the plugin is force-enabled in managed settings `enabledPlugins`.
+The command runs once per refresh tick and receives all visible subagent rows as a single JSON object on stdin. The input includes the [base hook fields](</docs/en/hooks#common-input-fields>), a `columns` field with the usable row width, and a `tasks` array. Each task has `id`, `name`, `type`, `status`, `description`, `label`, `startTime`, `model`, `effort`, `contextWindowSize`, `tokenCount`, `tokenSamples`, and `cwd`. The per-task `model` field is the resolved model ID the task runs on. `contextWindowSize` is that model’s context window in tokens, computed the same way as the main status line’s `context_window.context_window_size`, so you can render a per-row percentage from `tokenCount`. Both fields require Claude Code v2.1.205 or later and are omitted for a task whose model isn’t resolved yet. The per-task `effort` field is the reasoning effort set for that subagent, in its [definition frontmatter](</docs/en/sub-agents#supported-frontmatter-fields>) or on the individual invocation. The value is either one of the effort level strings `low`, `medium`, `high`, `xhigh`, or `max`, or a numeric token budget. The field reports the configured value as written: if the model doesn’t support that level, the effort Claude Code actually applies may differ. The field requires Claude Code v2.1.214 or later and is absent when the subagent inherits the session’s effort level. Write one JSON line to stdout per row you want to override, in the form `{"id": "<task id>", "content": "<row body>"}`. The `content` string is rendered as-is, including ANSI colors and OSC 8 hyperlinks. Omit a task’s `id` to keep the default rendering for that row; emit an empty `content` string to hide it. The same trust, `disableAllHooks`, and [`allowManagedHooksOnly`](</docs/en/settings-reference#allowmanagedhooksonly>) gates that apply to `statusLine` apply here. Plugins can ship a default `subagentStatusLine` in their [`settings.json`](</docs/en/plugins-reference#standard-plugin-layout>), but unlike hooks, plugin values don’t run under `allowManagedHooksOnly` even when the plugin is force-enabled in managed settings `enabledPlugins`.
##
@@ -1018,8 +1018,8 @@
* Check that your script outputs to stdout, not stderr
* Run your script manually to verify it produces output
* On Windows with Git Bash installed, backslashes in the `command` path are likely being consumed as escape characters before the script runs. Use forward slashes in the path. See Windows configuration.
- * If `disableAllHooks` is `true` outside managed settings after [settings precedence](</docs/en/hooks#disable-or-remove-hooks>) applies, Claude Code runs only a `statusLine` from managed settings, and with no managed `statusLine` the status line is disabled. Remove the setting, or set it to `false` in the file that sets it, to re-enable. See [Hook configuration](</docs/en/settings#hook-configuration>).
- * If your organization sets `allowManagedHooksOnly` in managed settings, your custom status line disappears without warning: you can only get a status line from a `statusLine` value in those managed settings. See [Hook configuration](</docs/en/settings#hook-configuration>) for the full behavior, and ask your administrator whether this setting applies to you.
+ * If `disableAllHooks` is `true` outside managed settings after [settings precedence](</docs/en/hooks#disable-or-remove-hooks>) applies, Claude Code runs only a `statusLine` from managed settings, and with no managed `statusLine` the status line is disabled. Remove the setting, or set it to `false` in the file that sets it, to re-enable. See [`disableAllHooks`](</docs/en/settings-reference#disableallhooks>).
+ * If your organization sets `allowManagedHooksOnly` in managed settings, your custom status line disappears without warning: you can only get a status line from a `statusLine` value in those managed settings. See [what runs under `allowManagedHooksOnly`](</docs/en/settings-reference#what-runs-under-allowmanagedhooksonly>) for the full behavior, and ask your administrator whether this setting applies to you.
* Run `claude --debug` to log the exit code and stderr from the first status line invocation in a session
* Ask Claude to read your settings file and execute the `statusLine` command directly to surface errors
--- a/sub-agents.md
+++ b/sub-agents.md
@@ -180,9 +180,9 @@
}
'@
-The `--agents` flag accepts JSON with a `prompt` field plus these frontmatter fields: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/settings#settings-files>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents.
-
-For security reasons, plugin subagents don’t support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](</docs/en/settings#permission-settings>) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not only the plugin subagent.
+The `--agents` flag accepts JSON with a `prompt` field plus these frontmatter fields: `description`, `tools`, `disallowedTools`, `model`, `permissionMode`, `mcpServers`, `hooks`, `maxTurns`, `skills`, `initialPrompt`, `memory`, `effort`, `background`, and `isolation`. Use `prompt` for the system prompt, equivalent to the markdown body in file-based subagents. **Managed subagents** are deployed by organization administrators. Place markdown files in `.claude/agents/` inside the [managed settings directory](</docs/en/managed-settings#delivery-mechanisms>), using the same frontmatter format as project and user subagents. Managed definitions take precedence over project and user subagents with the same name. **Plugin subagents** come from [plugins](</docs/en/plugins>) you’ve installed. They load automatically alongside your custom subagents and appear in the @-mention typeahead under their scoped name. See the [plugin components reference](</docs/en/plugins-reference#agents>) for details on creating plugin subagents.
+
+For security reasons, plugin subagents don’t support the `hooks`, `mcpServers`, or `permissionMode` frontmatter fields. These fields are ignored when loading agents from a plugin. If you need them, copy the agent file into `.claude/agents/` or `~/.claude/agents/`. You can also add rules to [`permissions.allow`](</docs/en/settings-reference#permissions-allow>) in `settings.json` or `settings.local.json`, but these rules apply to the entire session, not only the plugin subagent.
Subagent definitions from any of these scopes are also available to [agent teams](</docs/en/agent-teams#use-subagent-definitions-for-teammates>): when spawning a teammate, you can reference a subagent type and the teammate uses its `tools` and `model`, with the definition’s body appended to the teammate’s system prompt as additional instructions. See [agent teams](</docs/en/agent-teams#use-subagent-definitions-for-teammates>) for which frontmatter fields apply on that path.
@@ -549,7 +549,7 @@
Disable specific subagents
-You can prevent Claude from using specific subagents by adding them to the `deny` array in your [settings](</docs/en/settings#permission-settings>). Use the format `Agent(subagent-name)` where `subagent-name` matches the subagent’s name field.
+You can prevent Claude from using specific subagents by adding them to the `deny` array in your [settings](</docs/en/settings-reference#permission-settings>). Use the format `Agent(subagent-name)` where `subagent-name` matches the subagent’s name field.
{
"permissions": {
@@ -886,7 +886,7 @@
* **System prompt** : the agent’s own prompt plus environment details that Claude Code appends, not the full Claude Code system prompt. Custom subagents define theirs in the markdown body or `prompt` field. Built-in agents have predefined prompts.
* **Task message** : the delegation prompt Claude writes when it hands off the work.
* **CLAUDE.md files** : every level of the [CLAUDE.md hierarchy](</docs/en/memory#how-claude-md-files-load>) the main conversation loads, including `~/.claude/CLAUDE.md`, project rules, `CLAUDE.local.md`, and managed policy files. The built-in Explore and Plan agents skip this.
- * **Git status** : a snapshot taken at the start of the parent session. Absent when the working directory isn’t a Git repository or when [`includeGitInstructions`](</docs/en/settings#available-settings>) is `false`. Explore and Plan skip it regardless.
+ * **Git status** : a snapshot taken at the start of the parent session. Absent when the working directory isn’t a Git repository or when [`includeGitInstructions`](</docs/en/settings-reference#includegitinstructions>) is `false`. Explore and Plan skip it regardless.
* **Preloaded skills** : full content of any skill named in the agent’s `skills` field. Built-in agents don’t preload skills.
* **Sibling roster** : a system reminder listing `main` and every other named agent in the session, each a valid `to` value for `SendMessage`. Requires Claude Code v2.1.206 or later. The roster appears only when the subagent’s tools include `SendMessage` and at least one other agent has a name, whether Claude named it when spawning it or it runs as an [agent team](</docs/en/agent-teams>) teammate. It is a snapshot taken when the subagent starts, so agents named later don’t appear.
--- a/terminal-config.md
+++ b/terminal-config.md
@@ -54,7 +54,7 @@
Get a terminal bell or notification
-When Claude finishes a task or pauses for a permission prompt, and you appear to be away from the terminal, it fires a notification event. See [when each notification type fires](</docs/en/hooks#notification>) for the exact timing. Surfacing this as a terminal bell or desktop notification lets you switch to other work while a long task runs. By default Claude Code sends a desktop notification only in Ghostty, Kitty, and iTerm2. In other terminals, set [`preferredNotifChannel`](</docs/en/settings#available-settings>) to `"terminal_bell"` to ring the terminal bell instead, or configure a Notification hook for a custom sound or command. The following settings entry turns on the terminal bell:
+When Claude finishes a task or pauses for a permission prompt, and you appear to be away from the terminal, it fires a notification event. See [when each notification type fires](</docs/en/hooks#notification>) for the exact timing. Surfacing this as a terminal bell or desktop notification lets you switch to other work while a long task runs. By default Claude Code sends a desktop notification only in Ghostty, Kitty, and iTerm2. In other terminals, set [`preferredNotifChannel`](</docs/en/settings-reference#preferrednotifchannel>) to `"terminal_bell"` to ring the terminal bell instead, or configure a Notification hook for a custom sound or command. The following settings entry turns on the terminal bell:
~/.claude/settings.json
@@ -104,7 +104,7 @@
Configure tmux
-When Claude Code runs inside tmux, two things break by default: Shift+Enter submits instead of inserting a newline, and desktop notifications and the [progress bar](</docs/en/settings#available-settings>) never reach the outer terminal. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to apply them to the running server:
+When Claude Code runs inside tmux, two things break by default: Shift+Enter submits instead of inserting a newline, and desktop notifications and the [progress bar](</docs/en/settings-reference#terminalprogressbarenabled>) never reach the outer terminal. Add these lines to `~/.tmux.conf`, then run `tmux source-file ~/.tmux.conf` to apply them to the running server:
~/.tmux.conf
@@ -324,7 +324,7 @@
Paste large content
-When you paste more than 800 characters or more than two lines into the prompt, Claude Code collapses the input to a placeholder such as `[Pasted text #1 +120 lines]` so the input box stays usable. The full content is still sent to Claude when you submit. Claude Code keeps the collapsed content under `~/.claude/paste-cache/`, so when you recall a prompt from [command history](</docs/en/interactive-mode#command-history>) and resubmit it, Claude Code sends the full pasted content again, including in a later session, until the retention sweep removes the cache file. Claude Code deletes cache files older than [`cleanupPeriodDays`](</docs/en/settings#available-settings>), following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>), so a recalled prompt can reference pasted text that no longer exists. When you submit such a prompt, Claude Code never sends the literal `[Pasted text #N]` string, and shows a notification naming the missing paste:
+When you paste more than 800 characters or more than two lines into the prompt, Claude Code collapses the input to a placeholder such as `[Pasted text #1 +120 lines]` so the input box stays usable. The full content is still sent to Claude when you submit. Claude Code keeps the collapsed content under `~/.claude/paste-cache/`, so when you recall a prompt from [command history](</docs/en/interactive-mode#command-history>) and resubmit it, Claude Code sends the full pasted content again, including in a later session, until the retention sweep removes the cache file. Claude Code deletes cache files older than [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>), following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>), so a recalled prompt can reference pasted text that no longer exists. When you submit such a prompt, Claude Code never sends the literal `[Pasted text #N]` string, and shows a notification naming the missing paste:
* In a plain prompt with text remaining, Claude Code removes the placeholder and sends the remaining text.
* In a [shell mode](</docs/en/interactive-mode#shell-mode-with-prefix>) command or a `/` command, where the removal would change what runs, and in any prompt the removal leaves empty, Claude Code cancels the submission and keeps the original text in the input, with the placeholder still in it. Delete the placeholder or edit the command, then resubmit.
@@ -337,7 +337,7 @@
Edit prompts with Vim keybindings
-Claude Code includes a Vim-style editing mode for the prompt input. Enable it through `/config` → Editor mode, or by setting [`editorMode`](</docs/en/settings#available-settings>) to `"vim"` in `~/.claude/settings.json`. Set Editor mode back to `normal` to turn it off. Vim mode supports a subset of NORMAL- and VISUAL-mode motions and operators, such as `hjkl` navigation, `v`/`V` selection, and `d`/`c`/`y` with text objects. See the [Vim editor mode reference](</docs/en/interactive-mode#vim-editor-mode>) for the full key table. Vim motions aren’t remappable through the keybindings file. To map a two-key INSERT-mode sequence such as `jj` to Escape, set [`vimInsertModeRemaps`](</docs/en/interactive-mode#remap-insert-mode-key-sequences>) in your user settings. Pressing Enter still submits your prompt in INSERT mode, unlike standard Vim. Use `o` or `O` in NORMAL mode, or Ctrl+J, to insert a newline instead.
+Claude Code includes a Vim-style editing mode for the prompt input. Enable it through `/config` → Editor mode, or by setting [`editorMode`](</docs/en/settings-reference#editormode>) to `"vim"` in `~/.claude/settings.json`. Set Editor mode back to `normal` to turn it off. Vim mode supports a subset of NORMAL- and VISUAL-mode motions and operators, such as `hjkl` navigation, `v`/`V` selection, and `d`/`c`/`y` with text objects. See the [Vim editor mode reference](</docs/en/interactive-mode#vim-editor-mode>) for the full key table. Vim motions aren’t remappable through the keybindings file. To map a two-key INSERT-mode sequence such as `jj` to Escape, set [`vimInsertModeRemaps`](</docs/en/interactive-mode#remap-insert-mode-key-sequences>) in your user settings. Pressing Enter still submits your prompt in INSERT mode, unlike standard Vim. Use `o` or `O` in NORMAL mode, or Ctrl+J, to insert a newline instead.
##
--- a/tool-search.md
+++ b/tool-search.md
@@ -34,7 +34,7 @@
`auto:N`| Same as `auto` with a custom percentage. `auto:5` activates when those definitions reach 5% of the context window. Lower values activate sooner.
`false`| Tool search is off. All tool definitions are loaded into context on every turn.
-Setting [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/env-vars>) keeps tool search off. You can’t override it by setting `ENABLE_TOOL_SEARCH` yourself. Your organization can keep tool search on through [managed settings](</docs/en/settings#settings-files>), on Claude Code v2.1.227 or later. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies and what the variable strips. Tool search applies to all registered tools, whether they come from remote MCP servers or [custom SDK MCP servers](</docs/en/agent-sdk/custom-tools>). When you use `auto`, the SDK counts every definition that tool search can defer toward one combined threshold: each MCP tool that isn’t marked [`alwaysLoad`](</docs/en/mcp#exempt-a-server-from-deferral>), from any server, plus the built-in tools that load on demand. The SDK always loads core built-in tools such as Bash, Read, and Edit upfront and doesn’t count them toward the threshold. Set the value in the `env` option on `query()`. In TypeScript, `env` replaces the subprocess environment, so spread `...process.env` to keep inherited variables. In Python, `env` is merged on top of the inherited environment. This example connects to a remote MCP server that exposes many tools, pre-approves all of them with a wildcard, and uses `auto:5` so tool search activates when the definitions it can defer reach 5% of the context window:
+Setting [`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS`](</docs/en/env-vars>) keeps tool search off. You can’t override it by setting `ENABLE_TOOL_SEARCH` yourself. Your organization can keep tool search on through [managed settings](</docs/en/managed-settings>), on Claude Code v2.1.227 or later. [Disable pre-release capabilities](</docs/en/llm-gateway-protocol#disable-pre-release-capabilities>) covers where the override applies and what the variable strips. Tool search applies to all registered tools, whether they come from remote MCP servers or [custom SDK MCP servers](</docs/en/agent-sdk/custom-tools>). When you use `auto`, the SDK counts every definition that tool search can defer toward one combined threshold: each MCP tool that isn’t marked [`alwaysLoad`](</docs/en/mcp#exempt-a-server-from-deferral>), from any server, plus the built-in tools that load on demand. The SDK always loads core built-in tools such as Bash, Read, and Edit upfront and doesn’t count them toward the threshold. Set the value in the `env` option on `query()`. In TypeScript, `env` replaces the subprocess environment, so spread `...process.env` to keep inherited variables. In Python, `env` is merged on top of the inherited environment. This example connects to a remote MCP server that exposes many tools, pre-approves all of them with a wildcard, and uses `auto:5` so tool search activates when the definitions it can defer reach 5% of the context window:
TypeScript
--- a/tools-reference.md
+++ b/tools-reference.md
@@ -19,7 +19,7 @@
`ExitWorktree`| Exits a worktree session and returns to the original directory. Not available to subagents that already run in their own working directory, such as with [`isolation: worktree`](</docs/en/sub-agents#supported-frontmatter-fields>)| No
`Glob`| Finds files based on pattern matching. See Glob tool behavior| No
`Grep`| Searches for patterns in file contents. See Grep tool behavior| No
-`ListAgents`| Lists the agents Claude can message with `SendMessage`, apart from [agent team](</docs/en/agent-teams>) teammates, which Claude reaches through the team’s roster: subagents in the session, your other local Claude Code sessions, and, while this session is connected to [Remote Control](</docs/en/remote-control>), your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your Remote Control sessions on other machines. Backs the `/list-agents` command. See [cross-session messaging](</docs/en/cross-session-messaging>). Requires Claude Code v2.1.224 or later, and appears only in sessions where [cross-session messaging is enabled](</docs/en/cross-session-messaging#availability>)| No
+`ListAgents`| Lists the agents Claude can message with `SendMessage`: subagents in the session, [agent team](</docs/en/agent-teams>) teammates, your other local Claude Code sessions, and, while this session is connected to [Remote Control](</docs/en/remote-control>), your [Claude Code on the web](</docs/en/claude-code-on-the-web>) sessions and your Remote Control sessions on other machines. Backs the `/list-agents` command. See [cross-session messaging](</docs/en/cross-session-messaging>). Requires Claude Code v2.1.224 or later, and appears only in sessions where [cross-session messaging is enabled](</docs/en/cross-session-messaging#availability>). Teammate rows and the first line showing this session’s own name require v2.1.239 or later| No
`ListMcpResourcesTool`| Lists resources exposed by connected [MCP servers](</docs/en/mcp>)| No
`LSP`| Code intelligence via language servers: jump to definitions, find references, report type errors and warnings. See LSP tool behavior| No
`Monitor`| Runs a command in the background and feeds each output line back to Claude, so it can react to log entries, file changes, or polled status mid-conversation. Can also open a WebSocket and treat each incoming message as an event. See Monitor tool| Yes
@@ -57,7 +57,7 @@
For the most part, Claude decides when to use these tools and you don’t need to name them yourself when interacting with Claude. You reference tool names directly when defining permissions and other configuration:
- * in [`permissions.allow` and `permissions.deny`](</docs/en/settings#available-settings>) in settings, and the `/permissions` interface
+ * in [`permissions.allow`](</docs/en/settings-reference#permissions-allow>) and [`permissions.deny`](</docs/en/settings-reference#permissions-deny>) in settings, and the `/permissions` interface
* in the `--allowedTools` and `--disallowedTools` [CLI flags](</docs/en/cli-reference>)
* in the Agent SDK’s [`allowedTools` and `disallowedTools`](</docs/en/agent-sdk/permissions#allow-and-deny-rules>) options
* in a [subagent’s `tools` or `disallowedTools`](</docs/en/sub-agents#supported-frontmatter-fields>) frontmatter
@@ -113,7 +113,7 @@
Question auto-continue timeout
-Questions stay open until you answer them. If you want a question you leave unanswered to eventually close and let Claude continue without you, set the [`askUserQuestionTimeout`](</docs/en/settings#available-settings>) setting to `60s`, `5m`, or `10m`, either in your user `settings.json` or from the **Question auto-continue timeout** row in `/config`. After a question sits that long with no input, the dialog closes on its own: it submits any options you’d already selected and tells Claude you may be away from your keyboard, so Claude proceeds on its own judgment and can re-ask later. You see a countdown for the last 20 seconds. Press any key to restart the timer; on terminals that report focus, switching to the window restarts it too. The timeout applies only to `AskUserQuestion`’s multiple-choice questions; permission prompts, including plan approval, never auto-resolve on idle.
+Questions stay open until you answer them. If you want a question you leave unanswered to eventually close and let Claude continue without you, set the [`askUserQuestionTimeout`](</docs/en/settings-reference#askuserquestiontimeout>) setting to `60s`, `5m`, or `10m`, either in your user `settings.json` or from the **Question auto-continue timeout** row in `/config`. After a question sits that long with no input, the dialog closes on its own: it submits any options you’d already selected and tells Claude you may be away from your keyboard, so Claude proceeds on its own judgment and can re-ask later. You see a countdown for the last 20 seconds. Press any key to restart the timer; on terminals that report focus, switching to the window restarts it too. The timeout applies only to `AskUserQuestion`’s multiple-choice questions; permission prompts, including plan approval, never auto-resolve on idle.
##
@@ -316,7 +316,7 @@
`url`| Yes| The endpoint to connect to. Must be a `ws://` or `wss://` URL with no embedded credentials or whitespace, using ASCII characters only
`protocols`| No| WebSocket subprotocol names to offer during the handshake. Each entry must be a valid subprotocol token, and the list can’t contain duplicates
-The `timeout_ms` and `persistent` inputs behave the same as they do for a command: the watch ends at the deadline unless `persistent` is set, and `TaskStop` cancels it early. Opening a WebSocket prompts for approval; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) the classifier decides instead. The prompt doesn’t offer an option to skip future prompts for the same host. Claude Code denies URLs that point at a private, link-local, or cloud-metadata address, including hostnames that resolve to one. It also denies hosts in `sandbox.network.deniedDomains`, and when [`allowManagedDomainsOnly`](</docs/en/settings#sandbox-settings>) is set in managed settings, any host outside the managed allowlist.
+The `timeout_ms` and `persistent` inputs behave the same as they do for a command: the watch ends at the deadline unless `persistent` is set, and `TaskStop` cancels it early. Opening a WebSocket prompts for approval; in [auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) the classifier decides instead. The prompt doesn’t offer an option to skip future prompts for the same host. Claude Code denies URLs that point at a private, link-local, or cloud-metadata address, including hostnames that resolve to one. It also denies hosts in `sandbox.network.deniedDomains`, and when [`allowManagedDomainsOnly`](</docs/en/settings-reference#sandbox-network-allowmanageddomainsonly>) is set in managed settings, any host outside the managed allowlist.
##
@@ -341,7 +341,7 @@
The PowerShell tool lets Claude run PowerShell commands natively. On Windows, this means commands run in PowerShell instead of routing through Git Bash. How the tool becomes available depends on your platform:
* **Windows without Git Bash** : the tool is enabled automatically.
- * **Windows with Git Bash installed** : the tool is rolling out progressively.
+ * **Windows with Git Bash installed** : the tool is on by default for claude.ai and Console accounts; set `CLAUDE_CODE_USE_POWERSHELL_TOOL=1` to enable it in Amazon Bedrock, Google Cloud’s Agent Platform, and Microsoft Foundry sessions, or `0` to turn it off.
* **Linux, macOS, and WSL** : the tool is opt-in.
Your [PreToolUse hooks](</docs/en/hooks#powershell>) receive the tool’s command string in `tool_input.command`, with the same fields as the Bash tool. Match `Bash|PowerShell` in hooks that inspect shell commands; the [PowerShell hook input section](</docs/en/hooks#powershell>) explains why matching `Bash` alone is not enough.
@@ -360,7 +360,7 @@
}
}
-On Windows, set the variable to `0` to opt out of the rollout. On Linux, macOS, and WSL, the tool requires PowerShell 7 or later: install `pwsh` and ensure it is on your `PATH`. On Windows, Claude Code auto-detects `pwsh.exe` for PowerShell 7+ with a fallback to `powershell.exe` for PowerShell 5.1. When the tool is enabled, Claude treats PowerShell as the primary shell. The Bash tool remains available for POSIX scripts when Git Bash is installed. Claude Code spawns PowerShell with `-ExecutionPolicy Bypass` at process scope only, so `.ps1` scripts and module imports work on default Windows installs without changing the machine’s policy. Process-scope bypass doesn’t override Group Policy `MachinePolicy` or `UserPolicy`, so enterprise policies still apply. To respect the machine’s effective execution policy instead, set `CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1`.
+On Windows, set the variable to `0` to turn the tool off. On Linux, macOS, and WSL, the tool requires PowerShell 7 or later: install `pwsh` and ensure it is on your `PATH`. On Windows, Claude Code auto-detects `pwsh.exe` for PowerShell 7+ with a fallback to `powershell.exe` for PowerShell 5.1. When the tool is enabled, Claude treats PowerShell as the primary shell. The Bash tool remains available for POSIX scripts when Git Bash is installed. Claude Code spawns PowerShell with `-ExecutionPolicy Bypass` at process scope only, so `.ps1` scripts and module imports work on default Windows installs without changing the machine’s policy. Process-scope bypass doesn’t override Group Policy `MachinePolicy` or `UserPolicy`, so enterprise policies still apply. To respect the machine’s effective execution policy instead, set `CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1`.
###
@@ -370,7 +370,7 @@
Three additional settings control where PowerShell is used:
- * `"defaultShell": "powershell"` in [`settings.json`](</docs/en/settings#available-settings>): routes interactive `!` commands through PowerShell. Requires the PowerShell tool to be enabled.
+ * `"defaultShell": "powershell"` in [`settings.json`](</docs/en/settings-reference#all-settings>): routes interactive `!` commands through PowerShell. Requires the PowerShell tool to be enabled.
* `"shell": "powershell"` on individual [command hooks](</docs/en/hooks#command-hook-fields>): runs that hook in PowerShell. Hooks spawn PowerShell directly, so this works regardless of `CLAUDE_CODE_USE_POWERSHELL_TOOL`.
* `shell: powershell` in [skill frontmatter](</docs/en/skills#frontmatter-reference>): runs `!`command`` blocks in PowerShell. Requires the PowerShell tool to be enabled.
--- a/typescript.md
+++ b/typescript.md
@@ -436,8 +436,8 @@
Parameter| Type| Default| Description
---|---|---|---
`options.cwd`| `string`| `process.cwd()`| Directory to resolve project and local settings relative to
-`options.settingSources`| `SettingSource``[]`| All sources| Which filesystem sources to load. Pass `[]` to skip user, project, and local settings. [Endpoint-managed policy](</docs/en/settings#settings-files>) loads in all cases. Server-managed settings are taken from `serverManagedSettings` when the host passes it, or read from the CLI’s on-disk cache otherwise; the snapshot does not fetch them from the network
-`options.managedSettings`| `Settings`| `undefined`| Policy-tier settings supplied by the embedding host. Follows the same rules as `managedSettings` in `Options`, except that `resolveSettings()` doesn’t execute a configured [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>), so the snapshot can include settings that a live session drops
+`options.settingSources`| `SettingSource``[]`| All sources| Which filesystem sources to load. Pass `[]` to skip user, project, and local settings. [Endpoint-managed policy](</docs/en/managed-settings#delivery-mechanisms>) loads in all cases. Server-managed settings are taken from `serverManagedSettings` when the host passes it, or read from the CLI’s on-disk cache otherwise; the snapshot does not fetch them from the network
+`options.managedSettings`| `Settings`| `undefined`| Policy-tier settings supplied by the embedding host. Follows the same rules as `managedSettings` in `Options`, except that `resolveSettings()` doesn’t execute a configured [`policyHelper`](</docs/en/settings-reference#policyhelper>), so the snapshot can include settings that a live session drops
`options.serverManagedSettings`| `Settings`| `undefined`| Server-managed settings payload from `/api/claude_code/settings`. Non-restrictive keys pass through unfiltered
####
@@ -515,7 +515,7 @@
`includeHookEvents`| `boolean`| `false`| Include hook lifecycle events in the message stream as `SDKHookStartedMessage`, `SDKHookProgressMessage`, and `SDKHookResponseMessage`. Lifecycle events for `SessionStart` and `Setup` hooks are always included and don’t need this option. Some hook events, such as `Notification`, `SessionEnd`, `PreCompact`, and `PostCompact`, never produce an `SDKHookStartedMessage`, even with this option. For those events, Claude Code still emits an `SDKHookProgressMessage` while a command hook that runs for more than a second produces output, and emits an `SDKHookResponseMessage` only when a hook [that runs in the background](</docs/en/hooks#run-hooks-in-the-background>) finishes
`includePartialMessages`| `boolean`| `false`| Include partial message events
`loadTimeoutMs`| `number`| `60000`| _Alpha._ Timeout in milliseconds for each `sessionStore.load()` and `sessionStore.listSubkeys()` call during resume materialization. If the adapter doesn’t settle within this window, the query fails instead of hanging. Ignored when `sessionStore` is not set
-`managedSettings`| `Settings`| `undefined`| Policy-tier settings your host process supplies to the spawned session. On machines with admin-deployed managed settings, Claude Code ignores these unless the admin’s highest-priority managed source sets `parentSettingsBehavior: 'merge'`, and never merges them when an MDM or file-based source wins and configures a [`policyHelper`](</docs/en/settings#compute-managed-settings-with-a-policy-helper>). Merged values pass through a restrictive-only filter; [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) covers what the filter admits and the `allowManaged*Only` locks
+`managedSettings`| `Settings`| `undefined`| Policy-tier settings your host process supplies to the spawned session. On machines with admin-deployed managed settings, Claude Code ignores these unless the admin’s highest-priority managed source sets `parentSettingsBehavior: 'merge'`, and never merges them while a [`policyHelper`](</docs/en/settings-reference#policyhelper>) supplies managed settings. Merged values pass through a restrictive-only filter; [Restrict parent settings](</docs/en/claude-apps-gateway#restrict-parent-settings>) covers what the filter admits and the `allowManaged*Only` locks
`maxBudgetUsd`| `number`| `undefined`| Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`; see [Track cost and usage](</docs/en/agent-sdk/cost-tracking>) for accuracy caveats
`maxThinkingTokens`| `number`| `undefined`| _Deprecated:_ Use `thinking` instead. Maximum tokens for thinking process
`maxTurns`| `number`| `undefined`| Maximum agentic turns (tool-use round trips)
@@ -539,7 +539,7 @@
`sessionStore`| [`SessionStore`](</docs/en/agent-sdk/session-storage#the-sessionstore-interface>)| `undefined`| Mirror session transcripts to an external backend so another host can resume them. See [Persist sessions to external storage](</docs/en/agent-sdk/session-storage>)
`sessionStoreFlush`| `'batched' | 'eager'`| `'batched'`| _Alpha._ Flush mode for `sessionStore`. Ignored when `sessionStore` is not set
`settings`| `string | Settings`| `undefined`| Inline [settings](</docs/en/settings>) object or path to a settings file. Populates the flag-settings layer in the [precedence order](</docs/en/settings#settings-precedence>). Change at runtime with `applyFlagSettings()`
-`settingSources`| `SettingSource``[]`| CLI defaults (all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. [Endpoint-managed policy](</docs/en/settings#settings-files>) loads regardless; server-managed settings are fetched when the session authenticates with an organization credential on an [eligible configuration](</docs/en/server-managed-settings#platform-availability>). See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
+`settingSources`| `SettingSource``[]`| CLI defaults (all sources)| Control which filesystem settings to load. Pass `[]` to disable user, project, and local settings. [Endpoint-managed policy](</docs/en/managed-settings#delivery-mechanisms>) loads regardless; server-managed settings are fetched when the session authenticates with an organization credential on an [eligible configuration](</docs/en/server-managed-settings#platform-availability>). See [Use Claude Code features](</docs/en/agent-sdk/claude-code-features#what-settingsources-does-not-control>)
`skills`| `string[] | 'all'`| `undefined`| Skills available to the session. Pass `'all'` to enable every discovered skill, or a list of skill names. Pass exact names only. The SDK rejects malformed and wildcard-form names with an error before starting the Claude Code process. When set, the SDK adds the Skill tool to `allowedTools` automatically. If you also pass `tools`, include `'Skill'` in that list. See [Skills](</docs/en/agent-sdk/skills>)
`spawnClaudeCodeProcess`| `(options: SpawnOptions) => SpawnedProcess`| `undefined`| Custom function to spawn the Claude Code process. Use to run Claude Code in VMs, containers, or remote environments
`stderr`| `(data: string) => void`| `undefined`| Callback for stderr output
@@ -575,7 +575,7 @@
});
* `API_TIMEOUT_MS`: per-request timeout on the Anthropic client, in milliseconds. Default `600000`. Applies to the main loop and all subagents.
- * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set `CLAUDE_CODE_RETRY_WATCHDOG=1`: it retries capacity errors indefinitely, and as of Claude Code v2.1.199 raises the default for other transient errors to `300` and removes the cap on this variable.
+ * `CLAUDE_CODE_MAX_RETRIES`: maximum API retries. Default `10`, capped at `15`. Each retry gets its own `API_TIMEOUT_MS` window, so worst-case wall time is roughly `API_TIMEOUT_MS × (CLAUDE_CODE_MAX_RETRIES + 1)` plus backoff. For unattended runs that need to wait through longer outages, set [`CLAUDE_CODE_RETRY_WATCHDOG=1`](</docs/en/errors#tune-retry-behavior>): it retries transient capacity errors indefinitely and, on Claude Code v2.1.199 or later, raises the default for other transient errors to `300` and removes the cap on this variable.
* `CLAUDE_ASYNC_AGENT_STALL_TIMEOUT_MS`: stall watchdog for subagents launched with `run_in_background`. Default `600000`. Resets on each stream event; on stall it aborts the subagent, marks the task failed, and surfaces the error to the parent with any partial result. Does not apply to synchronous subagents.
* `CLAUDE_ENABLE_STREAM_WATCHDOG` with `CLAUDE_STREAM_IDLE_TIMEOUT_MS`: aborts the request when headers have arrived but the response body stops streaming. The watchdog is on by default for all providers; set `CLAUDE_ENABLE_STREAM_WATCHDOG=0` to disable it. `CLAUDE_STREAM_IDLE_TIMEOUT_MS` defaults to `300000` and is clamped to that minimum. After the abort, [Automatic retries](</docs/en/errors#automatic-retries>) covers what Claude Code does, based on how far the response had progressed.
@@ -3218,7 +3218,7 @@
contract?: "latest" | string;
};
-Publishes a local `.html` or `.md` file as a hosted artifact page, or lists the user’s published artifacts. Omit `action` or pass `"publish"` to publish `file_path`, which is required for the publish action along with `favicon`, one or two emoji for the browser tab. `title` names the published page in the browser tab and gallery when the HTML file has no `<title>` tag. `url` targets an existing artifact to update in place instead of minting a new one, and `force` is a last-resort overwrite that discards another session’s published version; on a 409 conflict the normal fix is to re-read, merge, and publish again rather than pass `force`. Pass `"list"` to enumerate the user’s published artifacts; only `limit` and `scope` may accompany it. `scope` defaults to `"mine"`, which lists artifacts the user owns; `"shared"` lists artifacts other people shared with the user, and `"all"` lists both.
+Publishes a local `.html` or `.md` file as a hosted artifact page, or lists the user’s published artifacts. Omit `action` or pass `"publish"` to publish `file_path`, which is required for the publish action along with `favicon`, one or two emoji for the browser tab. `title` names the published page in the browser tab and gallery when the HTML file has no `<title>` tag. `url` targets an existing artifact to update in place instead of minting a new one. `force` is a last-resort overwrite that discards a newer version another session published. On a conflict, the failed publish returns the newer content; Claude merges its changes onto that content, or re-reads the artifact, and publishes again. Pass `force` only when the user explicitly asks to discard that version. Pass `"list"` to enumerate the user’s published artifacts; only `limit` and `scope` may accompany it. `scope` defaults to `"mine"`, which lists artifacts the user owns; `"shared"` lists artifacts other people shared with the user, and `"all"` lists both.
* `capabilities`: the runtime capabilities the published page uses, keyed by capability name, such as the [connectors the page may call](</docs/en/artifacts#pull-live-data-with-mcp-connectors>). The artifact service validates the declaration and rejects a publish that names a capability the account can’t use or gives one an invalid config. Pass `{}` to clear a stored declaration, and omit the field on a redeploy to keep it. Requires Agent SDK v0.3.235 or later.
* `contract`: the runtime version the published page runs against. Omit it to keep the artifact’s current version, pass `"latest"` to upgrade, or pass a specific version to pin or roll back. Requires Agent SDK v0.3.235 or later.
@@ -3771,10 +3771,11 @@
artifactRead?: {
slug: string;
ver?: string;
+ seeded?: false;
};
};
-Returns the fetched content with HTTP status and metadata.
+Returns the fetched content with HTTP status and metadata. `artifactRead` is present only when Claude fetched an artifact the session can publish to, and it always carries that artifact’s `slug`. `seeded` is `false` on a read that didn’t deliver the page’s full source, and that entry carries no `ver`. The field requires Agent SDK v0.3.239 or later.
###
@@ -4500,7 +4501,7 @@
Value| Key in use
---|---
`ANTHROPIC_API_KEY`| The key in the `ANTHROPIC_API_KEY` environment variable
-`apiKeyHelper`| The key returned by your [`apiKeyHelper`](</docs/en/settings#available-settings>) command
+`apiKeyHelper`| The key returned by your [`apiKeyHelper`](</docs/en/settings-reference#apikeyhelper>) command
`/login managed key`| The key Claude Code stored when you logged in with a [Claude Console account](</docs/en/authentication#claude-console-authentication>)
`none`| No API key. The session authenticates another way, such as a claude.ai login, a bearer token, or a cloud provider
@@ -5090,7 +5091,7 @@
`SDKBackgroundTasksChangedMessage`
-Emitted whenever the set of live background tasks changes: a task starts, completes, is killed, or a foreground agent is backgrounded. The `tasks` array is the full live set. Replace any cached set with each payload instead of pairing `task_started` and `task_notification` events, so the next membership change corrects any event you missed. Ordering relative to those per-task events is unspecified, so don’t correlate the two streams. Nothing is emitted at startup. Reset to an empty set whenever the session’s CLI process starts or restarts and let the next membership change repopulate it. Requires Claude Code v2.1.203 or later.
+Emitted whenever the set of live background tasks changes: a task starts, completes, is killed, or a foreground agent is backgrounded. The `tasks` array is the full live set. Replace any cached set with each payload instead of pairing `task_started` and `task_notification` events, so the next membership change corrects any event you missed. Ordering relative to those per-task events is unspecified, so don’t correlate the two streams. Nothing is emitted at startup. Reset to an empty set whenever the session’s CLI process starts or restarts and let the next membership change repopulate it. When you send a repeated `initialize` control request to a running session, such as with `reinitialize()` after a transport gap, Claude Code follows the response with a snapshot of the current live set, even when it is empty. A reconnecting host therefore learns what is running without waiting for the next membership change. Before Agent SDK v0.3.239, Claude Code sent no snapshot after a repeated `initialize`. Requires Claude Code v2.1.203 or later.
type SDKBackgroundTasksChangedMessage = {
type: "system";
@@ -5273,7 +5274,7 @@
`allowUnsandboxedCommands`| `boolean`| `true`| Allow the model to request running commands outside the sandbox. When `true`, the model can set `dangerouslyDisableSandbox` in tool input, which falls back to the permissions system
`network`| `SandboxNetworkConfig`| `undefined`| Network-specific sandbox configuration
`filesystem`| `SandboxFilesystemConfig`| `undefined`| Filesystem-specific sandbox configuration for read/write restrictions
-`ignoreViolations`| `Record<string, string[]>`| `undefined`| Map of violation categories to patterns to ignore (e.g., `{ file: ['/tmp/*'], network: ['localhost'] }`)
+`ignoreViolations`| `Record<string, string[]>`| `undefined`| Map of command substrings, or `*` for every command, to substrings of the violation text to ignore, such as `{ "*": ['/etc/hosts'] }`; see [`sandbox.ignoreViolations`](</docs/en/settings-reference#sandbox-ignoreviolations>)
`enableWeakerNestedSandbox`| `boolean`| `false`| Enable a weaker nested sandbox for compatibility
`ripgrep`| `{ command: string; args?: string[] }`| `undefined`| Custom ripgrep binary configuration for sandbox environments
@@ -5335,7 +5336,7 @@
`allowedDomains`| `string[]`| `[]`| Domain names that sandboxed processes can access
`deniedDomains`| `string[]`| `[]`| Domain names that sandboxed processes cannot access. Takes precedence over `allowedDomains`
`strictAllowlist`| `boolean`| `false`| Deny sandboxed commands access to hosts outside the [network allowlist](</docs/en/sandboxing#network-isolation>) instead of prompting. Enforced for sandboxed commands only; in-process tools such as WebFetch aren’t gated by it. Only honored from user, managed, or CLI `--settings` settings; project settings are ignored. Requires Claude Code v2.1.219 or later
-`allowManagedDomainsOnly`| `boolean`| `false`| Managed-settings only. When set in [managed settings](</docs/en/permissions#managed-settings>), only `allowedDomains` entries and `WebFetch(domain:...)` allow rules from managed settings are honored, and allow entries from user, project, or local settings are ignored. Has no effect when set via SDK options
+`allowManagedDomainsOnly`| `boolean`| `false`| Managed-settings only. When set in [managed settings](</docs/en/managed-settings>), only `allowedDomains` entries and `WebFetch(domain:...)` allow rules from managed settings are honored, and allow entries from user, project, or local settings are ignored. Has no effect when set via SDK options
`allowLocalBinding`| `boolean`| `false`| Allow processes to bind to local ports (e.g., for dev servers)
`allowUnixSockets`| `string[]`| `[]`| Unix socket paths that processes can access (e.g., Docker socket)
`allowAllUnixSockets`| `boolean`| `false`| Allow access to all Unix sockets
--- a/voice-dictation.md
+++ b/voice-dictation.md
@@ -9,7 +9,6 @@
Voice dictation streams your recorded audio to Anthropic’s servers for transcription. Audio is not processed locally. It needs all of the following:
* **A Claude.ai account** : the speech-to-text service is only available when you authenticate with one, and is not available when Claude Code is configured to use an Anthropic API key directly, Amazon Bedrock, Google Cloud’s Agent Platform, or Microsoft Foundry.
- * **An organization without HIPAA compliance enabled** : `/voice` shows `Voice mode is disabled by your organization's policy` when this restriction applies.
* **A local microphone** : voice dictation does not work in remote environments such as [Claude Code on the web](</docs/en/claude-code-on-the-web>) or SSH sessions.
* **WSLg, if you run Claude Code in WSL** : WSLg is included with WSL2 when installed from the Microsoft Store on Windows 10 or 11. If WSLg is not available, for example on WSL1, run Claude Code in native Windows instead.
@@ -78,7 +77,7 @@
Change the dictation language
-Voice dictation uses the same [`language` setting](</docs/en/settings>) that controls Claude’s response language. If that setting is empty, dictation defaults to English. In the VS Code extension, if `language` is empty, dictation uses VS Code’s `accessibility.voice.speechLanguage` setting before defaulting to English.
+Voice dictation uses the same [`language` setting](</docs/en/settings-reference#language>) that controls Claude’s response language. If that setting is empty, dictation defaults to English. In the VS Code extension, if `language` is empty, dictation uses VS Code’s `accessibility.voice.speechLanguage` setting before defaulting to English.
Supported dictation languages
@@ -144,7 +143,7 @@
Common issues when voice dictation does not activate or record:
* **`Voice mode requires a Claude.ai account`** : you are authenticated with an API key or a third-party provider. Run `/login` to sign in with a Claude.ai account.
- * **`Voice mode is disabled by your organization's policy`** : your organization’s compliance configuration disables voice dictation, as described in Requirements. Contact your organization administrator to confirm whether voice dictation is available for your organization.
+ * **`Voice mode is disabled by your organization's policy`** : an administrator policy for your organization turns off voice dictation. Contact your organization administrator to confirm whether voice dictation is available for your organization.
* **`Microphone access is denied`** : grant microphone permission to your terminal in system settings. On macOS, go to System Settings → Privacy & Security → Microphone and enable your terminal app, then run `/voice` again. On Windows, go to Settings → Privacy & security → Microphone and turn on microphone access for desktop apps, then run `/voice` again. If your terminal isn’t listed in the macOS settings, see Terminal not listed in macOS Microphone settings.
* **`No audio recording tool found` on Linux**: the native audio module could not load and no fallback is installed. Install SoX with the command shown in the error message, for example `sudo apt-get install sox`.
* **`Voice mode requires a microphone, but SoX could not open an audio capture device`** : SoX is installed, but the host has no audio capture device, for example a headless server or a container. Run Claude Code on a machine with a microphone. As of v2.1.195, Claude Code on Linux reports this message in that situation; earlier versions asked you to install SoX even when it was already installed.
@@ -193,6 +192,6 @@
See also
* [Customize keyboard shortcuts](</docs/en/keybindings>): rebind `voice:pushToTalk` and other CLI keyboard actions
- * [Configure settings](</docs/en/settings>): full reference for `voice`, `language`, and other settings keys
+ * [Settings reference](</docs/en/settings-reference#voice>): the `voice`, `language`, and other settings keys
* [Interactive mode](</docs/en/interactive-mode>): keyboard shortcuts, input modes, and session controls
* [Commands](</docs/en/commands>): reference for `/voice`, `/config`, and all other commands
--- a/vs-code.md
+++ b/vs-code.md
@@ -91,10 +91,10 @@
* **Plan** : Claude describes what it will do and waits for approval before making changes. VS Code automatically opens the plan as a full Markdown document where you can add inline comments to give feedback before Claude begins.
* **Edit automatically** : Claude makes edits without asking.
* **Command menu** : click `/` or type `/` to open the command menu. Options include attaching files, switching models, toggling extended thinking, viewing plan usage (`/usage`), and starting a [Remote Control](</docs/en/remote-control>) session (`/remote-control`). The Customize section provides access to MCP servers, hooks, memory, permissions, and plugins. Items with a terminal icon open in the integrated terminal.
- * The Settings section includes **Enable Remote Control for all sessions** , which sets [`remoteControlAtStartup`](</docs/en/settings#available-settings>) to control whether [new interactive sessions connect to Remote Control automatically](</docs/en/remote-control#enable-remote-control-for-all-sessions>). Requires Claude Code v2.1.203 or later.
+ * The Settings section includes **Enable Remote Control for all sessions** , which sets [`remoteControlAtStartup`](</docs/en/settings-reference#remotecontrolatstartup>) to control whether [new interactive sessions connect to Remote Control automatically](</docs/en/remote-control#enable-remote-control-for-all-sessions>). Requires Claude Code v2.1.203 or later.
* The Settings section also includes **Focus view** , which hides tool calls, tool results, and thinking behind expandable rows, leaving your prompts and Claude’s responses. Claude’s latest to-do list stays visible, and so does the text a pending question from Claude is asking about. Toggle it there, with `Ctrl+Option+F` (Mac) / `Ctrl+Alt+F` (Windows/Linux), or from the Command Palette with **Claude Code: Toggle Focus view**. The change applies to every open session and persists across sessions. Requires Claude Code v2.1.221 or later.
* To report a bug, click **Report a problem** at the bottom of the menu, or type `/bug` or `/feedback` with an optional description that prefills the report. When you submit the report and you’re signed in to Anthropic on a first-party connection, Claude Code sends it to Anthropic. On a third-party provider, or without Anthropic credentials, the dialog still opens, but submitting shows an error and sends nothing: unlike the CLI’s `/bug`, the extension doesn’t write a local archive. Requires Claude Code v2.1.229 or later.
- * **Side questions** : type `/btw` followed by a question, or pick it from the command menu, to ask about your session [without adding to the conversation](</docs/en/interactive-mode#side-questions-with-%2Fbtw>). The answer opens in a panel beside the chat, where you can ask follow-up questions. The thread survives window reloads. Claude Code keeps the newest 20 exchanges and expires stored threads on the [`cleanupPeriodDays`](</docs/en/settings#available-settings>) schedule, as long as Claude Code can [safely determine the retention period](</docs/en/claude-directory#cleaned-up-automatically>). To clear a thread, click the trash icon in the panel. Requires Claude Code v2.1.227 or later.
+ * **Side questions** : type `/btw` followed by a question, or pick it from the command menu, to ask about your session [without adding to the conversation](</docs/en/interactive-mode#side-questions-with-%2Fbtw>). The answer opens in a panel beside the chat, where you can ask follow-up questions. The thread survives window reloads. Claude Code keeps the newest 20 exchanges and expires stored threads on the [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) schedule, as long as Claude Code can [safely determine the retention period](</docs/en/claude-directory#cleaned-up-automatically>). To clear a thread, click the trash icon in the panel. Requires Claude Code v2.1.227 or later.
* **Context indicator** : the prompt box shows how much of Claude’s context window you’re using. Claude automatically compacts when needed, or you can run `/compact` manually.
* **Extended thinking** : lets Claude spend more time reasoning through complex problems. Toggle it on via the command menu (`/`). Claude’s reasoning appears in the conversation as collapsed blocks: click a block to read it, or press `Ctrl+O` to expand or collapse every thinking block in the session. See [Extended thinking](</docs/en/model-config#extended-thinking>) for details.
* **Multi-line input** : press `Shift+Enter` to add a new line without sending. This also works in the “Other” free-text input of question dialogs.
@@ -620,7 +620,7 @@
2. Search for “Claude Code”
3. Click **Uninstall**
-If you run `claude` in a VS Code integrated terminal, Claude Code reinstalls the extension automatically. To keep it uninstalled, turn off **Auto-install IDE extension** in `/config`, or set [`autoInstallIdeExtension`](</docs/en/settings#global-config-settings>) to `false`. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) environment variable to `1`. To also remove extension data and reset all settings, delete the extension’s storage directory for your platform. On macOS:
+If you run `claude` in a VS Code integrated terminal, Claude Code reinstalls the extension automatically. To keep it uninstalled, turn off **Auto-install IDE extension** in `/config`, or set [`autoInstallIdeExtension`](</docs/en/settings-reference#autoinstallideextension>) to `false`. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](</docs/en/env-vars>) environment variable to `1`. To also remove extension data and reset all settings, delete the extension’s storage directory for your platform. On macOS:
rm -rf ~/Library/"Application Support"/Code/User/globalStorage/anthropic.claude-code
--- a/web-quickstart.md
+++ b/web-quickstart.md
@@ -68,7 +68,7 @@
Confirm your Default environment
-When you finish connecting GitHub, onboarding creates a [cloud environment](</docs/en/cloud-environments>) named **Default** for you; if onboarding shows an environment form instead, keep its defaults to create the same **Default** environment. The environment controls what network access Claude has during sessions and what runs when a new session is created. **Default** uses [`Trusted` network access](</docs/en/cloud-environments#access-levels>): sessions reach [common package registries](</docs/en/cloud-environments#default-allowed-domains>) and other allowlisted domains, and nothing else through the session’s network. See [Installed tools](</docs/en/cloud-environments#installed-tools>) for what’s available without any configuration.For a first project, the **Default** environment works as is. To change its network access, add environment variables, or run a [setup script](</docs/en/cloud-environments#setup-scripts>) before sessions start, [edit it or create additional environments](</docs/en/cloud-environments#configure-your-environment>).
+If you don’t have an environment yet, onboarding creates a [cloud environment](</docs/en/cloud-environments>) named **Default** for you when you finish connecting GitHub; if onboarding shows an environment form instead, keep its defaults to create the same **Default** environment. The environment controls what network access Claude has during sessions and what runs when a new session is created. **Default** uses [`Trusted` network access](</docs/en/cloud-environments#access-levels>): sessions reach [common package registries](</docs/en/cloud-environments#default-allowed-domains>) and other allowlisted domains, and nothing else through the session’s network. See [Installed tools](</docs/en/cloud-environments#installed-tools>) for what’s available without any configuration.For a first project, the **Default** environment works as is. To change its network access, add environment variables, or run a [setup script](</docs/en/cloud-environments#setup-scripts>) before sessions start, [edit it or create additional environments](</docs/en/cloud-environments#configure-your-environment>).
###
--- a/workflows.md
+++ b/workflows.md
@@ -153,7 +153,7 @@
/effort ultracode
-To start a session with ultracode already on, launch with `claude --effort ultracode`. Requires Claude Code v2.1.203 or later. With ultracode on, Claude decides when a task warrants a workflow. A single request can turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than at lower effort levels. Ultracode lasts for the current session and resets when you start a new one. Drop back with `/effort high` when you return to routine work. It’s available on models that support `xhigh` [effort](</docs/en/model-config#adjust-effort-level>); on other models the `/effort` menu doesn’t offer it.
+To start a session with ultracode already on, launch with `claude --effort ultracode`. Requires Claude Code v2.1.203 or later. With ultracode on, Claude decides when a task warrants a workflow. A single request can turn into several workflows in a row: one to understand the code, one to make the change, and one to verify it. This applies to every task in the session, so each request uses more tokens and takes longer than at lower effort levels. `/effort ultracode` lasts for the current session; to have every session start with it, set the [`ultracode`](</docs/en/settings-reference#ultracode>) setting. Drop back with `/effort high` when you return to routine work. It’s available on models that support `xhigh` [effort](</docs/en/model-config#adjust-effort-level>); on other models the `/effort` menu doesn’t offer it.
###
@@ -176,7 +176,7 @@
Manual, accept edits| Every run, unless you’ve selected **Yes, and don’t ask again** for that workflow in this project
Bypass permissions, `claude -p`, Agent SDK| Never. The run starts immediately
-In the Desktop app, an approval card shows the workflow name, the phase list, and a token-usage caution, with **Once** , **Always** , and **Deny** actions. The progress view appears in the Background tasks side pane. Your permission mode controls only the launch prompt above. The subagents the workflow spawns always run in `acceptEdits` mode and inherit your [tool allowlist](</docs/en/settings#permission-settings>), regardless of your session’s mode. File edits are auto-approved. Shell commands, web fetches, and MCP tools that aren’t in your allowlist can still prompt you mid-run. To avoid this on a long run, add the commands the agents need to your allowlist before starting. In `claude -p` and the Agent SDK there is no one to prompt, so tool calls follow your configured permission rules without interactive confirmation.
+In the Desktop app, an approval card shows the workflow name, the phase list, and a token-usage caution, with **Once** , **Always** , and **Deny** actions. The progress view appears in the Background tasks side pane. Your permission mode controls only the launch prompt above. The subagents the workflow spawns always run in `acceptEdits` mode and inherit your [tool allowlist](</docs/en/settings-reference#permission-settings>), regardless of your session’s mode. File edits are auto-approved. Shell commands, web fetches, and MCP tools that aren’t in your allowlist can still prompt you mid-run. To avoid this on a long run, add the commands the agents need to your allowlist before starting. In `claude -p` and the Agent SDK there is no one to prompt, so tool calls follow your configured permission rules without interactive confirmation.
###
@@ -396,7 +396,7 @@
`medium`| Fewer than 15 agents
`large`| Fewer than 50 agents
-The default is `medium`. Until you choose a value, the `/config` row shows `medium (default)` and the workflow’s `Running in background` line shows `medium size (/config)`. Requires Claude Code v2.1.219 or later; earlier versions default to `unrestricted`. To change the guideline, pick a value for the Dynamic workflow size setting in `/config`, or run `/config workflowSizeGuideline=small`. On v2.1.219 and later, you can also set the [`workflowSizeGuideline` key](</docs/en/settings#available-settings>) in any settings file; that value takes precedence over `/config`, and Claude Code hides the `/config` row while a settings file provides one. Changes take effect on the next prompt. The runtime agent caps still apply regardless of the setting.
+The default is `medium`. Until you choose a value, the `/config` row shows `medium (default)` and the workflow’s `Running in background` line shows `medium size (/config)`. Requires Claude Code v2.1.219 or later; earlier versions default to `unrestricted`. To change the guideline, pick a value for the Dynamic workflow size setting in `/config`, or run `/config workflowSizeGuideline=small`. On v2.1.219 and later, you can also set the [`workflowSizeGuideline` key](</docs/en/settings-reference#workflowsizeguideline>) in any settings file; that value takes precedence over `/config`, and Claude Code hides the `/config` row while a settings file provides one. Changes take effect on the next prompt. The runtime agent caps still apply regardless of the setting.
###
--- a/worktrees.md
+++ b/worktrees.md
@@ -108,7 +108,7 @@
Clean up subagent and background-session worktrees
-A periodic sweep removes worktrees that Claude created for subagents and [background sessions](</docs/en/agent-view#how-file-edits-are-isolated>) once they are older than your [`cleanupPeriodDays`](</docs/en/settings#available-settings>) setting, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>). The sweep skips a worktree that still holds work: changed or untracked files, or unpushed commits. It never removes worktrees you create with `--worktree`. While an agent is running, Claude runs `git worktree lock` on its worktree so that concurrent cleanup cannot remove it. The lock is released when the agent finishes. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. Before v2.1.210, a lock left by a killed session stayed in place until you ran `git worktree unlock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files.
+A periodic sweep removes worktrees that Claude created for subagents and [background sessions](</docs/en/agent-view#how-file-edits-are-isolated>) once they are older than your [`cleanupPeriodDays`](</docs/en/settings-reference#cleanupperioddays>) setting, following the [retention sweep rules](</docs/en/claude-directory#cleaned-up-automatically>). The sweep skips a worktree that still holds work: changed or untracked files, or unpushed commits. It never removes worktrees you create with `--worktree`. While an agent is running, Claude runs `git worktree lock` on its worktree so that concurrent cleanup cannot remove it. The lock is released when the agent finishes. The sweep also releases a lock Claude Code set for a session whose process has exited, so a killed background session doesn’t leave its worktree permanently locked. The sweep never releases a lock you set yourself with `git worktree lock`. Before v2.1.210, a lock left by a killed session stayed in place until you ran `git worktree unlock`. To clean up a worktree that the sweep keeps, run `git worktree remove`, adding `--force` if the worktree has uncommitted changes or untracked files.
##
@@ -124,7 +124,7 @@
Choose the base branch
-New worktrees branch from the repository’s default branch, so most sessions don’t need this setting. Set `worktree.baseRef` in [settings](</docs/en/settings#worktree-settings>) to branch from your current work instead. The setting accepts two values:
+New worktrees branch from the repository’s default branch, so most sessions don’t need this setting. Set `worktree.baseRef` in [settings](</docs/en/settings-reference#worktree>) to branch from your current work instead. The setting accepts two values:
* `"fresh"` (default): branch from the repository’s default branch on the remote, usually `main`, so the worktree starts from a clean tree matching the remote.
* `"head"`: branch from your current local `HEAD`, so the worktree carries your unpushed commits and feature-branch state. Use this when isolating subagents that need to operate on in-progress work. Inside a worktree, `"head"` resolves to that worktree’s `HEAD`, not the main checkout’s.
@@ -210,7 +210,7 @@
* **The repository’s`.git` directory**: git commands in a worktree write to the main repository’s shared `.git` directory, and [sandboxing](</docs/en/sandboxing#filesystem-isolation>) allows those writes, so commands such as `git commit` work from inside a worktree with the sandbox enabled.
* **Plugins** : plugins installed at [project scope](</docs/en/plugins-reference#plugin-installation-scopes>) from the main checkout also load in worktrees of the same repository, so you don’t need to reinstall them per worktree. Requires Claude Code v2.1.200 or later.
- * **Permission approvals** : choosing “Yes, and don’t ask again” for a Bash command in a worktree session saves the rule to the main checkout’s `.claude/settings.local.json`, so it applies in the main checkout and in every other worktree of the repository, and it survives the worktree’s removal. Before v2.1.211, an approval granted in a worktree was saved inside that worktree, didn’t apply elsewhere, and was lost when the worktree was removed. See [where approvals are saved](</docs/en/permissions#permission-system>).
+ * **Permission approvals** : choosing “Yes, and don’t ask again” for a Bash command in a worktree session saves the rule to the main checkout’s `.claude/settings.local.json`, so it applies in the main checkout and in every other worktree of the repository, and it survives the worktree’s removal. On Windows and the other cases where Claude Code [keeps the local file in the starting directory](</docs/en/settings#where-claude-code-looks-for-each-file>), the rule stays with that worktree. Before v2.1.211, an approval granted in a worktree was saved inside that worktree, didn’t apply elsewhere, and was lost when the worktree was removed. See [where approvals are saved](</docs/en/permissions#permission-system>).
All three apply whether you create the worktree with `--worktree`, with `git worktree add`, or through the [desktop app](</docs/en/desktop#work-in-parallel-with-sessions>).
@@ -249,7 +249,7 @@
Non-git version control
-Worktree isolation uses git by default. For SVN, Perforce, Mercurial, or other systems, configure [`WorktreeCreate` and `WorktreeRemove` hooks](</docs/en/hooks#worktreecreate>) to provide custom creation and cleanup logic. Because the hook replaces the default git behavior, `.worktreeinclude` is not processed when you use `--worktree`. Copy any local configuration files inside your hook script instead. This `WorktreeCreate` hook reads the worktree name from the JSON on stdin with `jq`, checks out a fresh SVN working copy, and prints the directory path so Claude Code can use it as the session’s working directory. Add the configuration to your [`settings.json`](</docs/en/settings#settings-files>):
+Worktree isolation uses git by default. For SVN, Perforce, Mercurial, or other systems, configure [`WorktreeCreate` and `WorktreeRemove` hooks](</docs/en/hooks#worktreecreate>) to provide custom creation and cleanup logic. Because the hook replaces the default git behavior, `.worktreeinclude` is not processed when you use `--worktree`. Copy any local configuration files inside your hook script instead. This `WorktreeCreate` hook reads the worktree name from the JSON on stdin with `jq`, checks out a fresh SVN working copy, and prints the directory path so Claude Code can use it as the session’s working directory. Add the configuration to your [`settings.json`](</docs/en/settings#where-settings-live>):
{
"hooks": {