Data Report · RedactSure Research
Chris Sowa · Founder, RedactSure
Published
Last updated
What Does Claude Code's Sandbox Actually Isolate?
It isolates Bash commands only, with filesystem and network limits and a proxy whose allowedDomains list starts empty, while Read, Edit, Write, WebFetch, WebSearch, local MCP servers and hooks run outside it with the user's normal access. Check which tool ran each step before treating the sandbox as the boundary.

A developer turns on the sandbox in Claude Code and reads the setting as the line between the agent and the machine. The line is real, and it is narrower than the setting suggests. The sandbox is an operating-system boundary around Bash commands: the command gets a filesystem view and a network path through a local proxy, and the domains it may reach begin as an empty list. The agent's other steps do not pass through that boundary. Read, Edit and Write open files under permission rules, WebFetch and WebSearch fetch pages under their own rules, and local MCP servers and hooks run with the user's normal access.
For a team running the tool on a repository that holds customer records, the difference decides what the sandbox is evidence of. It is evidence that a shell command could not write outside the workspace or reach an unlisted host. It is not evidence about the page the agent fetched, the file the Read tool opened, or the value that reached the model. A sandbox that wraps one tool is a useful control, and the pages that describe it are specific about what it wraps.
The worked record is one step of each kind, a curl inside the sandbox and a WebFetch outside it: the first runs under the boundary, and the second returns whatever the page renders, which the model reads as the user would.
Key findings
- For the sandbox to bound what an agent can reach, the values on the page it reads would have to be replaced with consistent tokens before any model reads it, so a step that runs outside the boundary still collects a placeholder (What Is Render-Layer Tokenization?).
- It would also require real values resolving only at an approved destination, with a named person approving each consequential action and a record of what the model received, because the sandbox governs a command's reach and not the decision behind it (What Is Least Exposure?).
- Anthropic's engineering post says "effective sandboxing requires both filesystem and network isolation"; it does not describe a control over what a page fetched outside the sandbox renders to the model (Anthropic, Engineering, 2026).
- Anthropic's Sandboxing page limits the sandbox to shell commands, states that Read, Edit and Write "follow permission rules instead," and warns that "A denyRead entry doesn't stop the Read tool" (Anthropic, Sandboxing, 2026).
- A WebFetch that opens a student account summary page returns "a high-level view of your student account, including:" the total owed, holds and a payment portal, a record the sandbox does not inspect (North Carolina Central University, 2026).
- Columbia's DAPLab argues that "trustworthy agent automation cannot be solved at a single layer of the stack," which is the frame for a boundary that wraps one kind of step (Columbia University DAPLab, 2026).
What does Claude Code's sandbox isolate from the model?
Anthropic's Sandboxing page describes an operating-system sandbox around commands the agent runs through Bash. The command works inside a filesystem boundary, and its network access goes through a local proxy rather than directly to the host network. The allowedDomains list starts empty, so the first request to a new domain stops for a prompt (Anthropic, Sandboxing, 2026). The boundary is about the command's reach: which files it can touch and which hosts it can contact.
The worked record is a curl inside the sandbox. A developer asks the agent to check a vendor's API status, and the agent runs a curl against the API host. Until the host is allowed, the request stops at the prompt. Once it is allowed, the request leaves through the proxy and the command prints the response into the agent's context. The command stayed inside its filesystem boundary and reached only the host the developer allowed. The command was contained; the output it produced was not.
The distinction is the one the sandboxing record draws. The control works on the command's files and its network traffic. It does not work on what a rendered page shows the model, because WebFetch is not a Bash command and does not pass through the command boundary. That is a statement of scope, not a judgment about the control: a boundary around a process is the right shape for a command, and the wrong shape for a page (Does Sandboxing an Enterprise AI Agent Protect Your Data?).
What does the agent read outside the sandbox?
The Sandboxing page is explicit that the boundary stops at shell commands. Read, Edit, Write, WebFetch and WebSearch follow permission rules instead, and local MCP servers and hooks run with full access. The credentials block is scoped the same way: sandbox.credentials affects sandboxed Bash commands only, so a .env file that a deny entry covers for commands is still readable through the Read tool unless a permission rule denies it (Anthropic, Sandboxing, 2026). That is the gap the .env page sets out (Does Claude Code Read My .env File?).
The worked record is a WebFetch. A developer asks the agent to open a student account summary page, and the tool fetches it under its permission rules. The page returns "a high-level view of your student account, including:" the total owed, any holds and a payment portal (North Carolina Central University, 2026). The page is rendered by the site, fetched as text, and passed to the model. The sandbox does not inspect the request or the response, because neither went through a Bash command. A payment portal link on that page may be the next thing the agent clicks, and the account total is now part of what the model knows about the run.
| Step | Runs under the sandbox? | What the model receives |
|---|---|---|
| A curl through Bash | Yes: the filesystem boundary and the proxy's allowed domains | The command's output, including whatever it prints |
| A file opened with Read | No: permission rules | The file's text, when a rule permits it |
| A page opened with WebFetch | No: permission rules | The page's text, including the account total and holds |
| A local MCP server call | No: full access outside the sandbox | Whatever the server returns |
| A hook | No: full access outside the sandbox | Whatever the hook writes or prints |
What do the vendors themselves say?
Anthropic documents a boundary and a set of exceptions. The facts below come from its Claude Code sandboxing page and from its engineering post on sandboxing.
| Dimension | Anthropic, per its documentation | What a buyer should verify |
|---|---|---|
| What the sandbox covers | Shell commands run through Bash, in an operating-system sandbox | Which steps in the workflow run as Bash commands and which do not |
| Filesystem | A filesystem boundary around the command | Which paths the workflow needs, and what a write outside them would do |
| Network | A local proxy, with allowedDomains starting empty and a prompt on the first new domain | Which hosts the workflow needs, and who approves a new one |
| Credentials | sandbox.credentials affects sandboxed Bash commands only; deny or mask | Whether the same credential is also readable through the Read tool |
| Outside the boundary | Read, Edit, Write, WebFetch, WebSearch follow permission rules; local MCP servers and hooks run with full access | What each outside tool returns to the model |
| Approval and record | Not described in the pages reviewed | Who approves a command, and what record shows what the model read |
Two passages carry the scope. The engineering post explains that effective sandboxing needs both a filesystem and a network boundary, and reports that sandboxing "safely reduces permission prompts by 84%" (Anthropic, Engineering, 2026). The 84% measures the approval loop, not what a model reads; the post does not describe a control over the content of a page the agent fetches. The sandboxing page adds a rule about where the setting lives: sandbox.credentials is honored from user settings, managed settings and the --settings flag, and ignored in a repository's own settings file (Anthropic, Sandboxing, 2026). A team that writes the rule into the repository has written one that does not apply, which is the kind of detail a security review should catch before it signs off.
The pages reviewed do not name an approver for a command or a record of what the model read. Those omissions matter because the sandbox is the control a reader is most likely to treat as complete.
Where does the sandbox stop and the model begin?
The boundary ends at the command. The model decides to run the command, and the sandbox does not review that decision. The model reads pages outside the sandbox, and a page can carry an instruction the developer never wrote. When the instruction arrives, the model can turn it into a Bash command, and the sandbox then bounds what the command can reach. That order matters: the sandbox is a limit on the consequence, not a check on the instruction.
The research on model-facing defenses is not encouraging about the check. An adaptive-attack study bypassed 12 published defenses with an "attack success rate above 90% for most," many of which had reported near-zero rates (Nasr et al., 2025). A sandbox is not a prompt filter, and that is its advantage: it does not ask the model to recognize an attack. Its limit runs the other way, because it cannot tell a legitimate command from an injected one.
The remedy sits outside the model's judgment. A position paper argues that "fully autonomous AI agents should not be developed," which puts the decision to act with a person rather than with the agent's own judgment (Mitchell et al., 2025). The 2026 OWASP Top 10 for agentic applications is a peer-reviewed framework of the most critical risks for autonomous and agentic AI systems, a starting list rather than a scope statement for one product (OWASP Gen AI Security Project, 2025). What follows from both is a division of labor: the sandbox limits what a command can do, and a person decides whether the command should run.
What should a security team ask for in writing?
Five questions separate a sandbox from a data control.
| Question to ask | What the Anthropic pages answer | What to ask for |
|---|---|---|
| Which steps run inside the sandbox? | Bash commands only | A list of the workflow's steps and the tool each uses |
| What does the model receive from a rendered page? | The page's text, fetched by a tool outside the sandbox | A statement of what each fetched page returns, and whether values are replaced before the model reads it |
| Is a sandbox deny rule a file control? | No: "A denyRead entry doesn't stop the Read tool" | A permission rule for the Read tool, or the file kept out of reach |
| Who approves an action the sandbox permits? | No approver is named | A named approver for each consequential action |
| What record shows what the model read? | No record is described | A record of each screen as tokens, each action and each approval |
The last two questions are where a sandbox stops being enough. A sandbox setting is a standing rule for the tool: it applies to every Bash command in the session, and it says nothing about the task the agent is doing. Chase's business access manager is a standing rule for a person in the same way: it describes assigning employees "varying levels of access," with daily limits and a second approver on transactions under dual control (Chase, 2025). Both are useful, and both answer a different question from the one a task poses. The 2024 New York DFS letter adds the authentication condition: "Covered Entities should consider using authentication factors that can withstand AI-manipulated deepfakes" (New York State Department of Financial Services, 2024). An approver who can be impersonated is not an approver.
The credential questions have the same shape. With masking, sandboxed commands see a per-session sentinel and the proxy substitutes the real value only for hosts on injectHosts (Is It Safe to Give Claude Code My GitHub Token?). A credential the agent can use without reading it depends on that arrangement, which covers sandboxed commands and not the Read tool (Can a Coding Agent Use a Credential It Cannot Read?). A transcript records the sentinel for a masked credential, which is why the command output and the file the Read tool opens have to be considered separately (Do Claude Code Transcripts Contain My Credentials?).
The ask is one paragraph in the questionnaire: show the tool boundary, the page boundary, the approver and the record, or say which one is missing. A vendor that answers the first and skips the rest has described a sandbox.
What does a governed environment change?
A governed environment is a control class that acts where a page is rendered, before any model reads it. Values chosen by policy are replaced with consistent tokens for the whole run, so the model works on placeholders such as ACCT_001. Real values resolve only at an approved destination, at the moment of an approved action. A named person approves each consequential action, and every screen as tokens, every action and every approval is written to a record that exports to the organization's own monitoring.
For the question this page asks, the change is the layer. A sandbox bounds a process; a governed environment bounds what a model reads on a screen. The two controls answer different questions, and a team can run both: the sandbox for the command, the governed environment for the page. Its scope is the rendered page. It does not govern the terminal, the IDE, the local filesystem, direct API calls or MCP, so a curl inside a coding agent's sandbox and a file the Read tool opens stay with the sandbox and the permission rules the team configures. The control is enforced outside the model where integrated: the model receives tokens in place of the values, and because the substitution happens before the page is read, it works with any model the customer chooses. Coverage applies to supported workflows in applications that render in the governed environment.
For the Claude Code case, the boundary between a command sandbox and a render-layer control is set out in (RedactSure vs Claude Code: 2026 Comparison & Alternative).
What the record shows
Claude Code's sandbox isolates a process, not what a model reads. It gives a Bash command a filesystem view and a network path with an empty allowlist, and it prompts on the first new domain. Read, Edit, Write, WebFetch, WebSearch, local MCP servers and hooks run outside it, so a student account summary page fetched by WebFetch is rendered to the model without the sandbox seeing it. That is a real containment control for commands and a narrow one for exposure. The test is to name one agent and one task, then run a step of each kind: a command that tries an unlisted host and a fetch of a page that shows an account total. Compare what the command reached with what the model read, and write both lines down. The gap is the second line.
Methodology and limitations
This page rests on vendor documentation from Anthropic and Chase, a university knowledge-base page describing an account summary, an adaptive-attack study, a position paper, one regulator letter, one standards framework and a university lab's commentary. Public documentation read in full gives a sound view of where each product applies its control. The documentation was read between October 16, 2026 and October 22, 2026, and each Sources line carries the date for its page.
None of the products described here was tested for this page, and "not described in the pages reviewed" means the recorded pages do not cover it. Vendor features change, and the page carries its date; a release after that date is unreviewed until the same questions are asked again. The example describes a record type, a student account summary page opened by a WebFetch, not an organization. RedactSure is deploying now with enterprise and government customers. Determinations about whether a control meets a regulatory or contractual requirement belong to counsel, assessors and the organization's own security and compliance officers.
Frequently asked questions
Does the Claude Code sandbox govern what the model reads?
No. It governs Bash commands. A command runs inside a filesystem boundary and reaches the network through a local proxy whose allowed list starts empty, so the sandbox limits what that command can touch. The model's reading happens through other tools: Read, Edit, Write, WebFetch and WebSearch follow permission rules, and local MCP servers and hooks run with full access. The boundary is around one kind of step, not around the model's view of a page.
What does the model receive from a page WebFetch opens?
The page's text, including everything a reader would see. A student account summary page returns the total owed, any holds and a payment portal, and the model receives that content as the tool returns it. The fetch does not pass through the sandbox, so neither the request nor the response is inspected. If the page shows a value the workflow does not need, the model still reads it, and the run's transcript can carry it forward.
Does a sandbox deny rule stop the Read tool?
No. The documentation says a sandbox deny entry does not stop the Read tool, and that Read, Edit and Write follow permission rules instead. A deny rule placed in sandbox.credentials therefore covers sandboxed commands and leaves the file readable through Read unless a separate permission rule denies the path. A team that wants the file out of the model's reach needs both rules, and should test each route on a copy before relying on either.
What record shows what the model read?
No record of what the model read comes from the sandbox. It governs a command's access to files and the network, and its output is what the command prints. The pages reviewed do not describe a per-run record of the pages a WebFetch returned or the values those pages carried. A team that needs that record has to get it from the environment the agent runs in, or build the record alongside the run, and should ask for a sample before signing.
Who approves an action the sandbox allows?
No approver is named in the pages reviewed. The sandbox is a standing setting for the tool, and a command that fits inside it runs without a person in the loop. Approval is a separate control, and it has to be placed on the action that matters, such as a write, a submission or a payment. Ask where that approval sits, who gives it and how the approver is authenticated; a deepfake-resistant factor is the standard the New York DFS letter sets.
What should a team log before trusting the sandbox as the boundary?
Two lines: what the command reached and what the model read. Log the sandbox decision for each command, including the domain prompt and its answer, then log the page or file each outside tool returned. Compare the two before a release and after one. The first line shows the containment the sandbox provides; the second shows the exposure it leaves, which is the line a review of customer records will ask about.
How RedactSure Covers the Page Claude Code's Sandbox Does Not Read
A sandbox around Bash leaves the page an agent fetches outside the boundary, and that page is where a token is still shown in full.
The environment that enforces this is built by RedactSure, an AI agent controls, governance and data protection company.
Before: a WebFetch returns the repository settings page with the token in full, and the model reads it. Inside the governed environment: the same page renders GH_TOKEN_001 and the model works with that token throughout the run. For each task, RedactSure's Policy Planner proposes what the agent may see and what it may do, and a named person approves the rotation. Every screen as tokens, every action and every approval lands in the record.
RedactSure is deploying now with enterprise and government customers. Anthropic's own documentation says the sandbox covers shell commands only.
Everyone else controls where data can go. RedactSure controls what the AI can see.
See it on your own workflow
A token that renders into a model's context is the value a review asks about first. Bring one page your agent fetches outside the sandbox and see, with test values, what the model reads and who approves the rotation. Book a demo