Course contents
Sandbox and approvals, and how Claude Code differs
Pick a permission mode on purpose: what the sandbox lets commands touch, when Codex stops to ask, and how that compares with Claude Code's approach.
Every coding agent has to answer one question many times a minute: is this action fine, or should a human decide? Codex answers it with two separate controls that work together. Understanding them is what lets you hand over a long task without either babysitting it or regretting it.
Control 1: the sandbox
The sandbox is enforced by your operating system, not by the model's good intentions. It decides which files commands can read or write and whether they can reach the network.
| Sandbox mode | What commands can do |
|---|---|
read-only | Inspect files. Editing files or running commands needs your approval. |
workspace-write | Read files, edit inside the workspace, and run routine local commands there. Network access and writes outside the workspace need approval. This is the default low-friction mode for local work. |
danger-full-access | No sandbox: no filesystem or network boundary at all. |
Control 2: the approval policy
The approval policy decides what happens when Codex wants to go past the sandbox boundary. With on-request, it works freely inside the boundary and asks when it needs to cross it. With never, it never stops to ask; anything the sandbox blocks fails and the error goes back to the model. A third setting, approvals_reviewer, decides who answers the request: you (user, the default) or a reviewer agent (auto_review). The older untrusted policy is retired, and so is the --full-auto flag you'll still see in old tutorials.
The ChatGPT desktop app and the IDE extension wrap these into named modes under the composer. OpenAI's advice is to start most work in Ask for approval.
| Mode | Sandbox + approvals | In practice |
|---|---|---|
| Ask for approval | workspace-write + on-request, you review | Works in the project, asks before editing outside it or using the internet |
| Approve for me | workspace-write + on-request, auto_review | Same boundary; a reviewer agent handles requests and only escalates ones it judges potentially unsafe |
| Full access | danger-full-access + never | Unrestricted access to the internet and any file on your computer |
| Custom (config.toml) | Whatever your config or permission profile says | For teams with their own profiles |
Illustrative. Under Approve for me, what counts as potentially unsafe is the reviewer's call, so treat the last row as the cautious case.
Move the controls and watch what changes.
Compare Ask for approval with Approve for me in the explorer. What actually changes between them?
Mobile work crosses the boundary often
Expo projects hit the edge of the sandbox more than a typical web app. npx expo install and pod install download packages, eas build uploads your project to Expo's servers, and git push talks to GitHub. You have better tools than jumping to Full access when the prompts get repetitive:
- Rules allow, prompt or forbid specific command prefixes outside the sandbox. Allowing
npx expo installremoves one repetitive prompt and keeps every other check. - Writable roots extend where Codex may write without removing the sandbox.
codex --add-dir ../packages/uilets it edit a sibling package in a monorepo. - Profiles keep a stricter or looser setup ready for specific jobs:
codex --profile reviewloads~/.codex/review.config.tomlon top of your user config.
Start a planning session on GPT-6.1 Sol that can read Tipjar but not change it, and that still asks before stepping outside the sandbox.
Release-week permissions
Tipjar ships to TestFlight on Friday. You're in Ask for approval mode and Codex is wiring up haptics, push and a paywall.
Codex has asked six times in ten minutes to run
npx expo install …. You're getting fatigued and starting to approve without reading.
How Claude Code differs
Course 1 taught Claude Code, which leans on per-tool permission rules that you grow over time: allow this command, ask about that one, deny another. Codex leads with an operating-system sandbox and a session-wide approval policy, then lets you carve out exceptions with rules. Both tools now offer some of each idea, so the difference is emphasis, not capability. Claude Code's habit is fine-grained permissions on a trusted machine; Codex's habit is a boundary you choose before the work starts.
If you're coming from Claude Code, Codex 0.167.2 has an /import command that brings over your setup, the current project and recent chats from Claude Code. Your CLAUDE.md conventions are worth carrying into AGENTS.md either way, since AGENTS.md is the file every surface of Codex reads.
Match each Tipjar job to the setting that fits it.
Pick one on the left, then its partner on the right.
npx expo install prefix better than switching to Full access to stop repeated prompts?Plain-English definitions from the AI Coding Dictionary.