Codex separates the approval policy, which sets when it asks, from the sandbox mode, which sets what commands can touch. Policies include on-request, never and a granular option, and auto review can route eligible requests to a reviewer agent. Sandbox modes run from read-only through workspace-write to danger-full-access, which belongs only on isolated machines.
Read in this order
- OfficialCodex: Agent approvals and securityStart here: how approval policy and sandbox mode combine into real behavior.
- OfficialCodex: SandboxWhat each sandbox mode actually blocks on files and network.
- OfficialCodex: Auto-reviewHow the reviewer agent decides, so you can judge whether to trust it.