← Field Notes
Tools11 August 2026·6 min read·Chris Ma

THE
$140
QUESTION.

Claude Code vs OpenAI Codex. Same task, very different bill.

AIClaude CodeCodexDev Tooling

In one documented Express.js refactor, Claude Code cost $155. Codex cost $15. Same task, same outcome: a working, passing codebase, but one ran 10× the bill. That gap is real. So is the other direction: blind code-quality reviews of the same output preferred Claude Code 67% of the time vs Codex's 25%.

Neither number wins the argument cleanly. They tell you what you're trading, not what to choose.

Key Takeaways
  • In one documented Express.js refactor, Claude Code cost $155 vs Codex’s $15 for the same passing outcome: a real 10× cost difference on an identical task.
  • Blind code-quality reviews of the same output preferred Claude Code 67% of the time vs Codex’s 25%. The quality premium is real and so is the price premium.
  • Context window is the decisive technical differentiator: 1M tokens (Claude Code) vs 200K (Codex). On tightly coupled legacy codebases, Codex has to sample what Claude Code can hold whole.
  • Use Codex for well-scoped greenfield work. Use Claude Code for deep legacy refactors where full-codebase context changes the outcome.
01

CONTEXT WINDOW

#

1M tokens vs 200K. On a greenfield project with clean module boundaries, the difference is irrelevant. On a three-year-old monolith with circular imports, undocumented global state, and ten contributors' worth of conflicting conventions — it's the whole game.

Claude Code can hold the full codebase graph while making a change. Codex has to sample it. Whether that sampling degrades the result depends entirely on how interconnected the code is. On a tightly coupled legacy codebase, it usually does.

CONTEXT WINDOWClaude Code1,000,000 tokensOpenAI Codex200,000 tokens5× smaller
1M vs 200K token context window — 5× difference; significant on large, interconnected codebases.

This is the most durable differentiator between the two tools — not benchmark scores, which shift with every model update, but a structural fact about how much each agent can hold at once.

02

BENCHMARKS VS REVIEWS

#

On Terminal-Bench 2.0, Codex leads: 82.7% vs 69.4%. On SWE-bench Verified, they're effectively tied: 88.7% vs 88.6%. Both measure whether the tool completed an automated evaluation of a coding task — not whether a senior developer would merge that output without edits.

Claude CodeOpenAI CodexTERMINAL-BENCH 2.069.4%82.7%SWE-BENCH VERIFIED88.6%88.7%BLIND CODE-QUALITY% preferred in review67%25%
Benchmark scores vs blind code-quality reviews — divergence is the story.

The blind review number is the interesting one. A 42-point gap in human code-quality preference doesn't show up in benchmark pass rates because benchmarks are binary — the test either passes or it doesn't. They don't measure readability, consistency with existing patterns, or whether the approach you'd have chosen yourself.

How to read these numbers

SWE-bench Verified and Terminal-Bench measure different tasks — treat them as directional, not directly comparable. Blind review numbers vary by evaluator and task type. Verify current figures at source before using them to justify budget decisions.

03

THE ACTUAL COST

#

Claude Code burns 3–4× more tokens per task than Codex on comparable benchmarks. Extended thinking is on by default and billed at 5× the input token rate — meaningful if you're running it iteratively against large files.

SAME TASK · EXPRESS.JS REFACTOR · ONE DOCUMENTED TEST$155Claude Code$15Codex10× cost deltasource: documented community benchmark · treat as directional
Same Express.js refactor — one documented community test. Treat as directional.
Subscription structure

Claude Code runs on your Claude subscription. Usage is shared across Claude Code, Claude.ai chat, and Cowork — heavy chat use eats into your coding budget. The $20 Pro tier is suited for light usage; daily multi-file work generally needs the $100 Max tier.

Codex billing

Codex uses token-based credits separate from ChatGPT's chat budget. Sandbox costs vary by month and codebase size — hard to forecast upfront but easier to cap per task.

The right comparison

Neither is cheap at scale. Model the cost against hours saved, not against each other in isolation. A $140 difference per refactor is noise if it replaces a day of senior engineering time. It isn't if you're running 50 tasks a week.

04

WHEN TO REACH FOR EACH

#

The most effective pattern isn't picking one tool — it's knowing which moment calls for which.

CLAUDE CODEReal-time pairing in editorIterative back-and-forthLarge, tangled codebasesAlready in Claude ecosystemQuality ceiling > per-task costCODEXAsync PRs while doing other workWell-defined, unattended tasksTight budget per taskSandboxed cloud executionDependency bumps, type fixesVS
Workflow fit — the decision is about task shape, not tool quality.

Reach for Claude Code when you're in the editor actively building something, the context needs to span many files, and the iteration is conversational — you're steering, not just queuing work.

Reach for Codex when the task is well-defined enough to hand off unattended: dependency bumps, isolated type fixes, feature flags on a stable interface. It handles async PRs well precisely because the task spec does the steering.

Agent Teams — multiple Claude Code instances sharing a task list — changes this calculus somewhat for large parallel workloads, but that's a workflow for teams rather than solo development.

05

GETTING MORE OUT OF CLAUDE CODE

#

Three habits that materially affect both output quality and cost:

Cap extended thinking

On by default, billed at 5× input token rate. Use MAX_THINKING_TOKENS or /effort to drop it for tasks that don't need deep reasoning — most Marketo scripting, AEM component work, small fixes.

Checkpoint before stepping away

Save progress to a doc, then /clear and restart with compressed context rather than resuming a stale session. A session that's gone cold accumulates confusion — you're better off giving it a clean brief than asking it to pick up mid-thought.

Right model, right task

Default to Sonnet for routine work — scripting, component scaffolding, small fixes. Reserve Opus for genuine multi-file architecture decisions where the extra context comprehension justifies the token cost.

Both tools are accelerators on well-scoped tasks. Neither replaces architectural judgement on ambiguous requirements — that's still your job. The question isn't which AI is smarter; it's which workflow fits what you're building today.

Recommended Reading

Chen et al. · arXiv 2021

The paper that introduced the HumanEval benchmark and established code generation as a measurable LLM capability — the methodology behind most subsequent coding benchmarks.

Peng et al. · arXiv 2023

A controlled experiment showing Copilot users completed tasks 55% faster — the most rigorous published study on AI-assisted coding productivity to date.

John Ousterhout · Yaknyam Press

The clearest articulation of what good code design actually means — essential for evaluating AI-generated code rather than accepting it uncritically.

Continue the conversation

If this changed how you think about it — or you think I'm wrong — I want to know.

Corrections, disagreements, and applications all welcome. Replies go directly to Chris.

Get in touch →
Field Notes · PodcastHost + Expert · Gemini TTS

THE $140 QUESTION

~6-8 min

1× · Two speakers · tap to play