What you are going to build
Codex is OpenAI's coding agent. It reads your repository, writes code, runs your commands, and does all of it inside a boundary you set. This course is about that boundary first, because everything else makes sense once you can see it.
Most tutorials open by asking Codex to build something. That part is easy and it is not where people get stuck. People get stuck when a command is refused, when the agent asks for approval on something harmless, or when they turn the limits off to make the refusals stop and then cannot say what the agent may now do.
The first thing you will see
Codex can run a command under the same sandbox the agent gets, without calling a model at all. That means the rules can be demonstrated rather than described, and this is a real run, on a Mac, asking for the read-only profile by name:
codex sandbox -P :read-only -- python3 -c "open('a.txt','w').write('x')"PermissionError: [Errno 1] Operation not permitted: 'a.txt'
A read-only profile refused a write in the project's own folder. Not outside it, inside it. That single line explains more about working with Codex than a page of prose, and lesson 3 does the same thing for every profile.
What you will have by the end
| What | Why it is there |
|---|---|
| A chosen permission profile | So you know what the agent may do before it does it |
An AGENTS.md | So the rules of this project are not retyped every session |
| Rules | So the few commands that need to leave the sandbox can, and nothing else |
| A skill and a plugin | So a procedure is followed the same way by everyone |
| A hook | So one rule is code rather than a request |
| A review in CI | So work nobody watched still gets read |
How this course is written
Terminal blocks are captured from real runs of codex-cli 0.154. Everything in part 1 runs with no account at all, because the sandbox, the help output and the doctor do not call a model.
Where a lesson needs a model, there is no invented transcript. The build machine is signed in and still cannot run Codex models, which is a common situation worth seeing rather than hiding:
codex exec "In one sentence, what does this project do?"ERROR: {"type":"error","status":400,"error":{"type":"invalid_request_error",
"message":"The 'gpt-5.4-mini' model is not supported when using Codex with a
ChatGPT account."}}Signing in is not the same as having access to the models. Those lessons show the command and describe the behaviour, and the page says which is which.
- Install the CLI now, so lesson 1 is a check rather than a wait.
- Pick the repository you will use for this course. A small one you know well.
Every expert started right here.