Codex: OpenAI documents what its sandbox does not cover
OpenAI's engineering post sets out how the Codex sandbox limits commands on a developer machine, and which gaps remain.
· OpenAI · Research by Michael Bolin

OpenAI published the design of the Codex sandbox and the gaps it leaves: the command that starts a stdio MCP server is not sandboxed, reads stay broad across the machine, and wildcard or DNS rules can still allow exfiltration.
01What happened
Michael Bolin of OpenAI published "Inside the Codex sandbox" on November 18, 2026, an engineering account of how Codex restricts the commands it runs on a user's machine. The post names the limits OpenAI knows about rather than claiming the sandbox is complete. OpenAI credits David Wiesen, Charlie Weems, Viyat Bhalodia and Fotis Chantzis as contributors.
02How it works
Permission profiles are the mechanism. Codex runs commands in the user's existing environment rather than a container or a VM, and the built-in :workspace profile allows writes inside the workspace, keeps directories such as .git and .codex read-only, and turns network access off. Enforcement differs by platform: Seatbelt on macOS, bubblewrap with seccomp-bpf on Linux, and on Windows OpenAI says it is replacing its sandbox with one built on Microsoft's MXC library. An HTTP and SOCKS5 proxy applies domain allow and deny rules, with explicit denies winning, and resolves a hostname only after a request is allowed, so a blocked lookup cannot carry data out through DNS.
03Who is affected
Teams running Codex locally on macOS, Linux, WSL or Windows are the audience. The post states that the Codex harness does not try to sandbox the command used to start a stdio MCP server, because Codex cannot reliably infer which files or network services that server needs, so the server can write files and make network requests with the permissions of the user running Codex. OpenAI also says read access stays broad, so sensitive files elsewhere on the machine may remain readable.
04What to do
Treat the startup command of a stdio MCP server as unsandboxed, and give it only the credentials you accept it can reach. Keep deny rules concrete instead of broad wildcards, because OpenAI says wildcard rules or access to DNS services can still permit DNS-based exfiltration. Administrators can limit which profiles users may choose through managed configuration, and the codex sandbox command runs any command under a profile so you can check what it blocks.
Sources 2 links, all fetched
- 1openai.comOpenAI Engineering Post
- 2learn.chatgpt.comCodex Sandbox Docs