Choose a sandbox environment
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -100,7 +100,7 @@
## Dev containers
-A dev container runs Claude Code inside a Docker container that VS Code or a compatible editor manages, with your project mounted in. You can define your own with a `.devcontainer/` directory in your repository. The claude-code repository publishes an [example dev container](</docs/en/devcontainer>) with a default-deny iptables firewall as a starting point. Copy it into your repository and adjust the firewall allowlist, base image, and pinned Claude Code version to fit your environment. Because the firewall blocks unapproved egress, a configuration like this supports running Claude Code with `--dangerously-skip-permissions` for unattended work.
+A dev container runs Claude Code inside a Docker container that VS Code or a compatible editor manages, with your project mounted in. You can define your own with a `.devcontainer/` directory in your repository. The claude-code repository publishes an [example dev container](</docs/en/devcontainer>) with a default-deny iptables firewall as a starting point. Copy it into your repository and adjust the firewall allowlist, base image, and pinned Claude Code version to fit your environment.
## Custom container
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -4,7 +4,7 @@
## Compare sandboxing approaches
-The first two approaches in the table below run on the host operating system without containers. The rest place Claude Code inside a container or virtual machine.
+The first two approaches in the table below run on the host operating system without containers. The rest use a container or virtual machine.
Approach| What is isolated| Requires Docker| Setup effort
---|---|---|---
@@ -13,9 +13,9 @@
Dev container| Full development environment| Yes| Medium
Custom container| Full development environment| Yes| Medium to high
Virtual machine| Full operating system| No| High
-Cloud sessions| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and a connected GitHub account to clone a GitHub repository
+Cloud sessions| By default, shell commands and file edits in a VM hosted by Anthropic| No| None; requires a Claude subscription, and a connected GitHub account to clone a GitHub repository
-The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
+The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. The sandbox runtime and your own container or VM put the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
Sandbox isolation reduces the impact of a breach, but it does not eliminate risk. Any approach that allows network egress can still leak data the agent can read, and any approach that mounts your project directory writable can still modify that code. Review the [security limitations](</docs/en/sandboxing#security-limitations>) before relying on a sandbox as a hard control.Isolation also does not change what is sent to the model. Your prompts and the files Claude reads are transmitted to the Anthropic API or your configured provider with or without a sandbox. See [Data usage](</docs/en/data-usage>) for what Claude Code sends and how to reduce it.
@@ -112,7 +112,7 @@
## Cloud sessions
-A [cloud session](</docs/en/claude-code-on-the-web>) runs in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires:
+By default, a [cloud session](</docs/en/claude-code-on-the-web>) runs its shell commands and file edits in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want commands to run in a VM without provisioning infrastructure, or when you delegate tasks from a device with no local development environment. It requires:
* **Subscription** : a Claude subscription
* **GitHub** : a connected GitHub account to work in a GitHub repository. When you launch from the CLI with `--cloud`, you don’t need one if Claude Code [bundles and uploads your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>)
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -25,7 +25,7 @@
You want to| Start with
---|---
-Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), configured with `/sandbox`
+Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>) in auto-allow mode, configured with `/sandbox`
Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime
Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository
Show diff (160 lines)
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -2,11 +2,7 @@
For the broader security model, see [Security](</docs/en/security>). For Agent SDK deployments, see [Secure deployment](</docs/en/agent-sdk/secure-deployment>).
-##
-
-
-
-Compare sandboxing approaches
+## Compare sandboxing approaches
The first two approaches in the table below run on the host operating system without containers. The rest place Claude Code inside a container or virtual machine.
@@ -23,11 +19,7 @@
Sandbox isolation reduces the impact of a breach, but it does not eliminate risk. Any approach that allows network egress can still leak data the agent can read, and any approach that mounts your project directory writable can still modify that code. Review the [security limitations](</docs/en/sandboxing#security-limitations>) before relying on a sandbox as a hard control.Isolation also does not change what is sent to the model. Your prompts and the files Claude reads are transmitted to the Anthropic API or your configured provider with or without a sandbox. See [Data usage](</docs/en/data-usage>) for what Claude Code sends and how to reduce it.
-##
-
-
-
-Choose an approach
+## Choose an approach
Match your goal to a row below, then read the detail section that follows.
@@ -41,19 +33,11 @@
Require isolation for every developer in your organization| Enforce isolation across an organization
Work on a native Windows host| A container or VM, or run the Bash sandbox inside WSL2
-###
-
-
-
-How isolation relates to permission modes
+### How isolation relates to permission modes
[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. The [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only shell commands, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
-##
-
-
-
-Sandboxed Bash tool
+## Sandboxed Bash tool
This option does not support native Windows. On Windows hosts, use WSL2 or one of the container or VM approaches below.
@@ -64,19 +48,11 @@
To put built-in tools, MCP servers, and hooks all behind one OS boundary, run the whole Claude Code process inside the sandbox runtime, the dev container, or a custom container.
-##
-
-
-
-Sandbox runtime
+## Sandbox runtime
The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropics/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains the session’s tools, hooks, and MCP servers as well as shell commands. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
-###
-
-
-
-Set up and launch the runtime
+### Set up and launch the runtime
On Linux and WSL2, the runtime relies on the same `bubblewrap` and `socat` packages as the built-in sandbox, plus `ripgrep`, which Claude Code bundles but the standalone runtime resolves from your PATH. Install `bubblewrap` and `socat` as described in [Set up Linux and WSL2](</docs/en/sandboxing#set-up-linux-and-wsl2>), and `ripgrep` from your distribution’s package manager. On macOS you need no additional packages. The runtime uses the built-in Seatbelt sandbox there. By default the runtime denies network access and confines writes to a small set of built-in runtime paths, so configure it before launching Claude Code through it. Put your configuration in `~/.srt-settings.json`, or in a file you pass with `--settings`. The package [README](<https://github.com/anthropics/sandbox-runtime>) documents the configuration schema. Allow write access to at least:
@@ -105,11 +81,7 @@
Claude Code starts inside the sandbox with the filesystem and network boundaries you configured. The same `srt` command works for sandboxing standalone MCP servers or other helper processes.
-###
-
-
-
-What the runtime blocks on its own
+### What the runtime blocks on its own
The runtime blocks the highest-risk writes without any configuration from you:
@@ -122,43 +94,23 @@
Your write grants still include other paths Claude Code loads configuration from, so deny those with `denyWrite`. A sandboxed session that can write them can persist hooks, permission rules, or MCP servers that run unsandboxed the next time you launch Claude Code.
-###
-
-
-
-After unattended runs
+### After unattended runs
Review the paths you kept writable. On Linux and WSL2, also review anything the session created.
-##
-
-
-
-Dev containers
+## Dev containers
A dev container runs Claude Code inside a Docker container that VS Code or a compatible editor manages, with your project mounted in. You can define your own with a `.devcontainer/` directory in your repository. The claude-code repository publishes an [example dev container](</docs/en/devcontainer>) with a default-deny iptables firewall as a starting point. Copy it into your repository and adjust the firewall allowlist, base image, and pinned Claude Code version to fit your environment. Because the firewall blocks unapproved egress, a configuration like this supports running Claude Code with `--dangerously-skip-permissions` for unattended work.
-##
-
-
-
-Custom container
+## Custom container
You can run Claude Code in any Docker or OCI container image with your own network policies, mounted volumes, and seccomp profiles. This is the most common path for organizations with existing container infrastructure or CI runners. Several managed sandbox and remote execution services can host the container for you. The same checklist applies as for any container you operate: review what is mounted writable, what credentials and tokens are reachable inside it, and what the network egress policy allows. You can layer the built-in Bash sandbox inside the container for per-command restrictions. Unprivileged containers need `enableWeakerNestedSandbox`, described in [Bubblewrap fails to start inside a container](</docs/en/sandboxing#bubblewrap-fails-to-start-inside-a-container>).
-##
-
-
-
-Virtual machine
+## Virtual machine
A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. [Docker Sandboxes](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on any host with Docker Sandboxes installed. It is a free, standalone product from Docker that does not require Docker Desktop.
-##
-
-
-
-Cloud sessions
+## Cloud sessions
A [cloud session](</docs/en/claude-code-on-the-web>) runs in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires:
@@ -167,11 +119,7 @@
See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
-##
-
-
-
-Enforce isolation across an organization
+## Enforce isolation across an organization
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:
@@ -179,11 +127,7 @@
* **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.
-##
-
-
-
-See also
+## See also
These pages cover configuration and policy details for the sandboxing approaches on this page.
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -1,4 +1,4 @@
-Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts, run it unattended, or point it at code you do not fully trust. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page compares them by what they isolate and what they require, helps you choose one for your threat model, and shows how to enforce that choice across an organization.
+Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts or run it unattended. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page compares them by what they isolate and what they require, helps you choose one for your threat model, and shows how to enforce that choice across an organization.
For the broader security model, see [Security](</docs/en/security>). For Agent SDK deployments, see [Secure deployment](</docs/en/agent-sdk/secure-deployment>).
@@ -36,7 +36,6 @@
Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), configured with `/sandbox`
Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime
Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
-Work on an untrusted repository| A dedicated virtual machine, or a [cloud session](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is not required when you launch with `claude --cloud`
Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository
Use Claude Code from a device with no local setup| A [cloud session](</docs/en/claude-code-on-the-web>), which requires a Claude subscription, and a connected GitHub account to clone a GitHub repository
Require isolation for every developer in your organization| Enforce isolation across an organization
@@ -153,7 +152,7 @@
Virtual machine
-A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when you are evaluating untrusted code, when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. [Docker Sandboxes](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on any host with Docker Sandboxes installed. It is a free, standalone product from Docker that does not require Docker Desktop.
+A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. [Docker Sandboxes](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on any host with Docker Sandboxes installed. It is a free, standalone product from Docker that does not require Docker Desktop.
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -17,7 +17,7 @@
Dev container| Full development environment| Yes| Medium
Custom container| Full development environment| Yes| Medium to high
Virtual machine| Full operating system| No| High
-Cloud sessions| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and a connected GitHub account unless you launch with `claude --cloud`
+Cloud sessions| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and a connected GitHub account to clone a GitHub repository
The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
@@ -38,7 +38,7 @@
Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
Work on an untrusted repository| A dedicated virtual machine, or a [cloud session](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is not required when you launch with `claude --cloud`
Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository
-Use Claude Code from a device with no local setup| A [cloud session](</docs/en/claude-code-on-the-web>), which requires a Claude subscription and a connected GitHub account
+Use Claude Code from a device with no local setup| A [cloud session](</docs/en/claude-code-on-the-web>), which requires a Claude subscription, and a connected GitHub account to clone a GitHub repository
Require isolation for every developer in your organization| Enforce isolation across an organization
Work on a native Windows host| A container or VM, or run the Bash sandbox inside WSL2
@@ -161,7 +161,12 @@
Cloud sessions
-A [cloud session](</docs/en/claude-code-on-the-web>) runs in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. Unless you launch from the CLI, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
+A [cloud session](</docs/en/claude-code-on-the-web>) runs in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires:
+
+ * **Subscription** : a Claude subscription
+ * **GitHub** : a connected GitHub account to work in a GitHub repository. When you launch from the CLI with `--cloud`, you don’t need one if Claude Code [bundles and uploads your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>)
+
+See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -96,11 +96,15 @@
mkdir -p ~/.claude && { [ -f ~/.claude.json ] || echo '{}' > ~/.claude.json; }
-Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
+Install the runtime globally, under a prefix outside every path you allow writes to:
- npx @anthropic-ai/sandbox-runtime claude
+ npm install -g @anthropic-ai/sandbox-runtime
-Claude Code starts inside the sandbox with the filesystem and network boundaries you configured. The same command works for sandboxing standalone MCP servers or other helper processes.
+Once the settings file is in place, launch Claude Code through the runtime from your project directory:
+
+ srt claude
+
+Claude Code starts inside the sandbox with the filesystem and network boundaries you configured. The same `srt` command works for sandboxing standalone MCP servers or other helper processes.
###
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -12,7 +12,7 @@
Approach| What is isolated| Requires Docker| Setup effort
---|---|---|---
-Sandboxed Bash tool| Bash, PowerShell, and Monitor commands and their child processes| No| Minimal on macOS; low on Linux and WSL2
+Sandboxed Bash tool| Bash, PowerShell, and Monitor tool commands and their child processes| No| Minimal on macOS; low on Linux and WSL2
Sandbox runtime| The whole Claude Code process, including file tools, MCP servers, and hooks| No| Low
Dev container| Full development environment| Yes| Medium
Custom container| Full development environment| Yes| Medium to high
@@ -58,10 +58,10 @@
This option does not support native Windows. On Windows hosts, use WSL2 or one of the container or VM approaches below.
-The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash, PowerShell, or Monitor command Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
+The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of Bash, PowerShell, and Monitor tool commands Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
* Other [built-in tools](</docs/en/tools-reference>) such as Read, Edit, and WebFetch run inside the Claude Code process and do not spawn arbitrary code. [Permission rules](</docs/en/permissions>) for path or domain gate them instead.
- * [MCP](</docs/en/mcp>) servers and [command hooks](</docs/en/hooks#command-hook-fields>) are separate processes that run unconstrained on the host.
+ * [MCP](</docs/en/mcp>) servers, [command hooks](</docs/en/hooks#command-hook-fields>), and [plugin monitors](</docs/en/plugins/components#monitors>) are separate processes that run unconstrained on the host. For other processes that run this way, see [What runs outside the sandbox](</docs/en/sandboxing#what-runs-outside-the-sandbox>).
To put built-in tools, MCP servers, and hooks all behind one OS boundary, run the whole Claude Code process inside the sandbox runtime, the dev container, or a custom container.
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -71,7 +71,7 @@
Sandbox runtime
-The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains every tool, hook, and MCP server in the session, not only shell commands. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
+The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropics/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains the session’s tools, hooks, and MCP servers as well as shell commands. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
###
@@ -79,11 +79,13 @@
Set up and launch the runtime
-On Linux and WSL2, the runtime relies on the same `bubblewrap` and `socat` packages as the built-in sandbox, plus `ripgrep`, which Claude Code bundles but the standalone runtime resolves from your PATH. Install `bubblewrap` and `socat` as described in [Set up Linux and WSL2](</docs/en/sandboxing#set-up-linux-and-wsl2>), and `ripgrep` from your distribution’s package manager. On macOS you need no additional packages. The runtime uses the built-in Seatbelt sandbox there. By default the runtime denies network access and confines writes to a small set of built-in runtime paths, so configure it before launching Claude Code through it. Put your configuration in `~/.srt-settings.json`, or in a file you pass with `--settings`. The package [README](<https://github.com/anthropic-experimental/sandbox-runtime>) documents the full configuration schema. Allow write access to at least:
+On Linux and WSL2, the runtime relies on the same `bubblewrap` and `socat` packages as the built-in sandbox, plus `ripgrep`, which Claude Code bundles but the standalone runtime resolves from your PATH. Install `bubblewrap` and `socat` as described in [Set up Linux and WSL2](</docs/en/sandboxing#set-up-linux-and-wsl2>), and `ripgrep` from your distribution’s package manager. On macOS you need no additional packages. The runtime uses the built-in Seatbelt sandbox there. By default the runtime denies network access and confines writes to a small set of built-in runtime paths, so configure it before launching Claude Code through it. Put your configuration in `~/.srt-settings.json`, or in a file you pass with `--settings`. The package [README](<https://github.com/anthropics/sandbox-runtime>) documents the configuration schema. Allow write access to at least:
* Your project directory.
* Claude Code’s configuration paths `~/.claude` and `~/.claude.json`.
- * `/tmp`, where Claude Code writes runtime files.
+ * The directory where Claude Code writes runtime files. Unless you set [`CLAUDE_CODE_TMPDIR`](</docs/en/env-vars>), that directory is:
+ * **Linux and WSL2** : `/tmp`
+ * **macOS** : `/private/tmp`. `/tmp` is a symlink to that directory, and Seatbelt checks the resolved path.
Allow the network domains your session needs:
@@ -139,7 +141,7 @@
Custom container
-You can run Claude Code in any Docker or OCI container image with your own network policies, mounted volumes, and seccomp profiles. This is the most common path for organizations with existing container infrastructure or CI runners. Several managed sandbox and remote execution services can host the container for you. The same checklist applies as for any container you operate: review what is mounted writable, what credentials and tokens are reachable inside it, and what the network egress policy allows. You can layer the built-in Bash sandbox inside the container for per-command restrictions. Unprivileged containers need the nested-sandbox setting described in [Sandboxing troubleshooting](</docs/en/sandboxing#troubleshooting>).
+You can run Claude Code in any Docker or OCI container image with your own network policies, mounted volumes, and seccomp profiles. This is the most common path for organizations with existing container infrastructure or CI runners. Several managed sandbox and remote execution services can host the container for you. The same checklist applies as for any container you operate: review what is mounted writable, what credentials and tokens are reachable inside it, and what the network egress policy allows. You can layer the built-in Bash sandbox inside the container for per-command restrictions. Unprivileged containers need `enableWeakerNestedSandbox`, described in [Bubblewrap fails to start inside a container](</docs/en/sandboxing#bubblewrap-fails-to-start-inside-a-container>).
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -112,8 +112,8 @@
* At the project root, the runtime denies `.git/hooks`, denies `.git/config` unless you set `filesystem.allowGitConfig: true`, and denies `.mcp.json`, `.claude/commands`, `.claude/agents`, and shell startup files.
* On macOS, these denies are checked when a write happens, so they also cover nested files and repositories created during the session.
* On Linux and WSL2, the runtime builds the deny list once at launch. It reliably covers the project root, makes a best-effort shallow scan for nested copies that exist at that point, and does not cover anything the session creates later, such as `git init`, `git clone`, or scaffolding. The README’s `mandatoryDenySearchDepth` section describes the scan’s exact semantics.
- * Without a valid `~/.srt-settings.json`, the runtime starts anyway, blocks network access, and confines writes to built-in runtime paths such as `/tmp/claude`, `~/.npm/_logs`, and `~/.claude/debug`. Don’t take a clean start as proof your settings loaded.
- * When you pass `--settings`, the runtime refuses to start if the file fails to load.
+ * If `~/.srt-settings.json` doesn’t exist and you don’t pass `--settings`, the runtime starts anyway. It blocks network access and confines writes to built-in runtime paths such as `/tmp/claude`, `~/.npm/_logs`, and `~/.claude/debug`. Don’t take a clean start as proof your settings loaded.
+ * If the settings file exists but is empty, unreadable, or invalid, the runtime refuses to start, whether it’s `~/.srt-settings.json` or a file you pass with `--settings`. It also refuses to start if the `--settings` file doesn’t exist.
Your write grants still include other paths Claude Code loads configuration from, so deny those with `denyWrite`. A sandboxed session that can write them can persist hooks, permission rules, or MCP servers that run unsandboxed the next time you launch Claude Code.
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -92,7 +92,7 @@
On Linux and WSL2, the runtime applies write grants only to paths that already exist. In a fresh environment, create Claude Code’s configuration paths before the first launch:
- mkdir -p ~/.claude && echo '{}' > ~/.claude.json
+ mkdir -p ~/.claude && { [ -f ~/.claude.json ] || echo '{}' > ~/.claude.json; }
Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -12,12 +12,12 @@
Approach| What is isolated| Requires Docker| Setup effort
---|---|---|---
-Sandboxed Bash tool| Bash commands and their child processes| No| Minimal on macOS; low on Linux and WSL2
+Sandboxed Bash tool| Bash, PowerShell, and Monitor commands and their child processes| No| Minimal on macOS; low on Linux and WSL2
Sandbox runtime| The whole Claude Code process, including file tools, MCP servers, and hooks| No| Low
Dev container| Full development environment| Yes| Medium
Custom container| Full development environment| Yes| Medium to high
Virtual machine| Full operating system| No| High
-Claude Code on the web| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and GitHub when you launch from the web interface
+Cloud sessions| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and a connected GitHub account unless you launch with `claude --cloud`
The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
@@ -36,9 +36,9 @@
Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), configured with `/sandbox`
Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime
Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
-Work on an untrusted repository| A dedicated virtual machine, or [Claude Code on the web](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is only required when you launch from the web interface
+Work on an untrusted repository| A dedicated virtual machine, or a [cloud session](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is not required when you launch with `claude --cloud`
Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository
-Use Claude Code from a device with no local setup| [Claude Code on the web](</docs/en/claude-code-on-the-web>), which requires a Claude subscription and a connected GitHub account
+Use Claude Code from a device with no local setup| A [cloud session](</docs/en/claude-code-on-the-web>), which requires a Claude subscription and a connected GitHub account
Require isolation for every developer in your organization| Enforce isolation across an organization
Work on a native Windows host| A container or VM, or run the Bash sandbox inside WSL2
@@ -48,7 +48,7 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. The [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. The [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only shell commands, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
@@ -58,7 +58,7 @@
This option does not support native Windows. On Windows hosts, use WSL2 or one of the container or VM approaches below.
-The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
+The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash, PowerShell, or Monitor command Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
* Other [built-in tools](</docs/en/tools-reference>) such as Read, Edit, and WebFetch run inside the Claude Code process and do not spawn arbitrary code. [Permission rules](</docs/en/permissions>) for path or domain gate them instead.
* [MCP](</docs/en/mcp>) servers and [command hooks](</docs/en/hooks#command-hook-fields>) are separate processes that run unconstrained on the host.
@@ -71,7 +71,7 @@
Sandbox runtime
-The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains every tool, hook, and MCP server in the session, not only Bash. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
+The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains every tool, hook, and MCP server in the session, not only shell commands. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
###
@@ -153,9 +153,9 @@
-Claude Code on the web
+Cloud sessions
-[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. When you launch a session from the web interface, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
+A [cloud session](</docs/en/claude-code-on-the-web>) runs in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. Unless you launch from the CLI, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead. See [Use Claude Code in the cloud](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -19,7 +19,7 @@
Virtual machine| Full operating system| No| High
Claude Code on the web| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and GitHub when you launch from the web interface
-The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts only Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
+The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
Sandbox isolation reduces the impact of a breach, but it does not eliminate risk. Any approach that allows network egress can still leak data the agent can read, and any approach that mounts your project directory writable can still modify that code. Review the [security limitations](</docs/en/sandboxing#security-limitations>) before relying on a sandbox as a hard control.Isolation also does not change what is sent to the model. Your prompts and the files Claude reads are transmitted to the Anthropic API or your configured provider with or without a sandbox. See [Data usage](</docs/en/data-usage>) for what Claude Code sends and how to reduce it.
@@ -61,7 +61,7 @@
The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
* Other [built-in tools](</docs/en/tools-reference>) such as Read, Edit, and WebFetch run inside the Claude Code process and do not spawn arbitrary code. [Permission rules](</docs/en/permissions>) for path or domain gate them instead.
- * [MCP](</docs/en/mcp>) servers and hooks are separate processes that run unconstrained on the host.
+ * [MCP](</docs/en/mcp>) servers and [command hooks](</docs/en/hooks#command-hook-fields>) are separate processes that run unconstrained on the host.
To put built-in tools, MCP servers, and hooks all behind one OS boundary, run the whole Claude Code process inside the sandbox runtime, the dev container, or a custom container.
@@ -155,7 +155,7 @@
Claude Code on the web
-[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. When you launch a session from the web interface, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead if GitHub isn’t connected. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
+[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. When you launch a session from the web interface, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
##
--- 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
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -163,7 +163,7 @@
Enforce isolation across an organization
-Individual developers can opt into any approach above. What an organization can enforce, and with which tools, depends on the approach:
+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.
* **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.
@@ -175,7 +175,7 @@
See also
-These pages cover configuration and policy details for the approaches above.
+These pages cover configuration and policy details for the sandboxing approaches on this page.
* [Sandboxing](</docs/en/sandboxing>): configure the built-in sandboxed Bash tool
* [Dev container](</docs/en/devcontainer>): the preconfigured Docker development container
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -48,15 +48,7 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. Claude Code still prompts you only for:
-
- * Explicit [ask rules](</docs/en/permissions#manage-permissions>)
- * Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>)
- * MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
- * Removals targeting `/` or your home directory
- * The [cross-session messaging safeguards](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)
-
-With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. The [actions no mode auto-approves](</docs/en/permission-modes#actions-no-mode-auto-approves>) still apply. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -155,7 +155,7 @@
Virtual machine
-A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when you are evaluating untrusted code, when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. Docker Desktop’s [sandboxes feature](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on hosts that already have Docker Desktop.
+A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when you are evaluating untrusted code, when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. [Docker Sandboxes](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on any host with Docker Sandboxes installed. It is a free, standalone product from Docker that does not require Docker Desktop.
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -48,7 +48,15 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first; you’re only prompted for explicit [ask rules](</docs/en/permissions#manage-permissions>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>), and removals targeting `/` or your home directory. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first. Claude Code still prompts you only for:
+
+ * Explicit [ask rules](</docs/en/permissions#manage-permissions>)
+ * Connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>)
+ * MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>)
+ * Removals targeting `/` or your home directory
+ * The [cross-session messaging safeguards](</docs/en/permission-modes#skip-all-checks-with-bypasspermissions-mode>)
+
+With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -48,7 +48,7 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first; you’re only prompted for explicit [ask rules](</docs/en/permissions#manage-permissions>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>), and removals targeting `/` or your home directory. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first; you’re only prompted for explicit [ask rules](</docs/en/permissions#manage-permissions>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>), and removals targeting `/` or your home directory. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
@@ -58,7 +58,7 @@
This option does not support native Windows. On Windows hosts, use WSL2 or one of the container or VM approaches below.
-The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs: Seatbelt, the built-in macOS sandbox, and [bubblewrap](<https://github.com/containers/bubblewrap>) on Linux and WSL2. By default it allows writes to the working directory and prompts the first time a command needs a new network domain. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
+The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
* Other [built-in tools](</docs/en/tools-reference>) such as Read, Edit, and WebFetch run inside the Claude Code process and do not spawn arbitrary code. [Permission rules](</docs/en/permissions>) for path or domain gate them instead.
* [MCP](</docs/en/mcp>) servers and hooks are separate processes that run unconstrained on the host.
@@ -155,7 +155,7 @@
Claude Code on the web
-[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. When you launch a session from the web interface, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead if GitHub isn’t connected. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
+[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Sessions your organization routes to a [self-hosted environment](</docs/en/self-hosted-environments>) run on infrastructure you provision instead, where isolation, egress control, and git credentials are your deployment’s responsibility. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. When you launch a session from the web interface, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead if GitHub isn’t connected. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -33,7 +33,7 @@
You want to| Start with
---|---
-Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), enabled with `/sandbox`
+Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), configured with `/sandbox`
Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime
Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
Work on an untrusted repository| A dedicated virtual machine, or [Claude Code on the web](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is only required when you launch from the web interface
@@ -48,7 +48,7 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first; you’re only prompted for explicit [ask rules](</docs/en/permissions#manage-permissions>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>), and removals targeting `/` or your home directory. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first; you’re only prompted for explicit [ask rules](</docs/en/permissions#manage-permissions>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>), and removals targeting `/` or your home directory. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. On Linux and macOS, Claude Code refuses to start with this flag when running as root, so run the container, VM, or sandbox runtime as a non-root user. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
@@ -58,7 +58,7 @@
This option does not support native Windows. On Windows hosts, use WSL2 or one of the container or VM approaches below.
-The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs: Seatbelt, the built-in macOS sandbox, and [bubblewrap](<https://github.com/containers/bubblewrap>) on Linux and WSL2. By default it allows writes to the working directory and prompts the first time a command needs a new network domain. Enable it with the `/sandbox` command. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
+The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs: Seatbelt, the built-in macOS sandbox, and [bubblewrap](<https://github.com/containers/bubblewrap>) on Linux and WSL2. By default it allows writes to the working directory and prompts the first time a command needs a new network domain. Run the `/sandbox` command to open the sandbox panel and choose a mode. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
* Other [built-in tools](</docs/en/tools-reference>) such as Read, Edit, and WebFetch run inside the Claude Code process and do not spawn arbitrary code. [Permission rules](</docs/en/permissions>) for path or domain gate them instead.
* [MCP](</docs/en/mcp>) servers and hooks are separate processes that run unconstrained on the host.
@@ -71,11 +71,59 @@
Sandbox runtime
-The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through it constrains every tool, hook, and MCP server in the session, not only Bash. The runtime is a beta research preview, and its configuration format may change as the package evolves. The runtime denies all write and network access by default, so configure it before launching Claude Code through it. In `~/.srt-settings.json`, or a file you pass with `--settings`, allow write access to at least your project directory, Claude Code’s configuration paths `~/.claude` and `~/.claude.json`, and `/tmp`, where Claude Code writes runtime files. Allow the network domains your session needs, including `api.anthropic.com` or your configured provider’s endpoint. See the package [README](<https://github.com/anthropic-experimental/sandbox-runtime>) for the full configuration schema. Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
+The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through the runtime constrains every tool, hook, and MCP server in the session, not only Bash. The runtime is a beta research preview, and its configuration format may change as the package evolves. This section covers what you configure and what the runtime enforces on its own. For deploying the runtime in Agent SDK applications, see the [secure deployment guide](</docs/en/agent-sdk/secure-deployment#sandbox-runtime>).
+
+###
+
+
+
+Set up and launch the runtime
+
+On Linux and WSL2, the runtime relies on the same `bubblewrap` and `socat` packages as the built-in sandbox, plus `ripgrep`, which Claude Code bundles but the standalone runtime resolves from your PATH. Install `bubblewrap` and `socat` as described in [Set up Linux and WSL2](</docs/en/sandboxing#set-up-linux-and-wsl2>), and `ripgrep` from your distribution’s package manager. On macOS you need no additional packages. The runtime uses the built-in Seatbelt sandbox there. By default the runtime denies network access and confines writes to a small set of built-in runtime paths, so configure it before launching Claude Code through it. Put your configuration in `~/.srt-settings.json`, or in a file you pass with `--settings`. The package [README](<https://github.com/anthropic-experimental/sandbox-runtime>) documents the full configuration schema. Allow write access to at least:
+
+ * Your project directory.
+ * Claude Code’s configuration paths `~/.claude` and `~/.claude.json`.
+ * `/tmp`, where Claude Code writes runtime files.
+
+Allow the network domains your session needs:
+
+ * `api.anthropic.com`, or your configured provider’s endpoint. On a third-party provider, keep `api.anthropic.com` as well: the WebFetch domain safety check still calls it by default unless you set `skipWebFetchPreflight: true`.
+ * `claude.ai` and `platform.claude.com`, which [OAuth sign-in and token refresh](</docs/en/network-config#network-access-requirements>) require. Runs authenticated with an API key can drop these two.
+
+On Linux and WSL2, the runtime applies write grants only to paths that already exist. In a fresh environment, create Claude Code’s configuration paths before the first launch:
+
+ mkdir -p ~/.claude && echo '{}' > ~/.claude.json
+
+Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
npx @anthropic-ai/sandbox-runtime claude
Claude Code starts inside the sandbox with the filesystem and network boundaries you configured. The same command works for sandboxing standalone MCP servers or other helper processes.
+
+###
+
+
+
+What the runtime blocks on its own
+
+The runtime blocks the highest-risk writes without any configuration from you:
+
+ * `denyWrite` takes precedence over `allowWrite`.
+ * At the project root, the runtime denies `.git/hooks`, denies `.git/config` unless you set `filesystem.allowGitConfig: true`, and denies `.mcp.json`, `.claude/commands`, `.claude/agents`, and shell startup files.
+ * On macOS, these denies are checked when a write happens, so they also cover nested files and repositories created during the session.
+ * On Linux and WSL2, the runtime builds the deny list once at launch. It reliably covers the project root, makes a best-effort shallow scan for nested copies that exist at that point, and does not cover anything the session creates later, such as `git init`, `git clone`, or scaffolding. The README’s `mandatoryDenySearchDepth` section describes the scan’s exact semantics.
+ * Without a valid `~/.srt-settings.json`, the runtime starts anyway, blocks network access, and confines writes to built-in runtime paths such as `/tmp/claude`, `~/.npm/_logs`, and `~/.claude/debug`. Don’t take a clean start as proof your settings loaded.
+ * When you pass `--settings`, the runtime refuses to start if the file fails to load.
+
+Your write grants still include other paths Claude Code loads configuration from, so deny those with `denyWrite`. A sandboxed session that can write them can persist hooks, permission rules, or MCP servers that run unsandboxed the next time you launch Claude Code.
+
+###
+
+
+
+After unattended runs
+
+Review the paths you kept writable. On Linux and WSL2, also review anything the session created.
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -17,7 +17,7 @@
Dev container| Full development environment| Yes| Medium
Custom container| Full development environment| Yes| Medium to high
Virtual machine| Full operating system| No| High
-Claude Code on the web| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription and GitHub
+Claude Code on the web| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription, and GitHub when you launch from the web interface
The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts only Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
@@ -36,7 +36,7 @@
Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), enabled with `/sandbox`
Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime
Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
-Work on an untrusted repository| A dedicated virtual machine, or [Claude Code on the web](</docs/en/claude-code-on-the-web>) if you have a Claude subscription and a connected GitHub account
+Work on an untrusted repository| A dedicated virtual machine, or [Claude Code on the web](</docs/en/claude-code-on-the-web>) if you have a Claude subscription; GitHub is only required when you launch from the web interface
Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository
Use Claude Code from a device with no local setup| [Claude Code on the web](</docs/en/claude-code-on-the-web>), which requires a Claude subscription and a connected GitHub account
Require isolation for every developer in your organization| Enforce isolation across an organization
@@ -107,7 +107,7 @@
Claude Code on the web
-[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription and a connected GitHub account, and sessions clone your repository from GitHub. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
+[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription. When you launch a session from the web interface, you also need a connected GitHub account so the sandbox can clone your repository. When you launch from the CLI with `--cloud`, Claude Code can [bundle and upload your local repository](</docs/en/claude-code-on-the-web#send-local-repositories-without-github>) instead if GitHub isn’t connected. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -71,7 +71,7 @@
Sandbox runtime
-The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through it constrains every tool, hook, and MCP server in the session, not only Bash. The runtime is a beta research preview, and its configuration format may change as the package evolves. The runtime denies all write and network access by default, so configure it before launching Claude Code through it. In `~/.srt-settings.json`, or a file you pass with `--settings`, allow write access to at least your project directory and Claude Code’s configuration paths `~/.claude` and `~/.claude.json`. Allow the network domains your session needs, including `api.anthropic.com` or your configured provider’s endpoint. See the package [README](<https://github.com/anthropic-experimental/sandbox-runtime>) for the full configuration schema. Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
+The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through it constrains every tool, hook, and MCP server in the session, not only Bash. The runtime is a beta research preview, and its configuration format may change as the package evolves. The runtime denies all write and network access by default, so configure it before launching Claude Code through it. In `~/.srt-settings.json`, or a file you pass with `--settings`, allow write access to at least your project directory, Claude Code’s configuration paths `~/.claude` and `~/.claude.json`, and `/tmp`, where Claude Code writes runtime files. Allow the network domains your session needs, including `api.anthropic.com` or your configured provider’s endpoint. See the package [README](<https://github.com/anthropic-experimental/sandbox-runtime>) for the full configuration schema. Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
npx @anthropic-ai/sandbox-runtime claude
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -48,7 +48,7 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. `--dangerously-skip-permissions` removes per-action review other than explicit [ask rules](</docs/en/permissions#manage-permissions>), so an isolation boundary is the only thing limiting what Claude can do. Always run it inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. When you pass `--dangerously-skip-permissions`, Claude acts without asking you first; you’re only prompted for explicit [ask rules](</docs/en/permissions#manage-permissions>), connector tools [your organization set to `ask`](</docs/en/mcp#organization-controls-on-connector-tools>), MCP tools marked [`requiresUserInteraction`](</docs/en/mcp#require-approval-for-a-specific-tool>), and removals targeting `/` or your home directory. With no prompts to catch mistakes, the isolation boundary you choose is what protects your system. Always run `--dangerously-skip-permissions` sessions inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -1,9 +1,4 @@
-Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts, run it unattended, or point it at code you do not fully trust. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page covers how to:
-
- * Compare the available isolation approaches by what they isolate, what they require, and how much setup is involved
- * Choose the approach that fits your goal and threat model
- * Get started with the approach you picked, from the built-in Bash sandbox to a dedicated virtual machine
- * Enforce isolation for every developer in your organization
+Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts, run it unattended, or point it at code you do not fully trust. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page compares them by what they isolate and what they require, helps you choose one for your threat model, and shows how to enforce that choice across an organization.
For the broader security model, see [Security](</docs/en/security>). For Agent SDK deployments, see [Secure deployment](</docs/en/agent-sdk/secure-deployment>).
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -53,7 +53,7 @@
How isolation relates to permission modes
-[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. `--dangerously-skip-permissions` removes per-action review entirely, so an isolation boundary is the only thing limiting what Claude can do. Always run it inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. `--dangerously-skip-permissions` removes per-action review other than explicit [ask rules](</docs/en/permissions#manage-permissions>), so an isolation boundary is the only thing limiting what Claude can do. Always run it inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
##
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -1,9 +1,3 @@
-> ## Documentation Index
->
-> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
->
-> Use this file to discover all available pages before exploring further.
-
Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts, run it unattended, or point it at code you do not fully trust. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page covers how to:
* Compare the available isolation approaches by what they isolate, what they require, and how much setup is involved
Show diff (150 lines)
--- a/sandbox-environments.md
+++ b/sandbox-environments.md
@@ -0,0 +1,147 @@
+> ## Documentation Index
+>
+> Fetch the complete documentation index at: <https://code.claude.com/docs/llms.txt>
+>
+> Use this file to discover all available pages before exploring further.
+
+Isolating Claude Code limits what a session can read, write, and reach on the network. This matters most when you let Claude work with fewer permission prompts, run it unattended, or point it at code you do not fully trust. Claude Code can run in several kinds of isolated environments, ranging from a lightweight per-command sandbox to a fully separate virtual machine. This page covers how to:
+
+ * Compare the available isolation approaches by what they isolate, what they require, and how much setup is involved
+ * Choose the approach that fits your goal and threat model
+ * Get started with the approach you picked, from the built-in Bash sandbox to a dedicated virtual machine
+ * Enforce isolation for every developer in your organization
+
+For the broader security model, see [Security](</docs/en/security>). For Agent SDK deployments, see [Secure deployment](</docs/en/agent-sdk/secure-deployment>).
+
+##
+
+
+
+Compare sandboxing approaches
+
+The first two approaches in the table below run on the host operating system without containers. The rest place Claude Code inside a container or virtual machine.
+
+Approach| What is isolated| Requires Docker| Setup effort
+---|---|---|---
+Sandboxed Bash tool| Bash commands and their child processes| No| Minimal on macOS; low on Linux and WSL2
+Sandbox runtime| The whole Claude Code process, including file tools, MCP servers, and hooks| No| Low
+Dev container| Full development environment| Yes| Medium
+Custom container| Full development environment| Yes| Medium to high
+Virtual machine| Full operating system| No| High
+Claude Code on the web| Full operating system, hosted by Anthropic| No| None; requires a Claude subscription and GitHub
+
+The [sandboxed Bash tool](</docs/en/sandboxing>) is built into Claude Code and restricts only Bash commands. Built-in file tools, MCP servers, and hooks still run directly on your host. Every other approach in the table puts the whole Claude Code process inside the isolation boundary, so file tools, MCP servers, and hooks are restricted too.
+
+Sandbox isolation reduces the impact of a breach, but it does not eliminate risk. Any approach that allows network egress can still leak data the agent can read, and any approach that mounts your project directory writable can still modify that code. Review the [security limitations](</docs/en/sandboxing#security-limitations>) before relying on a sandbox as a hard control.Isolation also does not change what is sent to the model. Your prompts and the files Claude reads are transmitted to the Anthropic API or your configured provider with or without a sandbox. See [Data usage](</docs/en/data-usage>) for what Claude Code sends and how to reduce it.
+
+##
+
+
+
+Choose an approach
+
+Match your goal to a row below, then read the detail section that follows.
+
+You want to| Start with
+---|---
+Reduce permission prompts during everyday work on your own machine| The [sandboxed Bash tool](</docs/en/sandboxing>), enabled with `/sandbox`
+Let Claude work unattended with `--dangerously-skip-permissions` or auto mode| The preconfigured [dev container](</docs/en/devcontainer>), any container or VM, or the sandbox runtime
+Isolate MCP servers and hooks as well as Bash, without Docker| The sandbox runtime
+Work on an untrusted repository| A dedicated virtual machine, or [Claude Code on the web](</docs/en/claude-code-on-the-web>) if you have a Claude subscription and a connected GitHub account
+Standardize a sandboxed environment across a team| The preconfigured [dev container](</docs/en/devcontainer>), copied into your repository
+Use Claude Code from a device with no local setup| [Claude Code on the web](</docs/en/claude-code-on-the-web>), which requires a Claude subscription and a connected GitHub account
+Require isolation for every developer in your organization| Enforce isolation across an organization
+Work on a native Windows host| A container or VM, or run the Bash sandbox inside WSL2
+
+###
+
+
+
+How isolation relates to permission modes
+
+[Permission modes](</docs/en/permission-modes>) decide whether a tool call runs and whether you are prompted first. Isolation restricts what a command can access once it runs. The two work together: when a permission mode lets actions run without asking you, an isolation boundary limits what those actions can reach. `--dangerously-skip-permissions` removes per-action review entirely, so an isolation boundary is the only thing limiting what Claude can do. Always run it inside a container, a VM, or the sandbox runtime, so that file tools, MCP servers, and hooks are also inside the boundary. [Auto mode](</docs/en/permission-modes#eliminate-prompts-with-auto-mode>) replaces the prompt with a classifier that reviews actions and blocks ones that escalate beyond the request, target unrecognized infrastructure, or appear driven by hostile content Claude read. The classifier is a per-action control, not an isolation boundary, so an isolation boundary still adds defense in depth for unattended runs, and is not required the way it is for `--dangerously-skip-permissions`. The sandboxed Bash tool on its own constrains only Bash, so it is not sufficient for fully unattended runs in either mode. You can layer approaches: running the sandboxed Bash tool inside a container or VM gives you OS-level command restrictions on top of the outer environment boundary. For how the Bash sandbox itself interacts with permission rules and modes, see [How sandboxing relates to permissions and permission modes](</docs/en/sandboxing#how-sandboxing-relates-to-permissions-and-permission-modes>).
+
+##
+
+
+
+Sandboxed Bash tool
+
+This option does not support native Windows. On Windows hosts, use WSL2 or one of the container or VM approaches below.
+
+The sandboxed Bash tool is built into Claude Code. It uses operating system primitives to restrict the filesystem and network access of every Bash command Claude runs: Seatbelt, the built-in macOS sandbox, and [bubblewrap](<https://github.com/containers/bubblewrap>) on Linux and WSL2. By default it allows writes to the working directory and prompts the first time a command needs a new network domain. Enable it with the `/sandbox` command. The [Sandboxing](</docs/en/sandboxing>) guide covers the approval modes, the default boundary, and how to widen or narrow it. The per-command sandbox does not cover everything that runs in a session:
+
+ * Other [built-in tools](</docs/en/tools-reference>) such as Read, Edit, and WebFetch run inside the Claude Code process and do not spawn arbitrary code. [Permission rules](</docs/en/permissions>) for path or domain gate them instead.
+ * [MCP](</docs/en/mcp>) servers and hooks are separate processes that run unconstrained on the host.
+
+To put built-in tools, MCP servers, and hooks all behind one OS boundary, run the whole Claude Code process inside the sandbox runtime, the dev container, or a custom container.
+
+##
+
+
+
+Sandbox runtime
+
+The [`@anthropic-ai/sandbox-runtime`](<https://github.com/anthropic-experimental/sandbox-runtime>) package wraps an entire process in the same Seatbelt or bubblewrap isolation that the built-in Bash sandbox uses. Running Claude Code through it constrains every tool, hook, and MCP server in the session, not only Bash. The runtime is a beta research preview, and its configuration format may change as the package evolves. The runtime denies all write and network access by default, so configure it before launching Claude Code through it. In `~/.srt-settings.json`, or a file you pass with `--settings`, allow write access to at least your project directory and Claude Code’s configuration paths `~/.claude` and `~/.claude.json`. Allow the network domains your session needs, including `api.anthropic.com` or your configured provider’s endpoint. See the package [README](<https://github.com/anthropic-experimental/sandbox-runtime>) for the full configuration schema. Once the settings file is in place, launch Claude Code with `npx` and pass `claude` as the command to wrap:
+
+ npx @anthropic-ai/sandbox-runtime claude
+
+Claude Code starts inside the sandbox with the filesystem and network boundaries you configured. The same command works for sandboxing standalone MCP servers or other helper processes.
+
+##
+
+
+
+Dev containers
+
+A dev container runs Claude Code inside a Docker container that VS Code or a compatible editor manages, with your project mounted in. You can define your own with a `.devcontainer/` directory in your repository. The claude-code repository publishes an [example dev container](</docs/en/devcontainer>) with a default-deny iptables firewall as a starting point. Copy it into your repository and adjust the firewall allowlist, base image, and pinned Claude Code version to fit your environment. Because the firewall blocks unapproved egress, a configuration like this supports running Claude Code with `--dangerously-skip-permissions` for unattended work.
+
+##
+
+
+
+Custom container
+
+You can run Claude Code in any Docker or OCI container image with your own network policies, mounted volumes, and seccomp profiles. This is the most common path for organizations with existing container infrastructure or CI runners. Several managed sandbox and remote execution services can host the container for you. The same checklist applies as for any container you operate: review what is mounted writable, what credentials and tokens are reachable inside it, and what the network egress policy allows. You can layer the built-in Bash sandbox inside the container for per-command restrictions. Unprivileged containers need the nested-sandbox setting described in [Sandboxing troubleshooting](</docs/en/sandboxing#troubleshooting>).
+
+##
+
+
+
+Virtual machine
+
+A dedicated virtual machine provides the strongest separation, with its own kernel and, in cloud or microVM deployments, its own virtualized hardware. Options include cloud instances, local hypervisors, and microVMs such as Firecracker. Use this approach when you are evaluating untrusted code, when your security policy requires kernel-level separation between the agent and the host, or when no host-level approach meets your compliance requirements. Docker Desktop’s [sandboxes feature](<https://docs.docker.com/ai/sandboxes/>) provides a microVM with its own Docker daemon and workspace sync, which can run Claude Code on hosts that already have Docker Desktop.
+
+##
+
+
+
+Claude Code on the web
+
+[Claude Code on the web](</docs/en/claude-code-on-the-web>) runs each session in an isolated, Anthropic-managed virtual machine. A network proxy enforces a default allowlist, and a separate proxy holds your GitHub token outside the sandbox while issuing scoped credentials for repository access inside it. Use this approach when you want full VM isolation without provisioning infrastructure yourself, or when you are delegating tasks from a device that does not have a local development environment. It requires a Claude subscription and a connected GitHub account, and sessions clone your repository from GitHub. See [Claude Code on the web](</docs/en/claude-code-on-the-web>) for plan availability and GitHub authentication options.
+
+##
+
+
+
+Enforce isolation across an organization
+
+Individual developers can opt into any approach above. 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.
+ * **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.
+
+##
+
+
+
+See also
+
+These pages cover configuration and policy details for the approaches above.
+
+ * [Sandboxing](</docs/en/sandboxing>): configure the built-in sandboxed Bash tool
+ * [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