Compare

Codex vs Claude Code

OpenAI’s Codex or Anthropic’s Claude Code: what each costs, how far each plan goes, how each keeps your machine safe, and what the public agent benchmarks show.

Short answer

Claude Code scores higher, Codex costs less to start.

On November 8, 2026, Claude Code with Claude Opus 5.5 ranks first on the Artificial Analysis Coding Agent Index at 61.7, and Codex with GPT-6 Astra scores 54.7. Both start at $20 a month on ChatGPT Plus or Claude Pro, but Codex also comes with ChatGPT Free and Go, and its $100 Pro plan has no five-hour limit. Claude Code has no free plan.

Overall call

TIE2 picks each

Codex vs Claude Code
Tool

Codex or Claude Code for you?

Checked November 8, 2026

Pick how you work. You get the tool, the plan to buy, and the vendor fact or public benchmark that decides it, with the date we read it.

You arePick per need
  1. 01Pick: Claude Code.
  2. 02Plan: Claude Pro, $20 a month or $17 a month billed yearly. It defaults to Claude Opus 5.5 with a 1 million token context window.
  3. 03Decides it: Artificial Analysis Coding Agent Index, read November 8, 2026. Claude Code with Opus 5.5 (max) scores 61.7, first of all agents; Codex with GPT-6 Astra (max) scores 54.7.

Codex on ChatGPT Plus costs the same $20 and gives 15 to 160 local GPT-6.1 Sol messages per five hours, by OpenAI’s estimate.

  1. 01Pick: Claude Code on a Claude Team plan.
  2. 02Plan: Team Standard seat, $20 a month billed yearly or $25 monthly, for 2 to 150 people. Claude Code is in every seat.
  3. 03Decides it: the seat price is the same as ChatGPT Business ($20 yearly, $25 monthly), so the agent score decides, and Claude Code leads it by 7 points on the Artificial Analysis index.

Pick Codex on ChatGPT Business if your team already pays for it: Codex comes in the same seat, with cloud tasks, GitHub code review, Slack and access tokens for automation.

  1. 01Pick: Codex. Claude Code has no free plan.
  2. 02Plan: ChatGPT Free, $0, or Go, $8 a month. Both run Codex with GPT-6 Luna in the ChatGPT desktop app, subject to rollout.
  3. 03Decides it: both pricing pages, read November 8, 2026. Anthropic lists Claude Code as “No” on Free; its first plan with Claude Code is Pro at $17 a month billed yearly.

With an API key the two cost the same for the mid models: GPT-6.1 Sol and Claude Sonnet 5.5 are both $2 per million input tokens and $10 per million output tokens.

  1. 01Pick: Codex.
  2. 02Plan: ChatGPT Pro, from $100 a month ($100, $200 or $500).
  3. 03Decides it: OpenAI’s Codex pricing page, read November 8, 2026: “Pro plans currently have no five-hour limit.” Claude Max at $100 has a five-hour limit; only Claude Ultra at $200 drops it, for verified accounts.

Codex cloud tasks also keep working while your computer is asleep. Weekly limits can still apply on both.

Codex vs Claude Code: what each AI coding agent is

Codex is OpenAI’s coding agent and Claude Code is Anthropic’s. Both read your repository, edit files, run commands and tests,.

Codex runs in the Codex CLI, an IDE extension for VS Code, Codex Cloud on the web, the ChatGPT iOS app, and the ChatGPT desktop app, where you choose ChatGPT or Codex for each chat. OpenAI’s pricing page says ChatGPT Work and Codex share one usage pool. Claude Code runs in the terminal, VS Code and JetBrains IDEs, the Claude desktop app under its Code tab, the web at claude.ai/code and the Claude apps for iOS and Android.

