Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes—but whether an AI agent can access files outside its sandbox depends on how that particular runtime is configured. A sandbox may intentionally share a host folder, expose files through tools or shared credentials, or restrict access to a private copy. Seeing a file through an intended mount is not, by itself, evidence that the agent escaped its isolation. Check the active mode, mounted paths, and tools before deciding what happened.

What “outside the sandbox” means

A sandbox is a boundary implemented by a particular product, not a universal promise that an agent cannot see any host files. Some setups expose no host workspace; others deliberately share a project folder. Custom tools, shared environments, and path relationships can also affect what the agent can reach. The right question is therefore: which files and capabilities does this runtime actually expose?

For example, Docker distinguishes mountless, direct-mount, and clone modes. The visibility and write behavior differ substantially, so first identify the mode rather than assuming that “sandboxed” means “no host access.” Docker’s filesystem documentation describes these options.

Compare the workspace modes

Mode Host workspace visibility Effect of agent writes
Mountless No host workspace is shared. No host workspace is exposed to modify.
Direct mount The mounted working tree is shared. Read-write access means changes can affect the host workspace.
Clone Repository contents are readable in a private clone. Changes stay in the clone until fetched; this separates writes, not confidentiality.

Docker says clone mode can include untracked files and files excluded by .gitignore. Do not treat a read-only host repository or a private clone as protection for secrets stored in the repository. Docker’s filesystem documentation explains the modes and their limits.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common causes of apparent outside access

The workspace is mounted intentionally

A direct mount lets the agent and host see the same workspace files, and it is read-write. That is configured sharing, not proof of a sandbox escape. Confirm which host directory is mounted and whether it is mounted read-only or read-write. Docker documents its mount modes; its sandbox overview describes the product’s sandbox model.

A shared environment or tool exposes more resources

Agents that share an environment may share files, credentials, and other resources. OpenAI’s self-hosted guide calls out this shared access and recommends keeping the application API key outside the sandbox, while limiting the environment key to the permissions needed to connect environments. OpenAI’s sandbox guide explains the distinction.

Review custom tools and MCP servers separately from the agent process. Anthropic says tools and MCP servers running inside its managed sandbox inherit worker permissions; tool access therefore depends on those permissions and should be reviewed as its own boundary. Anthropic’s secure deployment guidance covers this point.

A hard link points to the same underlying file

Docker warns that filesystem policy evaluates the workspace path. A hard link inside the workspace can therefore refer to the same underlying file as a path elsewhere, creating access or modification that may surprise someone relying only on the visible path. Check hard links when a file appears reachable despite the intended path restrictions. This is a Docker-documented behavior, not a claim about every sandbox implementation. Docker’s filesystem documentation describes it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The expected host configuration is not imported

Sometimes the problem is missing access rather than excess access. Docker says local sandboxes do not import the complete user-level configuration—for example, ~/.codex or ~/.claude—although project-level configuration remains available. Its FAQ also says a symlink to a host path cannot be followed from the sandbox. Do not assume host settings or files are present just because the project is. Docker’s sandbox FAQ covers configuration and symlink behavior.

The active launch command or permission mode differs from expectations

Verify the actual process, launch command, and effective policy. For example, Docker’s Codex sandbox template documents codex --dangerously-bypass-approvals-and-sandbox as its default startup command. That warning applies to that Docker template; it should not be generalized to every Codex installation or launch method. Docker’s template quickstart describes its setup.

Diagnose access in this order

  1. Identify the runtime. Record the exact agent product, whether it is local or cloud-based, and which sandbox implementation is active.
  2. Check the effective launch policy. Inspect the actual command and permission mode used by the running agent, not only the settings you expected it to use.
  3. Inventory mounts and shared folders. Determine which host paths are visible and whether each is mounted read-write, read-only, cloned, or not shared.
  4. Inspect the path relationship. Check whether the requested path is a mount, hard link, symlink, or another product-specific mapping. Do not assume different path names mean different underlying files.
  5. Review tools and shared resources. List custom tools, MCP servers, shared workers, and credentials the agent can use; assess their permissions independently.
  6. Match the isolation mode to the need. Use a mountless environment if the agent should not see the host workspace. Consider clone mode if it needs repository context but should not write to the host checkout, while recognizing that repository contents remain readable.
  7. Move and scope secrets deliberately. Keep sensitive credentials outside the workspace and use narrowly scoped environment credentials. OpenAI specifically advises keeping the application API key outside the sandbox and restricting the environment key to the permissions needed to connect environments. OpenAI’s sandbox guide gives its key-handling guidance.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What sandboxing does—and does not—establish

A correctly configured sandbox can limit filesystem and network access, but those controls are implementation-specific. Anthropic describes its sandbox controls as operating-system-level isolation for filesystem and network access, including scripts and subprocesses spawned by commands; it also describes configuring allowed paths and network domains. Anthropic’s position is that effective sandboxing requires both filesystem and network isolation. Anthropic’s sandboxing engineering post explains its approach.

In that same post, published October 20, 2025, Anthropic reported that its internal use of sandboxing reduced permission prompts by 84%. That is Anthropic’s internal usage result, not an independent measurement or a universal rate for AI agents. The post describes the result and its context.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.