Follow Discord
Sweep 03 Dec 2026 · 19:13Z Build v2.1.336 553 read Stable v2.1.332 Latest v2.1.336 Next v2.1.336 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · claude-code

One read of Claude Code CLIclaude-code-20261202T210701Z

35 pages moved out of 220 read.

Pages moved 35 significant first
Pages read 220 in this capture
Captured 21:07 UTC
Corpus hash c61e27e66822 corpus-hash

What this read moved

1-25 of 35, page 1 of 2

This capture is too large to show at once. Changes 1-25 of 35 are below, significant first; the rest are on the following screens.

agent-sdk/python Changed · +6 / -4 lines

from line 1554
15541554 apiUsage: NotRequired[dict[str, Any] | None]
15551555```
15561556 
1557Each `ContextUsageCategory` entry carries `name`, `tokens`, `color`, and an optional `isDeferred` flag. `totalTokens` is the session's current context usage, and `maxTokens` is the window that usage is measured against. That window is the model's context window, or the lower auto-compaction window when one applies, and `rawMaxTokens` carries the same value as `maxTokens`. `apiUsage` holds the usage from the latest API response, not a running total for the session. Claude Code leaves the optional `deferredBuiltinTools`, `systemTools`, and `systemPromptSections` keys unset, so expect them to be absent even though the type declares them.
1557Each `ContextUsageCategory` entry carries `name`, `tokens`, `color`, and an optional `isDeferred` flag. `totalTokens` is the session's current context usage, and `maxTokens` is the window that usage is measured against. That window is the model's context window, or the lower auto-compaction window when one applies, and `rawMaxTokens` carries the same value as `maxTokens`.
15581558 
1559`apiUsage` holds the usage from the latest API response, not a running total for the session. The optional `deferredBuiltinTools`, `systemTools`, and `systemPromptSections` keys are absent from the response.
1560 
15591561### `SdkPluginConfig`
15601562 
15611563Configuration for loading plugins in the SDK.
from line 3654
36523654 
36533655| Property | Type | Default | Description |
36543656| :- | :- | :- | :- |
3655| `allowedDomains` | `list[str]` | `[]` | Domain names that sandboxed processes can access |
3657| `allowedDomains` | `list[str]` | `[]` | Domain names that sandboxed processes can access [without approval](https://code.claude.com/docs/en/sandboxing.md#hosts-outside-your-allowed-domains) |
36563658| `deniedDomains` | `list[str]` | `[]` | Domain names that sandboxed processes cannot access. Takes precedence over `allowedDomains` |
36573659| `allowManagedDomainsOnly` | `bool` | `False` | Managed-settings only: when set in managed settings, ignore `allowedDomains` and `WebFetch(domain:...)` allow rules from non-managed settings sources. Has no effect when set via SDK options |
36583660| `allowUnixSockets` | `list[str]` | `[]` | macOS only: Unix socket paths that processes can access, such as the Docker socket. Ignored on Linux |
from line 3678
36763678 
36773679### Permissions Fallback for Unsandboxed Commands
36783680 
3679When `allowUnsandboxedCommands` is enabled, the model can request to run commands outside the sandbox by setting `dangerouslyDisableSandbox: True` in the tool input. These requests fall back to the existing permissions system, meaning your `can_use_tool` handler is invoked, allowing you to implement custom authorization logic.
3681When the `allowUnsandboxedCommands` option is enabled, the model can request to run commands outside the sandbox by setting `dangerouslyDisableSandbox: True` in the tool input. Claude Code [evaluates permissions](https://code.claude.com/docs/en/agent-sdk/permissions.md#how-permissions-are-evaluated) for these requests, and some skip your `can_use_tool` handler. For example, Claude Code skips the handler when an [allow rule like `Bash(curl *)`](https://code.claude.com/docs/en/sandboxing#the-unsandboxed-retry-escape-hatch) approves the command.
36803682 
36813683Your `excludedCommands` entries instead take a call out of the sandbox with no model involvement; [`sandbox.excludedCommands`](https://code.claude.com/docs/en/settings-reference#sandbox-excludedcommands) covers when an entry applies.
36823684 
3683The following example logs each unsandboxed request and denies it unless your own authorization logic allows it:
3685This example's handler denies the unsandboxed Bash requests it receives unless your `is_command_authorized` function approves them:
36843686 
36853687```python theme={null}
36863688import asyncio

