War in the Terminal
The two most powerful AI coding tools in the world are both claiming victory — and they're both right. OpenAI reports that Codex now has over 3 million weekly users (OpenAI via coursiv.io, May 2026) and claims the tool is four times more token-efficient than Claude Code (OpenAI claim reported by aitoolsrecap.com, April 2026). Anthropic fires back with Claude Code 2.0, 1 million tokens of context, and a rollback system that lets you rewind your code like a time machine. Both are right. Both are wrong. Here's the honest verdict.

Comparison Table
| Feature | OpenAI Codex | Claude Code |
|---|---|---|
| Model | o3 / GPT-4o | Claude Opus 4.7 / 4.8 |
| Context window | 128K (CLI) | 200K standard, 1M (Opus 4.8) |
| Terminal-Bench 2.0 | 77.3% | Not disclosed |
| Parallel execution | Multi-Agent Worktrees (GA) | Parallel subagents (experimental) |
| Project instructions | AGENTS.md | CLAUDE.md |
| MCP support | Yes | Yes |
| Hooks/scripts | Skills system (.codex/skills) | Hooks (shell + HTTP) |
| Memory | Cloud sandbox | Auto Memory |
| Rollback | Not built-in | /rewind (Claude Code 2.0) |
| Voice input | Not listed | 20 languages |
| GitHub integration | Tag @Codex on PR | Not direct |
| Source code | Apache 2.0, Rust-based CLI | Not open source |
| Price (heavy use) | ~$100–200/month (incl. Plus $20) | ~$100–200/month (Claude Max) |
| Platform | CLI, IDE, Web, App, Mobile | Terminal-first, CLI, VS Code |
Sources: aitoolsrecap.com (April 2026), coursiv.io (May 2026), claudify.tech, code.claude.com
Codex: The Machine Gun Approach
OpenAI's Codex CLI is now at version 0.120.0 (April 2026), written in Rust and released as open source under the Apache 2.0 license. This isn't just a coding tool — it's an orchestration system.
Multi-Agent Worktrees is now generally available: you can deploy multiple AI agents working in isolated git worktrees simultaneously, in parallel, without stepping on each other's code (according to vibehackers.io). The cloud sandbox feature lets you fire off asynchronous agent jobs and collect results when they're done — classic fire-and-forget.
> PULLQUOTE: "77.3% on Terminal-Bench 2.0 — Codex leads all rivals on raw terminal task completion"
> (Source: aitoolsrecap.com, April 2026)
The GitHub integration is particularly impressive: tag @Codex on a pull request, and the agent reviews the code automatically, generates comments, and can even push fixes directly (aitoolsrecap.com). For teams living in GitHub, this is a massive time-saver.
The Skills system (.codex/skills) lets you create shareable, distributable instruction packages — think of them as npm packages for AI behavior. The AGENTS.md file provides project-specific instructions, and MCP server integration connects Codex to external data sources and tools.
FACTBOX: Codex Numbers as of June 2026
- 3+ million weekly users (OpenAI via coursiv.io)
- 77.3% Terminal-Bench 2.0 score (aitoolsrecap.com)
- ~4x more token-efficient than Claude Code (OpenAI's own claim)
- 128K tokens of context in the CLI version
- $20/month for Plus users (Codex included)
Claude Code: The Brainpower Strikes Back
Anthropic's answer isn't a machine gun — it's a scalpel. Claude Code runs terminal-first with Claude Opus 4.7 as default and, with Claude Code 2.0, 1 million tokens of context via Opus 4.8 (coursiv.io). That's nearly eight times more than Codex CLI.
What does that mean in practice? You can load an entire large codebase, documentation, and test suites into a single context and let the agent reason over everything at once — without losing the thread.
The Agent Teams feature (experimental as of June 2026) introduces Lead and Teammate roles, where a primary agent coordinates specialized sub-agents (heyuan110.com). Parallel subagents in Claude Code 2.0 accomplish much the same thing as Codex's worktrees, but remain marked experimental.
What truly sets Claude Code apart is the Hooks system: shell- and HTTP-based custom scripts triggered by workflow events (claudify.tech, code.claude.com). This is serious automation for developers who want full control. Auto Memory retains build commands and debugging experiences across sessions (juejin.cn) — a feature Codex lacks natively.
The /rewind feature in Claude Code 2.0 is elegant: auto-checkpoints are saved continuously, and you can roll back to an earlier point with a single command. For developers who've ever had an agent tear apart code at 2 a.m., this is pure gold.
Voice input in 20 languages (vibesparking.com) is an unexpected bonus — and could make Claude Code the preferred choice for accessibility-conscious teams.
KEYFIGURE
1,000,000 tokens
Claude Code 2.0 with Opus 4.8 can hold one million tokens in context — roughly equivalent to 750,000 words, or an entire large codebase plus documentation, in a single conversation.
Pricing: Who's Cheaper?
Both tools land in roughly the same place for heavy use:
- Codex: Included in ChatGPT Plus ($20/month), Pro ($200/month), or Business ($30/user/month). API token-based pricing from April 2026. Estimated $100–200 per developer per month for intensive use (aitoolsrecap.com).
- Claude Code: Claude Max subscription at $100–200 per month (coursiv.io).
For teams, Codex is potentially cheaper via the Business plan, but API costs can escalate quickly for high-volume agentic use. Claude Max offers more predictable pricing.
Note: Both companies' pricing estimates are their own. Actual costs vary significantly with usage patterns.
The Competition Around Them
It's worth noting that Codex and Claude Code don't compete in a vacuum:
- Grok Build (xAI) offers 8 simultaneous sub-agents, 2 million tokens of context, and automatic routing between Grok Code Fast 1 and Grok 4.3 for $299/month ($99 for the first six months) (coursiv.io). That's the largest context window on the market.
- Cursor SDK runs multi-model with Composer 2 as default at $0.50 per million input tokens (lushbinary.com) — cheapest for token-intensive workflows.
- GitHub Copilot now has agent mode GA in JetBrains (March 2026) and PR creation via agentic architecture (coursiv.io) — and is deeply integrated for dev teams already living in the GitHub ecosystem.
Codex's GitHub integration puts it closest to Copilot in use case — but with more advanced orchestration.
TIMELINE: Key Events in 2026
- January 2026: Claude Code launches Hooks system and CLAUDE.md support
- March 2026: GitHub Copilot agent mode GA in JetBrains
- April 2026: Codex v0.120.0 released. API token-based pricing introduced. Terminal-Bench 2.0 results published
- May 2026: Codex passes 3 million weekly users. Claude Code 2.0 launches with /rewind, auto-checkpoints, and 1M-token context
- June 2026 (now): Codex mobile support added. Claude Code Agent Teams still experimental
Who Should Choose What?
Choose Codex if:
- You work in GitHub and want automatic PR reviews
- You need async, parallel agents running in the background while you do something else
- You're already a ChatGPT Plus subscriber and want the tool included
- You value open source and want to contribute to or fork the CLI
- You need broad platform support (CLI, IDE, Web, App, Mobile)
Choose Claude Code if:
- You work with large, complex codebases requiring deep context
- You want rollback and auto-checkpoints as a safety net
- Hooks and custom scripts are important to your workflow
- You need voice input or accessibility features
- Reasoning and reliability outweigh raw terminal speed
BOTTOM LINE
OpenAI Codex wins on breadth, speed, and integration. Three million weekly users and 77.3% on Terminal-Bench 2.0 are numbers you don't ignore. The open source CLI and GitHub integration make it the natural choice for teams already deep in the OpenAI and GitHub ecosystem.
But Claude Code wins on depth. One million tokens, /rewind, and a mature Hooks system make it the safer choice for developers who can't afford to gamble with complex, critical code. Agent Teams is still experimental — but the direction is clear.
The 2026 verdict: Codex for speed and scale. Claude Code for reliability and complexity. Most serious development teams will end up using both.
Source assessment: This article has been verified against 2 open primary sources (code.claude.com/docs, github.com/openai/codex) and 6 independent analyses/news sites (aitoolsrecap.com, coursiv.io, claudify.tech, vibehackers.io, heyuan110.com, vibesparking.com). OpenAI's token-efficiency claim is the company's own and has not been independently verified.
