OpenAI Codex overtakes Claude Code
TECH

OpenAI Codex overtakes Claude Code

30+
Signals

Strategic Overview

  • 01.
    Codex CLI 0.128.0 (April 30, 2026) shipped persisted /goal workflows that let the agent loop autonomously through plan-execute-test-refine cycles until a goal is met or a token budget is exhausted.
  • 02.
    On April 9, 2026, OpenAI launched a $100/month ChatGPT Pro tier offering 5x Codex usage versus Plus (10x through May 31, 2026), explicitly positioned against Anthropic's $100 Claude Max plan.
  • 03.
    Codex weekly active users reached 3 million in April 2026, up from 2 million about a month earlier and 6x higher than at the start of the year.
  • 04.
    Despite Codex's surge, Claude Code's annualized run rate exceeded $2.5B by February 2026 versus Codex's estimated $1B+, and Claude Code still accounts for roughly 4% of all public GitHub commits.

What /goal actually is: the Ralph loop, productized

The headline feature in Codex CLI 0.128.0 is /goal, and the mechanics are surprisingly humble. According to Simon Willison's teardown, /goal works by automatically injecting two markdown prompt files — goals/continuation.md and goals/budget_limit.md — at the end of every conversational turn. The continuation prompt nudges the model to keep working; the budget prompt tells it when to stop. That's the Ralph loop pattern that hobbyist developers have been hand-rolling for over a year, now wrapped in app-server APIs, persisted state, and TUI controls for create, pause, resume, and clear. Greg Brockman's framing of it as 'Ralph loop++' was unusually candid about the lineage.

What changes for users is the unit of work. Instead of typing a prompt, watching Codex execute, and then prompting again, you give the agent a goal — 'add SSO to this Django app and ship a passing PR' — and walk away. Codex plans, executes, runs tests, refines, and continues until either the goal evaluates as complete or the token budget is exhausted. The TUI lets you pause and resume a long-running goal across days. This is the concrete shape of the 'autonomous senior-engineer' marketing line: not a smarter single response, but a process that doesn't need you in the loop at all.

The 'overtake' reality check: usage is moving, revenue and benchmarks aren't

