OpenAI Codex vs Claude Code: Which coding agent should you use?
Summary
Derived from sourced facts, not from builder opinions- On the official Terminal-Bench 4.0 board, which tests each agent with a chosen model, Claude Code with Opus 5.5 leads at 64.85%. Codex scored 58.18% with GPT-6 Astra or GPT-6.1 Sol, all at max effort.
- Both start at $20 a month: Claude Pro and ChatGPT Plus. Codex also has Free and $8 Go tiers. Claude Code is not in Claude's free plan.
- Codex publishes usage ranges per model (Plus: about 15-160 messages per 5 hours with GPT-6.1 Sol), shared with ChatGPT Work. Claude Code publishes rolling 5-hour and weekly windows without per-plan numbers.
- Claude Code is built for Claude models. Other makers' models need an API that accepts Anthropic's format, set up and billed separately. Codex runs OpenAI models only.
Choose OpenAI Codex if
Choose Claude Code if
Follow both to get an email when either one changes its price, limits or behavior.
Plans
OpenAI Codex plans
GPT-6 Luna in the desktop app, rolling out
GPT-6 Luna in the desktop app, rolling out
Web, CLI, IDE and iOS · GPT-6.1 Sol and GPT-6 Luna
Plans at $100, $200 or $500 · no five-hour limit
Per user monthly · $20 billed annually
Claude Code plans
Claude Code included · billed $17/month annually
From $100: 5x or 20x Pro usage
Per seat, monthly · $20 billed annually
5x a standard seat · $100 billed annually
Per seat billed annually, 20-seat minimum, plus usage at API rates
Subscription agents are priced per seat with usage limits, so this compares plans rather than dividing a subscription by a guessed number of tasks.
Side by side
Scores appear side by side only when both were published for the same test. Settings differ between sources, so small gaps can reverse under another harness.
Updates
OpenAI Codex
Switching checklist
- Install Claude Code with curl -fsSL https://claude.ai/install.sh | bash on macOS or Linux, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell, then run claude in your project.
- Sign in with a Pro, Max, Team or Enterprise plan, or a Console account. The free Claude plan does not include Claude Code.
- Keep your AGENTS.md. Claude Code reads it as the project instructions when the repository has no CLAUDE.md (version 2.1.277 or later).
- Run /init to generate a CLAUDE.md from your codebase, or add one that imports AGENTS.md if you want Claude-only instructions on top.
- Move MCP servers out of the [mcp_servers] tables in ~/.codex/config.toml.
- Recreate your MCP servers with claude mcp add, or claude mcp add-json with the object inside mcpServers. Use --scope project to write a shared .mcp.json, and add "type": "http" to any url entry.
- Review permissions: Claude Code reads files without asking and asks before it edits files or runs most commands, close to Codex's default workspace-write with on-request approvals.
- Pick a model with /model: opus (Opus 5.5) is the default on paid plans, with sonnet, haiku and fable also available.
- Run one real task in your own repository with both tools and compare the diffs before moving a team.
FAQ
Is Claude Code better than Codex?
On the official Terminal-Bench 4.0 board, Claude Code with Opus 5.5 scored 64.85% and Codex scored 58.18% with GPT-6 Astra or GPT-6.1 Sol, all at max effort. No other shared test covers both agents.
How much do Claude Code and Codex cost?
Both start at $20 a month (Claude Pro, ChatGPT Plus). Codex also has Free and $8 Go tiers and Pro plans at $100, $200 or $500.
What are the Codex usage limits?
On Plus, about 15-160 local messages per 5 hours with GPT-6.1 Sol and 5-45 with GPT-6 Astra. ChatGPT Work shares the same allowance. Pro has no five-hour limit.
Can Claude Code use GPT models?
Not as a built-in choice. Claude Code's model settings list Claude models through the opus, sonnet, haiku and fable aliases. Other makers' models need an API that accepts Anthropic's format, set up and billed separately.
Can Claude Code read my AGENTS.md?
Yes. Claude Code reads AGENTS.md as the project instructions when the repository has no CLAUDE.md, from version 2.1.277.
Is Claude Code free?
No. It starts with Claude Pro at $20 a month, or $17 billed annually.
Where can I use Claude Code?
In the terminal, VS Code, JetBrains, the desktop app, the web and the iOS and Android app.