OpenAI Says Codex Cannot Run in Docker for iOS Builds, and Docker Launches It With Codex's Sandbox Off
Software / analysis
OpenAI Says Codex Cannot Run in Docker for iOS Builds, and Docker Launches It With Codex's Sandbox Off
Bolin's November 18 post lists Seatbelt, Bubblewrap and MXC as Codex's three sandboxes; Docker's page defaults to --dangerously-bypass-approvals-and-sandbox.
OpenAI's Codex does not run inside a container by default, and its own engineering post says why: a container "would not be able to run the iOS build toolchain composed of native Mac executables." Docker's own guide launches Codex inside its sandbox with Codex's own safeguards switched off.
Michael Bolin published "Inside the Codex sandbox" on OpenAI's engineering blog on November 18, 2026. Docker's documentation for running Codex in a Docker sandbox describes a different design for the same job. Read side by side, they say a lot about where each company expects the risk to be.
What Codex's default sandbox allows
The post describes the sandbox as one layer of defence in depth that works in your existing environment, not in a container or virtual machine. The default :workspace profile allows writes inside the workspace, keeps .git and .codex read-only, allows broad reads subject to the operating system's own permissions, and disables network access.
Network has three settings: fully disabled, fully enabled as :danger-full-access, or routed through a proxy that enforces domain allow and deny rules, with unmatched requests held for approval.
For a developer on a Mac, that default means a command Codex runs can edit the project and cannot phone home. It also means the agent can read a lot: reads are broad, so a secret in your home directory can be readable unless a profile denies it.
Three operating systems, three mechanisms
The sandbox is not one piece of software. OpenAI uses a different enforcement layer on each platform.
| Platform | Mechanism named in the post |
|---|---|
| macOS | Seatbelt, invoked through sandbox-exec |
| Linux | Bubblewrap (bwrap) for filesystem and namespace isolation, plus seccomp-bpf for syscall filtering |
| Windows | Moving from the earlier sandbox to the Microsoft MXC library |
That table is the reason a single "is Codex sandboxed" answer does not exist. A Linux CI runner and a MacBook get different guarantees from different kernels, and Windows is mid-migration as of the post.
Docker's container route and the flag it sets
Docker's page shows the command sbx run codex ~/my-project, which creates a sandbox for that directory. Credentials are handled before launch: "Authentication happens before launching the sandbox, so credentials are never exposed inside it." OAuth runs on the host and the tokens go to the OS keychain, while an API key is stored with sbx secret set openai.
The detail that stands out is the default startup command: codex --dangerously-bypass-approvals-and-sandbox. Docker turns off Codex's own approval prompts and its own sandbox, and relies on the outer sandbox alone. That is a consistent design, since a second sandbox inside the first would add friction without adding much, but it moves the whole trust decision to Docker's boundary.
The page also says sandboxes "don't pick up user-level configuration from your host", so ~/.codex is not read. Only project-level configuration in the working directory carries over. A developer who tuned permission profiles at user level will find them absent.
The escalation path inside Codex
Inside OpenAI's design, the model can ask for more. The post names two per-command overrides, with_additional_permissions and require_escalated. The harness, not the model, decides: it either prompts the user or routes the request to auto-review.
That is the sticking point for anyone running unattended jobs. By the post's description, a request for more permissions goes through the escalation path to a person or to auto-review. Enterprises can narrow the choices with managed requirements such as allowed_permission_profiles, and users define named profiles under [permissions] in config.toml.
A codex sandbox command runs any command under a chosen profile, which the post presents as a way to test profiles and to sandbox tools such as MCP servers. Our look at OpenComputer's 3.3x Devin claim covers a different agent that raises the same containment question.
What the sandbox does not cover
Both documents are vendor descriptions of their own products, and neither names an outside party that tested the boundary.
The post lists its limits itself. Deny globs are expanded before a command launches, so paths created afterwards that match the glob are not covered. And broad wildcard rules, or DNS access, can still permit DNS-based exfiltration.
Docker's page is silent on several things a reader would want. It does not describe network policy, does not say whether the isolation is a microVM, and does not say whether the feature is experimental.
Neither document reports a number for how many commands the default profile blocks, how often escalation is requested, or what a Docker sandbox costs in startup time. Those are the figures that would let a team choose between them, and neither source has published them.
What a team should compare
If you build for iOS or macOS, the OpenAI post gives a concrete reason not to start with a container. If you run Codex in CI on Linux, the bubblewrap and seccomp layer is the one to read about, and Docker's outer sandbox is the alternative, and it comes with Codex's own approvals off.
The decision depends on which side of the boundary holds your secrets. In the Docker design they sit in the host keychain and never enter the sandbox. In the OpenAI default they sit on the same machine, behind a profile you have to write. For another agent tool that shipped with opt-out telemetry, see OpenSRE's 13,884 stars, and check what any of them sends before you grant network access.
Sources
More in Software
- 01Levien's Next-100 Rust GUIs Post Counts About 20 New Toolkits and Bets Against egui's Immediate ModeThe Linebender author credits AI rewrites for the surge; egui's own README concedes the trade-off he is pressing on.
- 02C++26 Is Reopened: The 13–9–12 Ballot, the Enforced Label That Answers It, and What Is Still OpenSutter's Búzios report says the committee kept contracts, added one paper, and will send C++26 to a second ballot with no published date.
- 03CLI-Anything Has 62,119 Stars and a README With Three Different Test TotalsThe HKUDS project turns desktop software into agent-callable CLIs; its own per-harness lines sum to 158 more tests than it reports.
- 04Brazil's Receita Federal Posts Tax Calculator Under MIT With 16 Open IssuesThe agency published three repositories on Nov. 16 for the new consumption taxes, and outside developers had filed bug reports against the first within days.