Claude Code vs Codex
A fair side by side look at both tools and when to use each one

Pixl presents
Two AI coding agents, one question everybody asks, and zero fanboy nonsense, because the hype crowd is wrong about both.Two AI coding agents, one question everybody asks, and zero fanboy nonsense, because the hype crowd is wrong about both.

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.
The Big Picture#
Start with what they have in common, because honestly that's most of it.
- Both are AI coding agents that read your project, edit files and run commands
- Both run in a terminal, in code editors, in a desktop app and on the web
- Both read a project instructions file at the start of a session
- Both ask your permission before risky actions, and both let you loosen or tighten that
- Both have a plan mode for thinking through a change before making it
- Both have an
/initcommand that creates their instructions file for you
The differences mostly come down to setup, accounts and how each one keeps you safe.
Side by Side#
| 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 |
How Each One Asks Permission#
This is the biggest real difference between them, so let's slow down for a sec.
Claude Code. Permission Modes#
Claude Code uses permission modes. You met these earlier in this module. Here are the main ones you'll run into.
- Manual asks you before edits, commands and network access
- Accept edits lets Claude edit files without asking but still checks with you on everything else
- Plan lets Claude read and plan without changing your files
- Auto lets Claude work without asking, while a second AI model checks each action in the background
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. Sandbox Plus Approvals#
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.
What That Means for You#
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.
Instructions Files#

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.
- Codex reads
AGENTS.mdfrom 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 Code reads
CLAUDE.md, and recent versions also readAGENTS.mdwhen there's noCLAUDE.mdin the project. ACLAUDE.mdcan also pull in anAGENTS.mdwith 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.
Strengths, Honestly#
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
- You already pay for a Claude plan
- You've followed the earlier lessons in this module and like its setup (
CLAUDE.md, permission modes, plan mode) - You want to pick your level of hands-off with one key, Shift+Tab
Codex tends to suit you if
- You already pay for ChatGPT Plus or higher, so the CLI, IDE extension and Codex Cloud come with what you've got
- You like the idea of a sandbox that's on from the start
- You want to hand tasks to the cloud from your phone or the web with Codex Cloud
- You want a built-in code review command (
/review) that reports problems without editing your files
Notice 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.
When to Reach for Which#
Here's a simple way to think about it as a beginner.
- Use the one you already pay for. Seriously. Both can handle the beginner projects in this course.
- Stuck on a bug? Ask the other tool. A fresh set of eyes, even AI eyes, often spots what the first one missed.
- Want a second opinion on a change? Have one tool make it and the other review it. The next lesson walks you through exactly this.
- Want something to run while you're away? Look at Codex Cloud or Claude Code on the web.
TL;DR#
- Claude Code and Codex are the same kind of tool from different companies, and they have way more in common than not
- The biggest difference is how they keep you safe, since Claude Code uses permission modes while Codex uses a sandbox plus an approval policy
CLAUDE.mdandAGENTS.mddo the same job, and Claude Code can readAGENTS.mdtoo- Strengths shift with every release, so treat any "this one is better" claim as a tendency
- The best way to choose is to try both on your own project
What's Next?#
Plot 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...
This lesson ends with 2 short activities.
