AIThis post was created with the assistance of artificial intelligence (AI).

🔍 Read the full analysis: What Makes The Codex Sandbox Useful For AI? on ThorstenMeyerAI.com

Buying for a business?Offer from Amazon

Get business pricing on tech for your team

  • Business-only prices and quantity discounts
  • Tax-exempt purchasing
  • Multiple users, one account, clear invoices
As an affiliate, we earn on qualifying purchases.

TL;DR

OpenAI has described how Codex uses operating-system sandbox controls to limit the files and network access of commands run by its AI coding agent. The company says the restrictions can reduce direct data transfers while preserving access to a developer’s environment, but broad file reads and risks from altered local tools remain.

OpenAI has detailed how the Codex sandbox limits filesystem changes and network access for commands run by its AI coding agent on macOS, Linux and Windows. The controls are intended to reduce risks such as unauthorized changes to protected files and direct uploads of readable data, while allowing Codex to work in a user’s existing development environment; OpenAI cautions that they do not prevent every harmful outcome.

OpenAI says Codex applies permission profiles that set the filesystem and network access available to a session. In the built-in workspace profile described by the company, commands can write within the project workspace, while locations such as .git and .codex are read-only. That arrangement can let an agent edit project files without asking for approval after each change, while limiting direct edits to Git hooks and Codex configuration.

The profile permits broad filesystem reads, subject to the operating system’s own permissions. OpenAI says that access can be needed because compilers and other development tools may rely on libraries, SDKs or configuration files outside a repository. The same access can leave files elsewhere on a computer—including files that may contain API keys or other sensitive information—readable to a command. Network access is disabled by default in the profile described, which can block direct uploads but also prevent tasks such as downloading dependencies unless access is granted.

Rather than run commands in a separate virtual machine or container, Codex uses operating-system sandboxing to constrain processes in the host environment. OpenAI says a common harness interface accepts a command and its permission profile. If limited network access is allowed, the caller must supply a network proxy. The company also says child processes inherit their parent’s restrictions, including processes that continue running after the original command exits.

At a glance
reportWhen: Publication date not specified in the s…
The developmentOpenAI published a technical account of how Codex restricts AI-run commands through filesystem and network permission profiles on macOS, Linux and Windows.
Codex Sandbox · Briefing

Inside the Codex sandbox

Codex limits what agent-run commands can change and where they can connect. The safeguards reduce risk while keeping work in a developer’s existing environment.

3
desktop platforms covered
2
access areas controlled: files and network

Workspace permissions

The built-in profile balances routine project work with limits on sensitive locations.

Allowed
  • Write files in the project workspace
  • Read files broadly, subject to operating system permissions
Restricted
  • .git and .codex remain read-only
  • Network access is disabled by default

Why use host controls?

Operating system sandboxing can keep native development tools available without recreating the setup in a container or virtual machine.

macOS

Native build tools

Mac controls can preserve access to tools used for iOS builds and the iPhone simulator.

Shared interface

One harness API

A common interface accepts a command and permission profile across macOS, Linux, and Windows.

What the boundary can miss

Restrictions on a command do not remove every risk from later actions on the computer.

1
Broad reads expose files

Commands may be able to read local configuration, including files that contain API keys.

2
A local tool is changed

An agent could modify an installed package such as Prettier in node_modules.

3
The tool runs later

An editor might run the altered package outside the original sandboxed command.

Open questionThe supplied material gives no independent evaluation, incident rates, or detailed platform enforcement steps.
The takeaway
Treat the sandbox as one layer of protection: it limits direct writes and network access, but broad reads and modified local tools leave indirect risks.

Balancing Coding Access and Exposure

The design addresses a practical tension in AI-assisted software development: an agent needs enough access to run builds and edit code, but those abilities can also expose local data or affect a developer’s machine. Workspace writes can make routine coding tasks less interruptive, while default network restrictions limit one direct path for commands to send readable files outside the computer.

OpenAI’s description also shows why permission boundaries are not a complete security guarantee. The company gives the example of an agent modifying a locally installed package, such as a copy of Prettier in node_modules. Because that directory may be excluded from Git tracking, the change might not appear in a standard status check. If an editor later runs the altered package while saving a file, it could execute code outside the original sandboxed command.

That scenario is an example presented by OpenAI, not evidence in the supplied material that such an incident occurred. It nonetheless illustrates an indirect risk: restricting a command’s immediate access may not control what happens later if local software it changed is run by another process. For teams adopting coding agents, the relevant question is how to grant permissions that support the task while accounting for sensitive files and downstream execution.

