Codex vs Claude Code (October 2026): Models, Pricing, Limits and Features Compared

Updated 2026-10-15 · by Murilo Prataviera, maker of Aki

Last checked: October 2026. Models, plans and limits for both tools change every few weeks. Everything here comes from OpenAI's and Anthropic's own docs and pricing pages, listed under Sources. Check them before you buy a plan.

You pay $20 a month for one of them. A friend swears by the other. You give both the same bug in two terminals, and both fix it. So the question isn't "which one can code". It's which one fits your plan, your OS, your editor and how you like to review work.

Quick answer

  • Both are full coding agents. They run in the terminal, in your IDE, in a desktop app and in the cloud. Both support MCP, hooks, subagents, worktrees and GitHub review.
  • Price to start: both have a $20/month plan (ChatGPT Plus, Claude Pro). Codex also has a Free tier and an $8 Go plan. Claude Code isn't included in Claude's Free plan.

  • Biggest differences: Codex CLI is open source (Apache-2.0) and sandboxes commands by default. Claude Code is closed source, keeps its sandbox off by default and uses permission modes plus an auto mode with a safety classifier instead.

  • Instructions file: Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and now also reads AGENTS.md when there's no CLAUDE.md. One file can serve both.

  • No absolute winner. Many people use both and switch when one hits its limit.

What each one is

OpenAI Codex is a family of surfaces under one name: the Codex CLI (open source at >github.com/openai/codex), an IDE extension, Codex inside the ChatGPT desktop app, Codex cloud tasks on chatgpt.com/codex, and a GitHub integration. You sign in with your ChatGPT account or use an API key.

Anthropic Claude Code is the same idea from Anthropic: a terminal CLI, extensions for VS Code (and Cursor) and JetBrains, the Code tab in the Claude desktop app, cloud sessions at claude.ai/code and in the mobile app, plus GitHub Actions and a Code Review service. You sign in with a Claude subscription or an Anthropic Console account. Its GitHub repo is "All rights reserved", so it is not open source.

Side by side

OpenAI Codex Anthropic Claude Code
Current models GPT-6 Astra (most capable), GPT-6.1 Sol (recommended for complex work), GPT-6 Luna (most efficient) Opus 5.5 (default on Pro, Max, Team, Enterprise), Sonnet 5.5, Haiku 5.5, Fable 5.1
Cheapest way in Free ($0), Go ($8/month) Pro ($20/month, or $17/month billed yearly)
Main individual plans Plus $20, Pro $100 / $200 / $500 Pro $20, Max 5x $100, Max 20x $200
Team plans Business: $20/user/month yearly, $25 monthly Team: $20/$25 standard seats, $100/$125 premium seats
Limits Plus and Business: 5-hour window in local messages, weekly limits may apply. Pro: no 5-hour limit currently 5-hour session window plus a weekly limit on Pro and Max. Shared with Claude chat
Install curl -fsSL https://chatgpt.com/codex/install.sh \| sh, npm, Homebrew, Windows installer curl -fsSL https://claude.ai/install.sh \| bash, Homebrew, WinGet, apt/dnf/apk
Open source Yes, CLI under Apache-2.0 No
Sandbox On by default (workspace-write). Seatbelt on macOS, bubblewrap on Linux, native sandbox on Windows Off by default, turn on with /sandbox. Seatbelt on macOS, bubblewrap on Linux and WSL2. No sandbox on native Windows
Approvals on-request or never, set with /permissions Manual, accept edits, plan, auto (classifier reviews actions), dontAsk, bypassPermissions
Instructions file AGENTS.md (plus AGENTS.override.md) CLAUDE.md, or AGENTS.md when no CLAUDE.md exists
MCP Yes: codex mcp add, stdio and streamable HTTP Yes: servers in settings or a project .mcp.json
Hooks Yes, on by default; hooks.json or config.toml Yes; settings files
Subagents Yes, TOML files in .codex/agents/; spawned when you ask Yes, Markdown files in .claude/agents/; Claude can delegate on its own
Worktrees codex --worktree in the CLI; managed by the desktop app claude --worktree <name> in the CLI
Cloud / background Codex cloud tasks (web, app, mobile, CLI) Cloud sessions (claude --cloud), routines, background agents
IDE VS Code, Cursor, Windsurf, Xcode, JetBrains VS Code, Cursor, JetBrains
GitHub @codex review, automatic reviews, @codex tasks @claude via GitHub Actions; Code Review service on Team/Enterprise

Models

Codex recommends GPT-6.1 Sol for complex coding when your account has it, and GPT-6 Luna for focused, high-volume tasks. GPT-6 Astra is described as the most capable model. GPT-6.1 Sol isn't in the launch rollout for Free and Go. On Free you get GPT-6 Luna at standard speed in the desktop app.

Claude Code defaults to Opus 5.5 on every paid plan. You switch with /model: sonnet for everyday work, haiku for simple tasks, fable for the hardest and longest tasks. Fable is not the default on any plan. On Pro it runs on usage credits; on Max it has its own weekly limit.

We don't quote benchmarks here. They change with every release. Try both on your own repo for a day.

Plans, prices and limits

Codex comes with ChatGPT plans:

Claude Code comes with Claude plans. Free doesn't include it.

