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

🔍 Read the full analysis: AI Workflows Behind The Codex Sandbox 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 published a technical account of how Codex limits commands run in a developer’s existing environment, using operating-system sandboxing to control file changes and network access across macOS, Linux and Windows. The company says these protections can reduce risks such as direct data uploads, but broad file reads and indirect execution through altered local tools remain concerns.

OpenAI has published a technical account of how its Codex sandbox limits commands run by an AI coding agent in a developer’s existing environment, with controls for filesystem changes and network access on macOS, Linux and Windows. The company says the restrictions are intended to reduce risks such as unauthorized file changes and direct data uploads, while warning that they do not prevent every harmful action.

OpenAI says Codex applies permission profiles that specify what a command can read, write or access over the network. In the built-in workspace profile described by the company, commands can write inside the project workspace, while locations such as .git and .codex are read-only. That setup allows routine source-code edits without a separate approval for every change, while restricting direct modification of Git hooks and Codex configuration.

The profile permits broad filesystem reads, subject to the operating system’s own permissions. OpenAI says this supports ordinary development because compilers and build tools may need libraries, SDKs and configuration files outside a project. But that access can include sensitive local files, such as configuration that contains API keys. Network access is disabled by default in the described profile, which the company says blocks direct uploads but can also prevent tasks such as downloading dependencies unless access is granted.

Rather than run commands in a separate virtual machine or container, Codex uses each operating system’s own sandboxing facilities to restrict processes on the host. OpenAI says this preserves access to native tools, citing iOS development on a Mac, where builds and the iPhone simulator depend on Mac executables. The company describes a common harness interface for commands and permission profiles; when limited network access is allowed, a caller must provide a network proxy. Child processes inherit their parent’s restrictions, including descendants that remain active after the original process exits.

At a glance
reportWhen: Publication date not stated in the supp…
The developmentOpenAI has detailed how the Codex sandbox applies filesystem and network restrictions to commands run in a developer’s environment.
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.

Permissions Shape Codex Autonomy

The controls address a practical tradeoff in AI-assisted software development: an agent needs enough access to edit and test a project, but those same permissions can expose local data or allow unwanted changes. Workspace write access can support routine coding with fewer interruptions, while default network restrictions limit one direct path for sending out data a command can read.

OpenAI’s account also makes clear that process-level restrictions are not a complete security boundary for every later effect. The company describes a scenario in which an agent changes a locally installed package, such as Prettier in node_modules. If that directory is not tracked by Git, the modification might not show up in a standard status check. An editor could later run the altered package when saving a file, allowing code to act beyond the original sandboxed command. For developers and organizations, the relevant question is not just what a command can do immediately, but also what software it can alter and what may run later.

OpenAI presents sandboxing alongside model training and alignment as layers of protection. The source material does not provide independent testing or incident statistics, so readers cannot use it to gauge how often the described risks occur or how reliably the controls block attempted access.

Products Worth Considering

Sony WH-1000XM6 Wireless Noise-Cancelling Headphones – Midnight Blue

Sony WH-1000XM6 Wireless Noise-Cancelling Headphones – Midnight Blue

LG 27GS60QC-B Ultragear 27-inch Curved Gaming Monitor (QHD, 180Hz, 1ms, 1000R)

LG 27GS60QC-B Ultragear 27-inch Curved Gaming Monitor (QHD, 180Hz, 1ms, 1000R)

As an affiliate, we earn on qualifying purchases.

Host-Based Controls Across Systems

OpenAI frames its choice of operating-system controls as an effort to keep Codex useful within a developer’s established setup. A container or virtual machine can isolate software, but reproducing a complete development environment may take work and may leave host-specific tools unavailable. For instance, the company says a container cannot directly run native Mac build tools or launch the iPhone simulator. A workflow could send those tasks back to the host, but those operations would then need their own restrictions.

The approach described instead uses platform-specific sandboxing behind a shared harness interface for three desktop operating systems. The supplied account also refers to a one-shot shell tool, exec_command, as an example of how the agent runs commands. The excerpt available here does not include the subsequent step-by-step execution details or a full account of how enforcement differs by platform.

Coverage and Testing Remain Unclear

The supplied material does not state when OpenAI published the account or whether the described default profile applies to every Codex product and configuration. It also does not detail how users grant exceptions on each operating system. Those points matter because actual access depends on the profile and setup used for a particular session.

OpenAI provides no test results, incident rates or independent evaluation in the material supplied here. It acknowledges that broad reads may expose sensitive files and that changes to local tools can produce effects later, but does not explain whether Codex detects such changes, whether specific package directories can be restricted, or what protections cover every form of indirect execution. The account points to a security cookbook for enterprise guidance, but the available excerpt does not set out that guidance.

More Permission Guidance Expected

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 clarify how the described controls can be adapted to different projects and operating systems.

For now, the available information supports a limited conclusion: Codex’s described profile restricts writes and disables network access by default, while allowing broad reads to support development workflows. Further platform-specific instructions, independent evaluations or operational data would be needed to assess how consistently those controls work in practice and how users should address indirect risks such as modified local tools.

Key Questions

What does the Codex sandbox restrict?

OpenAI says permission profiles control filesystem access and network access for commands run by Codex. The described workspace profile allows writes in a project while keeping locations such as .git and .codex read-only; network access is disabled by default.

Can Codex read files outside a project?

The described profile permits broad reads, subject to the operating system’s own permissions. OpenAI says this helps tools find libraries and configuration, but it can also expose files elsewhere on the computer, including configuration that may contain API keys.

Does the sandbox prevent all harmful actions?

No. OpenAI describes sandboxing as one layer of protection and gives an example of a modified local package being run later by an editor. The company’s account does not establish that every indirect effect is detected or prevented.

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

OpenAI says host-based controls can preserve access to native development tools. It cites iOS development on a Mac, where builds and the iPhone simulator rely on Mac executables that may not be available inside a separate container.

Primary source: OpenAI · via ThorstenMeyerAI.com

You May Also Like

From The Creator Of Redis; Run LLM Locally With Ds4

Redis creator Salvatore Sanfilippo presents ds4, a C inference engine for running selected open-weight LLMs locally on high-memory computers.

The Truth About GLM-5.3-Flash: An Economical AI Agent Engine With A Catch

An in-depth look at GLM-5.3-Flash, a new open-source multimodal AI model designed for agents, highlighting its capabilities, pricing, and caveats.

Gemini 4 Carbon Leads AI Models By One Point: How To Read The Ranking

Gemini 4 Carbon scores 59 on Artificial Analysis’s v5 index, narrowly ahead of Claude Opus 5.5. The ranking reflects nine tests, not every AI task.

Dust: Pretraining Transformers Without Backpropagation

Q Labs reports that Dust trained transformer language models using activation perturbations, with results that approach backprop at larger populations.