Skip to content
WhichAgent

Claude Code vs OpenAI Codex

By · Updated Oct 22, 2026 · Sources linked throughout

At a glance

Claude CodeOpenAI Codex
Form factorCLI, IDE extension, Desktop app, Cloud agent, WebCLI, IDE extension, Desktop app, Cloud agent, Web
PricingPaid, from $20/moFree tier, paid from $8/mo
PlansPro: $20/mo · Max 5x: $100/mo · Max 20x: $200/mo · Team Standard seat: $25/mo · Team Premium seat: $125/mo · Enterprise: contact salesFree: $0/mo · Go: $8/mo · Plus: $20/mo · Pro 100: $100/mo · Pro 200: $200/mo · Pro 500: $500/mo · Business Standard seat: $25/mo · Business Premium seat: $125/mo · Enterprise & Edu: contact sales
Free tierNone. The Claude Free plan does not include Claude Code. You can also pay per token with an Anthropic API key (Claude Console) instead of subscribing.ChatGPT Free and Go include limited Codex in the desktop app (GPT-6 Luna at standard speed, subject to rollout), without Codex Cloud. The CLI can also run on an OpenAI API key billed per token, or on local models through Ollama or LM Studio.
ModelsClaudeGPT, Local models via Ollama or LM Studio, Custom OpenAI-compatible providers
Bring your own API keyYesYes
Local modelsNoYes
Open sourceNoYes (Apache-2.0)
MCP supportYesYes
PlatformsmacOS, Windows, Linux, WebmacOS, Windows, Linux, Web
IDE integrationsVS Code, JetBrainsVS Code, Cursor, Windsurf, JetBrains, Xcode
GitHub stars—130,413
Last commit—Oct 22, 2026
StatusActiveActive

Verified Oct 22, 2026 (Claude Code) and Oct 22, 2026 (OpenAI Codex) from official sources. GitHub figures refresh daily.

What changed recently

Two things to know before you read older comparisons:

  • GPT-5.5 is gone from Codex for ChatGPT users. It was retired on October 14, 2026 for Codex with ChatGPT sign-in. OpenAI now recommends GPT-6.1 Sol for complex coding (Plus and higher) and GPT-6 Luna for focused tasks and on the Free and Go plans. API-key sessions weren’t affected. (OpenAI’s Codex pricing page)
  • Codex now lives inside ChatGPT. The desktop experience is a mode in the ChatGPT desktop app, and Codex shares usage limits and credits with ChatGPT Work. Pro now comes in three tiers: $100, $200 and $500.

The key difference

Claude Code and Codex are the most direct rivals in this space. Both are terminal-first coding agents from a model lab. Both are also available in IDE extensions, a desktop app and the cloud, and both are bundled into that lab’s chatbot subscription.

The differences that actually decide it:

  • Models. Claude Code runs Claude only. Codex runs OpenAI’s GPT models on ChatGPT plans, and its CLI can be configured for local models (Ollama, LM Studio) and other OpenAI-compatible providers.
  • Openness. The Codex CLI is open source under Apache-2.0: you can read, fork and audit it. Claude Code is closed source.
  • Extensibility is close. Both support MCP servers, hooks, subagents and plugins, so this rarely decides it. Claude Code also has skills; Codex has rules and memories.
  • Subscription. Claude Code comes with Claude plans; Codex comes with ChatGPT plans. If you already pay for one chatbot, that’s often the tie-breaker.

Pricing in practice

Tier Claude Code (Claude plans) Codex (ChatGPT plans)
Free Not available Free: limited, GPT-6 Luna in the desktop app (subject to rollout)
$8 — Go: lightweight use, GPT-6 Luna in the desktop app
$20 Pro: $20/month ($17/month billed yearly) Plus: $20/month. Codex on web, CLI, IDE extension and iOS; cloud code review and Slack
$100 Max 5x Pro ($100 tier)
$200 Max 20x Pro ($200 tier)
$500 — Pro ($500 tier), with Ultrafast mode
Teams Team: Standard seat $25/user ($20 billed yearly), Premium seat $125 ($100 billed yearly) Business: $25/user ($20 billed yearly), 2+ users
Pay per token Anthropic API key OpenAI API key

Prices are from the official Claude pricing and Codex pricing pages, checked October 22, 2026.

