Block VI · Coding with agents · Lesson 30
Codex: code with OpenAI in the terminal and in the cloud
You'll learn to configure Codex with AGENTS.md and config.toml, to adjust the reasoning level, to use plan mode and custom agents, and to decide when it suits you better than Claude Code.
- 11 min
- 9 animated slides
- 4-question quiz
- Narrated in 6 languages
What you'll see in this lesson
- One agent, four places to use it
Codex is OpenAI's coding agent: it works in the terminal, in your editor, in the ChatGPT desktop app and in the cloud.
- Install it and sign in with your ChatGPT account
One command to install it, codex to start it, and «Sign in with ChatGPT» to use your plan without paying extra.
- AGENTS.md: house rules, in layers
Codex reads AGENTS.md before working and combines your personal one, the one at the repository root and the ones in each subfolder.
- config.toml: default model and reasoning
In ~/.codex/config.toml you set the model, reasoning effort, permissions and MCP servers; the CLI, extension and app share it.
- Sandbox and approvals: what it does alone and what it asks
The sandbox limits what Codex can touch; the approval policy decides when it asks for permission. Change it in a session with /permissions.
- Plan mode: first the plan, then the code
With /plan, Codex investigates and proposes an execution plan before touching anything; you correct it and then give it the go-ahead.
- Custom agents and profiles
One TOML per agent in .codex/agents/ creates specialists with their own model, effort and permissions; a profile saves a whole configuration.
- Codex or Claude Code?
They do almost the same thing: decide based on the subscription you already pay for, the models that work best for you and whether you want cloud tasks.
- Summary: Codex set up right
Installing it is the easy part; what makes the difference is setting up permissions, reasoning and agents properly.
Tools and concepts
- Codex CLI
- config.toml
- AGENTS.md
Sign in with your Google account to access this lesson and the whole course.