How OpenAI’s Codex Sandbox Limits Access
OpenAI says its Codex sandbox runs commands in users’ existing environments while enforcing user-configured filesystem and network restrictions. Permission profiles define the limits, and the operating system enforces them on macOS, Linux and Windows. A shared network proxy checks requests against domain rules, while setup details vary by operating system. OpenAI also says developers can reuse the sandbox in their own tools and describes it as one layer in a defense-in-depth approach alongside training and alignment. The company cautions that sandbox restrictions prevent a large class of harmful actions but do not eliminate every possible risk.
November 18, 2026
Inside the Codex sandbox
How Codex runs commands on your machine with limits you control.
By Michael Bolin, Member of Technical Staff
At OpenAI, we take a defense in depth(opens in a new window) approach when it comes to safeguarding agents. While our investments in training and alignment are fundamental to this effort, we also implement features in our agentic harness, Codex(opens in a new window), to provide additional protections. Because one of the most common (and potentially risky) things Codex does is run commands on your computer, we built the Codex sandbox so Codex can work in your existing environment within filesystem and network limits you control.
Some source content is omitted. Continue reading on the original site.