Codex's Sandbox Uses Seatbelt, bubblewrap and MXC, and Lets Commands Read Broadly by Default
Security / explainer
Codex's Sandbox Uses Seatbelt, bubblewrap and MXC, and Lets Commands Read Broadly by Default
OpenAI's Nov. 18 engineering post says writes are confined to the workspace and the network is off, while reads stay wide open.

Codex's sandbox does not put commands in a virtual machine or a container. It restricts them inside the user's own session, on a different mechanism for each operating system, and by default it lets them read nearly everything while writing only to the project folder. OpenAI described the design on Nov. 18 in an engineering post, "Inside the Codex sandbox", written by Michael Bolin, a Member of Technical Staff.
What the default profile allows
The default is the :workspace profile. Per the OpenAI post, commands can write inside the workspace, but .git and .codex stay read-only. Broad filesystem reads are allowed. Network access is off.
The read rule deserves attention. A command run by the agent can open files outside the project, such as a home directory, while the network block is what stops them leaving the machine. That reading is ours, not OpenAI's, and the post does not discuss it.
Three operating systems, three mechanisms
| OS | Mechanism | Note from the post |
|---|---|---|
| macOS | Apple Seatbelt through /usr/bin/sandbox-exec | Man page marks it deprecated; Codex keeps using it |
| Linux | bubblewrap (bwrap) plus seccomp-bpf | Separate network namespace; vendors its own bwrap |
| Windows | Microsoft MXC library | Replaces an earlier sandbox that needed admin access |

macOS
Codex builds a policy in Sandbox Profile Language, and the base policy denies everything by default. The post says sandbox-exec is marked deprecated in its man page and that Codex plans to keep using it. That is a dependency on an interface Apple has told developers to leave, and the post gives no fallback.
Linux
Codex uses bubblewrap to build a filesystem view and a separate network namespace, then applies seccomp-bpf filters through a launcher called codex-linux-sandbox. It bundles its own bwrap but prefers a system copy when one exists.
The bubblewrap project is blunt about what it provides. Its README says it "is not a complete, ready-made sandbox with a specific security policy" and that the protection level is "entirely determined by the arguments passed to bubblewrap." It also warns that everything mounted into the sandbox "can potentially be used to escalate privileges."
So the Linux guarantees rest on the arguments Codex passes, not on bubblewrap itself. The post describes those arguments in diagrams and code, and gives no figures for how many escapes were tested or found.
Windows
Codex is swapping its earlier Windows sandbox for one built on Microsoft's MXC (Microsoft eXecution Container) library. The post cites the old design's need for admin access, slow ACL operations and persistent setup state on the host. Under MXC, clipboard access, input injection and desktop controls are disabled.

One proxy for every platform
Network access, when granted, goes through a shared proxy that enforces domain allow and deny rules. The harness starts the proxy outside the sandbox. On Linux a relay process outside the sandbox forwards traffic over a loopback listener, which fits the separate network namespace described above.
The proxy resolves a hostname only after the request is allowed or approved. The reason given is to reduce DNS-based leakage: a blocked request never triggers a lookup that could carry data in the query.
What the post does not say
The post gives no Codex version numbers, no MXC version and no benchmarks. Its only pinned version is an example MCP package, @modelcontextprotocol/server-memory@1.0.0. Nothing in it reports a bypass, a CVE or an independent audit.
For context on how OpenAI's other recent engineering write-ups read, see our pieces on its WebRTC voice relay and on adversarial distillation.
What to check before relying on it
Treat the sandbox as a limit on accidents and injected commands, not as a boundary against a determined local attacker. On Linux, confirm the bubblewrap version your machine uses. On macOS, expect a future OS release to be the test of the deprecated interface. On Windows, the MXC sandbox is a replacement still arriving, so check which one your build runs.
Sources
More in Security
- 01Windows Server 2028 Preview Hardens Server Core by Default in Build 29706, but NTLM Is Still OpenHundreds of settings are on from first boot, Microsoft warns Server 2025 workloads may break, and the 33 percent of servers still on 2019 are untouched.
- 02VicOne's 28 Robotics Zero-Days Come From a Sponsored Article With No CVE IDs and No Named ProjectsThe Tokyo security firm's count ran as paid content on IEEE Spectrum and The Robot Report. An independent March paper counted 38 flaws in three named consumer robots.
- 03Synology's Third Critical DSM Advisory in 62 Days Hits OAuth, and the Last Patch Does Not Cover ItCVE-2026-120382 scores 9.8 and needs no login. DSM 7.4 and 7.3 builds ending -2 and -6 fix it; 7.2 and 7.1 have none yet.
- 04UK Tribunal Orders Home Office to Stop Hiding Apple Encryption NoticeThe Investigatory Powers Tribunal's Nov. 19 judgment confirms the order exists. What it requires of Apple stays sealed until a hearing expected in the first half of 2027.