How to check: /status in Codex, /usage in Claude Code. Our Claude Code usage limits guide explains both in detail.

Install

Both install with one line (see the table) and start with codex or claude in your project folder. Codex also installs with npm or Homebrew. Claude Code also installs with Homebrew or WinGet; only its native installer updates itself.

Sandbox and permissions

This is where the two differ the most.

Codex sandboxes by default. In workspace-write mode it can read, edit inside the workspace and run routine commands, and asks you (on-request) to go further. danger-full-access removes all limits.

Claude Code leans on permission modes. New interactive sessions start in auto mode (from v2.1.283): a separate classifier model reviews each action and blocks things like force pushes, curl | bash or sending secrets out. You can switch with Shift+Tab to manual, accept edits or plan mode. The OS-level sandbox for shell commands exists but is off by default; /sandbox turns it on, and then network access goes through a proxy with an allowlist.

Codex limits what a command can touch. Claude Code judges whether an action makes sense. In Claude Code you can turn on both.

AGENTS.md vs CLAUDE.md

Codex reads AGENTS.md: a global one in ~/.codex/, then one per folder from the repo root down. AGENTS.override.md wins in the same folder. The combined limit is 32 KiB by default, and project_doc_fallback_filenames in config.toml adds other file names.

Claude Code reads CLAUDE.md (user, project, local and managed levels) and keeps its own auto memory. Since v2.1.277 it reads AGENTS.md directly when there's no CLAUDE.md. If you have both, it reads only CLAUDE.md, unless you set Project instructions to claude-md-and-agents-md in /config.

MCP, hooks and subagents

MCP: both connect to MCP servers. Codex supports local (stdio) and streamable HTTP servers and keeps them in config.toml (~/.codex/ or the project's .codex/). Claude Code keeps them in its settings or a project .mcp.json. The same server usually works in both.

Hooks: both run your scripts at points in the agent loop, with many of the same event names, such as PreToolUse, PostToolUse and SessionStart. In Codex, hooks you didn't get from an admin must be reviewed and trusted with /hooks before they run.

Subagents: Codex spawns them only when you ask (or when AGENTS.md says to). Claude Code can hand work to them on its own.

Worktrees, cloud and background work

Worktrees: codex --worktree starts a CLI session in a new managed worktree, and the Codex desktop app manages worktrees for its chats. Claude Code has claude --worktree feature-auth, so each terminal gets its own checkout. See our guide to parallel Claude Code sessions.

Cloud: Codex cloud tasks run in a cloud environment you set up, keep working while your computer sleeps, and end in a diff you can turn into a PR. Claude Code cloud sessions run in an Anthropic-managed VM, start with claude --cloud "task", and come back to your terminal with claude --teleport. Both count toward your plan's limits.

IDE and GitHub

IDE: Codex covers VS Code, Cursor and Windsurf with its extension, and Xcode and JetBrains through their own integrations. Claude Code has a VS Code extension (also for Cursor) and a JetBrains plugin.

GitHub: comment @codex review on a PR, or turn on automatic reviews; Codex flags only P0 and P1 issues. With Claude Code, /install-github-app sets up @claude in GitHub Actions. Its managed Code Review service is for Team and Enterprise; anyone can run /code-review locally.

Which one should you pick

Using both

Plenty of developers keep both open. A few habits help:

  1. Keep one AGENTS.md. Codex reads it. Claude Code reads it when there's no CLAUDE.md. If you need Claude-only rules, create a CLAUDE.md with @AGENTS.md on the first line and the extra rules below.
  2. Share MCP servers. Add the same servers to both. Most work unchanged.
  3. One task per worktree. Give each agent its own checkout so they don't edit the same files.
  4. Review one with the other. Let one write the change and ask the other to review the diff.
  5. Watch two sets of limits. Two plans means two five-hour windows and two weekly limits.

Where Aki fits

Aki is a free, source-available Mac app (>github.com/muriloprataviera/aki) that works with both.

It's Mac only (Apple Silicon, macOS 14+), with no account.

FAQ

Is Codex better than Claude Code?

Neither is better for everyone. Both have MCP, hooks, subagents, cloud tasks and GitHub review. The real differences are price tiers, the sandbox approach, open vs closed source, and which plan you already pay for.

Is Codex free?

Codex has a Free tier ($0) for quick tasks, using GPT-6 Luna in the desktop app. Plus ($20) and above add more models and more usage. Claude Code needs a paid Claude plan, from Pro at $20.

Is Claude Code open source?

No. Its GitHub repository is "All rights reserved" and use falls under Anthropic's Commercial Terms. The Codex CLI is open source under Apache-2.0.

Can Claude Code read AGENTS.md?

Yes, since v2.1.277, when your project has no CLAUDE.md. With both files, it reads only CLAUDE.md unless you change Project instructions in /config or import @AGENTS.md from your CLAUDE.md.

Which one has higher usage limits?

It depends on the plan. Codex Pro currently has no five-hour limit, though weekly limits may apply. Claude Max 20x gives 20× Pro's per-session usage, with a weekly limit. Neither vendor publishes exact weekly numbers.

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

Yes. Share one AGENTS.md, add the same MCP servers to both, and give each agent its own worktree so they don't edit the same files at once.

Sources