agent-sdk/typescript Changed · +4 / -4 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 1093
10931093 
10941094`totalTokens` is the session's current context usage, and `maxTokens` is the window that usage is measured against. That window is the model's context window, or the lower auto-compaction window when one applies. `rawMaxTokens` carries the same value as `maxTokens`, and `percentage` is `totalTokens` as a rounded percentage of that window. `apiUsage` holds the usage from the latest API response, not a running total for the session.
10951095 
1096Claude Code leaves the optional `deferredBuiltinTools`, `systemTools`, and `systemPromptSections` diagnostics unset, so expect them to be absent even though the type declares them.
1096The optional `deferredBuiltinTools`, `systemTools`, and `systemPromptSections` fields are absent from the response.
10971097 
10981098#### Find a row by ID, a server's instruction tokens, or an entry's plugin and file
10991099 
from line 4620
46204620| Field | Type | Description |
46214621| - | - | - |
46224622| `status` | `"async_launched" \| "remote_launched"` | The tool accepted the invocation. `"async_launched"` for in-process runs, `"remote_launched"` for runs dispatched to a cloud session instead of running in-process |
4623| `taskId` | `string` | Background task ident
4623| `taskId` | `string` | Background task identifier for the run |
4624| `taskType` | `"local_workflow" \| "remote_a

channels-reference Changed · +2 / -4 lines

from line 461
461461| `description` | Human-readable summary of what this specific tool call does, never the command itself. For a Bash call this is Claude's description of the command; when the model gives no description, the field is the constant `Run shell command` and carries zero command detail. Render `input_preview` when you have room. |
462462| `input_preview` | The tool's arguments as JSON-shaped display text, keyed per top-level field. For Bash this is the command; for Write, the file path and the content. Omit it from your prompt if you only have room for a one-line message. Your server decides what to show. |
463463 
464Clients on Claude Code v2.1.211 or later sanitize `description` and `input_preview` before relaying them. Expect three changes in the text you receive:
464Clients on Claude Code v2.1.211 or later sanitize `description` and `input_preview` in three ways before relaying them:
465465 
466466* Claude Code neutralizes direction-override characters, invisible characters, and quote and angle-bracket lookalikes.
467467* Claude Code folds each run of whitespace to a single space.
from line 767
767767 
768768To make your channel installable and shareable, wrap it in a [plugin](https://code.claude.com/docs/en/plugins/overview.md) and publish it to a [marketplace](https://code.claude.com/docs/en/plugins/overview.md). Users install it with `/plugin install`, then enable it per session with `--channels plugin:<name>@<marketplace>`.
769769 
770A channel published to your own marketplace still needs `--dangerously-load-development-channels` to run, since it isn't on the [approved allowlist](https://code.claude.com/docs/en/channels.md#supported-channels). The default allowlist is the channel plugins in `claude-plugins-official`. The community marketplace is not on the channel allowlist.
771 
772If you are working with an Anthropic partner contact, reach out to them to coordinate an official-marketplace listing. On Team and Enterprise plans, an admin can instead include your plugin in the organization's own [`allowedChannelPlugins`](https://code.claude.com/docs/en/channels#restrict-which-channel-plugins-can-run) list, which replaces the default Anthropic allowlist.
770A channel published to your own marketplace still needs `--dangerously-load-development-channels` to run, since it isn't on the [approved allowlist](https://code.claude.com/docs/en/channels.md#supported-channels). The default allowlist is the channel plugins in `claude-plugins-official`. The community marketplace is not on the channel allowlist. On Team and Enterprise plans, an admin can include your plugin in the organization's own [`allowedChannelPlugins`](https://code.claude.com/docs/en/channels#restrict-which-channel-plugins-can-run) list, which replaces the default Anthropic allowlist.
773771 
774772## See also
775773 

code-mode Changed · +5 / -5 lines

from line 176
176176 
177177#### Trace calls from code
178178 
179On v2.1.333 or later, look for calls from code under the `claude_code.tool.execution` span of the `REPL` call that ran the code. Expect the same [span types](https://code.claude.com/docs/en/monitoring-usage.md#span-hierarchy) as for a call that Claude makes directly. Before your users turn on Code Mode, decide what you export and what you audit from:
179On v2.1.333 or later, look for calls from code under the `claude_code.tool.execution` span of the `REPL` call that ran the code. These calls have the same [span types](https://code.claude.com/docs/en/monitoring-usage.md#span-hierarchy) as a call that Claude makes directly. Before your users turn on Code Mode, decide what you export and what you audit from:
180180 
181181* **Keep tool output out of your backend**: code can read far more than it shows Claude. Leave `OTEL_LOG_TOOL_CONTENT` unset if your backend shouldn't receive what calls from code return. In that case, also leave `OTEL_LOG_TOOL_DETAILS`, `OTEL_LOG_RAW_API_BODIES`, `OTEL_LOG_ASSISTANT_RESPONSES`, and `OTEL_LOG_USER_PROMPTS` unset, because each can send parts of that output
182182* **Audit from events**: after code makes many calls, you can lose spans if Claude Code exits right away or your collector falls behind. Export [events](https://code.claude.com/docs/en/monitoring-usage.md#events) too and audit from those. To avoid losing events as well, run a collector that responds quickly and accepts large requests
from line 257
257257* **You're on a version before v2.1.328 and picked the session from the `claude --resume` list**: exit, [update Claude Code](https://code.claude.com/docs/en/setup.md#update-claude-code), then run the same `claude --resume` command with Code Mode on. To stay on your version, replace `--resume` with `--continue`. If Claude still waits after the update, start a new session in auto mode
258258* **You passed tool names to `--tools`**: start a new session in auto mode, with Code Mode on and without that flag
259259* **The session first started in auto or `bypassPermissions` mode**: press `Shift+Tab` until you're back in that mode. If that doesn't help, exit, then run `claude --continue --permission-mode auto` with Code Mode on
260* **The session first started in another mode**: if [auto mode is available](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) to you, exit, then run `claude --permission-mode auto` with Code Mode on to start a new session. On v2.1.331 or later, expect Claude to keep waiting if you resume the old session instead
260* **The session first started in another mode**: if [auto mode is available](https://code.claude.com/docs/en/permission-modes.md#eliminate-prompts-with-auto-mode) to you, exit, then run `claude --permission-mode auto` with Code Mode on to start a new session. On v2.1.331 or later, Claude can keep waiting if you resume the old session instead
261261 
262262### Stop code in progress
263263 
from line 357
357357 
358358### Permission prompt with a countdown
359359 
360In auto mode, if you approve code yourself after [repeated classifier blocks](https://code.claude.com/docs/en/permission-modes.md#when-auto-mode-falls-back), you can be asked about tool calls in that code and in earlier code that's still running. Expect the same in auto mode after an [`ask` rule](#approve-each-piece-of-code-first) or a `PreToolUse` hook on `REPL` has you approve the code.
360In auto mode, if you approve code yourself after [repeated classifier blocks](https://code.claude.com/docs/en/permission-modes.md#when-auto-mode-falls-back), you can be asked about tool calls in that code and in earlier code that's still running. You can also be asked about those calls in auto mode when you approved the code because of an [`ask` rule](#approve-each-piece-of-code-first) or a `PreToolUse` hook on `REPL`.
361361 
362362With no IDE connected, the prompt can show a countdown:
363363 
from line 374
374374If Claude reports a refused call, ask it for the error text. These errors mean your [`PreToolUse` hook](https://code.claude.com/docs/en/hooks#pretooluse) gave no decision:
375375 
376376* **`the hook did not finish`**: your hook timed out, or your agent hook ended without a decision. Raise the hook's [`timeout`](https://code.claude.com/docs/en/hooks#common-fields), or set [`"onFailure": "continue"`](#tool-call-ran-after-a-hook-failed) on a `command` or `http` hook. If an agent hook still gives this error, move the check to a `command` hook. After Claude runs code, you can see this error on calls outside code too
377* **`the hook failed`**: your hook failed on a call from code, for example because it couldn't start. Find the failure in the [debug log](https://code.claude.com/docs/en/hooks.md#debug-hooks) and fix it. Expect this error before v2.1.329. On later versions, you can see it after you turn off [feature-flag fetching](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching) during a session
377* **`the hook failed`**: your hook failed on a call from code, for example because it couldn't start. Find the failure in the [debug log](https://code.claude.com/docs/en/hooks.md#debug-hooks) and fix it. You see this error on versions before v2.1.329. On later versions, you can see it after you turn off [feature-flag fetching](https://code.claude.com/docs/en/env-vars.md#features-that-need-feature-flag-fetching) during a session
378378 
379379### Tool call ran after a hook failed
380380 
381381To stop a call from code when its `PreToolUse` hook fails, use a `command` or `http` hook and set [`"onFailure": "block"`](https://code.claude.com/docs/en/hooks#block-the-action-when-a-hook-fails). If several settings files have that hook, give it the same `onFailure` value in each.
382382 
383On v2.1.329 or later, expect these results for `command` and `http` hooks:
383On v2.1.329 or later, the call has these outcomes with `command` and `http` hooks:
384384 
385385| `onFailure` | Hook times out | Hook fails another way, such as a missing script |
386386| :- | :- | :- |

desktop Changed · +8 / -8 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 85
8585| Mode | Settings key | Behavior |
8686| - | - | - |
8787| **Manual** | `default` | Claude asks before editing files or running commands. You see a diff and can accept or reject each change. |
88| **Accept edits** | `acceptEdits` | Claude auto-accepts file edits and common filesystem commands like `mkdir`, `touch`, and `mv`, but still asks before running other terminal commands. Use this when you trust file changes and want faster iteration. |
88| **Accept edits** | `acceptEdits` | Claude auto-accepts file edits and common filesystem commands like `mkdir`, `touch`, and `mv`, but outside a cloud session still asks before running other terminal commands that aren't read-only. Use this when you trust file changes and want faster iteration. |
8989| **Plan** | `plan` | Claude reads files and runs commands to explore, then proposes a plan without editing your source code. Good for complex tasks where you want to review the approach first. |
9090| **Auto** | `auto` | Claude runs without routine prompts; before actions such as shell commands and network requests run, a background classifier checks that they align with your request. Appears when [auto mode is available](#auto-mode-availability); there is no separate Settings toggle for it. |
9191| **Bypass permissions** | `bypassPermissions` | Claude runs without permission prompts, except for the [actions no mode auto-approves](https://code.claude.com/docs/en/permission-modes.md#actions-no-mode-auto-approves), safety classifiers when Claude [acts on external sites](#browse-external-sites), or desktop actions such as deleting a session, though not [archiving one](#work-across-sessions). Equivalent to `--dangerously-skip-permissions` in the CLI. On Pro, Max, and Ultra plans, enable "Allow bypass permissions mode" in **Settings > Code** or **Settings > Claude Code**. On Team and Enterprise plans there is no Settings toggle, and organization policy controls it instead. Only use this in sandboxed containers or VMs. |
from line 98
9898>
9999> Start complex tasks in Plan so Claude maps out an approach before making changes. Once you approve the plan, switch to Accept edits or Manual to execute it. See [plan mode](https://code.claude.com/docs/en/permission-modes.md#analyze-before-you-edit-with-plan-mode) for more on this workflow.
100100 
101Cloud sessions support Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits, so the selector shows Accept edits instead of Manual. Bypass permissions isn't available in cloud sessions, including sessions in a [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments).
101Cloud sessions support Accept edits, Plan, and Auto. In Accept edits mode, Claude can run most shell commands and make most file edits in most cloud sessions without asking. Bypass permissions isn't available in cloud sessions, including sessions in a [self-hosted environment](https://code.claude.com/docs/en/self-hosted-environments).
102102 
103103Enterprise admins can restrict which permission modes are available. See [enterprise configuration](#enterprise-configuration) for details.
104104 
from line 161
161161Then have users restart Desktop to make sure that the setting applies, and tell them what to expect:
162162 
163163* **SSH and WSL files they open in the Browser pane**: the preview doesn't run scripts, so charts and tables that scripts draw stay empty
164* **Browser pane previews that are running scripts**: if Desktop picks up the setting before the restart, they close. Users see `This preview closed because scripts are turned off for previews. Open the file again to view it without scripts.`
164* **Browser pane previews that are running scripts**: if Desktop picks up the setting before the restart, they close. Users see a message that starts `This preview closed because scripts are turned off for previews.`
165165* **SSH and WSL files they open in the file pane**: an HTML file shows as code in place of its preview. Users see `HTML preview isn’t available here, so this file is shown as code.`
166166* **Files they export**: if a user [exports a file](#preview-html-files-in-ssh-and-wsl-sessions) and opens it in a browser, its scripts run there, with or without this setting
167167 
from line 674
674674> * **Connectors is grayed out in a WSL session**: see [If the terminal or connectors are unavailable](https://code.claude.com/docs/en/desktop-wsl.md#check-for-the-terminal-and-connectors)
675675> * **Cloud sessions**: see [How connectors reach Claude Code](https://code.claude.com/docs/en/mcp.md#how-connectors-reach-claude-code)
676676 
677Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session. To manage or disconnect connectors, click **Customize** in the sidebar and open **Connectors**. If the sidebar shows **Plugins** instead, click it and look under **Your plugins**.
677Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session. To manage or disconnect connectors, click **Customize** or **Plugins** in the sidebar and open the **Connectors** tab. If you don't see a **Connectors** tab, find your connectors in the **Your plugins** section.
678678 
679679For integrations not in the connector directory, add MCP servers manually via [settings files](https://code.claude.com/docs/en/mcp.md#installing-mcp-servers). You can also [create custom connectors](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp).
680680 
from line 2440
24402440>
24412441> Check the `forceLoginOrgUUID` value before you deploy it. If the ID isn't your organization's, people in your organization can't use Claude Desktop unless they also belong to an organization with that ID. To recover, deploy the correct ID and have them restart Claude Desktop.
24422442 
2443If you set `forceLoginMethod` and `forceLoginOrgUUID` in Claude Code's [managed settings](https://code.claude.com/docs/en/managed-settings.md), you don't change the Claude Desktop sign-in screen. A person can still use Claude Desktop with their own Claude API key or [Claude Console account](https://claude.com/docs/third-party/claude-desktop/claude-api#which-devices-offer-the-claude-api-account-sign-in), and run Code tab sessions that way.
2443If you set the `forceLoginMethod` and `forceLoginOrgUUID` keys only in Claude Code's [managed settings](https://code.claude.com/docs/en/managed-settings.md), a developer who already uses a Claude API key or [Claude Console account](https://claude.com/docs/third-party/claude-desktop/claude-api#which-devices-offer-the-claude-api-account-sign-in) in Claude Desktop can keep running Code tab sessions with it.
24442444 
2445To stop that, also deploy `forceLoginOrgUUID` in the Claude Desktop policy (in `HKLM` on Windows), with your claude.ai organization ID. Unless the policy itself [selects the Claude API](https://claude.com/docs/third-party/claude-desktop/claude-api#choose-an-authentication-approach), Claude Desktop stops using a person's own API key or Console account at the app's next launch.
2445To require developers to sign in to Claude Desktop with your claude.ai organization, also deploy `forceLoginOrgUUID` in the Claude Desktop policy (in `HKLM` on Windows), with your organization ID. Unless the policy itself [selects the Claude API](https://claude.com/docs/third-party/claude-desktop/claude-api#choose-an-authentication-approach), Claude Desktop stops using a developer's API key or Console account at the app's next launch.
24462446 
24472447Check three cases before you deploy it:
24482448 
from line 2622
26222622 
26232623| Feature | CLI | Desktop |
26242624| - | - | - |
2625| Permission modes | All modes including `dontAsk` | Manual, Accept edits, Plan, and Auto. Bypass permissions appears in the mode selector once enabled: through the Settings toggle on Pro, Max, and Ultra plans, or through organization policy on Team and Enterprise plans |
2625| Permission modes | All modes including `dontAsk` | Manual, Accept edits, Plan, and Auto. Bypass permissions can also appear on Team and Enterprise plans. To keep it off there, set `permissions.disableBypassPermissionsMode` to `"disable"` in [managed settings](#managed-settings). On Pro, Max, and Ultra plans, enable it with the Settings toggle |
26262626| [Third-party providers](https://code.claude.com/docs/en/third-party-integrations.md) | Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry | Anthropic's API by default. For gateway routing, see [connect the desktop app to a gateway](https://code.claude.com/docs/en/llm-gateway-connect.md#desktop-app). To run the Code tab on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, or a self-hosted LLM gateway, see [Claude Desktop on 3P](https://claude.com/docs/third-party/claude-desktop/overview). |
26272627| [MCP servers](https://code.claude.com/docs/en/mcp.md) | Configure in settings files | Connectors UI for local and SSH sessions, or settings files |
26282628| [Plugins](https://code.claude.com/docs/en/plugins/overview.md) | `/plugin` command | Plugin manager UI |
from line 2804
28042804 
28052805##### Check the keys that `ssh` already trusts
28062806 
2807Rerun the same `ssh` command with `-v -S none` added. In its output, a `Server host key:` line shows a fingerprint, and the next `Host '<name>' is known` line names the machine that it belongs to. [Compare](#check-a-remote-machines-host-key) each fingerprint that you find with that machine's own.
2808 
2809* **A jump host has no `Se
2807Rerun the same `ssh` command with `-v -S none` added. In its output, a `Server host key:` line shows a fingerprint, and the next `Host '<name>' is known` line names the machine that it bel