Two details that matter:

  • Codex’s cloud features need a ChatGPT plan. Automatic code review on GitHub and the Slack integration come with Plus and up, not with an API key.
  • Usage limits differ by model and task on both sides, so the plans don’t translate into a fixed number of tasks. OpenAI’s own pricing page warns that API token prices shouldn’t be used to estimate how many tasks a subscription includes.

Features side by side

Claude Code Codex
Terminal agent Yes (closed source) Yes (Apache-2.0)
IDE VS Code, Cursor, JetBrains VS Code, Cursor, Windsurf, JetBrains, Xcode
Desktop Claude Code desktop app Codex mode in the ChatGPT desktop app
Cloud Cloud sessions in the browser Cloud agent that runs tasks and opens pull requests
Project instructions CLAUDE.md (and AGENTS.md in supported setups) AGENTS.md (/init creates it)
Extensions MCP, hooks, subagents, skills, plugins MCP, hooks, subagents, plugins, rules
Models Claude GPT-6.1 Sol, GPT-6 Luna; local and custom providers in the CLI
Free tier No Limited, on ChatGPT Free and Go

Who should pick which

Choose Claude Code if:

  • you prefer Claude models, or already pay for Claude
  • you want to run Claude through Amazon Bedrock, Google Cloud or Microsoft Foundry for an enterprise deployment
  • you want one agent across terminal, IDE, desktop and browser on a Claude subscription

Choose Codex if:

  • you already pay for ChatGPT, so Codex costs nothing extra
  • you want an open-source CLI you can audit or fork, or want to point it at local models
  • you want a free way to try a coding agent (ChatGPT Free and Go include limited use)
  • you need Xcode or Windsurf integration

Use both if: you want a second opinion on your code. Teams commonly let one agent write a change and the other review it. Keep your project rules in AGENTS.md so both agents follow them.

Hands-on test

We haven’t run a hands-on test of this pair yet. This comparison is based on each vendor’s documentation, pricing pages and repositories, linked on the Claude Code and Codex pages. When we add a test, this page will name the task, the tool and model versions, and the date it was run.

Frequently asked questions

Is Codex free?

Partly. ChatGPT Free and Go include limited Codex use in the ChatGPT desktop app with GPT-6 Luna, subject to rollout. Codex in the CLI, the IDE extension, the web and iOS starts with ChatGPT Plus at $20/month. You can also use the Codex CLI with an OpenAI API key billed per token, or with local models.

Is Claude Code free?

No. Claude Code isn't included in the Claude Free plan. It comes with Claude Pro ($20/month, or $17/month billed yearly) and higher plans, or you can pay per token with an Anthropic API key.

Is Codex open source?

The Codex CLI is open source under the Apache-2.0 license. Codex's cloud agent and the ChatGPT desktop app are proprietary. Claude Code is closed source.

Which models do Claude Code and Codex use?

Claude Code runs Anthropic's Claude models only. Codex recommends GPT-6.1 Sol for complex coding on Plus and higher plans and GPT-6 Luna for focused, repeatable tasks. With its own configuration, the Codex CLI can also use local models through Ollama or LM Studio and other OpenAI-compatible providers.

What happened to GPT-5.5 in Codex?

GPT-5.5 was retired from Codex for ChatGPT sign-in on October 14, 2026. OpenAI recommends switching to GPT-6.1 Sol on Plus, Pro, Business, Enterprise and Edu plans, or GPT-6 Luna on Free and Go. Codex sessions that use an API key weren't affected.

Which is cheaper, Claude Code or Codex?

At the entry level they cost the same: Claude Pro and ChatGPT Plus are both $20/month. Codex goes lower (limited use on ChatGPT Free and the $8 Go plan) and higher (a $500 Pro tier with Ultrafast mode). Claude Code's top individual plan is Max 20x at $200/month. If you already pay for one of the two chatbots, the matching agent costs you nothing extra.

Can I use Claude Code and Codex on the same project?

Yes. Codex reads AGENTS.md, which its /init command creates, and Claude Code can read AGENTS.md in supported setups, so one shared file can hold your project rules. A common pattern is to have one agent write a change and the other review it.

Do both work in VS Code and Cursor?

Yes. Claude Code has an official extension for VS Code and Cursor, plus JetBrains IDEs. The Codex IDE extension works in VS Code, Cursor and Windsurf, and Codex also integrates with JetBrains IDEs and Xcode.

Keep reading

Related comparisons