🔍 Read the full analysis: A Closer Look At AI In The Codex Sandbox on ThorstenMeyerAI.com
Get business pricing on tech for your team
- Business-only prices and quantity discounts
- Tax-exempt purchasing
- Multiple users, one account, clear invoices
TL;DR
OpenAI has published a technical account of how Codex restricts commands running in a developer’s existing environment across macOS, Linux and Windows. The company says workspace writes can support routine coding while disabled network access limits direct uploads, but broad file reads and changes to local tools leave risks that sandboxing does not eliminate.
OpenAI has published a technical account of the Codex sandbox, explaining how it limits filesystem and network access for commands run by an AI coding agent on a user’s computer. The company says the controls, described for macOS, Linux and Windows, are meant to reduce risks such as unauthorized file changes and direct data uploads, but do not prevent every harmful action.
OpenAI says Codex applies permission profiles that specify what a command can read, write or access over a network. In the built-in workspace profile described in the account, commands can write to the project workspace while locations such as .git and .codex are read-only. That setup can let the agent edit project files without asking for approval for every change, while restricting direct edits to Git hooks and Codex configuration.
The profile allows broad filesystem reads, subject to the operating system’s own permissions. OpenAI says this is intended to support common development tasks: compilers and build tools may need libraries, SDKs and configuration files located outside the project. The tradeoff is that a command may also be able to read sensitive local files, including configuration that could contain API keys. Network access is disabled by default in the described profile; downloading dependencies or other network-dependent tasks require additional access.
Rather than run commands inside a separate virtual machine or container, Codex uses native operating-system sandboxing in the host environment. OpenAI says this preserves access to local tools, citing iOS development on a Mac, where builds and the iPhone simulator rely on Mac executables. The company describes a shared harness interface for commands and permission profiles; when limited network access is permitted, a caller must provide a network proxy. OpenAI also says child processes inherit their parent’s restrictions, including descendants that continue 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.
The Tradeoff Between Access and Isolation
The design affects how much work a coding agent can do without interrupting a user. Allowing changes inside a project directory supports routine editing and build workflows, while blocking network access by default can restrict a direct route for commands to upload files they can read. That can make the sandbox useful for development without requiring every task to run in a separate, recreated environment.
But a restriction on the command’s immediate permissions does not necessarily control what happens later. OpenAI describes a scenario in which an agent changes a locally installed package, such as a copy of Prettier in node_modules. If that directory is not tracked by Git, the alteration may not appear in a standard status check. An editor might later run the changed package when saving a file, allowing it to cause effects outside the original sandboxed process.
For developers and organizations, the account makes clear that sandbox settings are a risk-reduction layer, not a guarantee. Permission choices must balance access needed for builds against exposure of files elsewhere on the computer. OpenAI presents sandboxing alongside model training and alignment as part of a defense-in-depth approach, but the supplied material includes no independent evaluation or figures showing how often the described risks occur.
Products Worth Considering

DJI Mini 4K Drone with 4K UHD Camera

Sony WH-1000XM6 Wireless Noise-Cancelling Headphones – Midnight Blue

Apple Watch Series 12 GPS Smartwatch, 42 mm
As an affiliate, we earn on qualifying purchases.
Why Codex Uses Host Sandboxing
OpenAI frames the approach as a choice between stronger separation and practical access to an established development setup. Containers and virtual machines can isolate programs, but recreating a developer’s environment inside one may take work and may leave host-specific tools unavailable. For example, a container cannot directly run native Mac build tools or launch the iPhone simulator.
OpenAI says those operations could be delegated back to the Mac, but delegated work would run outside the container and need its own restrictions. The company says it instead invested in operating-system-specific controls exposed through a common harness across three desktop platforms. The supplied account also mentions a one-shot shell tool called exec_command, but does not include the further execution details.
OpenAI points readers to a security cookbook for enterprise guidance. The material provided for this report does not include the cookbook’s recommendations, nor does it specify whether the described defaults apply to every Codex product or configuration.
Defaults, Testing and Indirect Risks
The supplied material does not state when the account was published or whether its described defaults cover every Codex product, operating system version or configuration. It also does not give step-by-step details for granting exceptions on each platform, or test results showing how reliably the restrictions block attempted access beyond a permission profile.
OpenAI acknowledges that broad reads can expose sensitive files and that altered local tools may cause effects later. The provided account does not explain whether Codex detects such changes, whether users can restrict access to particular package directories, or what protections address every form of indirect execution. There are also no incident rates or independent assessments in the supplied material, so the real-world frequency and effectiveness of these risks cannot be established from it.
Further Platform and Permission Guidance
OpenAI says its full account discusses how end users and enterprises can tailor permissions, how developers can reuse the sandbox, and how enforcement works. Those details would help readers understand what choices are available on each platform and how the shared harness applies operating-system controls.
Until that guidance and any supporting evaluations are available, the confirmed description is limited to the stated profiles and design choices. Users and organizations considering Codex can assess whether broad reads and disabled-by-default networking fit their workflows, while treating sandboxing as one control among several rather than as a promise that all harmful effects are blocked.
Key Questions
What does the Codex sandbox restrict?
OpenAI says permission profiles govern filesystem and network access for commands. In the described workspace profile, commands can write to the project while .git and .codex remain read-only, and network access is disabled by default.
Can commands read files outside the project?
Yes. The described profile allows broad filesystem reads, subject to operating-system permissions. OpenAI says this helps development tools find resources outside a repository, but it may also expose sensitive local files, including configuration that could contain API keys.
Does the sandbox prevent every harmful action?
No. OpenAI says sandboxing is one layer of protection. Its example describes a locally installed package being altered and then run later by an editor, potentially causing effects outside the original sandboxed process.
Why does Codex use the host operating system instead of a container?
OpenAI says native operating-system controls let Codex use tools already installed in the developer’s environment. The company cites Mac-based iOS builds and the iPhone simulator as examples of workflows that may be difficult to run directly inside a separate container.
Primary source: OpenAI · via ThorstenMeyerAI.com
