Skip to content

Codex CLI vs Claude Code: The Terminal Agent Title Fight

OpenAI's open-source speedster against Anthropic's polished heavyweight. Benchmarks, pricing, session limits and the verdict per workload.

The Vibe Father 8 min read

Neutral corner

If the terminal agent category has a title fight, this is it: Claude Code, the reference implementation that defined what a coding agent in a shell should feel like, against Codex CLI, OpenAI's open-source challenger with serious price-performance behind it. Both are first-party tools — each lab building the harness for its own models — which makes this matchup unusually clean: you're not just picking a CLI, you're picking a lab.

We run both every day inside our own product, on real repos with real deadlines. Neither one embarrasses itself. But they win different rounds, and pretending otherwise would waste your time.

What Claude Code gets right

It finishes the hard jobs. On the work that actually separates agents — multi-file surgery in large, messy, real-world repos — Claude Code fails less and completes more. The numbers back the feel: Claude Opus 4.8 posts 88.6 on SWE-bench Verified against GPT-5.3 Codex's 74.8. That's not a rounding error; it's the difference between an agent that untangles a gnarly refactor and one that gets most of the way there and needs a second pass. On Terminal-Bench the two are nearly level — 78.9 for Opus 4.8 versus 78.4 for GPT-5.3 Codex — so day-to-day shell competence is a wash. The gap opens on repo surgery.

The deepest agentic toolkit in the market. Hooks that fire on lifecycle events, subagents you can define and dispatch, the most mature MCP support anywhere. Claude Code isn't just an agent; it's an automation surface. Teams build entire workflows on top of it, and nothing else in the terminal category offers the same depth.

Predictable spend. The Pro and Max subscriptions cap your monthly bill at a known figure. The trade — and it's a real one — is the well-known session and weekly caps. Heavy users hit walls, and hitting a wall mid-flow is genuinely painful.

What Codex CLI gets right

Price-performance that's hard to argue with. GPT-5.3 Codex runs at $1.75 per million input tokens and $14 per million output — and delivers 74.8 SWE-bench, 78.4 Terminal-Bench, and a strong 87.3 on LiveCodeBench for it. For well-scoped tasks, competitive-programming-style problems, and high-volume work, you're getting a large fraction of frontier capability at a fraction of frontier cost. If you meter your own usage, the economics favor Codex on most days.

An open-source client. Codex CLI's code is public. The program you're trusting to read your filesystem and run commands on your machine is one you can audit, patch, and fork. Claude Code offers no equivalent, and for security-conscious teams that difference is not cosmetic.

API pricing means no caps. Pay per token and the meter is the only limit. There's no session ceiling, no weekly quota, no "come back Thursday." For bursty workloads — ship week, migration weekend — uncapped access can matter more than a lower average price.

What the benchmarks don't capture

A caution before the table, because we publish benchmarks and we know their limits. SWE-bench measures whether an agent can resolve real GitHub issues; it doesn't measure how the agent behaves when your repo has no tests, when the task is ambiguous, or when the right answer is "stop and ask." In our daily use, Claude Code's edge shows up most in judgment — knowing when to read more before editing, when to back out of a bad approach — while Codex CLI's edge shows up in throughput: it gets more attempts per dollar, and on tasks where attempts are cheap to verify, more attempts often beats better attempts. Neither of those qualities has a leaderboard column, and both matter more than a single-digit score gap on the day you're actually shipping.

It's also worth saying that both tools are moving targets. First-party CLIs improve on their labs' release cadence, and a comparison written in one quarter can rot by the next. Treat the numbers here as the snapshot they are, and check the live board before you commit a team to either.

The economics, plainly

The pricing models are mirror images. Claude Code's subscription gives you a cost ceiling and a usage ceiling; Codex CLI's API pricing gives you unlimited usage and an unlimited bill. Light users often do better on Codex's meter; heavy-but-steady users often do better under Claude's cap; heavy-and-bursty users get squeezed by both in different ways. There's no universal winner here — only your own usage curve, which we'd encourage you to actually look at before choosing. Our live benchmarks track cost alongside capability for exactly this reason.

👑
Claude Code wins the hardest rounds; Codex CLI wins the scorecards where price counts.

Codex CLI vs Claude Code, feature by feature

Capability Codex CLI Claude Code
Open-source client✓ Yes
Hooks / lifecycle automation◐ Partial✓ Yes — deepest in class
Subagents◐ Partial✓ Yes
MCP support✓ Yes✓ Yes — most mature
Model choice— GPT only— Claude only
SWE-bench Verified74.8 (GPT-5.3 Codex)88.6 (Claude Opus 4.8)
Terminal-Bench78.478.9
LiveCodeBench87.3
Model pricing (per 1M in/out)$1.75 / $14Subscription (Pro/Max)
Usage caps✓ None — pay per token◐ Session + weekly caps
Cost ceiling— meter is unbounded✓ Yes — capped subscription

Honest segmentation

Who should pick Codex CLI

  • You optimize for cost per unit of work. At $1.75/$14 with 87.3 LiveCodeBench, the value math is the best first-party offer in the category.
  • You require an auditable client. Open source isn't a preference for you; it's a policy.
  • Your workload is bursty. No session or weekly caps means ship week never hits a quota wall.
  • Your tasks are well-scoped. On contained problems the SWE-bench gap rarely bites, and you pocket the savings.

Who should pick Claude Code

  • Repo surgery is your daily reality. The 88.6-versus-74.8 SWE-bench spread shows up exactly there, and it's the gap you'll feel most.
  • You build on your agent. Hooks, subagents, and mature MCP make Claude Code the better foundation for serious workflow automation.
  • You want a known monthly bill and can work within the caps that come with it.
  • You'd rather pay for fewer retries. A cheaper model that needs a second pass isn't always cheaper.

The closing thought

Title fights make good headlines, but the judges' honest scorecard here is split: Claude Code takes the capability rounds, Codex CLI takes the value rounds, and Terminal-Bench says they're even in the clinch. The right pick tracks your work — hard, sprawling, multi-file problems point to Claude Code; high-volume, well-scoped, cost-sensitive work points to Codex CLI. And an increasing number of developers refuse the premise entirely and run both, routing each task to the agent whose strengths match it. That's the pattern The Vibe Father was built for: both CLIs side by side in one macOS deck, alongside twenty others — the 2026 harness roundup explains why we think that beats picking a champion. For the fuller decision framework, see how to choose an AI coding CLI, and for why the harness matters more than the lab, start here.

Run every AI coding tool. Keep every conversation. Own your work.

The Vibe Father is the model-agnostic command deck we built for ourselves — 22 CLIs, multi-agent teams, your own keys.

Keep reading