OpenAI · Coding agent · checked 2026-12-01
Approval policy on-request or never (the older untrusted policy is retired). In the Auto preset, Codex edits and runs commands in the working directory automatically and asks for edits outside the workspace or commands that need network.
OS-enforced sandbox with three modes: read-only, workspace-write, danger-full-access.
Default workspace-write: writes limited to the active workspace. In writable roots, .git is protected as read-only.
Off by default. Turn on with network_access = true under [sandbox_workspace_write]. A network_proxy feature can constrain traffic to a domain policy once network is enabled.
~/.codex/config.toml: sandbox_mode, approval_policy, [sandbox_workspace_write], features.network_proxy. Flags: --sandbox, --ask-for-approval, --approve-for-me.
--yolo (dangerously-bypass-approvals-and-sandbox) removes both approvals and the sandbox. The docs say to use it only inside an externally hardened environment.
Facts come from each vendor's public documentation, linked on every row, and were read on 2026-12-01. Docs change often, so check the source before you rely on a setting. This is information, not security advice, and no setting here guarantees safety.