Products Worth Considering

Logitech MX Mechanical Mini for Mac Wireless Keyboard, Space Gray

Logitech MX Mechanical Mini for Mac Wireless Keyboard, Space Gray

As an affiliate, we earn on qualifying purchases.

Why Codex Uses Host Sandboxing

OpenAI frames its approach as a choice between stronger separation and access to the tools a developer already uses. Containers and virtual machines can isolate programs, but reproducing a developer’s setup inside them can require extra work and may leave host-specific software unavailable. OpenAI points to iOS development on a Mac: builds and the iPhone simulator depend on native Mac executables.

A container-based workflow could delegate those operations back to the Mac, the company says, but delegated tasks would then run outside the container and require their own restrictions. OpenAI says it instead uses platform-specific operating-system controls through one harness interface for the three desktop platforms. The supplied account introduces a one-shot shell tool, exec_command, but does not include the detailed execution steps that follow.

OpenAI presents sandboxing as one part of a broader, defense-in-depth approach alongside model training and alignment. It also points to a security cookbook for enterprise guidance. The available source does not include independent testing or measurements of how often the risks discussed occur.

Limits and Evidence Still Missing

The supplied material does not give the article’s publication date or specify whether the described defaults apply to every Codex product and configuration. It also does not detail how users grant exceptions on each operating system. Test results, incident rates and independent evaluations are not provided, so the source does not establish how reliably the controls prevent attempted access outside a permission profile.

OpenAI acknowledges that broad reads can expose sensitive local files and that modified tools may cause effects when run later. The available account does not explain whether Codex detects such changes, whether the harness can restrict particular package directories, or what protections it recommends for every form of indirect execution. Those points remain unclear from the available material.

Further Platform and Enterprise Guidance

OpenAI says its full account goes on to explain how end users and enterprises can tailor permissions, how developers can reuse the sandbox, and how enforcement works. Those details would help readers understand how the controls differ by platform and how permission exceptions are managed. The supplied excerpt does not provide a timetable for additional guidance or a date for further technical material.

For now, the stated next step for readers seeking implementation details is to consult OpenAI’s full technical account and the security cookbook it references. Any judgment about the sandbox’s effectiveness beyond the described design will require evidence not included in the source, such as platform-specific testing or independent evaluation.

Key Questions

What does the Codex sandbox restrict?

OpenAI says permission profiles set which files commands can read or change and whether they can access the network. In the built-in workspace profile described, commands can write to the project workspace, while .git and .codex are read-only and network access is disabled by default.

Does the sandbox prevent Codex from reading sensitive files?

Not necessarily. The described profile permits broad filesystem reads, subject to operating-system permissions. OpenAI says this can help tools access files outside a repository, but it may also leave local configuration files or API keys readable.

Why does Codex use the host operating system’s controls?

OpenAI says this approach lets commands use tools already installed in a developer’s environment. Its example is iOS development on a Mac, where builds and the iPhone simulator rely on native Mac executables that may not be available inside a separate container.

Can a modified local tool create risks after a command ends?

OpenAI says it can. The company describes a scenario in which an agent changes a locally installed package that an editor later runs. That example illustrates a possible indirect risk; the supplied material does not report that it occurred as an incident.

Has the sandbox been independently evaluated?

No independent evaluation or performance results are included in the supplied source. It also provides no incident rates or measurements of how reliably the controls block attempted access beyond the configured permissions.

Primary source: OpenAI · via ThorstenMeyerAI.com

You May Also Like

A relaunch with AI agents: how Gewerkton rebuilt its whole look in two days

Gewerkton replaced its whole look in two days, with AI coding agents carrying out the work from written plans: web app, phone app, Studio, icons, a website in forty languages and regional films. How it was checked, what broke and what the films cost.

Making The Case For Context-aware AI

MIT Technology Review’s Business Lab report examines why enterprise AI needs business-process context and how companies can test it.

Powering Space AI With Nvidia Vera CPUs: What SpaceXAI’s Deployment Means For The Future

SpaceXAI announces plans to deploy Nvidia Vera CPUs for Grok AI workloads and an orbital Vera Rubin system with a Starmind satellite, though details remain undisclosed.

AI Tools for Topic Clustering and Planning

Ineffective content planning can be costly—discover how AI tools for topic clustering and planning can transform your strategy and keep you ahead.