The 'Codex overtakes Claude Code' framing is doing a lot of work. The clearest signal supporting it is usage: Codex weekly active users hit 3 million in April 2026, up 6x since the start of the year and surpassing two million only a month earlier. The clearest signals against it are money and code quality. Claude Code's annualized run rate exceeded $2.5B in February versus Codex's estimated $1B+, and Claude Code still processes roughly 135,000 GitHub commits per day — about 4% of all public GitHub commits, with SemiAnalysis projecting that to reach 20% by year-end. On benchmarks the picture splits cleanly: GPT-5.5 leads Terminal-Bench 2.0 (82.7% vs Opus 4.7's 69.4%), while Opus 4.7 leads SWE-bench Pro (64.3% vs 58.6%) — terminal automation versus harder real-world software engineering tasks.

The community read tracks this nuance. Reddit's r/codex hosts a 902-upvote post arguing that Codex 5.5 / xhigh 'actually finishes tasks Claude would bail on,' and a thriving setup ecosystem (awesome-codex-skills, agent-orchestrator, ccusage) is forming around it. But the same threads carry contrarian voices flagging astroturfing concerns and developers migrating back to Claude Code, citing the maturity of subagents and hooks. On YouTube, the dominant emerging narrative is hybrid: Claude Code generates, Codex reviews — a divided workflow rather than a replacement. As one X commentator put it, Claude could keep the revenue lead even if Codex overtakes in usage, given how meager the Opus rate limits are.

The economic engine: token efficiency is the real moat OpenAI is widening

Behind the pricing aggression is a token-economics story that explains why OpenAI can offer 5x usage at $100. On identical tasks, Claude Code uses roughly 4x more tokens than Codex, and GPT-5.5 generates 72% fewer output tokens than Opus 4.7. A YouTube creator's Figma-to-code experiment captured the gap concretely: Codex CLI consumed about 1.5M tokens versus Claude Code's 6.2M for the same task. When your model is structurally cheaper to run per task, you can sell aggressive plan limits without lighting margin on fire — and you can credibly claim 'more coding capacity per dollar across paid tiers,' as OpenAI did at the Pro launch.

That asymmetry is what makes the April 9 / April 30 one-two punch coherent rather than reckless. The Pro tier's 10x promotional Codex multiplier (running through May 31) is a customer-acquisition lever priced off a cost base Anthropic doesn't have. Then /goal raises the ceiling on how much value those tokens can produce by letting a single user stretch one session across days of autonomous work. Anthropic's counter is harder: Opus 4.7 wins on the harder benchmark, but each task it runs is more expensive to serve, which is exactly why r/codex threads describe Claude's $20-tier limits as 'insane' relative to what Codex Free now provides. The risk for Anthropic isn't that Codex is better — it's that Codex is cheaper to use heavily, and heavy use is what generates the GitHub commit and revenue compounding.

The hidden footgun in /goal: a billing UX gap users are already hitting

One detail from the r/codex community deserves more attention than it has received: the /goal feature can silently rack up surprise top-up charges. A widely-shared post from a user running /goal reported 43 unexpected top-up charges with no CLI warnings before each one fired. The activation flag is buried in config — [features] goals = true in config.toml — and once enabled, an autonomous loop running for hours or days will draw from whatever auto-top-up policy the account has configured without surfacing the cumulative spend in the TUI. The community workaround is blunt: turn off auto top-up before using /goal.

This is the predictable downside of productizing the Ralph loop. Hand-rolled loops are written by people who already understand the cost model; a CLI flag invites users who don't. The same property that makes /goal compelling — it doesn't ask you to confirm at each step — is what makes the billing surface dangerous when paired with auto top-ups. Until OpenAI ships an in-loop spend visualization or a soft-cap below the budget exhaustion limit, the prudent path for new users is to scope each goal with a hard token budget at creation time and disable account-level top-ups, not rely on the loop's self-evaluation to stop in time.

Historical Context

2025-05
Codex first launched as an autonomous coding agent powered by codex-1, an o3 variant tuned for software engineering.
2025-10
Codex reached general availability after a staged research-preview rollout.
2025-11
Claude Code reached $1B run-rate revenue six months after public availability, becoming the fastest-monetizing developer product in Anthropic's portfolio.
2026-02
Claude Code annualized run rate exceeded $2.5B, more than doubling since the start of the year.
2026-04-09
OpenAI launched a $100/month ChatGPT Pro tier with 5x (promotionally 10x) Codex limits, explicitly targeting Claude Max.
2026-04-30
Codex CLI 0.128.0 shipped persisted /goal workflows for long-running autonomous coding tasks, with TUI controls for create, pause, resume, and clear.

Power Map

Key Players
Subject

OpenAI Codex overtakes Claude Code

OP

OpenAI

Maker of Codex; shipped the /goal feature in CLI 0.128.0 and used the $100 ChatGPT Pro tier as a direct pricing strike against Claude Max, positioning Codex as a senior-engineer-style autonomous agent.

AN

Anthropic

Maker of Claude Code, the incumbent leader in coding-agent revenue at $2.5B ARR by February 2026, supported by an entrenched ecosystem of subagents and hooks that long-time users still cite as a reason to stay.

DE

Developers and enterprise coding teams

Primary users whose adoption decides the market: 18% of developers reported using Claude Code at work as of January 2026 versus only 3% for Codex, though Codex's WAU base is closing fast.

SI

Simon Willison

Independent developer-analyst whose teardown framed /goal as OpenAI productizing the community's Ralph loop pattern, shaping how technical readers interpret the release.

SE

SemiAnalysis

Analyst firm tracking Claude Code's share of public GitHub commits (~4% as of March 2026, projected to 20% by year-end), an independent yardstick for who actually writes shipping code.

Source Articles

Top 1

THE SIGNAL.

Analysts

"The feature is mainly implemented though the goals/continuation.md and goals/budget_limit.md prompts, which are automatically injected at the end of a turn — framing /goal as OpenAI's productized Ralph loop."

Simon Willison
Independent developer and blogger

"If Claude Code won the early power-user beachhead, Codex may still be building the larger operating system — cautioning against declaring a winner based on early revenue alone."

Mark Chen
Industry analyst, Medium

"Compared with Claude Code, Codex delivers more coding capacity per dollar across paid tiers, with the difference showing up most clearly during active coding use."

OpenAI spokesperson
OpenAI

"Described the /goal release as Codex now having a built-in 'Ralph loop++,' positioning autonomy-by-default as a first-class product capability rather than a CLI affordance."

Greg Brockman
President, OpenAI
The Crowd

"Codex CLI shipped /goal (v0.128.0) You can now keep Codex running for days. Set a persistent goal. Codex loops autonomously: Plan -> Execute -> Test -> Refine It does not stop until the goal is achieved. The idea behind it: the Ralph loop keep a goal alive across turns"

@@hqmank0

"codex now has a built in Ralph loop++:"

@@gdb0

"Inside OpenAI's race to catch up with Claude Code, based on interviews with 30+ sources; a source says Codex had $1B+ in annualized revenue by January's end (@zeffmax / Wired)"

@@Techmeme0

"With this setup CODEX is far better than Claude Code"

@u/No_Parking4907902
Broadcast
Stop using Claude. Start using Codex?

Stop using Claude. Start using Codex?

OpenAI Just Killed Claude Code

OpenAI Just Killed Claude Code

[Amazing Update] The new /goal feature in OpenAI Codex v0.128.0 deep dive

[Amazing Update] The new /goal feature in OpenAI Codex v0.128.0 deep dive