Codex and Claude Code at a glance, checked November 8, 2026
WhatCodexClaude Code
MakerOpenAIAnthropic
Where it runsCLI, VS Code, cloud, desktop app, iOSTerminal, VS Code, JetBrains, desktop, web, mobile
Default modelRecom­mended model; GPT-6.1 Sol on paid plansClaude Opus 5.5
Context window500,000 tokens (GPT-6.1 Sol)1 million tokens
Free planYes, GPT-6 Luna, desktop appNo
Entry paid planGo $8; Plus $20Pro $20
SandboxOn by defaultOff by default, /sandbox
Rules fileAGENTS.mdCLAUDE.md or AGENTS.md
Agent Index score54.7 (GPT-6 Astra)61.7 (Opus 5.5)
Key pointBoth start at $20 a month and charge the same per token for their mid models. The real differences are the free tier and the $100 plan, where Codex has no five-hour limit, and the benchmark, where Claude Code leads.

Codex vs Claude Code price: plans and usage limits

Checked November 8, 2026, on OpenAI’s Codex Pricing page and claude.com/pricing. US prices per month; Anthropic says tax is not included.

Codex and Claude Code plans, checked November 8, 2026
TierCodexClaude Code
FreeChatGPT Free, $0, Luna onlyNot included
Low costChatGPT Go, $8, Luna onlyNone
Main paidPlus, $20Pro, $20, or $17 billed yearly
$100 tierPro $100, no five-hour limitMax, 5x Pro
$200 tierPro $200Ultra, 10x Pro weekly
Top tierPro $500, Ultrafast modeUltra, $200
Team seatBusiness, $20 yearly, $25 monthlyTeam, $20 yearly, $25 monthly

On Free and Go, Codex means GPT-6 Luna at Standard speed in the ChatGPT desktop app, and OpenAI adds “subject to rollout”. Plus is the first plan with Codex in the CLI, the IDE extension, the web and iOS, plus cloud code review and Slack, and with GPT-6.1 Sol.

Neither vendor gives a fixed message count. OpenAI publishes estimates of local messages per five hours for Plus and Standard Business seats: 5 to 45 with GPT-6 Astra, 15 to 160 with GPT-6.1 Sol, 35 to 285 with GPT-6.1 Terra and 350 to 3,000 with GPT-6 Luna. Cloud tasks use more, and weekly limits may also apply. Pro plans have no five-hour limit. Anthropic gives multiples instead: Max is 5 times Pro usage every five hours and every week, and Ultra is 10 times Pro every week with no five-hour limit for verified accounts.

At a limit, Codex lets the current turn finish; Plus and Pro can then buy ChatGPT credits, and anyone can keep working locally with an API key at API rates. In the CLI, the status command shows what is left. Claude Code offers usage credits at standard API rates, an upgrade, or a Claude Console account billed per token.

RelatedCursor vs Claude CodeVSCursor’s editor and X Subscription plans against Claude Code on a Claude plan.

Codex and Claude Code with an API key: price per million tokens

Both tools also run on an API key, billed per token instead of a plan. OpenAI’s Codex pricing page says an API key gives you the CLI, the SDK and the IDE extension, but no cloud features such as GitHub code review or Slack, and the models your API key can reach. Claude Code works with an Anthropic Console account at standard API prices, and Anthropic warns that if an API key is set in your environment, Claude Code bills the API instead of your plan.

  • GPT-6 Astra: $10 input, $50 output per million tokens.
  • GPT-6.1 Sol: $2 input, $10 output; higher rates apply to long prompts.
  • GPT-6 Luna: $0.10 input, $0.50 output.
  • Claude Opus 5.5: $4 input, $20 output; the full 1 million token window at the same rate.
  • Claude Sonnet 5.5: $2 input, $10 output.
  • Claude Haiku 5.5: $0.10 input, $0.50 output.

Prices checked 2026-11-04 on OpenAI’s and Anthropic’s pricing pages and again on November 8, 2026. At the top, Claude Opus 5.5 costs less per token than GPT-6 Astra.

Which models Codex and Claude Code use

