OpenAI’s November 18, 2026 guide, “Inside the Codex sandbox,” details a consequential tradeoff: Codex can edit a project while network access is disabled, but its default workspace profile still permits broad filesystem reads.
The document is an implementation and safety guide, not a new Codex model announcement. It explains how commands run within operating-system-enforced limits, why those limits preserve access to existing development tools, and how writable files can create risks after a sandboxed command finishes.
My main takeaway from the published design is that teams need to review two boundaries: what a command can do while sandboxed, and what its output might cause another program to do later. This article analyzes OpenAI’s documentation; it is not an independent test of the implementation.
What the Default Workspace Profile Permits
OpenAI describes the built-in :workspace permission profile as a compromise between useful development access and restrictions on potentially harmful actions.
| Area | Default behavior | Practical consequence |
|---|---|---|
| Workspace files | Writes allowed | Codex can edit source files without requesting permission for every change. |
| Protected directories | Paths including .git and .codex remain read-only | Commands cannot directly rewrite Git hooks or .codex/config.toml. |
| Filesystem reads | Broadly allowed, subject to existing OS permissions | Tools can find external dependencies, but sensitive configuration files may also be readable. |
| Network | Disabled | Commands cannot directly upload data or download dependencies. |
The permissions reference adds that :workspace allows writes in active workspace roots and system temporary directories. It also lists :read-only, which keeps local command execution read-only, and :danger-full-access, which removes local sandbox restrictions.
Broad reads support ordinary development work. Compilers, runtimes, SDKs and configuration often live outside a repository. Restricting every read to the project directory would break workflows that rely on those files.
That makes “workspace” an easy name to overinterpret. It describes the main write boundary, not a guarantee that commands can see only the repository. I would treat an inventory of readable credentials as a separate security task, even when workspace writes and offline execution are appropriate.
Why Network Access Starts Disabled
Disabling networking blocks direct uploads from sandboxed commands, including attempts to send readable data to an external service. It also blocks legitimate tasks such as downloading packages, so enabling network access is a meaningful expansion of permission.
OpenAI describes limited access through HTTP and SOCKS5 proxies with domain rules. The important configuration detail appears in the permissions documentation: setting network.enabled = true permits network access, but does not start the proxy.
To enforce profile domain rules, the documentation says users must also enable features.network_proxy = true in config.toml, or use enabled administrator-managed network requirements. Without an active proxy, those domain rules do not restrict direct network access.
That is a significant deployment trap. A configuration can contain an apparently narrow destination list while missing the component that enforces it. I would make verification of a blocked destination an acceptance test for any managed network policy.
Approvals are another separate control. Under the on-request policy, commands already permitted by the sandbox can run without approval, including network use when enabled. Teams should not assume that allowing a destination means Codex will ask before every connection. OpenAI distinguishes the technical access boundary from the policy governing when permission must be requested in its approvals and security guide.
The Risk That Survives a Sandboxed Command
OpenAI explicitly identifies two remaining risks in its sandbox guide.
Sensitive files can remain readable. Existing OS permissions may allow a command to read configuration containing API keys. Blocking network access closes a direct upload route, but it does not make those files unreadable. If a task does not need a credential, denying access to its location is a stronger boundary than relying on offline execution alone.
Writable dependencies can be executed later. OpenAI gives the example of malicious code inserted into node_modules/prettier. Because node_modules is commonly ignored by Git, the change might not appear in git status. An editor configured to run that copy of Prettier on save could subsequently execute the modified code outside the Codex sandbox.
The second example reveals a limit that a source diff alone cannot address:
- A sandboxed command modifies a permitted local file.
- Git’s normal status view omits the ignored file.
- A separate application later loads or executes it with its own permissions.
The sandbox can enforce its policy throughout the original command’s lifetime and still leave behind a dangerous artifact. My practical recommendation is to include ignored executable content in the review boundary. Depending on the project, that may mean rebuilding dependencies from a trusted lockfile or disabling automatic local tool execution until changes have been checked.
Cross-Platform Enforcement Follows the Process Tree
Codex uses platform-specific sandboxing facilities on macOS, Linux and Windows behind a common API. OpenAI’s design keeps commands in the existing development environment instead of requiring that environment to be reproduced inside a container.
The guide uses iOS development to explain the choice. Native Mac build tools and the iPhone simulator require host capabilities that a Docker-contained workflow cannot directly provide. Delegating those operations back to the Mac would introduce host-side execution needing its own restrictions.
The common sandbox API accepts a command, working directory, environment, permission profile and, when needed, a network proxy. It returns a child-process handle. That interface is also the reusable integration point described for developers building their own tools.
According to OpenAI’s guide, child processes inherit the parent’s sandbox constraints, including descendants that outlive the original process. Launching a subprocess therefore does not, by itself, remove the restrictions.
This also clarifies the ignored-package example: an editor later launching modified Prettier is a separate execution path, not necessarily a descendant of the original sandboxed command. Process inheritance protects the command tree; it does not attach a permanent security policy to every file that tree changes.
Configure a Narrower Profile Without Losing Defaults
The permissions reference recommends extending built-in profiles so baseline protections carry forward. Extending :workspace, for example, preserves read-only rules for workspace paths including .git, .agents, .codex and .aws, unless explicitly overridden.
The following illustrative configuration combines documented settings. It has not been executed or tested here.
Frequently Asked Questions
3 questions
1Does the workspace profile hide files outside the project?
No. It permits broad filesystem reads subject to OS permissions. Sensitive files need additional restrictions when the task does not require them.