Codex vs Claude Code: Which Coding Agent Should You Pick?
Codex vs Claude Code comes down to how you like to work. OpenAI Codex is the better pick for scoped tasks you hand off and review, with cloud tasks and a sandbox that is on by default. Anthropic's Claude Code is the better pick for long, interactive sessions in a large codebase. Both start at $20 a month as of November 2026.
Most pages on this query still name last spring's models and plans. Every model, price and limit below was checked against both vendors' docs on November 14, 2026, and you will see our own Claude Code session numbers next to the vendor claims.
Key takeaways
- Same entry price, different limits. Claude Pro and ChatGPT Plus both cost $20 a month. Codex Plus publishes per-model message estimates per five hours; Claude Pro publishes no numbers, only multiples (Max is 5x Pro).
- Models changed again. Codex now recommends the GPT-6 family led by GPT-6.1 Sol; Claude Code defaults to the 5.5 models, with Fable 5.2 opt-in.
- One AGENTS.md can serve both, as long as no CLAUDE.md or CLAUDE.local.md is in the way.
- Cached input decides your bill. Across 45 of our Claude Code sessions with recorded tokens, input outweighed output about 269 to 1.
- If you run both, record which agent and model worked each ticket, or you can't compare them later.
Codex vs Claude Code at a glance
| OpenAI Codex | Anthropic Claude Code | |
|---|---|---|
| Surfaces | Codex CLI, IDE extension, ChatGPT desktop app, web (cloud tasks) | Terminal CLI, IDE extensions, desktop app, web, Slack |
| Current models | GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna | Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2 (opt-in) |
| Entry plan | ChatGPT Plus, $20/mo | Claude Pro, $20/mo ($17/mo billed annually) |
| Top individual plans | Pro at $100, $200 or $500/mo | Max $100/mo, Ultra $200/mo |
| Team plan | Business, $20 to $25 per user/mo | Team, $20 to $25 standard seat, $100 to $125 premium seat |
| Instructions file | AGENTS.md (32 KiB combined by default) | CLAUDE.md, or AGENTS.md if no CLAUDE.md |
| Default sandbox | workspace-write, network off | Bash sandbox you turn on; network through an allowlist proxy |
| Headless mode | codex exec |
claude -p |
| Reasoning control | model_reasoning_effort in config.toml, or the effort setting in the app |
/effort, for example /effort high |
| Long sessions | /compact, plus automatic compaction |
/compact, plus automatic compaction |
| Best for | Hand-off tasks, parallel cloud work, review | Long interactive sessions, big refactors |
Prices are list prices from claude.com/pricing and OpenAI's Codex pricing page, as of November 2026.
What is the difference between Codex and Claude Code?
Codex is OpenAI's coding agent and Claude Code is Anthropic's. Both read your repository, edit files, run commands and open pull requests. The practical difference is where the work happens: Codex leans on cloud tasks you start and review later, while Claude Code is built around a session you steer in your terminal or IDE.
Claude Code runs in the terminal, IDE extensions, a desktop app and the web, per its overview, and claude -p runs it headless in scripts and CI.
Codex runs locally through the open-source Codex CLI and remotely as Codex cloud tasks, which check out a repository from your connected GitHub or GitLab account, work in a container, and let you review the diff before opening a pull request.
On GitHub, Codex can review pull requests when someone comments @codex review, or on every PR once automatic reviews are on, per OpenAI's GitHub review doc. Claude Code answers @claude mentions in PR and issue comments through Claude Code GitHub Actions, where it can implement changes and push commits.
Claude Code also has a web surface and cloud scheduled tasks, but its center of gravity is the interactive session you watch and redirect.
Which models do Codex and Claude Code use?
Short version: GPT-6.1 Sol for most Codex work, Sonnet 5.5 or Opus 5.5 for Claude Code. Our own agents ran 104 sessions on Opus 5.5 and 22 on Sonnet 5.5.
On November 14 OpenAI's Codex models page listed four: GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna. You switch with codex -m gpt-6.1-sol and the like. In Claude Code, the opus, sonnet and haiku aliases point to Opus 5.5, Sonnet 5.5 and Haiku 5.5 on the Anthropic API, per its model configuration doc.
| Model | Tool | Role, per the vendor | API price per 1M tokens (input / output / cached input) |
|---|---|---|---|
| GPT-6 Astra | Codex | Most capable, hardest end-to-end work | $10 / $50 / $1.00 |
| GPT-6.1 Sol | Codex | Near-Astra work at lower cost | $2 / $10 / $0.10 |
| GPT-6.1 Terra | Codex | Fast model for writing, visuals, computer use | $1 / $5 / $0.05 |
| GPT-6 Luna | Codex | High-volume, repeatable tasks | $0.10 / $0.50 / $0.01 |
| Claude Fable 5.2 | Claude Code | Tasks larger than one sitting | $8 / $40 / $0.20 |
| Claude Opus 5.5 | Claude Code | Complex reasoning | $4 / $20 / $0.20 |
| Claude Sonnet 5.5 | Claude Code | Daily coding | $2 / $10 / $0.10 |
| Claude Haiku 5.5 | Claude Code | Simple, fast tasks | $0.10 / $0.50 / $0.01 (prompts up to 100K) |
Prices are from OpenAI's API pricing and Anthropic's pricing doc, as of November 2026. You pay them only on an API key.
Why Sol: OpenAI's own line is that "GPT-6.1 Sol offers near-Astra performance at a lower cost than Astra." Move to Astra when Sol stalls. Fable is opt-in: "No Fable model is the account-type default on any plan or provider," so type /model fable when a task needs it.
On Amazon Bedrock and Google Cloud, sonnet still points to Sonnet 4.5, so check which model your provider actually serves.
How much do Codex and Claude Code cost?
Both start at $20 a month and top out at $200 (Claude Ultra) to $500 (ChatGPT Pro) for one person, as of November 2026.
| Plan | Price, as of Nov 2026 | Usage, as the vendor states it |
|---|---|---|
| ChatGPT Go (Codex) | $8/mo | GPT-6 Luna, light tasks |
| ChatGPT Plus (Codex) | $20/mo | Message estimates per 5 hours, per model |
| ChatGPT Pro (Codex) | $100, $200 or $500/mo | No five-hour limit; weekly limits may apply |
| ChatGPT Business (Codex) | $20 to $25 per user/mo | Same per-seat estimates as Plus |
| Claude Pro | $17 to $20/mo | More than Free, every 5 hours and every week |
| Claude Max | $100/mo | 5x Pro, plus $100 a month in API credits |
| Claude Ultra | $200/mo | No 5-hour limit for verified accounts, 10 times Pro weekly |
| Claude Team | $20 to $25 standard seat, $100 to $125 premium seat | Premium seat has 5x a standard seat |
Older guides still talk about "Max 5x" and "Max 20x". Those names are gone from Anthropic's pricing page: the $100 tier is Max and the $200 tier is Ultra, which gives 10 times Pro weekly usage, not 20 times.
OpenAI is the only one of the two that puts numbers on the entry plan. On Plus, its pricing page estimates 5 to 45 local messages per five hours on GPT-6 Astra, 15 to 160 on GPT-6.1 Sol and 350 to 3,000 on GPT-6 Luna. It adds:
"These estimates are not fixed message limits; check your usage dashboard for current limits and reset times."
For a team budget, Anthropic publishes its own enterprise average in the Claude Code costs doc:
"Across enterprise deployments, the average cost is around $13 per developer per active day and $150-250 per developer per month, with costs remaining below $30 per active day for 90% of users."
OpenAI publishes no equivalent figure for Codex, so measure it yourself.
Is Codex better than Claude Code?
Neither wins everywhere; it depends on the task. Codex is better at scoped work you can describe up front and check later, especially in parallel cloud tasks. Claude Code is better when the task needs exploration and back and forth across a large codebase. Benchmarks swing with every model release, so treat any single score as a snapshot.
The most cited test on this SERP is Composio's own 47-case evaluation in its Claude Code vs Codex write-up. It reports Claude Code with Fable 5 passing 47 of 47 and Codex with GPT-5.6 Sol (high) passing 45 of 47, with Sol using about 19 percent fewer tokens. Composio also measured cost. On DeepSWE both reached a 69 percent pass rate, at $9.18 per task with Fable High on Claude Code and $3.47 with Sol High on Codex. Running the same open model, DeepSeek V4 Flash, in both harnesses, each passed 16 of 30 tasks; Claude Code finished in about half the median time, and Codex cost $0.081 per success against $0.195. Those models are now a version behind, which is the point: a result like this ages in weeks.
A better test is your own: ten tickets from your backlog, the same instructions file, and the scorecard below.
How do AGENTS.md and CLAUDE.md differ?
Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and falls back to AGENTS.md when it finds no CLAUDE.md. So one AGENTS.md at the repository root can brief both agents, as long as no CLAUDE.md or CLAUDE.local.md sits in your working directory or above it.
Watch the local file. Per Anthropic's doc, adding a personal CLAUDE.local.md "stops Claude from reading AGENTS.md for you." To keep both, set Project instructions to claude-md-and-agents-md in /config, or import it with @AGENTS.md from a CLAUDE.md. Reading AGENTS.md directly needs Claude Code v2.1.277 or later.
Codex starts with ~/.codex/AGENTS.md, or AGENTS.override.md if you made one. Then it walks from the project root to your working folder and joins every AGENTS.md on the way; the one nearest your folder has the last word. It stops adding files at 32 KiB by default (project_doc_max_bytes), per Codex's AGENTS.md guide.
On the Claude Code side, the memory doc lists the load order: your own ~/.claude/CLAUDE.md and .claude/rules/ files still load next to the shared AGENTS.md. The shared format is written up at agents.md.
So keep it short. Past 32 KiB, Codex just stops reading more files. Put the rules that matter at the root and link out to longer docs.
This is the starter we would hand either agent. Drop it in the repository root and swap in your real commands.
<!-- AGENTS.md: read by Codex, and by Claude Code when no CLAUDE.md exists -->
## Project
- Stack: <language, framework, package manager>
- Run tests: <exact command, e.g. npm test -- --run>
- Lint and format: <exact command>
## How to work
- Work on one ticket at a time. Put the ticket id in the branch name and every commit subject.
- Before editing, read the files you will touch and the tests that cover them.
- Keep changes inside this repository. Ask before adding a dependency.
- Never commit secrets, .env files or generated build output.
- Run the tests before you say a task is done. Paste the result.
## When to stop and ask
- A migration, a schema change or anything that deletes data.
- A change to auth, billing or permissions.
- Tests fail twice for a reason you can't explain.
## Done means
- Tests pass, the diff is small and reviewed by you once more.
- A short report: what changed, why, files touched, PR link.
How do the sandboxes and permissions compare?
Codex sandboxes by default: in the CLI and IDE extension it runs in workspace-write mode, which can edit the working directory but keeps network access off. Claude Code's Bash sandbox is something you turn on and configure; once on, the operating system enforces which files and network hosts its shell commands can reach.
Codex. OpenAI's approvals and security doc describes the Auto preset as --sandbox workspace-write --ask-for-approval on-request. Codex asks before it edits outside the workspace or runs a command that needs the network. For planning only, run codex --sandbox read-only --ask-for-approval on-request.
Claude Code. Per Anthropic's sandboxing doc, shell commands get "no direct route out." Connections go through a local proxy that checks each host against your allowed domains, and that list starts empty. On Linux it uses bubblewrap, which can need an AppArmor profile inside containers.
In short: Codex is locked down out of the box; Claude Code is more configurable but needs setup before unattended runs.
How do Codex and Claude Code compare on MCP, skills, hooks and subagents?
Both support MCP servers, skills, hooks, subagents, plugins and pull request review. They differ in where the config lives and which plans get each feature. Each cell links the vendor doc we checked on November 14, 2026.
| Feature | OpenAI Codex | Anthropic Claude Code |
|---|---|---|
| MCP servers | STDIO and Streamable HTTP, with bearer token auth; codex mcp add, stored in config.toml (doc) |
Remote HTTP and local stdio; claude mcp add --transport http (doc) |
| Skills | Agent skills: a SKILL.md with instructions, resources and optional scripts (doc) | A SKILL.md, used when relevant or called with /skill-name (doc) |
| Hooks | Scripts or MCP tools on events such as PreToolUse, PostToolUse and Stop (doc) | Hook events with command, HTTP, prompt and MCP tool hooks (doc) |
| Subagents | Built-in agents, plus custom TOML agents in .codex/agents/ (doc) |
Custom subagents as Markdown files in .claude/agents/ (doc) |
| Plugins | Browse and install plugins on supported surfaces (doc) | Bundles of skills, agents, hooks and MCP servers from a marketplace (doc) |
| PR review | @codex review or automatic reviews on GitHub, with rules in AGENTS.md (doc) |
Code Review on GitHub PRs, for Team and Enterprise plans (doc) |
For a team running both, MCP is the common ground: one server, such as your tracker's, works in each tool.
What did we see running Claude Code on real tickets?
Our numbers are Claude Code only. As of November 14, 2026, our workspace holds 104 Claude Code sessions on claude-opus-5-5 totalling 3,024 minutes, about 29 minutes each, plus 22 on claude-sonnet-5-5. Each session is tied to the ticket it worked.
The number that changed how we read pricing pages is the token split. Across the 45 sessions with recorded tokens, agents used about 1.28 billion input tokens and 4.75 million output tokens, roughly 269 input tokens for every output token.
Priced at Opus 5.5 API rates for scale, that input costs about $256 if every token is a cache hit at $0.20 per million, and about $5,100 if none are, at $4 per million. The output side is about $95 either way. So on an API key, compare cached-input prices first.
On Codex, our use is narrower. We run the open-source Codex CLI in a sandbox with no network for small, scoped chores, such as a single-file edit that comes with a test, pointed at a self-hosted model through its provider settings.
Should you run Codex and Claude Code together?
Yes, if you can afford two subscriptions: route clear tickets and reviews to Codex and exploratory work to Claude Code. The catch is that you can't tell which agent did what, or what it cost, unless something records it per ticket.
That gap is why we use Jenzo, a ticket tracker that agents work over MCP or the API. Codex and Claude Code connect to the same Jenzo MCP server, and each session on a ticket stores the agent, model, active time and tokens. A ticket closes only with proof. After a month you can say which agent closed which tickets at what cost, instead of reading two invoices. Our guides to AI agent observability and Claude Code's task list cover the tracking side.
Copy this scorecard into a sheet for a two-week bake-off.
Codex vs Claude Code bake-off scorecard (one row per ticket)
ticket_id | type (bug/feature/refactor/test) | agent | model | plan or API
minutes_active | input_tokens | output_tokens | cached_share
first_attempt_passed_tests (y/n) | review_rounds | lines_changed
human_minutes_spent | merged (y/n) | cost_usd (API) or share of plan
Score each agent on:
1. Merged tickets per week
2. Review rounds per merged ticket
3. Human minutes per merged ticket
4. Cost per merged ticket
5. Tickets it should not have been given (count)
Count human minutes honestly: an agent that is cheaper per token but needs three review rounds costs more. Our human in the loop guide covers where to put those review points.
Which should you choose, Codex or Claude Code?
Codex for tickets clear enough to hand off. Claude Code for tickets that need digging first. Both, if you can pay for two plans and want data instead of an opinion.
Choose Codex if:
- You want network off by default, with no setup on day one.
- You start three or four cloud tasks before lunch and review the diffs after.
- You want to know the Plus allowance per model before you buy.
- ChatGPT Business is already on your company card.
Choose Claude Code if:
- Your repository is big and the agent has to read a lot before it edits.
- Someone on the team will write hooks and permission rules and own them.
- Some tasks run longer than one sitting, which is what Fable 5.2 is for.
- You are on Claude Team, where a premium seat carries 5x a standard one.
| Reader | Our pick | Why |
|---|---|---|
| Solo developer on a $20 budget | Codex on ChatGPT Plus | Plus shows 350 to 3,000 Luna messages per 5 hours, so small chores barely dent it |
| Developer doing deep refactors | Claude Code on Max | $100 buys 5x Pro every 5 hours, and you stay in the loop while it reads |
| Engineering lead with 10+ developers | Both, routed by task type, tracked per ticket | After a month you know cost per merged ticket for each agent |
| Security-sensitive team | Codex, or Claude Code with the sandbox configured first | Codex ships with network off; Claude Code's allowlist starts empty once you switch it on |
| Team already on Claude Team or ChatGPT Business | The one you already pay for, for a month | Score ten tickets before you add a second bill |
We run the third row ourselves. For tools that manage several agents at once, see our AI agent management platform comparison; for the per-ticket record, see Jenzo.
FAQ
Is OpenAI Codex better than Claude?
Not across the board. Codex is stronger on scoped, hand-off tasks and parallel cloud work, with a sandbox on by default. Claude Code is stronger on long, interactive sessions in large codebases. Benchmarks flip with each release, so test both on ten of your own tickets.
How much does Claude Code cost?
As of November 2026, Claude Code is included in Claude Pro at $20 a month ($17 billed annually), Max at $100 and Ultra at $200. Team seats cost $20 to $25 for standard and $100 to $125 for premium. Anthropic's costs doc puts the enterprise average at about $13 per developer per active day.
Is Claude worth $100 a month?
It is if you hit Pro's limits most weeks. Max costs $100 and gives 5x Pro usage every five hours and every week, Fable access up to half your weekly limit, and $100 a month in API credits. If you rarely hit limits on Pro, the extra spend buys little.
Can Claude Code read AGENTS.md?
Yes, from v2.1.277. Claude Code reads a repository's AGENTS.md when no CLAUDE.md or CLAUDE.local.md sits in your working directory or above it. Your personal ~/.claude/CLAUDE.md and rules files still load alongside it. Set Project instructions to claude-md-and-agents-md to read both.
What is the difference between Codex CLI and Codex cloud?
The Codex CLI runs on your machine, in a workspace-write sandbox with network off by default, and you watch it work. Codex cloud runs tasks in a container against a repository from your connected GitHub or GitLab account, so you can start several at once and review each diff before opening a pull request.
From our own experience
We expected the model to be the whole story. Now we look at the setup around it first: a short instructions file, a test the agent has to pass, and a close step that asks for proof. The surprise was the token split. Once we saw input outweigh output about 269 to 1, we stopped reading headline prices and started reading cache prices.
Let your agents keep the board.
Claude Code, Codex and Cursor open their own tickets, log hours and tokens, and close them with the commit.
Connect your agent