Codex runs OpenAI models. Its docs recommend GPT-6 Astra for the hardest work, GPT-6.1 Sol for “near-Astra performance” at a lower cost, GPT-6.1 Terra for fast everyday work, and GPT-6 Luna for focused, repeatable tasks. If you set no model, Codex uses a recommended model; since GPT-5.5 left Codex on October 14, 2026, OpenAI points paid plans to GPT-6.1 Sol and Free and Go to GPT-6 Luna. GPT-6.1 Sol has a default context window of 500,000 tokens in Codex. An Ultra setting splits big tasks across subagents.

Claude Code runs Claude models. Anthropic’s docs say it defaults to Claude Opus 5.5 on Pro, Max, Ultra, Team, Enterprise and the API, at medium effort. You can switch to Sonnet 5.5, Haiku 5.5 or Fable 5.1. Opus 5.5 and the other current models run with a 1 million token window by default.

Codex sandbox modes vs Claude Code permission modes

This is the biggest design difference. Codex starts sandboxed: commands it runs, including git, package managers and tests, run inside an OS sandbox (Seatbelt on macOS, bubblewrap on Linux and WSL2, a native sandbox on Windows) with network access off. The default Auto preset lets Codex read, edit and run commands in your project folder, and it asks before it edits outside it or uses the network. Other settings, per OpenAI’s security docs:

  • Read-only: Codex can read and plan but not change files; switch with the permissions command.
  • Approval “never”: no prompts, but the sandbox still limits what runs; meant for CI.
  • Auto-review: a reviewer agent checks requests that need approval before they run.
  • Full access: no sandbox and no approvals, which OpenAI marks “not recommended” outside a container.

Claude Code starts from permissions instead. Its docs list six modes, switched with Shift+Tab: Manual, which asks before edits and commands; accept edits; plan, which blocks edits until you approve a plan; auto, where a second model checks each action in the background (the starting mode in the terminal and VS Code from version 2.1.283); don’t ask, for locked-down CI; and bypass permissions, for containers and VMs only. Its Bash sandbox is off by default: you turn it on with the sandbox command, and it covers shell commands only, not file tools or MCP servers.

MCP, skills, AGENTS.md vs CLAUDE.md

Both use the Model Context Protocol. Codex keeps MCP servers in its config.toml file and adds them with the codex mcp add command; Claude Code adds them with claude mcp add and recommends HTTP servers for remote tools.

Both follow the open Agent Skills standard: a skill is a folder with a SKILL.md file and optional scripts, so one skill can serve both tools.

For project rules, Codex reads AGENTS.md files before any work: a global one in your Codex home folder, then each one from the repository root down to your folder, up to 32 KiB by default. Claude Code reads CLAUDE.md at the start of every session, and if a repository has an AGENTS.md and no CLAUDE.md, it reads AGENTS.md instead, so one instructions file can serve a team that uses both.

Is Codex better than Claude Code? Public benchmarks

What the public boards show for the tools, with the date we read them.

  • Artificial Analysis Coding Agent Index v2.0, read November 8, 2026, tests whole agents on FrontierCode, Terminal-Bench 4.0 and SWE-Atlas Q&A. Claude Code with Claude Opus 5.5 (max) ranks first at 61.7; with Sonnet 5.5 (max) it scores 59.3 and with Fable 5.1 (max) 57.6. Codex with GPT-6 Astra (max) scores 54.7, with GPT-6.1 Sol (max) 54.1 and with GPT-6.1 Terra (xhigh) 48.2.
  • Terminal-Bench 2.0 runs each agent on terminal tasks. Codex CLI with GPT-5.5 scores 82.2%, fourth on the board, from April 23, 2026. The newest Claude Code entry is Claude Opus 4.6 at 58.0%, from February 5, 2026. Neither entry uses today’s models.
  • SWE-bench Pro, Scale’s board, tests models in one shared setup, not the tools, and lists no GPT-6 or Claude 5 model when we read it. We could not read the SWE-bench Verified board, which loads with JavaScript.

On the one board that tests both tools with current models, Claude Code is ahead.

Codex vs Claude Code in VS Code and the terminal

