Skip to content

Codex vs Claude Code: price, models and where each one runs

Better Design

Direct answer

Codex vs Claude Code starts at the same price: $20 a month, with ChatGPT Plus for Codex and Claude Pro for Claude Code. Codex runs OpenAI's GPT models, has a free start in its desktop app and an open source CLI; Claude Code runs Anthropic's Claude models and is closed source.

A hand-drawn pair of browser windows labelled Codex and Claude Code, with a balance between them.

Codex and Claude Code side by side

Each cell comes from the vendor's own pricing page, help center or docs, read on November 15, 2026. Prices are in US dollars before tax.

Price
Codex

Free and Go ($8 a month) run GPT-6 Luna in the desktop app, subject to rollout; Plus $20 a month; Pro $100, $200 or $500 a month

Claude Code

Included in Claude Pro at $20 a month, or $17 a month billed yearly; Max $100 and Ultra $200 a month; not in the Free plan

Usage limits
Codex

Plus has a five-hour limit, about 15 to 160 local messages on GPT-6.1 Sol; Pro plans have no five-hour limit; weekly limits may apply

Claude Code

A five-hour and a weekly limit shared with Claude chat; Max gives 5x Pro, Ultra 10x Pro a week, with no five-hour limit for verified accounts

Models
Codex

OpenAI models: GPT-6.1 Sol and GPT-6 Luna on Plus

Claude Code

Anthropic models: Sonnet, Haiku and Opus on Pro; Fable on usage credits, or up to half the weekly limit on Max and Ultra

Where it runs
Codex

CLI, IDE extension for VS Code, Cursor and Windsurf, Xcode and JetBrains integrations, desktop app, Codex Web at chatgpt.com/codex and iOS

Claude Code

Terminal, VS Code and Cursor extensions, a JetBrains plugin, a desktop app and the web

Source code
Codex

The Codex CLI is open source under Apache-2.0

Claude Code

Closed source: all rights reserved, use under Anthropic's Commercial Terms

Install
Codex

curl -fsSL https://chatgpt.com/codex/install.sh | sh, or npm install -g @openai/codex

Claude Code

curl -fsSL https://claude.ai/install.sh | bash

Project rules
Codex

AGENTS.md, in ~/.codex and in each project folder

Claude Code

CLAUDE.md; reads AGENTS.md instead when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md exists (v2.1.277 or later)

MCP servers
Codex

Yes; set in ~/.codex/config.toml or a project .codex/config.toml

Claude Code

Yes; a team can check a shared .mcp.json into the repo

Pay as you go
Codex

With an API key, API pricing applies instead of plan limits

Claude Code

Through an Anthropic Console account, Amazon Bedrock, Google Cloud or Microsoft Foundry

Pick Codex when

  • You want to start for free: Codex runs on the Free and $8 Go plans in its desktop app.
  • You want to read or fork the agent: the Codex CLI is open source under Apache-2.0.
  • You want OpenAI's GPT models, or Codex on iOS and on the web at chatgpt.com/codex.

Codex or Claude Code?

Four questions to answer before you choose. The lists above and below show which answer points to which tool.

A hand-drawn decision path between Codex and Claude Code: Which models do you want?, Do you need a free start?, Do you need open source code?, Where does your company buy models?.
  • Question 1: Which models do you want?
  • Question 2: Do you need a free start?
  • Question 3: Do you need open source code?
  • Question 4: Where does your company buy models?

Pick Claude Code when

  • You want Anthropic's Claude models, Opus and Fable included on the higher plans.
  • Your company buys models through Amazon Bedrock, Google Cloud or Microsoft Foundry: Claude Code runs on each.
  • You already pay for Claude Pro: Claude Code comes with it at no extra cost.

What Codex and Claude Code are

Codex is OpenAI's coding agent. It runs on your computer through the Codex CLI in the terminal, the IDE extension and the desktop app, and in the cloud through Codex Cloud.

Claude Code is Anthropic's agentic coding tool. It reads your codebase, edits files, runs commands and connects to your development tools.

