Blog
Insights
Claude Code vs OpenAI Codex 2026: Pricing & Speed
Claude Code vs OpenAI Codex in 2026: compare Claude Fable 5.1 and GPT-6 Astra on pricing, benchmarks, and context, and see which coding agent fits you.

Nafis Amiri
Co-Founder of CatDoes

Both coding agents swapped frontier models in the space of three days. Anthropic shipped Claude Fable 5.1 on September 1, 2026. OpenAI shipped GPT-6 Astra on September 3 and made it the Codex CLI default on September 4. Any Claude Code vs Codex comparison written before September 2026 is describing models that are no longer the default on either side.
This guide compares Claude Code vs OpenAI Codex on the lineup that actually ships today: pricing, context windows, published benchmarks, sandboxing, and workflow. Every figure is drawn from vendor documentation, and the places where Anthropic and OpenAI report different numbers for the same model are flagged rather than smoothed over.
TL;DR
Claude Code's frontier model is Claude Fable 5.1 (September 1, 2026) at $10 per million input tokens and $50 output. Claude Opus 5 remains Anthropic's recommended starting point for coding at $5/$25 with a 1M-token context window.
Codex now defaults to GPT-6 Astra (September 3, 2026), also $10/$50, with a 1.05M-token context window. GPT-5.6 Sol dropped to $4/$20 and is the cheaper frontier option.
Frontier to frontier, the price gap has closed completely: Fable 5.1 and GPT-6 Astra cost exactly the same per token.
On vendor-published Terminal-Bench 4.0, Astra leads at roughly 57.7 against Fable 5.1's 55.8 and Opus 5's 52.3. On DeepSWE v1.1 the two are effectively tied. Neither lab publishes SWE-bench Verified for its current models anymore.
Claude Code is a supervised, local-first agent with deep hook and skill customization. Codex is an autonomous cloud executor with a Rust CLI, AGENTS.md support, and a free tier. Most experienced developers run both.
CatDoes routes every prompt to the right model tier (Junior, Senior, Principal) so non-technical builders get the quality-versus-cost tradeoff handled for them.
Last updated: September 2026. Rebuilt for Claude Fable 5.1 (September 1, 2026) and OpenAI GPT-6 Astra (September 3, 2026), with refreshed API pricing, the Terminal-Bench 4.0 and DeepSWE v1.1 boards, current subscription tiers, and Anthropic's September 14 weekly limit change.
Table of Contents
Claude Code vs Codex: The Quick Verdict
Side-by-Side Comparison Table
Claude Code: Strengths and Limits
OpenAI Codex: Strengths and Limits
Benchmarks: What the Numbers Say
Pricing and Token Efficiency
When to Use Claude Code vs Codex
Claude Code vs Codex FAQ
Pick Your Agent, or Let One Pick for You
Claude Code vs Codex: The Quick Verdict
Claude Code is Anthropic's coding agent. It started as a terminal tool and now runs across five surfaces that share one engine, one CLAUDE.md, and one settings file: the CLI, a desktop app for macOS, Windows, and Linux, the web and mobile apps, a VS Code extension, and a JetBrains plugin. Your code stays on your machine. The agent shows its reasoning, and since August 2026 it defaults to "auto" mode, where a classifier reviews proposed actions instead of stopping to ask you about each one.
Codex is OpenAI's coding agent, and it made the opposite bet. The CLI is written in Rust, runs locally, and pairs with Codex cloud, where you hand off a task and get a branch or pull request back. In July 2026 the standalone Codex desktop app was folded into the ChatGPT desktop app, consolidating both under one product.
The shortest answer for late 2026: the two are much closer than they were six months ago. The per-token price gap at the frontier is now zero, both offer roughly a million tokens of context, and published benchmark gaps sit within a few points. What still separates them is posture. Claude Code is built to be supervised and deeply customized. Codex is built to be delegated to and to run unattended.

