Agents
OpenAI's Codex Sandbox Puts Filesystem and Network Limits in Focus
OpenAI's Codex sandbox limits what commands can write and reach over the network, but broad reads and host tools outside it remain open questions for adopters.

OpenAI describes Codex as running commands in a developer’s existing environment, with filesystem and network restrictions controlled through session permission profiles. Its approach uses operating-system sandboxing rather than moving execution into a separate virtual machine or container. 1 For companies evaluating coding agents, the practical question is what the agent’s commands can reach under those restrictions, and what remains accessible to other processes on the developer’s machine.
What the Codex sandbox controls
OpenAI’s built-in workspace profile permits writes within the Git repository workspace while keeping directories such as .git and .codex read-only. It also allows broad filesystem reads, subject to the user’s existing operating-system permissions. 1
| Capability | Workspace profile behavior |
|---|---|
| Writes inside the workspace | Allowed, with directories such as .git and .codex read-only 1 |
| Filesystem reads | Broad reads are allowed, subject to the user’s existing OS permissions 1 |
| Network access | Disabled by default 1 |
| Child and descendant processes | Inherit the parent’s sandbox constraints, including descendants that outlive the original process 1 |
| Other host processes | OpenAI’s example describes an editor running outside the sandbox 1 |
Coding agent filesystem access beyond the repository
The read boundary matters: files outside the repository, including files containing API keys, may remain readable if the developer’s OS permissions allow it. OpenAI says broad reads support workflows that depend on SDKs, libraries, and configuration outside the repository. 1
The workspace profile also disables network access. OpenAI says this blocks direct uploads to external services, but also prevents operations such as downloading dependencies unless additional access is provided. 1
Analysis: Treat the profile as a constraint on commands, not as a guarantee that the agent can see only project files. Before rollout, map what the developer account can read and decide whether the tasks require that access.
A host sandbox, not a container
OpenAI says Codex uses each platform’s sandboxing facilities to constrain commands in the user’s existing environment rather than moving computation into a separate environment. The harness exposes these platform-specific mechanisms through a common API across macOS, Windows, and Linux. 1
That is an architectural choice, not a safety verdict. Codex’s approach relies on host operating-system controls and the permissions available in the developer’s environment. 1 Teams should consider how those controls intersect with local credentials and the tools in their development workflow. For a contrast with other isolation approaches, see what adopters still need to verify after Google’s Agent Substrate and gVisor donation to the CNCF.
The article says it will explain enforcement on macOS, Linux, and Windows, but the source excerpt provided here does not include those platform-specific details. 1 A common API alone does not establish that enforcement is equivalent across platforms.
Analysis: Review the platform-specific documentation and test the configurations your organization uses. Separate the common interface from the controls that enforce it on each platform.
Child processes inherit constraints
A command launched in the sandbox passes its constraints to child processes. OpenAI says those restrictions also apply to descendants that outlive the original process. 1 Teams can check whether agent tools spawn background processes and how those processes are tracked.
Inheritance does not mean every later action involving files touched by a sandboxed command stays inside the sandbox. OpenAI gives the example of malicious code inserted into a locally installed package and later run by an editor outside the Codex sandbox. 1 The example distinguishes the actions of sandboxed commands from what another host process might later do with files they changed.
AI agent network restrictions and the proxy
The workspace profile disables network access, which OpenAI says blocks direct uploads to external services while also preventing dependency downloads that require additional access. 1
For permission profiles that allow limited network access, the caller must supply a network proxy to enforce the limits. 1 The source excerpt does not describe proxy destination policies, failure handling, or network audit details. 1
Analysis: Before enabling limited network access, ask:
- Which destinations are allowed, and who approves changes?
- What happens to commands if the proxy is unavailable or misconfigured?
- What evidence is available about attempted and successful network calls?
OpenAI specifies that a proxy is required for limited-network access; teams still need to decide how to govern its use. 1
Coding agent security controls: what the sandbox does not eliminate
OpenAI says the restrictions prevent a large class of harmful behavior, while noting that harmful actions remain possible. Its example involves malicious code placed in a local package and later executed by an editor outside the sandbox. 1
That example highlights why a sandbox setting should not stand in for a review of the surrounding development workflow. Teams can assess the agent, repository, developer credentials, editor, build tools, package sources, and host operating system together.
Analysis: Avoid treating the word “sandbox” as an adoption decision. Assess the whole workflow and the risks that remain for the tasks you plan to assign. Our guide to evaluating agent platforms with deployment tests rather than model scores covers a similar approach.
Checklist before adopting the Codex sandbox
Map the agent’s required actions to the permissions it needs. OpenAI’s workspace profile handles writes, reads, and network access differently, so those requirements affect both workflow and exposure. 1
- Inventory reachable files. Check what the developer account can read outside the repository, especially files containing API keys. OpenAI says such files may remain readable under the workspace profile. 1
- Exercise the process tree. Check child processes and lingering descendants, which inherit the parent’s sandbox constraints. 1
- Review host tools separately. Consider editors and other software that may run outside the sandbox, including how they handle packages the agent touches. OpenAI’s package example illustrates this risk. 1
- Validate network controls. If limited access is needed, establish destination rules, proxy failure behavior, change approval, and available audit evidence. OpenAI requires a proxy for limited-network access; the excerpt does not describe those other controls. 1
- Review platform enforcement. The source excerpt provided here does not include the OS-specific enforcement details, despite saying the article will cover enforcement on macOS, Linux, and Windows. 1 Test the configurations your organization supports.
Analysis: Evaluate the developer workflow, not the sandbox setting in isolation. Test the permissions and tools the agent will actually use, then assess whether the remaining exposure is acceptable.
FAQ
Can Codex read files outside the repository?
Potentially. The workspace profile permits broad filesystem reads subject to the user’s existing OS permissions, so files elsewhere, including files containing API keys, may remain readable. 1
Does the Codex workspace profile allow network access?
Not by default. OpenAI says the profile disables network access, blocking direct uploads to external services while also potentially preventing dependency downloads unless additional access is provided. 1
Is the Codex sandbox a virtual machine or container?
No. OpenAI describes it as operating-system sandboxing in the user’s existing environment, rather than a separate VM or container. 1
Are child processes restricted by the Codex sandbox?
Yes. Child processes inherit the parent’s constraints, including descendants that outlive the original process. 1
Does the sandbox eliminate coding-agent security risk?
No. OpenAI says harmful actions remain possible and gives the example of malicious code in a local package later executed by an editor outside the sandbox. 1
Before deploying Codex, review the platform-specific enforcement details and test the workflow on the developer configurations your organization uses. 1
Source
1 “Inside the Codex sandbox,” OpenAI, published November 18, 2026. https://openai.com/index/inside-the-codex-sandbox
Questions
- Can Codex read files outside the repository?
- Potentially. OpenAI says the workspace profile permits broad filesystem reads subject to the user’s existing operating-system permissions, so files elsewhere, including files containing API keys, may remain readable [1].
- Does the Codex workspace sandbox allow network access?
- Not by default. OpenAI says the workspace profile disables network access. That blocks direct uploads to external services but can also prevent downloading dependencies unless additional access is allowed [1].
- Is the Codex sandbox a virtual machine or container?
- No. OpenAI describes it as operating in the developer’s existing environment using operating-system sandboxing facilities rather than a separate virtual machine or container [1].
- Are child processes restricted by the Codex sandbox?
- Yes. OpenAI says child processes inherit the parent’s sandbox constraints, including descendants that continue running after the original process exits [1].
- Does the sandbox eliminate coding-agent security risk?
- No. OpenAI says the restrictions prevent many harmful actions but do not eliminate risk, including the possibility that malicious code in a locally installed package is later run by an editor outside the sandbox [1].
Sources
- Inside the Codex sandbox · OpenAI · Nov 18, 2026
How this article was made: an AI writer persona researched and wrote it from the sources listed above; separate AI passes edited it, checked its claims against those sources and audited it; an editor at Yelno reviewed and approved it before publication. How the Yelno blog works · Follow Yelno on LinkedIn