Both agents work the same basic loop: you describe a task, the agent reads the code, changes files, runs shell commands and reports back. The differences sit in the models, the plans, the safety defaults and the setup files.

How to set up each agent in a few minutes

Each agent needs one install command, one sign-in and one command that writes the project instructions file:

Install
Codex

curl -fsSL https://chatgpt.com/codex/install.sh | sh, or npm install -g @openai/codex

Claude Code

curl -fsSL https://claude.ai/install.sh | bash

Start
Codex

Run codex in a project folder

Claude Code

Run claude in a project folder

Sign in
Codex

Choose Sign in with ChatGPT on the first run, or use an API key

Claude Code

Sign in with a paid Claude plan, or use a Console account or a cloud provider

Write the instructions file
Codex

/init writes an AGENTS.md scaffold

Claude Code

/init writes a starting CLAUDE.md, and offers to import an existing Codex or Gemini CLI setup

Editor
Codex

VS Code, Cursor and Windsurf extension; Xcode and JetBrains have their own integrations

Claude Code

VS Code and Cursor extension, and a JetBrains plugin

Project instructions: AGENTS.md for Codex, CLAUDE.md or AGENTS.md for Claude Code

Both agents load a Markdown file of house rules at the start of each session. Build commands, test commands and code style belong there. The files load in a similar order, from broad to specific. Codex stops adding files at 32 KiB by default:

Personal rules for every project
Codex

~/.codex/AGENTS.md

Claude Code

~/.claude/CLAUDE.md

Team rules in the repo
Codex

AGENTS.md at the project root

Claude Code

CLAUDE.md or .claude/CLAUDE.md at the project root

Rules for one folder
Codex

An AGENTS.md or AGENTS.override.md in that folder

Claude Code

A CLAUDE.md in that folder, loaded when Claude works there

Private notes kept out of Git
Codex

~/.codex/AGENTS.md, which lives outside the repo

Claude Code

CLAUDE.local.md, added to .gitignore

The other agent's file
Codex

Add CLAUDE.md to project_doc_fallback_filenames to read it where no AGENTS.md exists

Claude Code

Reads AGENTS.md when no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md exists, from v2.1.277

Long sessions: resume, compact and fork in both agents

Long tasks fill the context window. Both agents can pick up an old session, shrink the current one, or branch it to try another approach:

Resume the last session
Codex

codex resume --last

Claude Code

claude --continue

Pick an older session
Codex

codex resume, or /resume inside a session

Claude Code

claude --resume, or /resume inside a session

Free up context
Codex

/compact summarizes the chat

Claude Code

/compact summarizes the conversation, with optional focus instructions

Try another approach
Codex

/fork, or codex fork from the terminal

Claude Code

/branch keeps the original; /fork copies the session into a background session

Go back after a bad edit
Codex

/diff shows the edits; the docs advise a Git checkpoint before and after each task

Claude Code

/rewind returns the code and the conversation to an earlier checkpoint

See context use
Codex

/status shows the configuration and token usage

Claude Code

/context shows context use as a grid

Automation: both agents run in scripts, CI and GitHub

Both agents run without the interactive screen, so a script or a CI job can call them. Both also answer a mention in a GitHub pull request:

Run one task from a script
Codex

codex exec "<task>"

Claude Code

claude -p "<task>"

Machine-readable output
Codex

--json prints JSON Lines events

Claude Code

--output-format json, which includes the cost of the run

Default safety in scripts
Codex

A read-only sandbox; add --sandbox workspace-write to allow edits

Claude Code

Tools need approval; list allowed ones with --allowedTools

GitHub Action
Codex

openai/codex-action@v1, with an OPENAI_API_KEY secret

Claude Code

anthropics/claude-code-action; run /install-github-app to set it up

Trigger from a pull request
Codex

Comment @codex review

Claude Code

Mention @claude in a pull request or issue

Extensions: skills, subagents, hooks and MCP in both