Both have a VS Code extension and a CLI. OpenAI’s docs give these steps for the Codex CLI:

  1. 01Install with npm (npm install -g @openai/codex) or Homebrew (brew install --cask codex).
  2. 02Run codex in your project folder and sign in with your ChatGPT account or an API key.

For Claude Code, install it with the native script from Anthropic’s docs, run claude in your project folder and log in with a paid Claude plan or a Console account. In VS Code, install OpenAI’s Codex extension or Anthropic’s Claude Code extension from the Marketplace; both show diffs next to your code. Claude Code also has a JetBrains plugin.

Claude Code vs Codex: which one to pick

Pick Claude Code if you want the agent that scores highest on public tests today and a default model with a 1 million token window, on Claude Pro at $20. Pick Codex if you want to start free or at $8, need long sessions at $100 without a five-hour limit, or want a sandbox that is on from the first run. Teams pay the same $20 or $25 a seat for either, so use the one whose chat app your team already pays for.

FAQ

Is Codex better than Claude Code?

Not on the public agent index. On November 8, 2026, Claude Code with Opus 5.5 scores 61.7 on the Artificial Analysis Coding Agent Index and Codex with GPT-6 Astra scores 54.7. Codex is cheaper to start, with a free tier and a $100 plan with no five-hour limit.

Is Codex free?

Partly. ChatGPT Free and Go include Codex with GPT-6 Luna in the desktop app, subject to rollout. The CLI, IDE extension and cloud tasks with GPT-6.1 Sol start at Plus, $20 a month. Claude Code has no free plan.

Codex vs Claude Code price: which is cheaper?

At $20 they cost the same: ChatGPT Plus or Claude Pro, which is $17 a month billed yearly. Codex is cheaper below that, with Free and Go at $8. Per token, GPT-6.1 Sol and Claude Sonnet 5.5 are priced the same.

Codex vs Claude Code usage limits: which lasts longer?

Neither vendor publishes a fixed count. OpenAI estimates 15 to 160 GPT-6.1 Sol messages per five hours on Plus, and ChatGPT Pro has no five-hour limit. Claude Max is 5 times Pro usage per five hours; Claude Ultra drops the five-hour limit for verified accounts.

Can I use Codex or Claude Code with an API key?

Yes. Codex with an API key runs in the CLI, SDK and IDE extension at API prices, without cloud features. Claude Code bills the API when you log in with a Console account or set an API key in your environment.

Which works better in VS Code?

Both have an official VS Code extension that uses your plan’s limits. Claude Code also has a JetBrains plugin.

Codex vs Claude Code vs Cursor?

Cursor is an editor rather than a terminal agent and is not on the Artificial Analysis Coding Agent Index. Claude Code also runs inside Cursor as an extension.

Codex vs Claude Code vs Gemini CLI?

On the same index, read November 8, 2026, Google’s Antigravity CLI with Gemini 4 Carbon (high) scores 59.4, between Claude Code with Opus 5.5 at 61.7 and Codex with GPT-6 Astra at 54.7.

Sources

  1. OpenAI, Codex Pricing, read November 8, 2026
  2. OpenAI, Codex docs: Models, Sandbox, Agent approvals and security, AGENTS.md, Agent Skills, MCP, CLI, IDE extension and Cloud, read November 8, 2026
  3. OpenAI, API Pricing, read November 8, 2026
  4. Anthropic, Claude plans and pricing, read November 8, 2026
  5. Anthropic, Claude Code docs: Overview, Model configuration, Permission modes, Sandboxing, Memory, Skills and MCP, read November 8, 2026
  6. Anthropic, Claude Help Center: Use Claude Code with your Pro, Max, or Ultra plan, read November 8, 2026
  7. Artificial Analysis, Coding Agent Index v2.0, read November 8, 2026
  8. Laude Institute, Terminal-Bench 2.0 leaderboard, read November 8, 2026
  9. Scale AI, SWE-Bench Pro leaderboard, read November 8, 2026

Spotted a mistake? Write to support@gptx.io and we will check it.

Keep reading