Module · Codex Engineer
Codex CLI Essentials
The configuration, the approval model and the non-interactive runs.
TOPIC 01
Configuration & Approvals
What the agent may do without asking, and how you tell it before it starts.
What you'll practice
- Write a Codex Profile — guided · beginner
- Choose an Approval Policy — practice · intermediate
A command you'll meet
cat ~/.codex/config.tomlThe profile is the contract between you and the agent. Open the task below for the full walkthrough.
Hands-On Tasks in This Topic (2)
Write a Codex Profile
Every agent run starts from a profile. Write the configuration that picks the model, the approval policy and the sandbox the agent works in.
Choose an Approval Policy
Three approval policies decide how often the agent interrupts you. Write down what each one means and when it is the right choice.
TOPIC 02
Non-Interactive Runs
Drive the agent from a script and from a review command, not from the prompt box.
What you'll practice
- Run the Agent From a Script — practice · intermediate
- Automate a Review Pass — challenge · advanced
A command you'll meet
cat ~/scripts/codex-task.shA scripted run has to be reproducible - the prompt, the directory and the sandbox all belong in the script. Open the task below for the full walkthrough.
Hands-On Tasks in This Topic (2)
Run the Agent From a Script
The same agent, the same result, every time - that is what a script buys you. Write the wrapper that runs the agent non-interactively in a fixed directory.
Automate a Review Pass
A review agent is cheap and tireless, but it is not a human. Write the script that reviews a diff against a base branch and writes its findings to a file.