Side-by-Side Comparison Table
Here is the comparison at a glance, current as of September 9, 2026. The sections below go deeper on each row.
Feature | Claude Code | Codex |
|---|---|---|
Frontier model | Claude Fable 5.1 (Sept 1, 2026) | GPT-6 Astra (Sept 3, 2026) |
Default coding model | Opus 5 (Max, Team Premium, Enterprise); Sonnet 5 (Pro, Team Standard) | GPT-6 Astra |
Context window | 1M tokens | 1.05M tokens |
Frontier API price | $10 / $50 per MTok | $10 / $50 per MTok |
Mid-tier API price | Opus 5: $5 / $25 | GPT-5.6 Sol: $4 / $20 |
Terminal-Bench 4.0 | 55.8 (Fable 5.1), 52.3 (Opus 5) | ~57.7 (Astra) |
DeepSWE v1.1 | ~74% (Opus 5), 67.4% (Fable 5.1) | 74.1% (Astra) |
Workflow | Supervised, local-first | Autonomous, cloud plus local |
CLI language | Native binaries | Rust |
AGENTS.md | Not supported | Supported, with per-directory hierarchy |
Entry plan | Pro, $20/mo | Free $0, Go $8/mo |
Latest version | v2.1.266 (Sept 8, 2026) | v0.153.4 (Sept 4, 2026) |
Two rows do most of the work now. Codex is the only one of the two with a genuinely free tier and an $8 entry plan, and Codex is the only one that reads AGENTS.md. Everything else has converged.
Claude Code: Strengths and Limits

Claude Code reads your local filesystem directly and never uploads your repository to a cloud sandbox, which matters under an NDA or on proprietary code. All three current models (Fable 5.1, Opus 5, Sonnet 5) carry a 1M-token context window, and Anthropic does not charge a premium for long context: a 900,000-token request bills at the same per-token rate as a 9,000-token one.
What Claude Code does better than Codex:
Customization depth. Hooks fire on lifecycle events, including model-switch events, and can run conditionally. Skills are folder-based instruction packs loaded on demand, and custom slash commands were merged into them.
Checkpointing. A snapshot is taken before every change. Esc-Esc or /rewind rolls back both files and conversation, and can resume from before a /clear.
Subagents. Each gets its own context window, tool permissions, and model, and they nest up to five levels deep.
Permission granularity. Six modes, from fully manual through plan mode to bypass, with OS-level sandboxing via macOS Seatbelt and Linux bubblewrap.
Cheap mid-tier. Sonnet 5 at $2/$10 with the full 1M window is the least expensive million-token frontier-class model either lab ships, and its introductory pricing was made permanent.
Where Claude Code falls short:
No AGENTS.md. Anthropic still does not support the cross-tool AGENTS.md standard. The feature request has drawn roughly 5,000 GitHub reactions and public criticism from Shopify's Tobi Lütke.
Weekly limits are tightening. Anthropic has said that from September 14, 2026 it will permanently raise standard weekly Claude Code limits by 25% against the pre-May baseline. Because a temporary +50% promotion has been running since May 13, the company clarified this works out to a 17% reduction compared to what subscribers have had all summer.
No free tier. Claude Code starts at the $20/mo Pro plan. Codex has a free tier and an $8 plan.
Tokenizer inflation. Claude 4.7 and later use a tokenizer that produces roughly 30% more tokens for the same text, so headline per-token prices are not directly comparable to older Claude models or to competitors.
If you want a deeper look at how we route work across model tiers inside our own product, see our CatDoes vs Claude Code comparison.
OpenAI Codex: Strengths and Limits

