# 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.

- **Severity:** Info: Research, tools, evals or lab claims with no direct exposure. Context, not an alert.
- **Category:** Lab safety
- **Published by:** OpenAI
- **Disclosed:** 2026-11-18
- **Affects:** OpenAI Codex
- **Research by:** Michael Bolin
- **Primary source:** https://openai.com/index/inside-the-codex-sandbox/
- **Page:** https://theinjection.dev/items/openai-codex-sandbox-internals/

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.

## What 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.

## How 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.

## Who 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.

## What 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.

## Quick facts

- **Published:** November 18, 2026, by Michael Bolin, OpenAI
- **Default profile:** :workspace: workspace writes, .git and .codex read-only, network off
- **Enforcement:** Seatbelt on macOS, bubblewrap and seccomp-bpf on Linux, MXC on Windows
- **Not sandboxed:** The command used to start a stdio MCP server
- **Stated gaps:** Broad reads, code planted in gitignored paths such as node_modules, DNS-based exfiltration
- **Admin control:** Managed config.toml with allowed_permission_profiles

## Sources

1. [OpenAI Engineering Post](https://openai.com/index/inside-the-codex-sandbox/)
2. [Codex Sandbox Docs](https://learn.chatgpt.com/docs/sandboxing)
