Inside the Codex sandbox
Codex’s sandbox applies filesystem and network limits to commands in the developer’s existing environment across macOS, Linux, and Windows. Its defaults allow workspace edits but disable network access, with broader reads that can still expose local sensitive files.
The built-in **:workspace** profile allows writes inside the workspace, keeps areas such as **.git** and **.codex** read-only, permits broad reads allowed by the OS, and disables network access. Codex applies platform sandboxing on macOS, Linux, and Windows, with child processes inheriting restrictions.
When running coding agents on a developer machine, set filesystem and network permissions to match the task. For example, allow documentation access while keeping source read-only for review, or grant a limited set of network domains when dependencies are needed. Teams can define profiles and constrain choices with managed requirements.
The built-in **:workspace** profile allows writes inside the workspace, keeps areas such as **.git** and **.codex** read-only, permits broad reads allowed by the OS, and disables network access. Codex applies platform sandboxing on macOS, Linux, and Windows, with child processes inheriting restrictions. When running coding agents on a developer machine, set filesystem and network permissions to match the task. For example, allow documentation access while keeping source read-only for review, or grant a limited set of network domains when dependencies are needed. Teams can define profiles and constrain choices with managed requirements. The defaults still allow reads outside the workspace, which may include files containing API keys. Sandboxing also cannot prevent every indirect effect: the article describes malicious changes to ignored local packages being run later by an editor. The sandbox is one layer of protection, not a substitute for reviewing agent changes.
This clarifies the Codex sandbox as a configurable permission layer: teams can grant task-specific file and network access, but broad read access may expose secrets and indirect effects remain possible. It supports treating sandboxing as one part of agent safety, alongside reviewing changes and controlling what runs later.