Sandbox Boundaries, Fewer Approval Prompts
Repeated approvals are not the only alternative to unrestricted agent access. OS-enforced filesystem and network boundaries can let routine work proceed while preserving explicit escalation outside the sandbox.
An agent that asks before every file edit or command can make a developer the bottleneck. An agent that can read any file, write anywhere, and connect to any host creates a different problem: one mistaken instruction or compromised dependency can reach far beyond the task. The useful question is not whether to approve everything or trust everything. It is where the agent should be allowed to act without asking—and what must remain outside that boundary.
In “Making Claude Code safer with sandboxing,” Anthropic describes an OS-level sandbox for Claude Code. The method is to permit routine work inside defined filesystem and network limits, while retaining user confirmation for requests that cross them. Anthropic reports an 84% reduction in permission prompts in its internal usage. That is a vendor-reported result, not an independently reproduced benchmark or a prediction for every repository.
Replace repeated consent with explicit boundaries
The source starts from a permission-based model: Claude Code is read-only by default and asks before most modifications or commands, with some safe commands automatically allowed. Repeated interruption can slow work and encourage approval fatigue. Sandboxing changes the unit of consent. Rather than deciding on every ordinary operation, a developer defines the directories and network hosts available to a process; the operating system enforces those limits.
Anthropic describes two controls. Filesystem isolation limits which directories a process can read or modify. Network isolation limits which servers it can reach. The article argues that the combination matters: network access can expose sensitive files, while filesystem access can let a compromised process alter its environment or reach credentials. This is a design rationale, not proof that every attack path is eliminated.
The implementation described uses Linux bubblewrap and macOS Seatbelt to constrain the shell and its child processes. Network traffic is routed through a proxy outside the sandbox, which applies domain restrictions and can ask for confirmation when a new domain is requested. A developer can review that request or configure stricter outbound rules. The article also describes a sandbox runtime for arbitrary processes, agents, and MCP servers. These are source-described product capabilities; they should not be generalized to other operating systems or agent tools without checking their enforcement model.
The operational rule is therefore conditional: allow routine operations only where the operating system can enforce a narrow workspace and an explicit network policy. Keep credentials and unrelated personal or production data outside that workspace. Make boundary-crossing requests visible and reviewable. A prompt saying “stay in this folder” is not equivalent to an OS-enforced filesystem boundary, and a tool allowlist is not equivalent to network isolation.
What the reported prompt reduction does—and does not—show
Anthropic reports that sandboxing reduced permission prompts by 84% in its internal usage. The article does not provide, in this account, a controlled comparison protocol, task mix, uncertainty interval, or an independently audited security outcome. The number is useful as a signal that a boundary-based design may reduce interruptions in one deployment. It does not establish that another team will see the same reduction, that fewer prompts mean more completed work, or that the sandbox prevents every prompt-injection consequence.
Prompt count is only one measure. A system could produce fewer prompts by granting too much access, by silently failing, or by shifting work to a human later. A security review should therefore examine successful task completion alongside denied boundary crossings, attempts to reach blocked paths or hosts, sensitive-data exposure, and time spent handling exceptions. Security and productivity belong in the same evaluation, but they are not interchangeable.
This also changes what “human in the loop” means. Human judgment is most valuable at policy boundaries and consequential exceptions, not necessarily at each low-risk command. That works only if boundaries are small enough to understand, exceptions are logged, and a reviewer can revoke access or stop the process. If the agent needs broad access to make progress, that is evidence to redesign the task or environment—not a reason to approve a larger boundary by default.
A bounded reconstruction to test the idea
HYPOTHESIS — not run here: compare four policies on a disposable repository and a fixed set of routine coding tasks: the existing per-action approval baseline; filesystem isolation only; network isolation only; and both controls together. Keep the model, prompts, tasks, starting state, and evaluation criteria fixed. Do not place real credentials, production data, or valuable source code in the test environment.
For each run, save the task, policy configuration, command trace, approval and denial events, final diff, test result, and elapsed time. Measure task completion and correctness, number of prompts, attempted boundary crossings, whether any prohibited read/write/network operation succeeded, and the human time needed to resolve exceptions. Use repeated tasks or randomized order to reduce the chance that a single easy task determines the result. Stop immediately if a supposedly blocked operation succeeds or sensitive material appears in an output.
The success condition is not simply “fewer prompts.” It is fewer routine interruptions without worse task quality or an increase in unsafe access, with every exception explainable from the trace. If the setup cannot reliably enforce both boundaries or cannot record what crossed them, the test cannot support a safety claim. The local result remains unknown until that experiment is actually run.
Transfer rule
Try this approach for repeatable, low-risk work when the agent can operate in a disposable, narrowly scoped workspace and its network needs can be stated in advance. Keep explicit review for new hosts, sensitive directories, production changes, and any boundary expansion. Prefer a deterministic script or human action when the task is simple, the policy is unclear, or the cost of one wrong operation is high.
For related practice, see how to turn reviewed agent feedback into reusable memory. A useful next step is to record not only what an agent changed, but which boundary permitted it and which denied action would have mattered.
Practice card
- Inputs: disposable repository, fixed task set, sandbox policy, test suite, and a trace recorder.
- Steps: run the same tasks under each policy; inspect diffs and tests; review denied and attempted boundary crossings.
- Expected artifact: policy files, command/network traces, diffs, scores, and exception notes.
- Quality check: confirm both filesystem and network restrictions are enforced by the OS and that blocked actions fail closed.
- Next iteration: narrow an overbroad directory or host rule, then rerun the same tasks before increasing autonomy.
The English and Chinese editions are companions: read the Chinese edition.
Sources
- Anthropic, “Making Claude Code safer with sandboxing”, published October 20, 2025.