Claude Code vs Codex CLI (2026)

Claude Code (Anthropic) and Codex CLI (OpenAI) are both strong terminal coding agents that read your repository, edit files and run commands. For most people the deciding factor is which plan they already pay for and how its limits fit their day, and you can run both.

Contents

We make Shuriken. We tried to be fair; corrections welcome at office@shuriken.sh.

Quick answer#

Claude Code vs Codex is mostly decided by the subscription you already have. Claude Code (Anthropic) signs in with a Claude Pro, Max, Team or Enterprise plan; Codex CLI (OpenAI) signs in with a ChatGPT plan, Free included. Both run in your terminal, read your repository, edit files and run commands. What you'll feel is whose limits fit your day, and you can run both.

At a glance#

Every cell comes from the vendor's own docs or repository, read on 22 October 2026.

Claude Code Codex CLI
Made by Anthropic OpenAI
Licence Proprietary: "All rights reserved", use under Anthropic's Commercial Terms Open source, Apache-2.0
Sign in with Claude Pro, Max, Team, Enterprise or a Console account; the free claude.ai plan doesn't include it A ChatGPT plan: OpenAI's pricing page includes Codex in Free, Go, Plus, Pro, Business, Edu and Enterprise. Or an API key with extra setup
Subscription limits A rolling five-hour session window; paid plans add weekly limits Plus: messages per five-hour period, weekly limits may apply. Pro: "currently no five-hour limit"
Past the limit Usage credits on paid plans Plus and Pro can buy credits
MCP servers Yes: ~/.claude.json or a project's .mcp.json Yes: ~/.codex/config.toml, [mcp_servers.<name>], stdio and HTTP with OAuth
Platforms macOS 13+, Windows 10 1809+ (native or WSL), Ubuntu 20.04+, Debian 10+, Alpine 3.19+ macOS and Linux binaries; Windows via a PowerShell install script, with Windows and WSL pages in the docs
Install curl -fsSL https://claude.ai/install.sh | bash, Homebrew, WinGet, Debian, Fedora and Alpine package repositories, npm curl -fsSL https://chatgpt.com/codex/install.sh | sh, npm, Homebrew
Desktop app Claude Desktop's Code tab (macOS, Windows, Linux) Codex inside the ChatGPT desktop app (macOS, Windows, Linux)

Why there are no benchmarks on this page#

We left them out on purpose. A ten-task chart would date with the next model either vendor ships, it would depend on your repository's size and language and on how you prompt, and we sell a harness for both, so you'd be right to doubt our choice of tasks.

Run the same task in both, on your own code, and compare the diffs. It takes ten minutes, and it's the only result that applies to you. (Shuriken makes this easy, see the end of this page.)

What Claude Code does well#

  • Subagents, hooks, skills, plugins, project memory files and MCP servers give you a lot of control over how it works. Shuriken can install, enable and update Claude Code plugins per project, because so many people rely on them.
  • Native Windows, WSL, macOS and several Linux distributions are all first-class in the docs, with signed package repositories for Debian, Fedora and Alpine.
  • One Claude subscription covers the CLI, the Desktop app's Code tab and Anthropic's cloud scheduled tasks.
  • The limits are a five-hour session window plus a weekly limit: annoying when you hit them, but predictable (how the 5-hour window works).

What Codex does well#

  • The source is open, under Apache-2.0. You can read exactly what the agent does, file issues against the code and build it yourself.
  • MCP servers live in ~/.codex/config.toml, and OpenAI's docs say "The ChatGPT desktop app, Codex CLI, and IDE extension share this configuration."
  • Streamable HTTP servers sign in with OAuth, including dynamic client registration, or with bearer tokens; codex mcp login <server-name> starts the OAuth sign-in.
  • ChatGPT Pro has no five-hour cap right now. OpenAI's pricing page says "Pro plans currently have no five-hour limit", which matters if your work comes in long bursts (Codex usage limits has the details).

Where they differ in practice#

The limit you'll actually hit#

Claude's limit is a rolling five-hour window plus a weekly cap, and a busy day usually hits the window first. ChatGPT Plus counts messages per model in each five-hour period; OpenAI publishes those figures as estimates, "not fixed message limits", and adds that weekly limits may also apply. ChatGPT Pro currently has no five-hour limit at all, and OpenAI's page lists no separate weekly figure for Pro. Which shape hurts less depends on how your work spreads over the day and the week; the plans themselves are compared in Claude Max vs ChatGPT Pro.

Two config formats#

