Codex vs Claude Code

OpenAI's Codex and Anthropic's Claude Code side by side: what each plan costs, how the usage limits work, which models they run and what changes on an API key.

Published November 28, 2026

Both start at $20 a month: Codex comes with ChatGPT Plus and Claude Code with Claude Pro. Codex runs OpenAI's GPT models and its command-line tool is open source. Claude Code runs Anthropic's Claude models and isn't open source. Both can also run on an API key and bill per token instead of a plan.

At a glance

  • Made by

    Codex
    OpenAI
    Claude Code
    Anthropic
  • Where it runs

    Codex
    ChatGPT's apps, a CLI, IDE extensions, cloud tasks, GitHub and Slack
    Claude Code
    A CLI, VS Code and JetBrains, a desktop app, the web, phones, GitHub Actions
  • Cheapest plan with it

    Codex
    ChatGPT Plus, $20 a month
    Claude Code
    Claude Pro, $20 a month ($17 billed yearly)
  • Bigger plans

    Codex
    Pro at $100, $200 or $500 a month
    Claude Code
    Max at $100 and Ultra at $200 a month
  • Models

    Codex
    OpenAI's GPT models
    Claude Code
    Anthropic's Claude models
  • On an API key

    Codex
    Yes, without the cloud features
    Claude Code
    Yes, in place of the plan
  • Open source

    Codex
    Yes, Apache-2.0
    Claude Code
    No

Plans and limits

Codex comes with ChatGPT Plus at $20 a month, Business at $25 a seat ($20 billed yearly), and Pro at $100, $200 or $500 a month. On Plus and Business, limits count messages per five hours for each model: for GPT-6.2 Sol, OpenAI gives a range of 17 to 180 local messages. Pro plans have no five-hour limit, and weekly limits can apply to every plan (OpenAI).

Claude Code comes with Claude Pro at $20 a month, Max at $100 with 5 times Pro's usage, and Ultra at $200 with 10 times Pro's weekly usage and no five-hour limit for verified accounts. Team seats cost $25 or $125 a month (Anthropic). The limits are shared with Claude's chat apps, and past them you can buy extra usage at API prices (Anthropic).

Neither maker publishes how many messages a plan allows in a week. How fast you reach a limit depends on the model, the length of the session and the size of the files.

Paying per token instead

Both run on an API key. Codex signs in with codex login --with-api-key; you then pay API prices and lose the cloud features, such as code review on GitHub (OpenAI). Claude Code uses ANTHROPIC_API_KEY in place of the plan, even while you're logged in (Anthropic).

On the API, Anthropic puts the average Claude Code cost across enterprise deployments at about $13 per developer per active day, or $150 to $250 a month, at its own prices (Anthropic). At /model's prices the same tokens cost less:

Claude prices here

Prices as of Nov 30, 06:33 PM UTC

Per 1M tokens, input / output, at the cheapest channel serving each model now.

Every Claude price

Models

Codex lists GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Astra and GPT-6 Luna. OpenAI suggests Astra for demanding work and Sol for everyday coding. Another provider must offer OpenAI's Responses API: current Codex releases don't take the Chat Completions format (OpenAI).

Claude Code picks Claude models by alias: opus, sonnet, haiku and fable. Its default is Opus 5.5 on every plan and on the API (Anthropic). Another provider must speak Anthropic's Messages API.

What sets them apart

  • Codex cloud tasks run in a workspace of their own and keep going while your computer sleeps (OpenAI).
  • Codex CLI is open source under Apache-2.0, so you can read and change it (GitHub). Claude Code's license reserves all rights to Anthropic (GitHub).
  • Claude Code runs in more places: the terminal, VS Code and JetBrains, a desktop app, the web, phones and CI (Anthropic).
  • Both take MCP servers, subagents and scripted runs (codex exec, claude -p). Claude Code reads a project's AGENTS.md as well as its own CLAUDE.md.

Which to choose

  • Choose Codex for GPT models, an open-source CLI, or tasks that run in the cloud while you're away.
  • Choose Claude Code for Claude models, or to work from the same agent in the terminal, the editor and the browser.
  • On a budget, use either on an API key and pay per token: a quiet day costs little, and no weekly limit stops you.

One /model key runs both: Claude models in Claude Code, and GPT models in Codex CLI through the Responses API. The Claude Code guide and the Codex CLI guide show the settings.

Sources

Each opened on November 28, 2026.

One key for every model here.

Top up from $10, change one URL, and pay only for the tokens you use.