Codex spans more surfaces than any competing agent: the Rust CLI, IDE extensions for VS Code, Cursor, Windsurf, JetBrains and Xcode, Codex cloud, the ChatGPT desktop and web apps, a mobile remote mode that drives a Mac from your phone, a TypeScript and Python SDK, a GitHub Action, and integrations with GitHub, GitLab, Slack and Linear.
What Codex does better than Claude Code:
Free and cheap entry. A genuinely free tier plus an $8/mo Go plan. Claude Code has neither.
AGENTS.md with real scoping. Codex merges a global file with per-directory project files, walking from repo root down to your working directory, with closer files overriding earlier ones under a 32 KiB combined budget.
Autonomous cloud execution. Fire off parallel tasks in reproducible cloud environments and apply results back locally with codex cloud.
Code review as a product. Comment @codex review on a pull request and Codex posts a standard GitHub review, deliberately flagging only P0 and P1 issues. A separate @codex security review runs a security-focused pass.
Long-context retrieval. On OpenAI's MRCR v2 8-needle test, Astra scored 96.3% in the 512K to 1M range against GPT-5.6 Sol's 73.8%.
Migration path. Since August 2026 Codex can import an existing Claude Code, Claude Cowork, or Cursor setup directly.
Where Codex falls short:
Reasoning is harder to audit. Astra uses a technique OpenAI calls opaque recurrence, and its own launch materials concede that "Astra's written reasoning is harder to monitor than Sol's." Chief scientist Jakub Pachocki framed it as monitorability getting harder as capability rises.
Long-context surcharge. Past 272K input tokens, Codex applies 2x input and 1.5x output rates to the entire request. Claude Code charges a flat rate across the full window.
Sandbox escapes have been demonstrated. Security researchers chained prompt injection into host command execution across several agents including Codex during 2026. The specific findings were patched and bug bounties paid, but the class of attack is real.
No plan mode equivalent. Codex has /review for read-only prioritized findings and a separate goal mode, but nothing that mirrors Claude Code's approve-the-plan-before-execution flow.
Aider and Cursor split along a similar terminal-versus-editor line, as we cover in Aider vs Cursor.
Benchmarks: What the Numbers Say
One caveat governs this entire section: every figure below is vendor-reported, drawn from Anthropic's Fable 5.1 announcement and OpenAI's Astra launch table, and no independent replication exists for the September 2026 models. OpenAI states its Astra numbers were run at maximum effort and reflect an elevated-access configuration rather than the default production setup. Anthropic reports a standard error of 3.5 to 4.5 points per model on Terminal-Bench-Science. Treat gaps under three points as noise.