Claude Code reads JSON (~/.claude.json, .mcp.json), and claude mcp add --transport http notion https://mcp.notion.com/mcp adds a server from the command line. Codex reads TOML (~/.codex/config.toml, one [mcp_servers.<name>] table per server), and its equivalent is codex mcp add context7 -- npx -y @upstash/context7-mcp. Using both by hand, you keep two lists of MCP servers in step and sign in to Linear, Notion or GitHub twice.

Openness#

Codex's source is public; Claude Code's licence says "All rights reserved". For some teams that's a policy question. For most individual developers it changes little day to day.

Which should you choose?#

None of these is about which model is smarter this month.

If Start with
You already pay for Claude Pro or Max Claude Code. It's included, and your limits are already there
You already pay for ChatGPT Plus or Pro Codex, for the same reason
You want to read the agent's source, or your company requires open source Codex
You're on native Windows and don't want WSL Both have Windows paths, but Claude Code's docs treat native Windows as a first-class setup with its own install commands and a WinGet package. For Codex, Codex CLI on Windows covers its native sandbox and when WSL still fits
You rely on plugins, hooks and subagents you've already built Claude Code; moving those over is real work
Your work comes in long bursts that hit a five-hour cap ChatGPT Pro, which currently has no five-hour limit
Neither fits Our list of Claude Code alternatives, open-source agents included
You can't decide Both, for a week of real tasks; keep the one you reached for more often

Pricing#

Both agents come with their vendor's plans at no extra cost. Prices as published on 22 October 2026, in US dollars.

Price
Claude Pro is $20 a month ($17 billed yearly); Max starts at $100 a month, with a 5x and a 20x tier
ChatGPT Plus is $20 a month; Pro starts at $100 a month, with plans at $100, $200 or $500. Codex is also included in the Free and Go ($8 a month) plans
API keys Both agents can run on pay-as-you-go API keys instead, billed at API rates

Using them together#

In Shuriken, one project can hold a Claude Code chat and a Codex chat side by side, each on its own branch in its own git worktree, so they never edit the same files under each other.

  • Add an MCP server once in Global MCPs and every Claude Code and Codex chat gets it, with no .mcp.json and config.toml to keep in step. You sign in to each server once, because the sign-in belongs to the server, not to your AI account.
  • Claude Code chats run on your Claude sources, Codex chats on your ChatGPT sign-ins and OpenAI keys. When an account reaches your switch point (99% by default, adjustable from 50% to 100%), its chats move to another source you added for that agent and keep going. A Claude Code chat never turns into a Codex chat.
  • For the ten-minute comparison, give the same prompt to a Claude Code chat and a Codex chat, compare both diffs in Changes, and finish the one you like.

Shuriken also runs Gemini CLI, Copilot, OpenCode and the rest of its 67 coding agents.

If you pay for both, download Shuriken and add a source for each.

Sources

  1. Claude Code advanced setup: system requirements and authentication (accessed 22 October 2026)
  2. Connect Claude Code to tools via MCP (Claude Code docs) (accessed 22 October 2026)
  3. Claude Code licence (GitHub) (accessed 22 October 2026)
  4. Claude plans and pricing (accessed 22 October 2026)
  5. Codex CLI README (GitHub) (accessed 22 October 2026)
  6. Codex CLI (OpenAI docs) (accessed 22 October 2026)
  7. Codex pricing and usage limits (OpenAI docs) (accessed 22 October 2026)
  8. Model Context Protocol in Codex (OpenAI docs) (accessed 22 October 2026)

Frequently asked questions

Which is better, Claude Code or Codex?

Neither wins everywhere, and the answer changes with each model release and with your codebase. Try both on the same task in your own repository and compare the diffs; often the plan you already pay for decides.

Can one subscription cover both?

No. Claude Code signs in with a Claude plan (Pro, Max, Team or Enterprise) or an Anthropic Console account. Codex signs in with a ChatGPT plan or an OpenAI API key.

Can I switch between Claude Code and Codex in one project?

Yes. In Shuriken, each chat picks its agent, and one project can hold both. A chat keeps its agent, so start the next chat with the other one when you want to switch. Both see the same MCP servers from Global MCPs.

Do both support MCP servers?

Yes. Claude Code keeps its servers in ~/.claude.json or a project's .mcp.json. Codex keeps them in ~/.codex/config.toml under [mcp_servers]. Shuriken keeps one list and hands it to both.

Do both run on Windows?

Claude Code supports native Windows 10 and 11 as well as WSL. Codex has a PowerShell install script and Windows and WSL pages in its docs. Both run on macOS and Linux.

Free tools