ToolNavs Find Useful AI Tools
Submit Sign in
Back to AI information
OpenAI Explains the Codex Sandbox: No Containers — Native OS Mechanisms Cage the Agent

OpenAI Explains the Codex Sandbox: No Containers — Native OS Mechanisms Cage the Agent

AI information • Admin • • 0 views

On November 18, 2026, OpenAI published an official blog post that systematically breaks down the design of the Codex sandbox: when an agent runs commands, instead of moving the whole environment into a virtual machine or container, Codex calls on the native sandboxing facilities of macOS, Linux, and Windows to draw filesystem and network boundaries inside the user's existing environment. The long post lays out the defaults, the permission configuration, and the three platform implementations.

Why Not Virtual Machines and Containers

OpenAI's reasoning is practical: a developer's machine is itself a bespoke environment that is hard to reproduce inside Docker, and work like iOS development depends on native Mac toolchains — simulators and native compilers simply do not run in a container. Codex flips the approach: commands keep running on the user's machine, but each one is wrapped in the operating system's sandbox constraints, and child processes inherit the same limits — even descendants that outlive the original command cannot escape.

The default :workspace profile draws three lines: writes are allowed inside the workspace, but .git and .codex stay read-only, so code can be edited without asking at every step while repository hooks and configuration cannot be touched; reads are broadly allowed outside the workspace, because compilers and build tools need SDKs and configuration from elsewhere on the system, and locking reads down would break everyday development — the price is that sensitive files elsewhere on the machine may also be readable, such as configuration files holding API keys; and network access is off by default, which blocks data exfiltration but means operations like installing dependencies need separate approval.

Two Openings Remain Beyond the Sandbox

The post does not present the sandbox as bulletproof. OpenAI admits it cannot stop every bad outcome: an agent could plant malicious code in a locally installed copy of Prettier inside node_modules, a change that often stays invisible to Git because the directory is ignored, and the next time the editor saves a file it could execute outside the sandbox. That is why it insists on defense in depth — the sandbox guards the boundary, while training and alignment keep the model acting on the user's intent. The sandbox can also be used on its own: the codex sandbox command runs any command under a permission profile, enterprises can lock down which profiles employees may use through requirements.toml, and MCP servers are not sandboxed by default — OpenAI shows how to wrap them first, caching packages in advance and running offline.

For people who use Codex, the practical value of the post is that permission profiles can be written by hand: define a dev profile in config.toml, extend the workspace, add read-only directories, and allow network access by domain, while enterprise administrators can layer and lock down dangerous profiles. For readers who do not write code, the conclusion is simpler: letting an agent run commands on your computer and letting it run any command are now two different things — the boundary lives in configuration, not in trusting the model to behave.

Recommended Tools

More