Crayon drawing of a tall blue stick-figure robot holding up a tidy drawing of a house, a short red robot holding a black scribble, and a child in the middle pointing at the blue robot.

Claude Code is the better coding agent today, in our experience: we moved all our coding to Claude Code with Opus 5.5 after OpenAI's models kept letting us down, worst on front ends. Pick Codex if you want a free way in, an open-source CLI, a sandbox that's on by default or published usage estimates. Pick Claude Code if code quality decides it. Both start at $20 a month.

Below are the plans, the usage limits per plan, the Codex CLI, and the defaults that make the two feel different day to day, all from the vendors' own pages. Docs checked 2026-11-06.

What is the difference between Codex and Claude Code?

Same job, different defaults. Both read your repo, edit files and run commands from a terminal, an IDE, a desktop app or the web. What differs is the account you need, the file each one reads for instructions, and whether memory and the sandbox are on when you start.

Claude Code Codex
Models Claude, from Anthropic or a third-party provider OpenAI models such as GPT-6.1 Sol and GPT-6 Luna, or local models through Ollama or LM Studio with --oss
Cheapest way in Claude Pro, $20 a month ($17 billed annually); not on the Free plan ChatGPT Free, desktop app only, subject to rollout
Top individual plan Ultra, $200 a month, no 5-hour limit for verified accounts ChatGPT Pro at $100, $200 or $500 a month, no 5-hour limit for now
Source code Closed, all rights reserved CLI is open source, Apache-2.0
Instruction file CLAUDE.md; reads AGENTS.md when there's no CLAUDE.md (v2.1.277+) AGENTS.md; other names only if you add them to a fallback list
Learned memory Auto memory, on by default, per repo, machine-local Local memories, off by default, stored under ~/.codex
Local sandbox Off by default; macOS, Linux, WSL2 On by default (workspace-write); macOS, Linux, WSL2, Windows
Import the other /import codex: instructions, MCP servers, commands, subagents, skills /import: the same plus Claude Code project memories and recent chats

Sources: Claude pricing; Claude Code overview, memory, sandboxing, commands, license; Codex pricing, AGENTS.md, memories, sandbox, import, local providers, GitHub.

Is Claude Code so much better than Codex?

For us, yes, and this is opinion from our own work, not a benchmark. All our coding runs on Claude Code with Opus 5.5. We dropped Codex and the OpenAI coding models because Astra and GPT Sol 6.1 were slow and weak on what we gave them, and they were worst at front-end work.

Opus 5.5 understands the codebase it's in and makes fewer wrong edits. The project that settled it was a simple site we figured was too small to need Opus 5.5, so we gave it to the OpenAI side to save budget. The front end came back unusable and we rebuilt the whole thing with Opus.

We still use Astra for images and decks, so this isn't a blanket verdict on OpenAI. And Codex has real advantages that have nothing to do with model quality: a free tier, an open-source harness, local models and a sandbox you don't have to remember to turn on. Model quality moves with every release, so check the date on anything you read, this page included.

Which is cheaper, Codex or Claude Code?

Codex is cheaper to start, and at $20 a month they cost the same. Codex comes with ChatGPT Free and Go ($8 a month) in the desktop app, subject to rollout. Claude Code isn't on Claude's Free plan at all. ChatGPT Plus and Claude Pro are both $20 a month, and Claude Pro drops to $17 a month on an annual plan.

The top tiers have moved apart. Claude has Max at $100 a month and Ultra at $200. ChatGPT Pro comes in three tiers at $100, $200 or $500 a month. Past the price tag, the cheaper tool is the one whose limits you hit less often.

Are Codex limits better than Claude Code?

Codex's limits are easier to read, and at $20 they're published as numbers where Claude's aren't. The Codex pricing page estimates local messages per five hours on Plus: 15 to 160 on GPT-6.1 Sol, and 350 to 3,000 on GPT-6 Luna. Weekly limits may also apply. ChatGPT Pro plans currently have no five-hour limit.

Anthropic publishes multipliers instead of message counts. On Claude's plans, Pro gives at least 5x the Free plan's usage per 5-hour session, Max gives 5x Pro every 5 hours and every week, and Ultra gives 10x Pro's weekly usage with no 5-hour limit for verified accounts. Max and Ultra include Fable, Anthropic's top model, for up to half your weekly limit.

Both pools are shared. Claude Code draws from the same pool as your Claude chats on web, desktop and mobile. Codex shares usage with ChatGPT Work. So if you chat heavily in Claude all day, budget for that before you blame Claude Code for running dry.