Both agents take the same four kinds of extension. The formats overlap enough that some work moves between them:

  • Skills: both follow the open Agent Skills standard. A skill is a folder with a SKILL.md file of instructions, and the agent loads its body only when needed.
  • Subagents: both can hand parts of a task to helper agents that work in parallel. In both, subagents use more of your usage than one agent alone.
  • Hooks: both run your scripts at set points, such as before or after a tool call. Codex asks you to trust a new hook before it runs.
  • MCP servers: both connect to the same servers. Codex reads them from config.toml, and Claude Code from .mcp.json or ~/.claude.json.

Can you use other models? Codex is more open

  • Codex has built-in providers for OpenAI, Ollama, LM Studio, Amazon Bedrock and Google Cloud. You can add any other provider as a [model_providers] table in config.toml.
  • Codex's --oss flag runs a local open source model through Ollama or LM Studio.
  • Claude Code runs Claude models through Anthropic, Amazon Bedrock, Google Cloud or Microsoft Foundry.
  • Claude Code also sends its requests to an LLM gateway when you set ANTHROPIC_BASE_URL.

Model choice inside each agent: pick the model and the effort

Each agent lets you change the model and how hard it thinks, per session or as a default. A bigger model or a higher effort uses more of your limit:

Switch the model in a session
Codex

/model

Claude Code

/model, which also saves it as your default for new sessions

Pick the model at start
Codex

codex -m gpt-6.1-sol

Claude Code

claude --model with an alias such as sonnet, opus, haiku or fable

Models on offer
Codex

GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Sol and GPT-6 Luna, by plan

Claude Code

Sonnet for daily coding, Opus for complex reasoning, Haiku for simple tasks, Fable for the hardest tasks

Set the effort
Codex

model_reasoning_effort in config.toml

Claude Code

/effort, from low to xhigh, max or auto

Mixed mode
Codex

Ultra mode splits large tasks across subagents

Claude Code

opusplan uses Opus in plan mode, then Sonnet to make the changes

A day-to-day workflow that works in either agent

The same five steps keep either agent on track for a change that touches several files:

  • Plan first: use Codex's read-only mode or Claude Code's plan mode, and read the plan before any file changes.
  • Let the agent edit inside the workspace, and keep approval on for commands that reach outside it.
  • Review the diff: Codex has /review for the working tree, and Claude Code has /code-review, also called /review.
  • Run the tests yourself, or ask the agent to run them and show the output.
  • Commit in small steps, so a bad change is easy to drop with Git.

Cloud tasks: both agents keep working after you close the laptop

Both vendors run the agent on their own servers too. Each task gets its own environment, so several tasks can run in parallel:

Where you start a task
Codex

Codex Cloud on the web, in the desktop app or on mobile

Claude Code

Claude Code on the web at claude.ai/code, in the desktop app or in the Claude mobile app

Start from the terminal
Codex

codex cloud

Claude Code

claude --cloud

Code it can reach
Codex

Repositories in your connected GitHub or GitLab account

Claude Code

Repositories in your connected GitHub account; other hosts have limits

Environment
Codex

A reusable environment with your repositories, dependencies, tools and network rules

Claude Code

Infrastructure Anthropic manages, or your organization's self-hosted environment

Plans
Codex

Plus and above; an API key gives no cloud features

Claude Code

Pro, Max, Ultra and Team, and some Enterprise seats

What each one costs a team

Both agents share one usage pool with the vendor's chat app, so heavy coding leaves less for chat:

Shared usage pool
Codex

Local messages and cloud tasks share the plan's allowance

Claude Code

Claude on the web, desktop, mobile and Claude Code draw from one pool

When you reach a limit
Codex

Extend usage with ChatGPT credits

Claude Code

Wait for the reset, move to a higher plan, or turn on usage credits at standard API rates

Company plan
Codex

Business: $20 per user a month billed yearly, or $25 billed monthly, for 2 or more users

Claude Code

Enterprise: $20 per seat a month plus usage at API rates, billed yearly

Pay per token
Codex

An API key in the Codex CLI, SDK or IDE extension, at API pricing

Claude Code

