Open Brain
OpenAIOfficial ReleaseOfficial Source

Inside the Codex sandbox

Codex’s sandbox applies filesystem and network limits to commands in the developer’s existing environment across macOS, Linux, and Windows. Its defaults allow workspace edits but disable network access, with broader reads that can still expose local sensitive files.

OpenAI · Nov 18, 2026
Open Source Open MarkdownOpen JSON
Source Summary

The built-in **:workspace** profile allows writes inside the workspace, keeps areas such as **.git** and **.codex** read-only, permits broad reads allowed by the OS, and disables network access. Codex applies platform sandboxing on macOS, Linux, and Windows, with child processes inheriting restrictions.

Practical Implication

When running coding agents on a developer machine, set filesystem and network permissions to match the task. For example, allow documentation access while keeping source read-only for review, or grant a limited set of network domains when dependencies are needed. Teams can define profiles and constrain choices with managed requirements.

Agent-Ready Context
The built-in **:workspace** profile allows writes inside the workspace, keeps areas such as **.git** and **.codex** read-only, permits broad reads allowed by the OS, and disables network access. Codex applies platform sandboxing on macOS, Linux, and Windows, with child processes inheriting restrictions.

When running coding agents on a developer machine, set filesystem and network permissions to match the task. For example, allow documentation access while keeping source read-only for review, or grant a limited set of network domains when dependencies are needed. Teams can define profiles and constrain choices with managed requirements.

The defaults still allow reads outside the workspace, which may include files containing API keys. Sandboxing also cannot prevent every indirect effect: the article describes malicious changes to ignored local packages being run later by an editor. The sandbox is one layer of protection, not a substitute for reviewing agent changes.
Connected Context · Feed7 Judgment

This clarifies the Codex sandbox as a configurable permission layer: teams can grant task-specific file and network access, but broad read access may expose secrets and indirect effects remain possible. It supports treating sandboxing as one part of agent safety, alongside reviewing changes and controlling what runs later.

nightly-labs/openbotOpenBot gives agents broad machine access after consent, so the sandbox guidance highlights the isolation gap that coordination controls alone do not address.Cursor Cloud Agents can now run in Vercel SandboxVercel’s per-request microVM is one execution-isolation option; this article adds the complementary point that local sandboxes can also be tuned to task permissions.Vercel AI Gateway and Vercel Sandbox now available on Hermes AgentHermes keeps model routing and sandboxed command execution independent, while this guidance explains why execution permissions must be set for the task regardless of the model gateway.Metal Sandbox: Isolated Execution and Command Scheduling for GPU Coding Agents on Apple SiliconMetal Sandbox applies isolated workspaces and command scheduling to local GPU agents; this article supplies the broader permission and indirect-effect considerations relevant to evaluating such isolation.
Context Map
infracodingsecurity#sandboxing#coding-agents
Uncertainty
The defaults still allow reads outside the workspace, which may include files containing API keys. Sandboxing also cannot prevent every indirect effect: the article describes malicious changes to ignored local packages being run later by an editor. The sandbox is one layer of protection, not a substitute for reviewing agent changes.