
要点
- The default :workspace profile allows writes inside the workspace while keeping .git and .codex read-only, so Codex cannot directly change .codex/config.toml or Git hooks under .git/hooks. Network access is off by default.
- To let compilers and build tools read software development kits and configuration outside the repository, the default profile allows broad filesystem reads. The post acknowledges that sensitive files elsewhere on the machine, including configuration files that may contain API keys, may also remain readable.
- The residual risk the post itself gives is injecting malicious code into node_modules/prettier, which is often ignored by Git. If the user's editor runs that copy on save, the code would execute outside the Codex sandbox. The company describes the sandbox as one layer in a defense-in-depth approach, not a sealed box on its own.
- The limits are enforced by the operating system. macOS uses Seatbelt, which is marked deprecated and still in use. Linux uses bubblewrap and seccomp-bpf. On Windows, Codex is replacing its existing sandbox with Microsoft's MXC on compatible devices. Domain rules are enforced by a proxy outside the sandbox, and the post notes that broad wildcard rules or access to DNS services can still permit DNS-based exfiltration.
On 18 November 2026, OpenAI technical staff member Michael Bolin published Inside the Codex sandbox, explaining how Codex runs commands in a user's existing environment under filesystem and network limits the user can control. The post describes the sandbox as a layer inside the Codex software that runs the agent, added on top of training and alignment.
The default rules are specific. With a Git repository as the workspace root, the built-in :workspace profile allows writes inside the workspace, keeps .git and .codex read-only, and disables network access by default. It also allows broad reads, so files outside the workspace that may hold API keys may remain readable. The post itself describes a path the sandbox does not stop: injecting malicious code into node_modules/prettier, after which an editor that runs that copy on save would execute the code outside the sandbox. The checkable material is those defaults and the operating-system mechanisms, not a showing that typical sessions are thereby contained.
[1]What the default profile allows, and what it leaves open
Bolin describes the design rule as conservative defaults that still allow meaningful work. That is why :workspace lets Codex edit source code without asking permission for every change, while read-only rules on .git and .codex block direct edits to the config file and to Git hooks. Turning the network off is meant to block direct uploads to external services, including attempts to send out data the command can read. It also blocks legitimate steps such as downloading dependencies, which need extra access.
Broad reads are a stated tradeoff. The post says that restricting reads to the workspace would break many ordinary compile and build workflows. The cost is that sensitive files elsewhere on the machine may remain readable. Users can tighten those boundaries with named permission profiles, for example by setting **/*.env and secrets to deny, or by allowing only listed domains. Enterprise administrators can also use layered configuration and managed requirements to limit which settings users may change.
A command can also ask for more access inside the sandbox, or ask to run outside it. The post says the Codex software evaluates those requests against the user's preferences first, for example by prompting the user or by sending the request to Auto-Review. The same sandbox can be reused in other tools through the codex sandbox command, and the article shows how to wrap an MCP server that would otherwise run unsandboxed.
[1]What the enforcement layer makes checkable, and which gaps the company lists itself
The strength of the post is how clearly it explains how the limits are applied by the operating system. On macOS, Codex uses Apple's Seatbelt through /usr/bin/sandbox-exec. The base policy starts by denying everything by default, then allows what the permission profile requires. The post admits that Apple does not document this policy language well for third-party use, and that the sandbox-exec manual marks the command as deprecated. OpenAI still plans to keep using Seatbelt for the foreseeable future, and it notes that software such as Chrome also still relies on it.
On Linux, Codex uses bubblewrap to build an isolated filesystem view, then seccomp-bpf to filter system calls. It vendors its own copy of bwrap, but prefers a compatible copy already on the machine, because some distributions disable user namespaces by default and leave an exception for the system bwrap. When networking is off, or when connections must go through the proxy, it creates a new network namespace and relays traffic from outside the sandbox. On Windows, the company is replacing its existing sandbox with Microsoft's MXC on compatible devices, to avoid the older design's need for administrator access, slow access-control-list operations, and leftover configuration on the host. Under MXC, clipboard access, input injection, and desktop and system-settings controls are turned off. Registry reads, and the Win32k and desktop access PowerShell needs at startup, are kept.
Network limits are enforced by a proxy that runs outside the sandbox. The proxy decides whether a hostname is allowed before it resolves that name, so a DNS lookup cannot leak information by itself. The same paragraph says that broad wildcard rules, or access to DNS services, can still permit DNS-based exfiltration. Deny globs are expanded to concrete paths before a command starts, and new matching paths are not added automatically while the command is running. These are limits the company wrote down itself, not later objections from outside.
[1]The company's strongest fair reading
A fair reading is that OpenAI is not selling the default sandbox as a sealed box. It describes :workspace as a set of tradeoffs made so that code can be edited and builds can run, and it argues that turning the network off and protecting .git and .codex blocks a large class of direct harm. The platform details are also specific enough for an engineer to check against a local machine, including Seatbelt's deprecated status, the Linux dependence on user namespaces, and the still unfinished move to MXC on Windows.
The evidence is weaker if the post is read as proof that typical Codex sessions are already contained. The default read scope is still wide, and the company's own Prettier example shows that harm can be triggered outside the sandbox. The proxy also does not close every DNS-based exfiltration path. The article leaves those remaining risks to training, alignment, and extra user or enterprise configuration. This page does not provide usage data on whether those extra controls are actually in force in common setups.
[1]What to watch in the next six months
The first test is whether the defaults tighten. Watch whether :workspace still allows broad reads outside the workspace by default, whether the network stays off by default, and whether the current documentation still includes a path such as Prettier executing outside the sandbox. If the default read scope narrows in a clear way, or if setup begins to require stricter enterprise profiles, the tradeoffs in this post will need to be rewritten.
The second test is whether the enforcement layer catches up with the plan in the article. Watch whether the MXC replacement on Windows is finished or still limited to compatible devices, whether macOS still depends on Seatbelt after the deprecation warning, and whether the Linux sandbox still starts reliably on distributions that disable user namespaces. If those implementation details remain public, and the default profile does not quietly shrink the gaps the company already named, this post will still be an unusually checkable engineering account. If the documentation remains while default installs no longer expose those limits, buyers should inspect the policy that actually lands on the machine, not only this long article.
【No.2】
[1]