Can I use Codex in the terminal like Claude Code?

Yes. The Codex CLI is a terminal agent like Claude Code: open a project directory, run codex, and sign in with ChatGPT. Install it with npm install -g @openai/codex, with Homebrew (brew install --cask codex), or with the standalone script, curl -fsSL https://chatgpt.com/codex/install.sh | sh.

One catch: on the pricing page, the CLI starts at the Plus plan, and Free and Go get Codex in the desktop app only. You can also run the CLI with an API key and pay API rates. During a session, /status shows how much of your limit is left.

Claude Code installs the same way, with curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSL (overview). The Codex CLI is the open-source one: it's Apache-2.0 on GitHub, while Claude Code's license reserves all rights.

Can I use Codex the same way I use Claude Code?

Mostly. Skills and most of your setup carry over; instruction files, memory and the sandbox behave differently.

Instructions. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and since v2.1.277 it reads AGENTS.md when you have no CLAUDE.md in your working directory or above it (memory docs). One AGENTS.md can serve both.

Skills. Both follow the Agent Skills open standard. Claude Code loads SKILL.md files from .claude/skills/ (skills); Codex scans .agents/skills (skills).

Memory. Claude Code's auto memory is on by default in local sessions and stays on one machine. Codex memories are off until you turn them on. We cover what each keeps in Claude Code memory and Codex memory.

Sandbox. Codex runs local commands inside a sandbox by default, in workspace-write mode (sandbox). Claude Code's sandbox is off until you run /sandbox, and on native Windows it runs commands unsandboxed (sandboxing).

The Codex /import brings over Claude Code instructions, settings, skills, plugins, project memories and up to 50 chats from the last 30 days, and the ChatGPT desktop app can keep imported work in sync. Going the other way, Claude Code's /import codex copies instruction files, MCP servers, commands, subagents and skills; its docs don't list chats or memories. So running both on one repo still leaves Claude Code blind to what Codex just did; the last section covers closing that gap with a shared Tokenrip workspace. The other options are in Codex and Claude Code together.

Which should you pick?

Pick by what you already pay for and what you want on by default:

  • The best code and front ends today: Claude Code, on our experience above.
  • A free way to start: Codex, through ChatGPT Free in the desktop app.
  • You already pay for Claude: Claude Code is in every paid Claude plan.
  • A sandbox that's on from the first command: Codex.
  • Memory that builds itself: Claude Code, with auto memory on by default.
  • An open-source harness or local models: Codex, with its Apache-2.0 CLI and --oss.
  • An editor first, agent second: see Cursor vs Claude Code.

Switch between Claude Code and Codex without re-explaining the project

The gap this page keeps hitting is that each tool keeps its own record: Claude Code's memory, Codex's memory, one-way imports. Tokenrip is the shared workspace both agents work from, so the project's decisions and open tasks live in one place every agent reads before it starts.

  • Pinned decisions that Claude Code and Codex both read before they touch the repo.
  • Tasks either agent can pick up, with a note on why every change was made.
  • One history of what changed and which agent changed it, whichever tool ran it.
  • A key per agent that you can revoke without touching the others.
Connect me to Tokenrip. Fetch https://tokenrip.com/setup?ref=claude-code-vs-codex and follow it. Then set up a workspace where Claude Code and Codex share this project's decisions and open tasks.

Paste that into Claude Code, Codex or any agent you use. The Free plan is $0 with no credit card: unlimited workspaces and agents and 2,500 agent actions a month.

Anything an agent wants to send, post or publish outside the workspace waits for your approval first.

Related reading

Questions

How do I check how much Codex or Claude Code usage I have left?

In Codex, open the usage dashboard in your ChatGPT settings, or type /status during a Codex CLI session. For Claude Code, open Settings, then Usage, in Claude, which shows the pool your chats and Claude Code share.

What happens when I hit the usage limit in Claude Code or Codex?

On Claude you can wait for the reset, move to a higher plan, or, on paid plans, turn on usage credits billed at standard API rates. Codex lets you finish the turn already running, and ChatGPT Plus and Pro users can buy extra credits instead of upgrading.

Can I use Claude Code or Codex with an API key instead of a subscription?

Yes, both. Claude Code can run on pay-as-you-go API credits through an Anthropic Console account. Codex with an API key works in the CLI, SDK and IDE extension at API prices, but without cloud features such as GitHub code review and Slack.

Which works better on Windows, Codex or Claude Code?

Both run natively on Windows. Codex sandboxes commands natively on Windows, while Claude Code runs commands unsandboxed on native Windows and needs WSL2 for its sandbox.