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.

Go to the course

What you'll see in this lesson

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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

Sign in with your Google account to access this lesson and the whole course.

Go to the courseSee the full syllabus

More lessons in this block