Codex vs Claude Code: an honest comparison

OpenAI Codex vs Anthropic Claude Code: how they work, what they cost, where each is stronger, and how to choose. Facts checked against official docs.

Manoj Prabhakar8 November 20269 min readLast checked 8 November 2026
  1. Prompt
  2. Codex
  3. Claude Code
  4. Review
  5. Merge

Search "Codex vs Claude Code" and you will find strong opinions, benchmark screenshots and a lot of loyalty. Most of it is out of date within a month, because both tools ship changes every week.

This comparison sticks to what you can check: how each one works, what it costs and what each is built for. Every product fact below comes from OpenAI's and Anthropic's official docs and pricing pages, checked on 8 November 2026. Then we give our opinion, clearly marked as opinion.

What they are

Both are coding agents. You describe a task. The agent reads your project, plans, edits files, runs commands and tests, and reports what it did. Neither is just autocomplete.

Codex is OpenAI's coding agent. It runs in the terminal (Codex CLI), in an IDE extension, in the ChatGPT desktop app, on the web and in the cloud, where it can take tasks from GitHub, Slack or Linear. The CLI is open source under the Apache-2.0 licence.

Claude Code is Anthropic's coding agent. It runs in the terminal, in VS Code and JetBrains, in a desktop app and in the browser at claude.ai/code, where you can start long tasks and check back later.

On paper, the surfaces line up almost one to one. The differences are in pricing, models and defaults.

Side by side

Codex Claude Code
Made by OpenAI Anthropic
Where it runs CLI, IDE extension, ChatGPT desktop app, web, cloud, iOS CLI, VS Code, JetBrains, desktop app, web, mobile
Instruction file AGENTS.md (global in ~/.codex, then repo root down to your folder) CLAUDE.md (can read AGENTS.md instead)
Instruction file guidance Combined files capped at 32 KiB by default Docs recommend under 200 lines per file
Planning before edits Ask for a plan in your prompt, and limit edits with /permissions Plan mode (Shift+Tab or /plan) blocks edits until you approve
Permissions /permissions to choose when it can edit or run commands; sandboxing Auto mode by default, with a classifier on risky actions; manual mode available
Code review Review of uncommitted changes, a commit or a branch; GitHub PR reviews on paid plans /code-review; hooks and tests as hard checks
Pay per use API key: CLI, SDK and IDE only, no cloud features Console API credits

Pricing, as of 8 November 2026

Codex

Codex is included in every ChatGPT plan, and Codex shares its usage with ChatGPT Work.

Plan Price What you get for coding
Free $0 GPT-6 Luna in the desktop app, subject to rollout
Go $8/month GPT-6 Luna in the desktop app, subject to rollout
Plus $20/month Codex on web, CLI, IDE extension and iOS; cloud code review and Slack; GPT-6.1 Sol and GPT-6 Luna
Pro $100, $200 or $500/month Everything in Plus with more usage; Ultrafast mode on the $500 plan
Business $20/user/month billed annually (2+ users), $25 monthly Workspace with admin controls, SAML SSO, no training on business data by default

OpenAI publishes rough estimates rather than fixed limits. On Plus, it estimates 15 to 160 local messages per five hours with GPT-6.1 Sol, and far more with the lighter GPT-6 Luna. It says Pro plans currently have no five-hour limit. When you run out, Plus and Pro users can buy credits.

Claude Code

Claude Code is included in Claude Pro ($20 a month, or $17 a month billed annually), Max ($100), Ultra ($200), Team and Enterprise. It is not on Claude's Free plan. Usage is shared with Claude chat on a 5-hour and weekly basis. Full breakdown in Claude Code pricing explained.

What that means

At the entry level, both cost $20 a month for the full coding toolset. Codex has a free taste on Free and Go; Claude Code does not. At the top end, both have $100 and $200 tiers, and Codex adds a $500 Pro plan.

If you already pay for ChatGPT Plus or Claude Pro, you already have one of these. Start there.

Where each one is stronger

This section is opinion, based on how the tools are designed and documented, not on a benchmark.

Codex leans into the cloud and GitHub

Codex is built to take work from where your team already talks about it. On paid plans you can delegate GitHub issues and PRs with @codex, turn on automatic PR reviews, and hand tasks over from Slack or Linear. If your team lives in GitHub and wants an agent that picks up tickets in the background, Codex's integrations are a strong reason to choose it. The open source CLI is also a plus if you want to read or extend the tool itself.

