🔍 Read the full analysis: Inside Codex: A Guide To The AI Sandbox on ThorstenMeyerAI.com
Get the latest gadgets delivered free with Prime
- Fast, free delivery on millions of items
- Prime Video, Amazon Music and more included
- Member-only deals all year
TL;DR
OpenAI has published a technical account of how Codex uses operating-system controls to restrict commands run in a developer’s existing environment. Its default profile permits project-workspace writes but blocks network access; OpenAI cautions that broad file reads and changes to local tools can still create risks.
OpenAI has described, in its original analysis of the Codex sandbox, how the Codex sandbox limits what AI-generated commands can do on a user’s computer, using operating-system security controls across macOS, Linux and Windows. The company says the default profile allows changes within a project workspace while disabling network access, but warns that the design does not prevent every harmful action, including risks from altered local software.
OpenAI says Codex uses permission profiles to define filesystem and network access for a session. In the built-in workspace profile described in its technical account, commands can write to the project workspace, while locations including .git and .codex are read-only. That arrangement is intended to support routine code edits while limiting direct changes to Git hooks and Codex configuration. The profile also allows broad filesystem reads, subject to permissions enforced by the operating system.
OpenAI says broad reads help preserve normal development workflows: compilers and other tools may need libraries, SDKs or configuration files outside a project directory. The same access can expose other local files to commands, including configuration that may contain API keys. The default profile disables network access, which OpenAI says blocks direct uploads but also prevents tasks such as downloading dependencies unless additional access is granted.
Rather than put commands in a separate virtual machine or container, Codex applies each operating system’s own sandboxing facilities to processes in the host environment, an approach relevant to developers considering workspaces for Claude and Codex on Macs. OpenAI says this can retain access to native tools, citing iOS development on a Mac, where builds and the iPhone simulator depend on Mac executables. A shared harness interface accepts a command and permission profile; when limited network access is allowed, the caller must provide a network proxy. The company also says child processes inherit restrictions, including descendants that remain active after the original process exits.
Inside the Codex sandbox
Codex limits what agent-run commands can change and where they can connect. The safeguards reduce risk while keeping work in a developer’s existing environment.
Workspace permissions
The built-in profile balances routine project work with limits on sensitive locations.
- Write files in the project workspace
- Read files broadly, subject to operating system permissions
- .git and .codex remain read-only
- Network access is disabled by default
Why use host controls?
Operating system sandboxing can keep native development tools available without recreating the setup in a container or virtual machine.
Native build tools
Mac controls can preserve access to tools used for iOS builds and the iPhone simulator.
One harness API
A common interface accepts a command and permission profile across macOS, Linux, and Windows.
What the boundary can miss
Restrictions on a command do not remove every risk from later actions on the computer.
Commands may be able to read local configuration, including files that contain API keys.
An agent could modify an installed package such as Prettier in node_modules.
An editor might run the altered package outside the original sandboxed command.
How Sandbox Limits Shape Codex Use
The controls affect how much work a coding agent can perform without asking a user to approve each individual action. Allowing writes inside a project makes routine edits more practical, while disabling network access removes a direct route for a command to send readable files to an external service. For developers and organizations, the stated design is a balance between agent autonomy and local restrictions, rather than full isolation from the host computer.
That balance matters because permitted access can still carry exposure. A command that can read beyond the workspace may encounter sensitive local material even if it cannot send that material over the network itself. And a restriction on one command does not necessarily control what happens later if that command changes software another application subsequently runs. OpenAI presents sandboxing as one layer of protection, alongside model training and alignment, rather than as a guarantee against harmful effects.
The account gives developers a clearer description of the intended boundaries, but the supplied material does not quantify how often the identified risks occur or provide an independent evaluation of the controls. Readers should distinguish OpenAI’s description of the design from evidence about how reliably it performs under real-world conditions.
Products Worth Considering

Apple AirPods Pro (1st Generation) with MagSafe Charging Case

Jackery Fridge Guard 1024Wh Backup Power Station with Mount

Jackery HomePower 3000 Portable Power Station, 3072Wh, 3600W
As an affiliate, we earn on qualifying purchases.
Why Codex Uses Host Security Controls
Developers commonly isolate programs with containers or virtual machines. OpenAI frames its alternative as a way to keep access to the host tools already used in a developer’s workflow. Reproducing a full setup in a container can require extra work, and some host-specific tools may not be available there. In the company’s example, iOS builds and the iPhone simulator rely on native Mac executables.
OpenAI says those operations could be delegated from a container back to the Mac, but delegated actions would run outside the container and require their own restrictions. Its described approach instead uses platform-specific operating-system controls behind one harness interface for three desktop platforms. The supplied account introduces a one-shot shell tool, exec_command, as an example of how Codex runs commands, but does not include the later step-by-step execution details.
Open Questions About Coverage and Testing
The supplied material does not give a publication date or establish whether the described defaults apply to every Codex product or configuration. It also does not detail how users grant exceptions on each operating system, or provide test results, incident rates or independent assessments of the sandbox’s effectiveness.
OpenAI’s example of a locally altered package raises questions the available account does not answer: whether Codex detects such changes, whether the harness can restrict specific package directories, and what protections are recommended against every form of indirect execution. The company identifies broad reads and later execution of modified tools as risks, but the supplied material does not describe how frequently they arise or how they are mitigated in practice.
Further Platform and Enterprise Guidance
OpenAI says its full technical account goes on to cover how individuals and enterprises can tailor permissions, how developers can reuse the sandbox, and how enforcement works on each platform. The supplied excerpt does not include those details, so the available information does not establish the exact steps for granting exceptions or the full set of platform-specific controls.
Readers evaluating Codex for development or organizational use can look to that guidance for configuration details, while keeping the stated limits in view. Any fuller assessment of effectiveness would also depend on evidence not included here, such as independent testing and data on how often the described indirect risks occur.
Key Questions
What does the Codex sandbox restrict?
OpenAI says permission profiles set filesystem and network access for commands Codex runs. The built-in workspace profile permits writes in the project directory, keeps locations such as .git and .codex read-only, and disables network access by default.
Can commands read files outside the project?
In the profile described by OpenAI, commands have broad filesystem read access, subject to the operating system’s permissions. That can help tools reach external libraries and configuration, but may also expose sensitive local files, including files that contain API keys.
Does the sandbox prevent every harmful action?
No. OpenAI says the sandbox is one protective layer, not a guarantee. It describes a risk in which a command changes a locally installed package that another application later runs, potentially causing effects outside the original sandboxed process.
Why does Codex use host operating-system controls?
OpenAI says this approach can preserve access to native developer tools without recreating the environment in a virtual machine or container. The company gives Mac-based iOS builds and the iPhone simulator as examples of workflows that rely on host-specific tools.
Primary source: OpenAI · via ThorstenMeyerAI.com
