Inside the Codex sandbox: cross-platform controls for files and network access
Brief
OpenAI details how Codex constrains commands in users’ existing environments and how developers can reuse the sandbox outside an agent session.
Permission profiles
- The built-in
:workspaceprofile allows writes in the workspace, broad reads subject to OS permissions, and disables network access by default. - Profiles can grant, restrict, or deny filesystem and network access; enterprise administrators can limit which profiles users may select.
Use beyond Codex sessions
- The
codex sandboxCLI runs arbitrary commands under a configured permission profile, making the sandbox available to developers’ own tools. - OpenAI shows wrapping an MCP server command to limit its writable paths and disable its network access.
Platform enforcement
- Codex uses Seatbelt on macOS, bubblewrap and seccomp-bpf on Linux, and is transitioning its Windows sandbox to Microsoft’s MXC library.
- The shared network proxy applies domain rules; direct external connections are blocked when proxy restrictions are in force.
Generated by AI from the original article. Check the source for full details.