Beta — OS-level Sandbox is opt-in and under active development. Behavior,
settings, and platform support may change between releases.
Default access policies (when sandbox is enabled)
| Resource | Default policy | Configurable via |
|---|---|---|
| File reads | Allow all. Only explicit denyRead entries are blocked. | sandbox.filesystem.denyRead |
| File writes | Deny all except CWD (current working directory). Additional paths can be allowed. denyWrite overrides allowWrite. | sandbox.filesystem.allowWrite, sandbox.filesystem.denyWrite |
| Network | Deny all except *.factory.ai (always allowed by default). Additional domains must be explicitly allowed. | sandbox.network.allowedDomains |
Sandbox modes
Thesandbox.mode setting selects how isolation is applied:
per-command(default) — only Droid-initiated shell commands and tool operations are sandboxed.whole-process(Linux only) — the entire Droid process is launched inside the OS sandbox, extending isolation to the main process, MCP stdio transports, and subagents.
What’s included
Per-command sandbox mode (mode: "per-command", default when enabled):
- File tools (Read, Edit, Create, LS, Grep, Glob, ApplyPatch) —
checkFileAccess()before every operation, enforcingdenyReadfor reads andallowWrite/denyWritefor writes - Execute tool — shell commands wrapped in OS sandbox (Seatbelt/bubblewrap) with network routed through SRT’s filtering proxy for domain-level control
- FetchUrl —
checkNetworkAccess()againstallowedDomains - MCP tools — fail closed (denied) under an active sandbox. MCP tool behavior is opaque (a server can read/write files, reach the network, etc.) and the protocol exposes no per-tool effect metadata, so MCP tools cannot be mapped to an enforceable sandbox policy and are blocked by the default-deny tool policy below.
- Note — the main Droid process and subagents are not isolated in this mode. Use
whole-processmode to isolate them.
mode: "whole-process", Linux only):
- At startup the entire Droid process is re-executed inside the OS sandbox, so the main process, MCP stdio transports, and subagent lifecycles all run within the configured filesystem and network boundaries
- Network requests made directly by the Droid process (not only those from the Execute tool) are filtered against
allowedDomains, with interactive domain prompts in TUI mode - Fails closed — if the secure runtime cannot be established at startup (unsupported platform, missing sandbox support, or a failed isolation check), Droid refuses to start rather than running unsandboxed
- Default access policies, filesystem and network configuration, and allow-always persistence behave the same as per-command mode
- Every registered tool declares sandbox side-effect metadata (
filesystem-read,filesystem-write,network,process,external-service,persistent-settings) - When sandbox is enabled, a tool is allowed only if every declared side effect maps to a sandbox policy handler (file access, network, or per-command Execute). Tools with an unannotated, unknown, or unhandled side effect are denied
- Tools whose effects cannot be enforced locally — such as MCP tools and connectors (
external-service) — have no handler and therefore fail closed - Tool-policy denials are non-promptable: user approval cannot bypass missing policy coverage, and these denials are not configurable via
allowWrite/allowedDomains
- Sandbox violations interrupt the agent loop with a TUI prompt, even at Auto (High) autonomy
- Three options: Allow once, Allow always (persists to settings), Deny
- For
denyWriteviolations: “Remove from deny list” option instead of “Allow always” (removes the entry fromdenyWritein settings) - For
denyReadviolations: “Remove from deny list” option instead of “Allow always” - For Execute network violations: real-time domain prompts via SRT’s proxy callback with 60s auto-deny timeout
droid exec):
- Sandbox violations are auto-denied without prompting — no hang, no user interaction required
- The agent receives a denial message and reports it in the output
- File write violations (outside CWD): adds parent directory to
sandbox.filesystem.allowWritein user settings denyWriteviolations: removes the entry fromsandbox.filesystem.denyWritedenyReadviolations: removes the entry fromsandbox.filesystem.denyRead- Domain violations: adds domain (with wildcard for 3+ part domains, e.g.
registry.npmjs.org->*.npmjs.org) tosandbox.network.allowedDomains - Changes take effect immediately in the current session
- Org-level
denyWrite/denyReadsettings cannot be overridden by user “Allow always” - Violation prompt shows “(organization policy)” when the deny comes from org settings
SANDBOXstatus indicator in footer when sandbox is enabled- “Sandbox Violation” prompt with violation details (path, domain, reason)
Settings config
denyWrite/denyRead use union merge — org denies cannot be removed downstream.
Related
- Autonomy Level — approval policy for tool risk.
- Settings — where
sandbox.*lives. - Hierarchical Settings & Org Control — how org policy merges with user settings.
- Security — broader security model for the Droid CLI.