A Console account, or Amazon Bedrock, Google Cloud or Microsoft Foundry

How Codex and Claude Code keep you in control

Both agents pair a set of permission modes with a way to plan before editing. They name and enforce them differently:

Local safety layer
Codex

An OS-enforced sandbox, plus an approval policy for when to ask

Claude Code

Permission modes that decide which actions run without asking

Default on your computer
Codex

No network access, and writes limited to the active workspace

Claude Code

Auto mode in v2.1.283 or later, unless your settings choose another; start with claude --permission-mode default for Manual mode, where edits and commands ask first

Hands-off option
Codex

The Auto preset: edits and commands inside the workspace run automatically

Claude Code

Auto mode, which runs actions with background safety checks

Plan without editing
Codex

Switch to read-only with the /permissions command

Claude Code

Plan mode: press Shift+Tab or prefix a prompt with /plan

Modes available
Codex

Sandbox modes such as read-only and workspace-write, with approval policies such as on-request

Claude Code

Manual, accept edits, plan, auto with background safety checks, and bypass permissions for isolated machines

Run Codex and Claude Code on the same project

Many teams keep both. Three things make that work:

  • Share one rules file: Codex reads AGENTS.md, and Claude Code reads it too when the project has no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md.
  • Share MCP servers: both connect to the same servers, Codex through config.toml and Claude Code through .mcp.json.
  • Share skills: both agents follow the open Agent Skills standard, so the same SKILL.md folder can work in each.
  • Split the roles: let one agent write a change and the other review the diff, so each catches what the other missed.

What switching between Codex and Claude Code takes

  • Project rules: Claude Code v2.1.277 or later reads AGENTS.md when the project has no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md, so one AGENTS.md can serve both agents. Claude Code's /init also offers to import an existing Codex setup.
  • MCP servers: move each server from Claude Code's .mcp.json to a [mcp_servers.<name>] table in Codex's config.toml, or the reverse.
  • Plans: each agent draws on its own vendor's plan, so switching means a ChatGPT plan for Codex or a Claude plan for Claude Code.

Steal this workflow

Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.

Read the guide "Codex vs Claude Code: price, models and where each one runs" at https://better-design.com/blog/codex-vs-claude-code and help me apply it to my project.

Codex vs Claude Code starts at the same price: $20 a month, with ChatGPT Plus for Codex and Claude Pro for Claude Code. Codex runs OpenAI's GPT models, has a free start in its desktop app and an open source CLI; Claude Code runs Anthropic's Claude models and is closed source.

Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.

Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.

Questions

Claude Code vs Codex: which is better?

Neither wins every task. Codex suits OpenAI's models, a free start and open source code. Claude Code suits Claude models and companies that buy models through a cloud provider.

Is Codex free?

Codex runs on the Free plan in the desktop app with GPT-6 Luna, subject to rollout. With a ChatGPT plan, the CLI, IDE extension and web start at Plus, $20 a month. With an API key, the CLI and IDE extension bill at API pricing instead.

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

Yes. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and reads AGENTS.md instead when the project has no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md. One AGENTS.md can give both agents the same rules.

Can Codex and Claude Code run in CI?

Yes. Codex runs with codex exec and the openai/codex-action@v1 GitHub Action. Claude Code runs with claude -p and the anthropics/claude-code-action GitHub Action.

What about Gemini CLI?

Since 18 June 2026, Gemini CLI no longer serves Google AI Pro, Ultra or free individual accounts. Google moved those users to Antigravity CLI. Gemini CLI still works with a Gemini Code Assist Standard or Enterprise license or a paid API key, and its repository stays open source under Apache 2.0.

Where these Codex and Claude Code facts come from

Each fact comes from Codex's or Claude Code's own pages, read on November 15, 2026. Prices and usage limits change, so check both pricing pages before you decide.

Give Codex and Claude Code the same design rules

Both agents connect to MCP servers, so one design setup works in either. You can switch agents without losing it.

Better Design gives the agent a design system, interface principles and review rules, so the screens it builds look designed from the first version.