Claude Code vs Codex: the real difference

Claude Code and Codex share most features. The real differences are the instruction file (CLAUDE.md or AGENTS.md) and how each holds back before acting. A side-by-side table and a fair way to test both on your own task.

Short answer: Same idea, different files and defaults. Claude Code (Anthropic) reads CLAUDE.md and asks your permission before it edits files or runs commands. Codex (OpenAI) reads AGENTS.md and works inside a sandbox that lets it edit your project folder and run routine commands there. Most of the rest is shared: both run in the terminal, your editor and the cloud, and both have skills, hooks and MCP servers. To choose, give both the same task and compare the result and the cost.

Comparison posts usually pick a winner from benchmarks. Your code is not a benchmark. Knowing where the two really differ tells you what to set up, and a small test on your own project tells you the rest.

Checked against the Claude Code and Codex docs on 14 November 2026.

Nothing loads from YouTube until you press play. Then Google receives your IP address and may set its own storage. Narrated with an AI-generated voice. Privacy

How do Claude Code and Codex compare side by side?

Claude CodeCodex
Made byAnthropicOpenAI
Project instructionsCLAUDE.md (reads AGENTS.md when there is no CLAUDE.md)AGENTS.md
Settings filesettings.jsonconfig.toml in ~/.codex/
Before it actsAsks permission for edits and commands, by defaultWorks in a sandbox: edits and routine commands inside the project, asks to go further
Where it runsTerminal, VS Code and JetBrains, desktop app, webTerminal (Codex CLI), IDE extension, ChatGPT desktop app, Codex Cloud
Skills, hooks, MCPYesYes
Starter file/init writes CLAUDE.md/init writes AGENTS.md
NeedsA paid Claude plan or a Console accountA ChatGPT sign-in or another sign-in method

What is actually different?

The instruction file. Claude Code's standing instructions live in CLAUDE.md, Codex's in AGENTS.md. You do not need two copies: since version 2.1.277, Claude Code reads AGENTS.md by itself when a project has no CLAUDE.md, or a CLAUDE.md can import it with @AGENTS.md.

How they hold back. Claude Code's default is to ask: each new edit or command waits for your yes, and you allow trusted commands with /permissions. Codex's default is a fence: inside the workspace it may edit and run routine commands without asking, and it asks before stepping outside. Both can be changed, and Claude Code has an optional sandbox too (Claude Code sandbox settings, Codex sandbox and approval modes).

What is the same?

More than the debates suggest. Both read your project, edit files, run commands and show you the diff. Both have slash commands, custom agents, skills, hooks that run your scripts at set moments, and MCP servers for outside tools. Both have a review command, and both work from the terminal, an editor or the cloud.

How do you test them fairly?

  1. Make a Git commit, so each run starts from the same place.
  2. Write one task with a finish line: "Add input validation to the signup form. Done when the new tests pass."
  3. Run it in Claude Code, note the result, then git stash or reset and run the same prompt in Codex.
  4. Compare three things: did the tests pass, how much did you have to fix, and what did it cost (/usage in both).

Do it on two or three real tasks from your week. That answer beats any chart.

Where can you check this?

Can you set up both in one place?

Yes, one tool for each. Config Studio for Claude Code covers the 20 surfaces Claude Code reads and Config Studio for Codex the 21 Codex reads. Each explains every option, shows which file wins and writes the file for you to copy, so both agents can start your test with the same rules.

The tool

Do it in your browser.

Claude Code

Config Studio for Claude Code

Every file Claude Code reads, explained: what each setting does, where it lives, which file wins, and an editor that writes it for you.

Codex

Config Studio for Codex

Every file Codex reads, explained: config.toml, sandbox and approvals, AGENTS.md, rules, hooks, skills, MCP servers and the status line, with an editor that writes them for you.

Keep reading

More from the blog.

Every post