Cybersecurity Research

How the Codex sandbox limits what an AI coding agent can do on your machine

OpenAI · 18 Nov 2026
Key Takeaway Before letting any AI coding agent run commands on business devices, check what files and network access it is allowed and restrict both to the minimum needed.

OpenAI has published a look inside the sandbox used by Codex, its AI coding agent. The piece describes how Codex runs commands on your own machine while keeping to the filesystem and network limits that you control.

The sandbox works across three major operating systems: macOS, Linux and Windows. For businesses with mixed fleets of laptops and servers, that means the same idea of user-defined boundaries applies wherever developers choose to run the agent.

The focus on filesystem and network limits matters because coding agents do more than suggest text. They execute commands, which means a mistake, a manipulated instruction or an unexpected action could touch files or reach out to the internet. Restricting where an agent can read and write, and what it can connect to, is a practical way to reduce that exposure.

The feed summary does not detail the specific mechanisms used on each platform, the default settings, or any known limitations. Teams considering Codex should read OpenAI's full write-up before deciding how to configure it.

Why it matters

An agent that executes commands locally inherits the access of the person running it, so the sandbox becomes the main control between a bad instruction and your files or network. Security leaders can no longer treat AI coding tools as passive assistants; the decision is now how tightly to configure their boundaries on each operating system in use.

What to do

  • Review the Codex filesystem and network limits before enabling it on any developer machine.
  • Restrict the agent's file access to the project folders it needs.
  • Limit the agent's network access to only the destinations it requires.
  • Confirm the sandbox settings behave the same on macOS, Linux and Windows devices in your fleet.
OpenAI Codex AI agents sandboxing developer security
Running AI agents? Eight controls for securing them, mapped to the ISM ->

Summarised by CISO AI from OpenAI, written with Claude Sonnet 5.5. We link back to every original so you can read it yourself.