Claude Code leans into control over the local session

Claude Code's docs put a lot of weight on steering a session: plan mode that blocks edits until you approve, a rewind menu to roll back code and conversation, hooks that enforce rules every time, and deny rules for files that must never be touched. If you work on one codebase for hours and want firm guardrails around the agent, that design suits you.

Models

Codex runs OpenAI's models (on Plus: GPT-6.1 Sol and GPT-6 Luna). Claude Code runs Anthropic's (Opus 5.5 by default on most plans, with Sonnet, Haiku and Fable available). Model quality changes with every release, so any "X writes better code" claim has a short shelf life. Try both on your own project.

Where both go wrong

Both agents fail the same way when the workflow around them is weak:

  • Vague tasks produce confident work in the wrong direction.
  • Huge instruction files waste usage on every turn. Both vendors tell you to keep them small.
  • Too many MCP servers or tools add context to every message. OpenAI's pricing page suggests disabling the ones you do not need.
  • No check to run. If there are no tests, the agent cannot know it is done, and neither can you.

The agent is rarely the bottleneck. The plan, the context and the review are.

That is why we teach a workflow, not a tool. Plan the task, keep the context file tight, review every diff, run the tests. It transfers from one agent to the other in an afternoon. The details are in context engineering.

Using both

Many developers use both. A simple way to do it:

  1. Keep one AGENTS.md at the repo root as the shared instructions. Codex reads it directly. Claude Code can read it in place of a CLAUDE.md.
  2. Use one agent to build and the other to review. A second agent that did not watch the code being written is a cheap independent reviewer.
  3. Commit after every working step, so either agent can pick up from a clean state.

How to choose

  • You already pay for ChatGPT Plus or Pro: start with Codex.
  • You already pay for Claude Pro or Max: start with Claude Code.
  • Your team runs on GitHub issues and wants background agents on tickets: look hard at Codex.
  • You want strict guardrails on a local codebase: look hard at Claude Code.
  • You are a student with no subscription: try Codex on the Free plan to learn what an agent is, then pick one paid plan and learn it properly rather than hopping between tools.

Whichever you choose, the skill that makes you employable is the same: directing an agent, reviewing its work and shipping something that holds up. If you also use an editor, see Claude Code vs Cursor.

At our free Saturday workshop we run the same task through a coding agent from plan to pull request, and you can bring whichever tool you already have. Join us this Saturday.

08Questions people ask

Is Codex better than Claude Code?

Not across the board. Both are capable coding agents with similar building blocks: a terminal CLI, IDE extensions, a project instruction file and cloud tasks. Which one does better depends on your project, the model you pick and how well you plan and review. Test both on the same real task.

Is Codex free?

Codex is included in the ChatGPT Free plan, but on Free and Go it is limited to the GPT-6 Luna model in the desktop app, subject to rollout. The CLI, IDE extension, web and cloud features come with Plus at $20 a month and above.

Can I use Claude Code for free?

No. Claude Code is included in paid Claude plans starting with Pro, or you can pay per use with API credits through an Anthropic Console account. It is not on Claude's Free plan.

Do Codex and Claude Code use the same instruction file?

Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and its docs say it can read a repository's AGENTS.md in place of CLAUDE.md. A team that uses both can keep one AGENTS.md as the shared source.

Is Codex CLI open source?

Yes. The Codex CLI repository on GitHub is published under the Apache-2.0 licence.

Free · Saturday · live

Build and deploy a real app with Claude Code, with us.

90 minutes, live, free. Bring a laptop; leave with a deployed app and the workflow to build the next one.

Join the free workshop

Sources

  1. 01learn.chatgpt.comhttps://learn.chatgpt.com/docs/pricing
  2. 02learn.chatgpt.comhttps://learn.chatgpt.com/docs/codex/cli
  3. 03learn.chatgpt.comhttps://learn.chatgpt.com/docs/agent-configuration/agents-md
  4. 04github.comhttps://github.com/openai/codex
  5. 05claude.comhttps://claude.com/pricing
  6. 06code.claude.comhttps://code.claude.com/docs/en/overview
  7. 07code.claude.comhttps://code.claude.com/docs/en/memory
  8. 08code.claude.comhttps://code.claude.com/docs/en/permission-modes
  9. 09code.claude.comhttps://code.claude.com/docs/en/best-practices

Checked against these pages on 8 November 2026.