AI CODING TOOLS / LESSON 15
Claude Code vs Codex.
A fair side by side look at both tools and when to use each one

Loading the lesson…
Loading activities…
AI CODING TOOLS / LESSON 15
A fair side by side look at both tools and when to use each one

Loading the lesson…
Loading activities…
You've now met two AI coding agents. Claude Code, from Anthropic, and Codex, from OpenAI. The internet will happily tell you one of them is incredible and the other is garbage. Ignore all of it.
This lesson gives you a practical side-by-side of how the two tools work, so you can make the call yourself. Both are good, and both change FAST. The best one for you is whichever does better work on your project, and the only way to find that out is to try both.
Start with what they have in common, because honestly that's most of it.
/init command that creates their instructions file for youThe differences mostly come down to setup, accounts and how each one keeps you safe.
| Claude Code | Codex | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| AI models | Claude models | OpenAI models |
| Install (Mac or Linux) | curl -fsSL https://claude.ai/install.sh | bash | curl -fsSL https://chatgpt.com/codex/install.sh | sh |
| Start it | claude | codex |
| Account | A paid Claude plan (Pro, Max, Team, Enterprise) or an Anthropic Console account | A ChatGPT plan (Free and Go get Codex in the desktop app only, the CLI, IDE extension and cloud start at Plus) or an OpenAI API key |
| Where it runs | Terminal, VS Code and JetBrains, desktop app, web | Terminal, VS Code and similar editors (plus JetBrains and Xcode integrations), ChatGPT desktop app, Codex Cloud on the web |
| Instructions file | CLAUDE.md (and it can read AGENTS.md too) | AGENTS.md |
| Personal instructions | ~/.claude/CLAUDE.md | ~/.codex/AGENTS.md |
| Switch permission level | Press Shift+Tab to cycle modes | Type /permissions |
| Safety approach | Permission modes and rules, with an optional sandbox | An operating system sandbox plus an approval policy, on by default |
This is the biggest real difference between them, so let's slow down for a sec.
Claude Code uses permission modes. You met these earlier in this module. Here are the main ones you'll run into.
Recent versions of Claude Code start in auto mode by default. Press Shift+Tab to cycle through the modes, and keep an eye on the status bar to see which one you're in. If you'd rather approve every step while you're learning, switch to Manual.
Codex uses two layers. The sandbox is a fence your operating system enforces, limiting where Codex can write and whether it can reach the internet. The approval policy decides when Codex stops to ask.
The default, called Auto, lets Codex edit and run commands inside your project folder and asks before it goes outside the folder or touches the internet. Network access for commands stays off unless you turn it on. Type /permissions to switch to Read Only or back.
Both approaches keep you plenty safe, they just put the guardrails in different spots. Claude Code puts more of the decision in its modes and rules, while Codex leans on a sandbox that's switched on from the start. Either way, the habits that ACTUALLY protect you are the same. Commit before you start, and read what changed.
You already know CLAUDE.md. Codex's version is AGENTS.md. They do the same job, which is being a plain text file that tells the agent your project's rules, commands and gotchas.
There are a few practical differences.
AGENTS.md from your Codex home folder, then from the top of your project down to the folder you're working in. Files closer to your current folder win.CLAUDE.md, and recent versions also read AGENTS.md when there's no CLAUDE.md in the project. A CLAUDE.md can also pull in an AGENTS.md with an import line, which we cover next lesson.So if you only want to write one file, AGENTS.md is the one both tools understand.
Here's where people start yelling at each other online. Don't join them. Model quality goes up and down with every release, and a tool that wins on one project can lose on the next. Treat these as tendencies, and take anybody screaming "tHiS oNe iS bEtTeR" with a big grain of salt.
Claude Code tends to suit you if
CLAUDE.md, permission modes, plan mode)Codex tends to suit you if
/review) that reports problems without editing your filesNotice that most of these come down to what you already have and how you like to work. Which one is "smarter" barely shows up, and that's on purpose.
One more thing from me. I'm a big "go deep, not wide" guy. Every time the crowd stampedes toward the next shiny tool, the folks who just keep getting better with the tool they've got tend to win. Learn one of these properly before you start hopping.
Here's a simple way to think about it as a beginner.
CLAUDE.md and AGENTS.md do the same job, and Claude Code can read AGENTS.md tooPlot twist, you don't actually have to choose. Next lesson you'll learn how to run both tools on one project without them stepping on each other's toes...