desktop-ios-simulator Changed · +1 / -1 lines

### When Claude asks to export Xcode agent skills ### Expect a prompt to export Xcode agent skills

from line 155
155155* **Fold it yourself**: click one of the three pose buttons next to the rotate button. Hold the pointer over one to see its name: **Closed**, **Half open**, or **Open**. For an angle between those poses, move the pointer over the pose buttons, then drag the slider that appears above them.
156156* **Ask Claude to fold it**: ask for one of the three poses, or for a half-open hinge angle from 1 to 179 degrees.
157157 
158### Expect a prompt to export Xcode agent skills
158### When Claude asks to export Xcode agent skills
159159 
160160Before a layout check on an iPhone Duo, Claude may ask whether to export Xcode's agent skills to your [personal skills folder](https://code.claude.com/docs/en/skills.md#where-skills-live). These skills come with Xcode to guide coding agents, and once they're in that folder, Claude Code loads them in your other projects too. They include a skill for getting your app's layout ready for the iPhone Duo.
161161 

errors Changed · +5 / -5 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

Nothing in the body moved in this read. What changed is above.

headless Changed · +4 / -0 lines

### Change when a session compacts

from line 417
417417 
418418In place of the session ID, you can pass `--resume` the absolute path to a session's `.jsonl` [transcript file](https://code.claude.com/docs/en/sessions.md#where-transcripts-are-stored), and Claude Code continues the conversation stored in that file.
419419 
420### Change when a session compacts
421 
422If you haven't set an auto-compact window, `claude -p` and Agent SDK sessions use `auto`, a size that Anthropic tunes per model. For the size on current models, see [Compaction near 400K on a 1M model](https://code.claude.com/docs/en/model-config.md#compaction-near-400k-on-a-1m-model). To opt out of `auto`, [set the auto-compact window](https://code.claude.com/docs/en/model-config.md#set-the-auto-compact-window) in your settings.
423 
420424## Next steps
421425 
422426* [Agent SDK quickstart](https://code.claude.com/docs/en/agent-sdk/quickstart.md): build your first agent with Python or TypeScript

hooks Changed · +14 / -19 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 312
312312 
313313Matching `StopFailure` on `cloud_credential_error` requires Claude Code v2.1.267 or later, the first version that reports credential-load failures under that value rather than `server_error` or `unknown`.
314314 
315For most events, Claude Code evaluates the matcher against a field from the [JSON input](#hook-input-and-output) it sends to your hook on stdin. For tool events, that field is `tool_name`. For `PreModelSwitch` and `PostModelSwitch`, Claude Code evaluates the matcher against the canonical name it derives from `to_model`, as described under [PreModelSwitch](#premodelswitch). Each [hook event](#hook-events) section lists the full set of matcher values and the input schema for that event.
315For most events, Claude Code evaluates the matcher against a field from the [JSON input](#hook-input-and-output) it sends to your hook on stdin. On tool events, that field is `tool_name`. For `PreModelSwitch` and `PostModelSwitch`, Claude Code evaluates the matcher against the canonical name it derives from the `to_model` field, as described under [PreModelSwitch](#premodelswitch). Each [hook event](#hook-events) section lists the matcher values and the input schema for that event.
316316 
317317This example runs a linting script only when Claude writes or edits a file:
318318 
from line 1282
12821282 
12831283### SessionStart
12841284 
1285Runs when Claude Code starts a new session or resumes an existing session. Useful for loading development context like existing issues or recent changes to your codebase, or setting up environment variables. For static context that doesn't require a script, use [CLAUDE.md](https://code.claude.com/docs/en/memory.md) instead.
1285Runs when Claude Code starts a new session or resumes an existing session. Useful for loading development context like existing issues or recent changes to your codebase, or setting up environment variables.
12861286 
1287SessionStart runs on every session, so keep these hooks fast. Only `type: "command"` and `type: "mcp_tool"` hooks are supported. See [MCP tool hook fields](#mcp-tool-hook-fields) for when `mcp_tool` hooks run.
1287Only `type: "command"` and `type: "mcp_tool"` hooks are supported. See [MCP tool hook fields](#mcp-tool-hook-fields) for when `mcp_tool` hooks run.
12881288 
12891289The matcher value corresponds to how the session was initiated:
12901290 
from line 1296
12961296| `compact` | Auto or manual compaction |
12971297| `fork` | A new session forked from an existing one: `--fork-session` with `--resume` or `--continue`, the `/fork` background copy, `/branch`, or a conversation you [move to the background](https://code.claude.com/docs/en/agent-view.md#from-inside-a-session) |
12981298 
1299When you start an interactive session, resume a conversation at launch with `--continue` or `--resume`, or run `/clear`, you can type while SessionStart hooks run. A conversation you resumed at launch appears without waiting for the hooks. When you run `/resume` inside a terminal session, you see the resumed conversation after its synchronous hooks finish. SessionStart hooks are [synchronous by default](#run-hooks-in-the-background).
1299After you start a terminal session or run `/clear` in one, Claude Code sends your prompt once the [synchronous](#run-hooks-in-the-background) SessionStart hooks finish, so Claude has their context. To take the prompt back into the input while it waits, press `Esc`.
13001300 
1301While synchronous hooks are still running after launch or `/clear` in an interactive terminal session, Claude Code waits to send your prompt or discards their output:
1302 
1303* **You send a prompt**: Claude Code sends the prompt after the hooks finish, so their context reaches Claude. To take the waiting prompt back into the input, press `Esc`. The hooks keep running.
1304* **You run `/clear`**: Claude Code discards what the hooks return.
1305 
13061301If a plugin finishes loading after the session starts, your prompt can reach Claude without the context from that plugin's hooks.
13071302 
13081303#### SessionStart input
from line 2083
20882083| `permissionDecision` | `"allow"` skips the permission prompt, except for [actions no mode auto-approves](https://code.claude.com/docs/en/permission-modes.md#actions-no-mode-auto-approves) and [reads from network paths](https://code.claude.com/docs/en/permissions.md#network-paths). It doesn't skip approval for calls to [tools an Agent SDK app marks `always_ask`](https://code.claude.com/docs/en/agent-sdk/custom-tools#require-approval-for-specific-tools) either, unless the [permission mode approves the call](https://code.claude.com/docs/en/agent-sdk/typescript.md#permission-modes-that-can-approve-an-always_ask-call). `AskUserQuestion` and `ExitPlanMode` need [`updatedInput` paired with `"allow"`](#allow-with-updatedinput). For plan mode, see [Hook approvals in plan mode](https://code.claude.com/docs/en/permissions.md#hook-approvals-in-plan-mode). `"deny"` prevents the tool call. `"ask"` prompts the user to confirm. `"defer"` ends the turn so the tool can be resumed later, and requires [non-interactive mode](#defer-a-tool-call-for-later) with the `-p` flag. [Deny and ask rules](https://code.claude.com/docs/en/permissions.md#manage-permissions) are still evaluated regardless of what the hook returns |
20892084| `permissionDecisionReason` | For `"ask"`, shown to the user in the permission prompt. When Claude Code [denies the call](https://code.claude.com/docs/en/headless.md#turn-off-permission-prompts-in-unattended-runs) in a `-p` run where no one can answer that prompt, Claude reads the reason in the tool result instead. For `"deny"`, shown to Claude. For `"allow"` and `"defer"`, written to the [debug log](#debug-hooks) only |
20902085| `updatedInput` | Modifies the tool's input parameters before execution. Replaces the entire input object, so include unchanged fields alongside modified ones. Claude Code evaluates permission rules and a Bash command's [auto-background eligibility](https://code.claude.com/docs/en/tools-reference.md#foreground-commands-that-move-to-the-background) against the input your hook returns, not the input Claude sent. Combine with `"allow"` to auto-approve, or `"ask"` to show the modified input to the user. For `"defer"`, ignored. With no `permissionDecision`, [auto mode can deny the changed call](#pretooluse-updatedinput-in-auto-mode) |
2091| `additionalContext` | String added to Claude's context alongside the tool result. Ignored when `permissionDecision` is `"defer"`. See [Add context for Claude](#add-context-for-claude) |
2086| `additionalContext` | String added to Claude's context alongside the tool result. See [Add context for Claude](#add-context-for-claude) |
20922087 
20932088When multiple PreToolUse hooks return different decisions, precedence is `deny` > `defer` > `ask` > `allow`.
20942089 
from line 2610
26152610| :- | :- |
26162611| `reason` | The denial reason |
26172612 
2618When you log denials, expect text such as the following in `reason`:
2613When you log denials, you see text such as the following in the `reason` field:
26192614 
26202615* **Classifier verdict**: in most sessions, the matched [policy](https://code.claude.com/docs/en/auto-mode-config.md#fix-a-policy-denial) or rule in square brackets, such as `[Destructive or Unwanted Actions]`. See [Review denials](https://code.claude.com/docs/en/auto-mode-config.md#review-denials) for the other forms.
26212616* **[No verdict from the classifier](#permissiondenied-decision-control)**: starts with `Auto mode could not evaluate this action and is blocking it for safety`
from line 2666
26712666>
26722667> The `permission_prompt`, `idle_prompt`, `elicitation_dialog`, and `elicitation_url_dialog` types share their timing with desktop notifications, so in terminal sessions you only see them when you appear to be away from the terminal:
26732668>
2674> * Expect `permission_prompt` once you haven't typed for about six seconds. The timer starts when the permission prompt appears, and each keystroke defers it. To run a hook immediately when Claude asks for permission to use a tool, use [PermissionRequest](#permissionrequest) instead.
2675> * Expect `idle_prompt` about 60 seconds after Claude finishes responding, and only if you haven't typed since and no background agent, such as a background [subagent](https://code.claude.com/docs/en/sub-agents.md), is still running. Claude Code doesn't send `idle_prompt` while it waits for a claude.ai usage limit to reset. When the wait ends on its own, one of the `quota_auto_resume_*` types fires instead.
2676> * Expect `elicitation_dialog` for an elicitation form, or `elicitation_url_dialog` for a browser URL request, once you haven't typed for about six seconds.
2669> * `permission_prompt` fires once you haven't typed for about six seconds. The timer starts when the permission prompt appears, and each keystroke defers it. To run a hook immediately when Claude asks for permission to use a tool, use [PermissionRequest](#permissionrequest) instead.
2670> * `idle_prompt` fires about 60 seconds after Claude finishes responding, and only if you haven't typed since and no background agent, such as a background [subagent](https://code.claude.com/docs/en/sub-agents.md), is still running. Claude Code doesn't send `idle_prompt` while it waits for a claude.ai usage limit to reset. When the wait ends on its own, one of the `quota_auto_resume_*` types fires instead.
2671> * `elicitation_dialog` fires for an elicitation form, or `elicitation_url_dialog` for a browser URL request, once you haven't typed for about six seconds.
26772672>
26782673> A permission request or elicitation that arrives while another dialog is on screen keeps the same six-second timing, timed from when the request arrives. Its notification can reach you while the request still waits behind the open dialog.
26792674 
26802675Claude Code times `permission_prompt` differently in sessions where it sends permission requests to the Agent SDK's [`canUseTool` callback](https://code.claude.com/docs/en/agent-sdk/user-input), which is how Claude Desktop and the VS Code extension host Claude Code:
26812676 
2682* Expect `permission_prompt` about six seconds after Claude asks for permission. Claude Code doesn't defer it while you type.
2677* `permission_prompt` fires about six seconds after Claude asks for permission. Claude Code doesn't defer it while you type.
26832678* If you or a [PermissionRequest](#permissionrequest) hook answer sooner, Claude Code doesn't run `permission_prompt`.
26842679* Set [`CLAUDE_CODE_DISABLE_PERMISSION_PROMPT_NOTIFY_HOOKS`](https://code.claude.com/docs/en/env-vars) to `1` to turn `permission_prompt` off in these sessions.
26852680 
from line 2825
28302825 "transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
28312826 "cwd": "/Users/...",
28322827 "hook_event_name": "TaskCreated",
2833 "task_id": "task-001",
2828 "task_id": "1",
28342829 "task_subject": "Implement user authentication",
28352830 "task_description": "Add login and signup endpoints",
28362831 "teammate_name": "implementer",
from line 2881
28862881 "cwd": "/Users/...",
28872882 "permission_mode": "default",
28882883 "hook_event_name": "TaskCompleted",
2889 "task_id": "task-001",
2884 "task_id": "1",
28902885 "task_subject": "Implement user authentication",
28912886 "task_description": "Add login and signup endpoints",
28922887 "teammate_name": "implementer",
from line 3258
32633258 
32643259DirectoryAdded hooks have no decision control. They can't block the add, which has already completed when the hook runs. Claude Code discards the `continue` field from their JSON output and surfaces the rest differently per source:
32653260 
3266* `slash_command`: Claude Code delivers the hook's `systemMessage` to Claude as context on the next conversation turn, rather than showing it to you. A count of failed hooks appears in the transcript. Full failure output goes to the debug log
3261* `slash_command`: if a hook returns a `systemMessage` value or fails, Claude reads that value and the failure count, then replies without waiting for your next prompt. You see only the reply. Full failure output goes to the debug log
32673262* `register_repo_root`: Claude Code writes `systemMessage` output and failure output to the debug log only
32683263 
32693264### FileChanged
from line 3638
36433638| `prompt_cache_warm` | boolean | Whether the current model's prompt cache is likely still warm, meaning the switch forfeits it |
36443639| `cache_ttl` | string | [Prompt cache lifetime](https://code.claude.com/docs/en/prompt-caching.md#cache-lifetime) of the main conversation at the time of this switch: `"5m"` or `"1h"` |
36453640| `estimated_cache_write_usd` | number | Estimated cost in US dollars of writing `context_tokens` to the prompt cache on `to_model` at the `cache_ttl` rate, excluding the next response. The server may not need to re-cache the whole context, so treat it as an estimate |
3646| `pricing` | string | How Claude Code priced `estimated_cache_write_usd`: `"configured"` at your organization's own rates when it has configured them, `"catalog"` at list price, or `"
3641| `pricing` | string | How Claude Code priced `estimated_cache_write_usd`: `"configured"` at your organization's own rates when it has configured them, `"catalog"` at list price, or `"default"` when `to_model` has no known price and Claude Code assumed a default rate |
3642 
3643This example shows the input for `/model opus` in a session running Sonnet 5:
3644 
3645```json theme={null}
3646{
3647 "session_id": "abc123",
3648 "transcript_path": "/Users/.../.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
3649 "cwd": "/Users/...",
3650 "hook_event_name": "PreModelSwitch",
3651 "from_model": "claude-sonnet-5",
3652 "to_model": "claude-opus-5",
3653 "requested_model": "opus",
3654 "source": "command",
3655 "context_tokens": 182340,
3656 "prompt_cache_warm": true,
3657 "cache_ttl": "5m",
3658 "estimated_cache_write_usd": 1.1396,
3659 "pricing": "catalog"
3660}
3661```
3662 
3663#### PreModelSwitch decision control
3664 
3665`PreModelSwitch` hooks can cancel the switch, ask the user to confirm it, or let it proceed. Exit code 2 or a top-level `decision: "block"` cancels the switch.
3666 
3667For finer c

permission-modes Changed · +3 / -3 lines

from line 8
88 
99## Available modes
1010 
11Each mode makes a different tradeoff between convenience and oversight. The table below shows what Claude can do without a permission prompt in each mode. Manual mode appears under its config value, `default`.
11Each mode makes a different tradeoff between convenience and oversight. The table below shows what Claude can do without a permission prompt in each mode on your computer. Manual mode appears under its config value, `default`. For a cloud session, see [Switch permission modes](#switch-permission-modes).
1212 
1313| Mode | What runs without asking | Best for |
1414| :- | :- | :- |
from line 247
247247>
248248> On [claude.ai/code](https://claude.ai/code), use the mode dropdown in the row under the prompt box. In the mobile app, tap the **+** button in the prompt box, then **Permission**. Cloud sessions and Remote Control sessions offer different permission modes:
249249>
250> * **[Cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md)**: Accept edits, Plan, and Auto. Accept edits corresponds to `default` mode: cloud sessions pre-approve file edits regardless of mode, so the dropdown shows Accept edits instead of Manual. Cloud sessions still honor `defaultMode: "acceptEdits"` from settings. Auto mode appears unless your organization turns it off, and on claude.ai/code it's grayed out if the selected model doesn't [support it](#eliminate-prompts-with-auto-mode). Bypass permissions isn't available.
250> * **[Cloud sessions](https://code.claude.com/docs/en/claude-code-on-the-web.md)**: Accept edits, Plan, and Auto. In Accept edits mode, Claude can run most shell commands and make most file edits in most cloud sessions without asking. Cloud sessions honor `defaultMode: "acceptEdits"` from settings. Auto mode appears unless your organization turns it off, and on claude.ai/code it's grayed out if the selected model doesn't [support it](#eliminate-prompts-with-auto-mode). Bypass permissions isn't available.
251251> * **[Remote Control](https://code.claude.com/docs/en/remote-control.md) sessions** on your local machine: Manual, Accept edits, Plan, and Auto for a session you started yourself, and you can't select Bypass permissions from the app. To use Auto, the session has to meet the auto mode [availability requirements](#eliminate-prompts-with-auto-mode). For a project thread running on your computer, see [Run a thread on your own computer](https://code.claude.com/docs/en/claude-projects.md#run-a-thread-on-your-own-computer).
252252> * Except for Bypass permissions, the dropdown shows the permission mode the local session is in, including one set from the terminal. It updates when the permission mode changes in the app or in the terminal.
253253> * Sessions hosted by the [desktop app](https://code.claude.com/docs/en/desktop.md) or the [VS Code extension](https://code.claude.com/docs/en/vs-code.md) report permission mode changes to claude.ai as they happen, the same as sessions hosted in a terminal.
from line 260
260260 
261261## Auto-approve file edits with acceptEdits mode
262262 
263`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active.
263`acceptEdits` mode lets Claude create and edit files in your working directory without prompting. The status bar shows `⏵⏵ accept edits on` while this mode is active. This section covers sessions on your computer. For a cloud session, see [Switch permission modes](#switch-permission-modes).
264264 
265265In addition to file edits, `acceptEdits` mode auto-approves common filesystem Bash commands: `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp`, and `sed`. Except for `touch`, these commands are also auto-approved when prefixed with safe environment variables such as `LANG=C` or `NO_COLOR=1`, or process wrappers such as `timeout`, `nice`, or `nohup`. Like file edits, auto-approval applies only to paths inside your working directory or `additionalDirectories`.
266266 

sandboxing Changed · +10 / -10 lines

### 0-byte read-only files appear in your project ### 0-byte read-only files appear at `.claude` settings paths, and "Yes, and don't ask again" doesn't save

from line 306
306306}
307307```
308308 
309If you placed the same configuration in `~/.claude/settings.json`, `.` would resolve to `~/.claude` instead, and project files would remain blocked by the `denyRead` rule.
309If you put this configuration in `~/.claude/settings.json`, the `.` entry resolves to `~/.claude` instead of the project root.
310310 
311311To deny sandboxed commands read access to home directories and mounted volumes while keeping the working directories readable, set [`permissions.blockReadsOutsideWorkingDirectories`](https://code.claude.com/docs/en/settings-reference#permissions-blockreadsoutsideworkingdirectories) instead of writing path rules.
312312 
from line 364
364364}
365365```
366366 
367The sandbox has two independent layers: [filesystem isolation](#filesystem-isolation) controls which paths sandboxed commands can read and write, and [network isolation](#network-isolation) controls which domains they can reach. With the filesystem layer off, sandboxed commands get unrestricted read and write access to the host filesystem, while their network egress stays confined to your allowed domains. Turn the layer off when you sandbox to control where commands connect rather than what they write.
367The sandbox has two independent layers: [filesystem isolation](#filesystem-isolation) controls which paths sandboxed commands can read and write, and [network isolation](#network-isolation) controls which domains they can reach. With the filesystem layer off, sandboxed commands get unrestricted read and write access to the host filesystem.
368368 
369369`sandbox.filesystem.disabled` defaults to `false`.
370370 
from line 690
690690| `Edit` allow rules | Grant write access to specific paths, the same way `sandbox.filesystem.allowWrite` does |
691691| `Read` and `Edit` deny rules | Block access to specific files or directories |
692692| `WebFetch(domain:...)` allow and deny rules | Control domain access |
693| Sandbox `allowedDomains` | Controls which domains Bash commands can reach |
693| Sandbox `allowedDomains` | Pre-allows domains for sandboxed commands |
694694| Sandbox `deniedDomains` | Blocks specific domains even when a broader `allowedDomains` wildcard would otherwise permit them |
695695 
696696Paths and domains from both sandbox settings and permission rules are merged into the final sandbox configuration.
from line 759
759759* [`allowAppleEvents`](https://code.claude.com/docs/en/settings-reference#sandbox-allowappleevents), which a repository can't turn on
760760* [`allowNestedUserNamespaces`](https://code.claude.com/docs/en/settings-reference#sandbox-allownestedusernamespaces), which a repository can't turn on
761761 
762Set `allowManagedReadPathsOnly` to `true` in managed settings so that only `allowRead` entries from managed settings are honored. 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`](https://code.claude.com/docs/en/settings-reference#sandbox-network-allowmanageddomainsonly). With `allowManagedDomainsOnly` on, only managed settings can set a [proxy port](#custom-proxy-configuration).
762Set `allowManagedReadPathsOnly` to `true` in managed settings so that only `allowRead` entries from managed settings are honored. To lock network domains to the managed values the same way, set [`allowManagedDomainsOnly`](https://code.claude.com/docs/en/settings-reference#sandbox-network-allowmanageddomainsonly). With `allowManagedDomainsOnly` on, only managed settings can set a [proxy port](#custom-proxy-configuration).
763763 
764764When managed settings configure `sandbox.filesystem` or list any `sandbox.credentials.files` entry with `"mode": "deny"`, only managed settings can set [`filesystem.disabled`](#disable-filesystem-isolation), so developers can't turn filesystem isolation off with that key. A [valid](https://code.claude.com/docs/en/settings-reference.md#invalid-credential-entries-in-managed-settings) `mask` entry doesn't lock the key. See [Which settings can disable it](#which-settings-can-disable-it).
765765 
from line 950
950950 
951951Before v2.1.310, Claude Code didn't check for this restriction at startup, so `/sandbox` didn't report it.
952952 
953### 0-byte read-only files appear at `.claude` settings paths, and "Yes, and don't ask again" doesn't save
953### 0-byte read-only files appear in your project
954954 
955955On Linux and WSL2, the sandbox holds a write denial on a file that doesn't exist yet by creating a 0-byte read-only placeholder there while a sandboxed command runs. The sandbox removes the placeholder afterward.
956956 
from line 957
957957A placeholder can stay behind in cases such as these:
958958 
959959* The session is killed before that cleanup runs, for example by SIGKILL
960* The session exits while a sandboxed command is still running
960* You [move the session to the background](https://code.claude.com/docs/en/agent-view.md#send-the-session-to-the-background) while a sandboxed background command is still running
961961 
962Later sessions bind the placeholders read-only again on every start, so a settings write such as saving a permission choice fails at a path where a placeholder remains.
962Until you delete a leftover placeholder, creating a file or folder with the same name can fail, even in a later session.
963963 
964Run `claude doctor` in your terminal to list the leftover placeholder files. The [`Sandbox mask files left behind at write-deny paths`](https://code.claude.com/docs/en/errors#stale-sandbox-mask-files-left-by-a-killed-session) warning names some of them and counts the rest. Delete each file with `rm` while no other Claude Code session is running in that project. Before v2.1.257, Claude Code left the same placeholders behind when a session was killed, without flagging them.
964To check for leftover placeholder files, run `claude doctor` in your terminal from the folder where you started the session. To delete them, follow the steps for the [`Sandbox mask files left behind at write-deny paths`](https://code.claude.com/docs/en/errors#stale-sandbox-mask-files-left-by-a-killed-session) warning. Before v2.1.257, Claude Code left the same placeholders behind when a session was killed, without flagging them.
965965 
966966### `git` over SSH fails with the sandbox on
967967 

settings-reference Changed · +7 / -7 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 190
190190| [`sandbox.excludedCommands`](#sandbox-excludedcommands) | Name commands Claude Code can run outside the [sandbox](https://code.claude.com/docs/en/sandboxing.md) | Sandbox settings | Any file |
191191| [`sandbox.failIfUnavailable`](#sandbox-failifunavailable) | Refuse to start when the [sandbox](https://code.claude.com/docs/en/sandboxing.md) can't, instead of running unsandboxed, except in an Anthropic-hosted environment | Sandbox settings | Any file |
192192| [`sandbox.filesystem`](#sandbox-filesystem) | Control which paths [sandboxed](https://code.claude.com/docs/en/sandboxing.md#filesystem-isolation) commands can read and write | Sandbox settings | Any file |
193| [`sandbox.filesystem.allowManagedReadPathsOnly`](#sandbox-filesystem-allowmanagedreadpathsonly) | Stop developers from re-opening [read paths your organization blocked](https://code.claude.com/docs/en/sandboxing.md#keep-developers-from-widening-the-policy) | Sandbox settings | Managed |
193| [`sandbox.filesystem.allowManagedReadPathsOnly`](#sandbox-filesystem-allowmanagedreadpathsonly) | Honor `allowRead` entries only from [managed settings](https://code.claude.com/docs/en/sandboxing.md#keep-developers-from-widening-the-policy) | Sandbox settings | Managed |
194194| [`sandbox.filesystem.allowRead`](#sandbox-filesystem-allowread) | Re-open reading inside a region [`denyRead`](#sandbox-filesystem-denyread) blocks | Sandbox settings | Any file |
195195| [`sandbox.filesystem.allowWrite`](#sandbox-filesystem-allowwrite) | Add paths [sandboxed](https://code.claude.com/docs/en/sandboxing.md) commands can write to | Sandbox settings | Any file |
196196| [`sandbox.filesystem.denyRead`](#sandbox-filesystem-denyread) | Block [sandboxed](https://code.claude.com/docs/en/sandboxing.md) commands from reading specific paths | Sandbox settings | Any file |
from line 335
335335* **Scope**: [`Managed`](#scopes). Claude Code ignores the key in user, project, and local settings and in `--settings`, with a warning
336336* **Type**: string, one of:
337337 * `"prefix"`: a model ID entry permits its version and any model ID that extends it with another segment
338 * `"exact"`: a model ID entry permits only the version it names, so `"claude-opus-5"` permits Opus 5 but not `claude-opus-5-5`. An entry such as `"claude-opus-4-5"` also permits its dated Anthropic model ID `claude-opus-4-5-20251101`. A family alias such as `"opus"` still permits the whole family, and `best`, `opusplan`, and `default` entries are ignored
338 * `"exact"`: a model ID entry permits only the version it names, so `"claude-opus-5"` permits Opus 5 but not `claude-opus-5-5`. An entry such as `"claude-opus-4-5"` also permits its dated Anthropic model ID `claude-opus-4-5-20251101`. A family alias such as `"opus"` still permits the whole family unless [another entry names a model in that family](https://code.claude.com/docs/en/model-config.md#merge-behavior). Claude Code ignores `best`, `opusplan`, and `default` entries
339339* **Default**: `"prefix"`
340340 
341341This example permits Opus 5 and Sonnet 5 and no later release of either:
from line 1605
16051605 
16061606### `sandbox.filesystem.allowManagedReadPathsOnly`
16071607 
1608Honor only the [`allowRead`](#sandbox-filesystem-allowread) entries that come from managed settings, so developers can't re-open read access to paths your organization blocked. Claude Code still merges `denyRead` entries from every settings scope the session loads.
1608Honor only the [`allowRead`](#sandbox-filesystem-allowread) entries that come from managed settings. Claude Code still merges `denyRead` entries from every settings scope the session loads.
16091609 
16101610* **Scope**: [`Managed`](#scopes)
16111611* **Type**: Boolean
from line 1613
16131613 * `false`: `allowRead` entries from other settings files can merge in
16141614* **Default**: `false`
16151615 
1616This blocks reads of the home directory, re-opens `~/work`, and stops developers from re-opening anything else:
1616This example blocks sandboxed commands from reading the home directory, re-opens `~/work`, and ignores `allowRead` entries from other settings files:
16171617 
16181618```json managed-settings.json theme={null}
16191619{
from line 1631
16311631 
16321632### `sandbox.filesystem.disabled`
16331633 
1634Skip 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`](#sandbox-network-alloweddomains). Use it when you sandbox to control where commands connect rather than what they write.
1634Skip filesystem isolation while keeping network isolation. Sandboxed commands get unrestricted read and write access to the host filesystem.
16351635 
16361636* **Scope**: [`User or managed`](#scopes). When managed settings configure `sandbox.filesystem` at all, or list a `sandbox.credentials.files` entry with `"mode": "deny"`, only managed settings can set it.
16371637* **Type**: Boolean
from line 1639
16391639 * `false`: filesystem isolation stays on
16401640* **Default**: `false`, so filesystem isolation stays on
16411641 
1642This leaves the filesystem open and confines network egress to GitHub and npm:
1642This leaves the filesystem open and [pre-allows](#sandbox-network-alloweddomains) GitHub and npm:
16431643 
16441644```json settings.json theme={null}
16451645{
from line 3312
33123312 
33133313### `tui`
33143314 
3315Choose the terminal UI r
3315Choose the terminal UI renderer. Use `"fullscreen"` for the flicker-free [alt-screen renderer](https://code.claude.com/docs/en/ful

admin-setup Changed · +1 / -1 lines

from line 83
8383 
8484## Decide what to enforce
8585 
86Managed settings can lock down tools, sandbox execution, restrict MCP servers and plugin sources, and control which hooks run. Each row is a control surface with the setting keys that drive it.
86Managed settings can lock down tools, turn on sandboxing, restrict MCP servers and plugin sources, and control which hooks run. Each row is a control surface with the setting keys that drive it.
8787 
8888| Control | What it does | Key settings |
8989| :- | :- | :- |

agent-sdk/secure-deployment Changed · +1 / -1 lines

from line 78
7878 
7979**How it works:**
8080 
81* **Filesystem**: Uses OS primitives (`bubblewrap` on Linux, `sandbox-exec` on macOS) to restrict read/write access to configured paths
81* **Filesystem**: Uses OS primitives (`bubblewrap` on Linux, `sandbox-exec` on macOS) to block writes outside allowed paths and reads of denied paths
8282* **Network**: Runs commands in their own network namespace (Linux) or under a Seatbelt profile (macOS) and routes their traffic through a built-in proxy that allows the configured domains. A connection to an outside host that skips the proxy fails.
8383* **Configuration**: JSON-based allowlists for domains and filesystem paths
8484 

claude-code-on-the-web Changed · +1 / -1 lines

from line 202
202202* **Using `--teleport`**: from the command line, run `claude --teleport` for an interactive session picker, or `claude --teleport <session-id>` to resume a specific session directly. [`--resume`](https://code.claude.com/docs/en/sessions#resume-a-session) reopens a conversation from this machine's local history and doesn't list cloud sessions.
203203* **Using `/teleport`**: inside an existing CLI session, run `/teleport` or `/tp` to open the same session picker without restarting Claude Code.
204204* **From `/tasks`**: run `/tasks` to see your background sessions, then press `t` to teleport into one.
205* **From claude.ai/code**: select **Open in > Terminal** from the session menu to copy a command you can paste into your terminal.
205* **From claude.ai/code**: select **Open in > Terminal (copy command)** from the session menu, then paste the command into your terminal.
206206* **From inside the cloud session**: type `/teleport` and Claude Code replies with the exact `claude --teleport <session-id>` command for that session, ready to run from a checkout of the repository.
207207 
208208When you teleport a session, Claude verifies you're in the correct repository and loads the conversation into your terminal. To get the session's branch too, check the [requirements](#teleport-requirements) and run `claude --teleport`.

claude-projects Changed · +1 / -1 lines

from line 301
301301 
302302| Context | What it carries | How you set it |
303303| :- | :- | :- |
304| Project memory | Notes Claude keeps about the project, such as requirements, decisions, and pitfalls, stored as files. Every cloud thread reads the index file `MEMORY.md` when it starts and opens the other files when it needs them | Ask Claude in the project conversation or any cloud thread to remember a requirement, a decision, or a pitfall, or to forget one. Read, edit, and delete the files in **Project settings > Memory** |
304| Project memory | Notes Claude keeps about the project, such as requirements, decisions, and pitfalls, stored as files. Every cloud thread reads the index file `MEMORY.md` when it starts and opens the other files when it needs them | Ask Claude in the project conversation or any cloud thread to remember a requirement, a decision, or a pitfall, or to forget one. Read the files, or delete any except `MEMORY.md`, in **Project settings > Memory** |
305305| Project instructions | Text sent to each new thread and to Claude in the project conversation, up to 16,000 characters. [Write project instructions](#write-project-instructions) covers what to put in it | **Project settings > Memory > Project instructions**, or ask Claude to change the instructions |
306306| Repositories, files, and environment | The repositories every cloud thread clones, the folders and files it can read under `/mnt/project-files`, and the cloud environment it runs in | Repositories and environment in **Project settings > Environment**, or ask Claude in the conversation to add a repository to the project. [Files and folders](#add-files-and-folders) from **Add context** in the project's [**Context** tab](#see-what-needs-you-in-overview) |
307307 

cli-reference Changed · +1 / -1 lines

from line 69
6969| `--autocompact <auto\|tokens>` | Set the [auto-compact window](https://code.claude.com/docs/en/model-config.md#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` |
7070| `--ax-screen-reader` | Render screen-reader friendly output: flat text without decorative borders or animations. Forces the classic renderer, so the [`tui`](https://code.claude.com/docs/en/settings-reference#tui) setting has no effect; attached [background sessions](https://code.claude.com/docs/en/agent-view.md) still render fullscreen. Takes precedence over [`CLAUDE_AX_SCREEN_READER`](https://code.claude.com/docs/en/env-vars) and the [`axScreenReader`](https://code.claude.com/docs/en/settings-reference#axscreenreader) setting. Requires Claude Code v2.1.181 or later | `claude --ax-screen-reader` |
7171| `--bare` | Minimal mode: skip auto-discovery of your hooks and of skills, custom commands, subagents, installed 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`](https://code.claude.com/docs/en/env-vars). See [bare mode](https://code.claude.com/docs/en/headless.md#start-faster-with-bare-mode) | `claude --bare -p "query"` |
72| `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` |
72| `--betas` | Beta headers to include in API requests with the `-p` flag, for API key users only | `claude -p "query" --betas context-1m-2025-08-07` |
7373| `--bg`, `--background` | Start the session as a [background agent](https://code.claude.com/docs/en/agent-view.md) 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. Checks [workspace trust](https://code.claude.com/docs/en/permissions.md#project-allow-rules-and-workspace-trust) for the directory before it starts. Can't be combined with `-p`/`--print`; see the [error reference](https://code.claude.com/docs/en/errors.md#command-line-errors) | `claude --bg "investigate the flaky test"` |
7474| `--channels` | (Research preview) MCP servers whose [channel](https://code.claude.com/docs/en/channels.md) 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` |
7575| `--chrome` | Enable [Chrome browser integration](https://code.claude.com/docs/en/chrome.md) for web automation and testing | `claude --chrome` |

cloud-environments Changed · +1 / -1 lines

from line 179
179179An Owner makes an environment available to the organization in one of two ways:
180180 
181181* **Create a shared environment**: use the **Cloud environments** page in [admin settings](https://claude.ai/admin-settings), which is also where Owners edit and archive shared environments. Each one has a name, a [network access level](#access-levels), [environment variables](#set-environment-variables) in `.env` format, and a [setup script](#setup-scripts).
182* **Share a personal environment**: open one of your own environments for editing in the environment selector, then share it from the **Who can use it** row. The environment keeps its ID, so sessions and scheduled tasks that already use it aren't affected, and every member can then see it and start sessions in it.
182* **Share a personal environment**: in the environment selector, open one of your own environments other than **Default** for editing, then share it from the **Who can use it** row. The environment keeps its ID, so sessions and scheduled tasks that already use it aren't affected, and every member can then see it and start sessions in it.
183183 
184184Owners choose the organization's [default environment](#the-default-environment) separately, at [claude.ai/admin-settings/claude-code](https://claude.ai/admin-settings/claude-code).
185185 

cross-session-messaging Changed · +1 / -1 lines

from line 276
276276}
277277```
278278 
279With this set, Claude Code asks for your approval before Claude's message to a session beyond this machine leaves, even in `bypassPermissions` mode, which skips ordinary permission prompts. A `true` from any settings scope applies, so a checked-in project file can turn the requirement on but not off. Claude Code doesn't prompt for messages between sessions on the same machine.
279With this set, Claude Code asks for your approval before Claude's message to a session beyond this machine leaves, even in `bypassPermissions` mode, which skips ordinary permission prompts. A `true` from any settings scope applies, so a checked-in project file can turn the requirement on but not off.
280280 
281281### Turn off cross-session messaging
282282 

hipaa-setup Changed · +1 / -1 lines

from line 159
159159 
160160### Restrict Claude Desktop sign-in
161161 
162If developers use the Code tab of Claude Desktop, also set `forceLoginOrgUUID` in the Claude Desktop policy, as [Restrict sign-in to your organization](https://code.claude.com/docs/en/desktop.md#restrict-sign-in-to-your-organization) describes. Deploying `forceLoginMethod` and `forceLoginOrgUUID` in managed settings doesn't change the Claude Desktop sign-in screen.
162If developers use the Code tab of Claude Desktop, also set `forceLoginOrgUUID` in the Claude Desktop policy, as [Restrict sign-in to your organization](https://code.claude.com/docs/en/desktop.md#restrict-sign-in-to-your-organization) describes. If you set it only in Claude Code's managed settings, a developer who already uses a Claude API key or Claude Console account in Claude Desktop can keep running Code tab sessions with it.
163163 
164164## Confirm the configuration on a computer
165165 

how-claude-code-works Changed · +1 / -1 lines

from line 161
161161 
162162* **Auto**: a classifier reviews most actions in the background and blocks the risky ones instead of asking you. With Claude Code v2.1.283 or later, it's the [built-in starting permission mode](https://code.claude.com/docs/en/permission-modes.md#which-mode-a-session-starts-in) for interactive terminal and VS Code sessions. On earlier versions, it's the built-in starting permission mode only on Pro, Max, Ultra, and Team plans.
163163* **Manual**: Claude asks before file edits and shell commands
164* **Accept edits**: Claude edits files and runs common filesystem commands like `mkdir` and `mv` without asking, still asks for other commands
164* **Accept edits**: Claude edits files and runs common filesystem commands like `mkdir` and `mv` without asking, and outside a cloud session still asks for other commands that aren't read-only
165165* **Plan**: Claude explores and proposes a plan without editing your source files
166166 
167167You can also allow specific commands in `.claude/settings.json` so Claude doesn't ask each time. This is useful for trusted commands like `npm test` or `git status`. Settings can be scoped from organization-wide policies down to personal preferences. See [Permissions](https://code.claude.com/docs/en/permissions.md) for details.

mcp Changed · +1 / -1 lines

from line 603
603603* Incognito chats
604604* Claude Code's [cloud scheduled tasks](https://code.claude.com/docs/en/routines.md)
605605 
606In cloud sessions and chats that have tasks, a [subagent](https://code.claude.com/docs/en/sub-agents.md)'s call can become a task too. This needs a subagent that the main conversation started and that isn't a [fork](https://code.claude.com/docs/en/sub-agents.md#fork-the-current-conversation). The subagent gets the result if the task ends within two minutes. For a longer task, expect Claude to pick up the result in the main conversation.
606In cloud sessions and chats that have tasks, a [subagent](https://code.claude.com/docs/en/sub-agents.md)'s call can become a task too. This needs a subagent that the main conversation started and that isn't a [fork](https://code.claude.com/docs/en/sub-agents.md#fork-the-current-conversation). The subagent gets the result if the task ends within two minutes. For a longer task, [the result](#mcp-task-results-in-the-cloud) goes to the main conversation.
607607 
608608#### Answer an MCP task's question in the cloud
609609 

model-config Changed · +1 / -1 lines

from line 25
2525 
2626| Model alias | Behavior |
2727| - | - |
28| **`default`** | Special value that clears any model override and reverts to the [runtime default for your account](#default-model-setting). Not itself a model alias |
28| **`default`** | With the `--model` flag or `/model` command, reverts to the [runtime default for your account](#default-model-setting) |
2929| **`best`** | Uses the same model as `opus` |
3030| **`fable`** | Uses the [Fable model for your provider](#fable-alias-resolution) for your hardest and longest-running tasks |
3131| **`sonnet`** | Uses the latest Sonnet model for daily coding tasks |

permissions Changed · +2 / -0 lines

from line 843
843843| Servers in `.mcp.json`, including ones the repository [approves in its own settings](https://code.claude.com/docs/en/mcp.md#project-server-approvals-and-workspace-trust) | Claude Code asks you before connecting them. The repository's own approvals don't count | Connected without asking, approved or not. The SDK loads them only when `settingSources` includes project settings. `claude mcp list` in the same folder still reports such a server as pending |
844844| A [`headersHelper`](https://code.claude.com/docs/en/mcp#trust-a-folder-before-its-headershelper-runs) on a server in `.mcp.json` | Not run until you accept the trust dialog, which appears again naming where the helper is declared. Claude Code connects the server with its static `headers` alone until then | Not run. Claude Code connects the server with its static `headers` alone and prints a [`headersHelper not run`](https://code.claude.com/docs/en/errors#headershelper-not-run) line per server to stderr |
845845 
846If you start a [Remote Control](https://code.claude.com/docs/en/remote-control.md) session in a subfolder of the directory `claude remote-control` serves, the `claude -p` column applies unless you trusted that subfolder or its repository.
847 
846848For the rows that need this exact folder trusted, trust it by hand: set `projects["<path>"].hasTrustDialogAccepted` to `true` in `~/.claude.json`, where `<path>` is the repository root, or the folder itself outside a repository. Claude Code prints the exact key in the debug log line for a skipped subagent hook or inline MCP server, in the stderr warning for skipped allow rules, and in the `headersHelper not run` line for a skipped helper.
847849 
848850Before you run `claude -p` in a repository you didn't write, decide what it may run on your machine:

plugins/cli-hints Changed · +1 / -1 lines

from line 116
116116 
117117## Next steps
118118 
119* [Publish and distribute a plugin](https://code.claude.com/docs/en/plugins/publish.md): the routes for distributing a plugin, including the official marketplace, which the hint requires
119* [Publish and distribute a plugin](https://code.claude.com/docs/en/plugins/publish.md): share a plugin through your own marketplace or Anthropic's directory
120120* [Plugin commands reference](https://code.claude.com/docs/en/plugins/cli-reference.md#plugin-install): the shell command that installs the same plugin outside a session
121121 
Feedback