Terminal-Bench 4.0 (agentic terminal tasks)
Model | Score | Reported by |
|---|---|---|
GPT-6 Astra | ~57.7 | OpenAI |
Claude Fable 5.1 | 55.8 | Anthropic |
Claude Opus 5 | 52.3 | Anthropic |
Claude Fable 5 | 42.0 | Anthropic |
GPT-5.6 Sol | 37.3 | Anthropic |
Astra takes this one, though sources transcribing OpenAI's launch table report both 57.7 and 57.9, so read it as "just under 58." The more useful signal is the generational jump: GPT-5.6 Sol at 37.3 was the Codex default until six days ago, and Astra moved the number by roughly twenty points. Anthropic's restricted Mythos 5.1 variant scores 60.9, above both.
Terminal-Bench 2.x scores are not comparable to 4.0. If you see GPT-5.5 quoted at 82.7% on Terminal-Bench 2.0, that is a different, easier benchmark, not evidence it beats Astra.
DeepSWE v1.1 (agentic software engineering)
GPT-6 Astra: 74.1%
Claude Opus 5: approximately 74%
GPT-5.6 Sol: 72.7%
Claude Fable 5.1: 67.4%
This is a tie at the top, and it is the benchmark OpenAI used to fill the agentic-coding slot that SWE-bench Verified used to occupy. Note the ordering oddity: Anthropic's most capable model scores lowest of the four here, while Opus 5, the model Anthropic actually recommends starting with for coding, matches Astra. Bigger is not automatically better for this workload.
A second cross-vendor number reinforces the tie. On the Artificial Analysis Coding Agent Index, Astra scores 67.0 against Fable 5.1's 67.2 and Fable 5's 68.1, putting OpenAI's newest model marginally behind both Anthropic models on that composite.
Where SWE-bench Verified went
If you came looking for a SWE-bench Verified comparison, it no longer exists in any form worth citing. Anthropic omitted it from both the Opus 5 and Fable 5.1 launch materials, leading instead with Terminal-Bench, CursorBench and GDPval. OpenAI published no SWE-bench Verified score for GPT-6 Astra or for the GPT-5.6 family.
The reason is saturation. Top models had converged inside a single point of each other, at which stage the benchmark stops discriminating. Third-party leaderboards still list numbers in the 96 to 97% range for current models, but they are self-reported and they disagree with each other, in one case by more than four points for the same model. Any 2026 article quoting a precise SWE-bench Verified figure for Astra or Fable 5.1 is quoting something neither lab published.
Where the vendors disagree
A useful reality check on all vendor benchmarking: on AutomationBench, Anthropic reports GPT-5.6 Sol at 19.6 while OpenAI reports the same model at 18.1. Neither is lying; they used different scaffolds. That two-point spread on an identical model is a reasonable floor for how much trust to place in any single-digit lead across the tables above.
The older generation head-to-head
The most-cited independent comparison of these two tools predates the current models entirely, and it is worth reading with that caveat attached. In a survey of 500-plus developers conducted during the Opus 4.x and GPT-5.x era, 65% preferred Codex for daily work, while blind reviews of the code produced rated Claude Code cleaner and more idiomatic 67% of the time against Codex's 25%. A published Express.js refactor test from the same period had Claude Code finishing in 1 hour 17 minutes on 6.2M tokens and catching a race condition, against Codex at 1 hour 41 minutes on 1.5M tokens, missing the bug.
Those figures describe retired models and a pricing structure that no longer applies. The qualitative finding has held up in practice, though: Claude Code tends to produce more careful code, Codex tends to get more done per token. What has changed is that the cost consequence of that tradeoff is far smaller now than it was in the spring.
Pricing and Token Efficiency
The single biggest change since mid-2026 is that frontier pricing converged. Fable 5.1 and GPT-6 Astra are priced identically.
Model | Input / MTok | Cached input | Output / MTok |
|---|---|---|---|
Claude Fable 5.1 | $10 | $0.25 | $50 |
GPT-6 Astra | $10 | $1.00 | $50 |
Claude Opus 5 | $5 | $0.50 | $25 |
GPT-5.6 Sol | $4 | $0.40 | $20 |
Claude Sonnet 5 | $2 | $0.20 | $10 |
GPT-5.6 Terra | $2 | $0.20 | $12 |
GPT-5.6 Luna | $0.20 | $0.02 | $1.20 |
Read that table tier by tier and OpenAI is cheaper almost everywhere below the frontier. Sol undercuts Opus 5 on both input and output ($4/$20 against $5/$25), and nothing Anthropic ships competes with Luna at $0.20 input. Anthropic's one decisive win is cached reads at the frontier, where Fable 5.1's $0.25 is a quarter of Astra's $1.00. Full rates are published on Anthropic's pricing page and OpenAI's API pricing page.
Two structural details matter more than the headline rates. Codex applies 2x input and 1.5x output pricing to the entire request once you exceed 272K input tokens, so a single long session gets expensive fast. Claude charges its standard rate across the full 1M window. Pulling the other direction, Claude's post-4.7 tokenizer emits roughly 30% more tokens for identical text, which quietly erodes some of that advantage. Neither effect shows up in a price-per-million comparison, and both show up on the invoice.
Subscription plans
Tier | Claude Code | Codex |
|---|---|---|
Free | Not included | Free, $0 |
Entry | Pro, $20/mo ($17 annual) | Go $8/mo, Plus $20/mo |
Mid | Max 5x, from $100/mo | Pro 5x, $100/mo |
Top | Max 20x | Pro 20x, $200/mo |
Team | Standard $20/seat, Premium $100/seat | Business $20/user |
Both meter the same way: a rolling five-hour window with an additional weekly cap. Neither publishes absolute weekly numbers, so treat any article quoting "X hours per week" as an estimate. OpenAI does publish per-window message ranges on its Codex pricing page, which is more transparency than Anthropic offers: on Plus you get roughly 5 to 45 Astra messages per five-hour window, 10 to 100 on GPT-5.6 Sol, and 250 to 2,000 on Luna.
Anthropic's usage is pooled across claude.ai, Claude Code, the desktop app and Cowork, so there is no separate Claude Code allowance. Codex moved from per-message pricing to token-based credits in April 2026, and Plus and Pro users can buy additional credits rather than upgrading. Codex also still supports plain API keys for the CLI, SDK and IDE extension, though doing so gives up every cloud-backed feature including GitHub code review and Slack.
Prompt caching and context economics
Cache reads are where the real money is on both platforms, and it is the clearest remaining Anthropic advantage. Fable 5.1 reads cache at $0.25 per million tokens, which is 2.5% of its own input rate and a quarter of what Astra charges. If your workflow reloads the same large repository session after session, that difference compounds faster than any benchmark gap.
Anthropic also offers a 50% batch discount and a faster-inference mode on Opus 5 priced at $10/$50, which draws from usage credits rather than counting against plan limits. OpenAI matches the 50% discount on batch and flex modes and charges 2x standard for its own fast mode.
When to Use Claude Code vs Codex
Use Claude Code when:
The change is high-stakes (auth, payments, security-sensitive code) and you want to approve a plan before execution.
You reload the same large codebase constantly and cache-read pricing dominates your bill.
You work with data that cannot leave your machine.
You want programmable hooks, skills, and nested subagents for custom governance.
You want a cheap million-token context model, where Sonnet 5 at $2/$10 has no direct equivalent.
Use Codex when:
The task is well scoped and can run unattended in a cloud sandbox.
You want automated pull request review and security passes in GitHub.
You are cost-sensitive at volume, where Luna at $0.20/$1.20 is unmatched.
You want to start free or at $8/mo.
Your team already standardizes on AGENTS.md across tools.
Use both (still the most common answer):
"Claude Code for architecture, Codex for keystrokes" remains the shorthand. Use Claude Code to design and review the important 20% of changes, and Codex to grind through the mundane 80%. The two companies clearly expect this: OpenAI ships a Codex plugin that runs inside Claude Code, and added direct import of Claude Code configurations in August 2026.
For a concrete hybrid workflow applied to indie mobile app development, our vibe code a mobile app guide walks through where each tool fits in the build loop.
Claude Code vs Codex FAQ
Which is better for beginners, Claude Code or Codex?
Neither, if the goal is to ship a working app without reading code. Both tools assume a developer is reviewing the output. Codex is easier to try because it has a free tier, but that lowers the cost of entry, not the skill requirement. If you have never written code, use an AI-native app builder that handles model routing, backend, and deployment for you, then move to Claude Code or Codex once you need to customize.
Does Claude Code work offline?
No. Claude Code runs your code locally but sends inference requests to Anthropic's API, so it needs an internet connection. What stays local is your codebase, filesystem, and command execution.
Can I use Claude Code and Codex on the same project?
Yes, and many developers do. OpenAI ships a Codex plugin that runs inside Claude Code, and since August 2026 Codex can import an existing Claude Code setup directly. Git branches keep the outputs from conflicting. The main friction is configuration: Codex reads AGENTS.md, Claude Code reads CLAUDE.md, and you will end up maintaining both.
Is GPT-6 Astra worth using over GPT-5.6 Sol?
For hard agentic work, yes. Astra became the Codex CLI default on September 4, 2026 and leads Sol by roughly twenty points on Terminal-Bench 4.0. But it costs $10/$50 against Sol's $4/$20, and the two are within 1.5 points on DeepSWE v1.1. For routine coding, Sol at less than half the price is the better value, and Terra or Luna are better still for high-volume batch work.
What is the cheapest way to try both?
Codex has a free tier, so the true floor is $20/mo: Claude Pro plus Codex Free. Claude Pro drops to $17/mo equivalent if you pay annually. For a fuller test of both, Claude Pro at $20 and ChatGPT Plus at $20 comes to $40/mo, less than most single-tool mid-tier plans. Codex also offers an $8/mo Go tier between free and Plus.
Do Claude Code or Codex replace CatDoes?
Not for mobile app builders. CatDoes handles the full stack: native iOS and Android output, CatDoes Cloud (database, auth, storage, edge functions, realtime), App Store and Google Play submission, and a checkpoint system tuned for iteration. Claude Code and Codex are general-purpose coding tools that assume you have already set up all of that yourself.
Pick Your Agent, or Let One Pick for You
Claude Code vs Codex was a genuine tradeoff six months ago. In September 2026 it is closer to a preference. Frontier pricing is identical, context windows are within 5%, and published benchmark gaps sit inside the margin of error on vendor-reported numbers. Claude Code still owns supervised, customizable, cache-heavy work. Codex still owns autonomous execution, pull request review, and the low end of the price curve.
If you are building a mobile app or website and do not want to track which frontier model shipped this week, try CatDoes free. Describe what you want to build, and the right agent tier (Junior, Senior, or Principal) runs each part of the job, so you get top-tier quality where it matters without burning premium credits on a button color change.

Nafis Amiri
Co-Founder of CatDoes


