Claude Code vs OpenAI Codex

The two frontier-lab coding agents: Anthropic's terminal-native Claude Code versus OpenAI's Codex, which spans an open-source CLI, IDE extension and parallel cloud tasks.

Short answer: choose Claude Code for hands-on, multi-step work in your terminal with Claude models (it leads Terminal-Bench 4.0 at 64.8%); choose OpenAI Codex if you already have ChatGPT and want to delegate tasks to cloud sandboxes that return PRs, plus built-in GitHub code review. Both start at $20/month, and Codex has limited free use.

Side by side

FeatureClaude CodeOpenAI Codex
Made byAnthropicOpenAI
StatusActiveActive
TypeCLI / terminal, IDE extension, Cloud agentCLI / terminal, Cloud agent, IDE extension, Code review
InterfacesTerminal · VS Code / JetBrains · Desktop app · WebTerminal (Codex CLI) · IDE extension · Web / ChatGPT · Desktop app · iOS
Open sourceNo✓ Codex CLI is open source (Apache-2.0); cloud service proprietary
Free tier— No✓ Yes
Starting pricefrom $20/moFree tier · from $20/mo
Plans
Pro: $20/mo ($17/mo billed annually)
Max: From $100/mo
Team: Per seat
Enterprise: $20/seat/mo + usage at API rates
API (pay-as-you-go): Per token
ChatGPT Free / Go: Included (limited)
Plus: $20/mo
Pro: $100, $200 or $500/mo
Business / Enterprise: Per seat
API key: Pay per token
ModelsAnthropic Claude models (Opus, Sonnet, Haiku families)OpenAI GPT models (current GPT-6 family in Codex)
Bring your own key✓ Yes✓ Yes
Agent mode✓ Yes✓ Yes
Autocomplete— No— No
Cloud / background agents✓ Yes✓ Yes
PR code review✓ Yes✓ Yes
MCP support✓ Yes✓ Yes
Self-host option— No— No
Best forDevelopers who are comfortable in the terminal and want an agent that can own multi-step tasks end to end.ChatGPT subscribers who want to delegate well-scoped tasks to background agents and review PRs.
Last verified2026-10-102026-10-10

The real difference: local loop vs delegation

Claude Code is built around an interactive local loop. It explores your repo, plans, edits files and runs commands in your terminal (also IDE, desktop and web surfaces), with MCP servers, hooks and subagents to extend it.

Codex is built around delegation. The CLI and IDE extension work locally, but its distinctive mode is the cloud: each task runs in its own sandbox in parallel and comes back as a diff or pull request, with automatic GitHub code review and Slack integration.

Where Claude Code wins

  • Benchmarks — 64.8% vs 58.2% on Terminal-Bench 4.0 (Oct 2026, max effort).
  • Deep interactive sessions — strong at multi-file changes in large, unfamiliar codebases.
  • Extensibility — MCP, custom slash commands, hooks and subagents.

Where Codex wins

  • Free entry — included (limited) in ChatGPT Free and Go; Plus is $20/month.
  • Parallel cloud tasks — fire off several tickets and review PRs later.
  • Open-source CLI — Apache-2.0, can run with a plain OpenAI API key.

Pricing compared

Claude Code: Claude Pro $20/month ($17/month annually), Max from $100/month, Team per seat, Enterprise $20/seat + API usage, or pay-as-you-go API. Codex: included in ChatGPT Free/Go (limited), Plus $20/month, Pro $100, $200 or $500/month, Business/Enterprise per seat, or an API key (CLI/IDE only); usage beyond the plan allowance is billed in credits. Verified 2026-10-11 on the official pricing pages.

FAQ

Should I use Claude Code or OpenAI Codex?
Pick Claude Code if you want a terminal-first agent driven by Anthropic's Claude models and do most work interactively on your machine. Pick OpenAI Codex if you already pay for ChatGPT and want to hand off tasks to parallel cloud sandboxes that return diffs or pull requests. Both have a $20/month entry plan (Claude Pro; ChatGPT Plus).
Which scores higher on benchmarks?
On the Terminal-Bench 4.0 leaderboard (tbench.ai, October 2026), Claude Code with Claude Opus 5.5 scores 64.8% and Codex with GPT-6 Astra scores 58.2%. On the older Terminal-Bench 2.1 agent-level results (Aug 2026, Artificial Analysis harness) they are nearly tied: Codex 89.5%, Claude Code 89.1%. Benchmarks are one signal, not a verdict.
Is there a free plan?
Codex is included in every ChatGPT plan, including Free and Go with limited usage. Claude Code is not included in Claude's Free plan; it starts with Claude Pro at $20/month ($17/month billed annually) or pay-as-you-go API billing.
Is either open source?
The Codex CLI is open source (Apache-2.0); the Codex cloud service is proprietary. Claude Code is proprietary.
Can I use both?
Yes. They edit the same files and git repo, so some teams run Claude Code interactively and delegate background tickets to Codex cloud tasks, or use Codex's GitHub code review on PRs written with Claude Code.