Codex vs Claude Code
We make AI Bridge, a Mac app that runs these command-line agents side by side. We do not sell any of them, are not affiliated with their makers, and none of them paid for or reviewed this guide. We use them every day.
Which should you choose?
The honest answer depends on how you work more than on which model is ahead this month.
Choose Claude Code if
- you work with the agent interactively, steering as it goes, and want it to infer what you meant;
- you already pay for Claude Pro, Max or Team: Claude Code is included, with Opus 5.5 as the default model;
- you want the surfaces around it: the desktop app, Claude on the web, Slack and Chrome integrations.
Choose Codex if
- you already pay for ChatGPT Plus or Pro: the Codex CLI is included from Plus up;
- you want an operating-system sandbox, with the network off, from the very first run;
- you delegate work to run unattended or in the cloud, or want automatic reviews on pull requests;
- you want an open-source CLI: Codex is Apache-2.0, Claude Code is not open source.
Users consistently report getting more work per dollar out of Codex, and finding Claude Code better at reading intent in an interactive session. Neither claim comes from an independent benchmark; both come up again and again in developer discussions, and match what we see running them side by side.
My take, after using both
For serious engineering work, I reach for Claude Code. I have used both, and Codex may well get more right on the first try. But it felt slow to me, and over a working day slow is what I notice most.
Claude Code works faster. It makes more mistakes, but because it moves quickly, a mistake is quick to spot and quick to fix, and I get to a finished result sooner. It is also better at the parts of the job beyond the plumbing, such as animation and design. Codex, by comparison, felt a bit flat to work with, and its CLI slower to respond.
That is one engineer’s experience, not a benchmark, and your work may differ: Codex’s default sandbox and its value for money are real advantages, which is why the rest of this guide sets out both sides. — Stas
Codex vs Claude Code at a glance
As of 12 October 2026, from each vendor’s own documentation and pricing pages:
| Claude Code | Codex CLI | |
|---|---|---|
| Made by | Anthropic | OpenAI |
| Licence | Proprietary | Apache-2.0 (Rust) |
| Cheapest plan with the CLI | Claude Pro, $20/month (not on Free) | ChatGPT Plus, $20/month (Free and Go: desktop app only) |
| Default model | Opus 5.5 | GPT-6.1 Sol |
| Starting permission mode | Auto: a classifier reviews each action | Sandboxed workspace writes; asks when it needs more |
| OS sandbox | Off by default; /sandbox, shell commands only | On by default, network off |
| Instruction file | CLAUDE.md (reads AGENTS.md too) | AGENTS.md (CLAUDE.md with one setting) |
| Resume a session | claude -c, claude -r | codex resume --last |
| Headless | claude -p | codex exec |
| MCP, hooks, skills, subagents | All | All |
Price and usage limits
Both start at $20 a month. Claude Code comes with Claude Pro and every plan above it; it is not part of Claude’s free plan. The Codex CLI comes with ChatGPT Plus ($20) and above; on ChatGPT Free and Go, Codex is available only in the desktop app.
Both have higher tiers for heavy use, and both can run on pay-as-you-go API keys instead. Both meter a plan in a rolling five-hour window with weekly limits on top. The difference is what they publish: OpenAI gives usage ranges per model, while Anthropic publishes no hour or prompt numbers.
What users report
The most repeated verdict in developer discussions is that Codex goes further for the money. One example on Hacker News in August 2026: a Claude Max five-hour allowance gone in two to three hours, against a $100 Codex plan lasting more than three days. It is one person’s workload, not a benchmark, but it is a common experience.
Current plans and limits are on each vendor’s own page, which we link rather than copy because they change often: Claude pricing and Codex pricing.
Models: most comparisons are out of date
Claude Code now defaults to Opus 5.5, and Codex to GPT-6.1 Sol. Claude Code moved Pro and Team Standard from Sonnet to Opus on 22 September 2026; Codex made GPT-6.1 Sol its default on 7 October, and retires GPT-5.5 from Codex on 14 October.
That matters for every quality verdict you will read. The comparisons ranking today were written against Opus 4.x and GPT-5.x, so their head-to-head results describe models neither tool uses by default any more. We know of no independent head-to-head of the two agents as they ship now; the figures most often quoted were run by vendors, or cannot be traced to a source.
Both let you pick. Claude Code takes --model with aliases such as opus, sonnet and fable, and effort levels up to max. Codex takes -m with GPT-6.1 Sol, GPT-6 Sol, Luna and Astra (the most capable), effort up to ultra, and can run local models with --oss.
Permissions and sandboxing: the biggest real difference
Codex sandboxes by default; Claude Code reviews by default. Codex runs in a macOS Seatbelt sandbox from the first run: it may write inside your workspace, the network is off, and .git and its own config stay read-only. It asks before stepping outside that, and you can hand those questions to a reviewer agent (“Approve for me”).
Claude Code has started new terminal and VS Code sessions in auto mode since late September 2026: a classifier model reviews each action instead of asking you. Its operating-system sandbox is off until you run /sandbox, and even then it covers shell commands only, not file edits, MCP tools or hooks. Shift+Tab switches to the manual mode that asks first.
Several popular comparisons get this backwards, describing Claude’s safety as “app-level only” or listing Codex modes that no longer exist. Both tools also have a full bypass, --dangerously-skip-permissions and --yolo, meant for disposable containers. More on choosing safely in Claude Code permissions, explained.
CLAUDE.md and AGENTS.md now work in both
You no longer need two instruction files. Claude Code reads AGENTS.md natively when there is no CLAUDE.md (since version 2.1.277, 18 September 2026). Codex reads AGENTS.md from ~/.codex and from the git root down to your folder, and will read CLAUDE.md if you add it to project_doc_fallback_filenames.
# ~/.codex/config.toml
project_doc_fallback_filenames = ["CLAUDE.md"]Codex goes a step further for people switching: its /import command (since 0.140) brings over Claude Code settings, MCP servers, sessions and memories. Settings live in ~/.claude/settings.json and .claude/ for Claude Code, and in ~/.codex/config.toml and .codex/ for Codex.
MCP, hooks, skills and subagents
Both have all four now. Articles that say Codex lacks hooks, subagents or skills are out of date. Both connect to MCP servers, run hooks on events such as a permission request or the end of a turn, load skills and plugins, and start subagents. One removal to know about: Codex dropped its mcp-server mode on 5 September 2026.
What their hooks tell a tool, first-hand
Building AI Bridge meant listening to both CLIs’ hooks to show whether an agent is working or waiting on you. Two differences stood out:
- Claude Code reports more, but not everything. Its hooks cover permission prompts, idle prompts and every tool call, but an interrupted turn (Ctrl-C) reports nothing, and a turn that fails on an API error fires
StopFailureinstead ofStop, so a tool has to listen for both. - Codex hooks can be passed for one launch with
-c, without touching~/.codex, and asks you to review new hooks the first time they run. Its permission hook covers tool approvals only: the folder-trust, re-login and update dialogs are invisible to hooks, and in our testing a failed turn fired no Stop event.
If you build on hooks, read Claude Code hooks, explained.
Sessions and resuming
Both resume by id from any folder; “continue” works per folder. claude -c continues the last session in the current folder and claude -r opens a picker, starting with this folder’s sessions; since 2.1.223, claude --resume <id> finds a session started anywhere. Claude Code keeps sessions for 30 days by default.
codex resume --last continues the latest session in this folder (add --all for every folder), and codex resume <id> finds a session from anywhere. Codex can also queue a message for a session’s next turn with codex queue.
Seen first-hand
The two fail differently. Resume Claude Code with an id that no longer exists and it exits. Codex shows an error, then carries on as a fresh session under a new id, and a prompt you passed is dropped. A script that resumes Codex should check it got the session it asked for.
Headless runs, CI and pull requests
Both run without a person, but Codex leans further into delegation. Claude Code runs headless with claude -p, JSON output, a schema for the result and a spending cap; Codex with codex exec, also with JSON and an output schema.
claude -p "Fix the failing test in src/date.ts" --output-format json --max-turns 20
codex exec "Fix the failing test in src/date.ts" --jsonOn GitHub, Claude answers @claude mentions through its action; Codex has an action too, plus @codex review on pull requests and automatic reviews. Codex cloud tasks keep running while your computer sleeps, and since July 2026 the Codex desktop app lives inside the ChatGPT desktop app. Claude Code has its own desktop app, Claude on the web, and can move a session to the cloud and back.
Where each falls short
Claude Code
- No published limit numbers: you find the edge of your plan by reaching it.
- The OS sandbox is off by default and covers shell commands only.
- Not open source, and not available on Claude’s free plan.
- Sessions are deleted after 30 days unless you raise
cleanupPeriodDays.
Codex
- The CLI needs ChatGPT Plus or above; Free and Go get the desktop app only.
- Users describe it as very literal: it does what you wrote, less what you meant.
- Hooks do not see its trust, login or update dialogs, and a stale resume quietly starts a new session.
- Model churn is fast: GPT-5.5 leaves Codex a week after GPT-6.1 Sol became the default.
Using both
Running both is common, and easier than it was. The pattern developers describe most is one agent writing and the other reviewing, or giving each the kind of work it does best: Claude Code for interactive work, Codex for delegated tasks and reviews. Shared instruction files and Codex’s /import remove most of the friction.
What remains is keeping track: two CLIs in terminal tabs, each stopping to ask for permission at different times. That is the problem we built AI Bridge for; see how to run several AI coding agents at once.
Questions
Is Codex better than Claude Code?
Neither is better at everything. Codex gives more usage for the money, sandboxes by default and suits delegated and cloud work; Claude Code is stronger at interactive steering and comes with Claude plans. My own pick for serious engineering work is Claude Code, mainly because it is faster to work with. Most published head-to-heads tested older models than the current defaults, Opus 5.5 and GPT-6.1 Sol.
Is Codex free?
The Codex desktop app is available on ChatGPT Free and Go, subject to rollout. The Codex CLI needs ChatGPT Plus ($20 a month) or above, or a pay-as-you-go API key.
Is Claude Code free?
No. Claude Code is not part of Claude’s free plan. It comes with Claude Pro ($20 a month, or $17 billed yearly) and above, or you can pay per use with an API key.
Can Codex read my CLAUDE.md?
Yes, with one setting: add CLAUDE.md to project_doc_fallback_filenames in ~/.codex/config.toml. Claude Code already reads AGENTS.md when a project has no CLAUDE.md.
Can I move from Claude Code to Codex?
Codex’s /import command brings over Claude Code settings, MCP servers, sessions and memories.
Which is safer to let run on its own?
Codex’s defaults are stricter: an operating-system sandbox with the network off. Claude Code starts in auto mode, where a classifier reviews each action, and its sandbox is opt-in. Whichever you use, avoid the full bypass flags outside a disposable container.
Sources
Checked on 12 October 2026. These tools change often; where a source and this page disagree, the source is right, and we would like to hear about it at hello@aibridge.sh.
- Claude Code overview · code.claude.com · checked 12 Oct 2026
- Claude Code setup · code.claude.com · checked 12 Oct 2026
- Claude plans and pricing · claude.com · checked 12 Oct 2026
- Claude Max plan · support.claude.com · updated Oct 2026
- Claude usage limits · support.claude.com · updated Oct 2026
- Claude Code model configuration · code.claude.com · checked 12 Oct 2026
- Claude Code permission modes · code.claude.com · checked 12 Oct 2026
- Claude Code sandboxing · code.claude.com · checked 12 Oct 2026
- Claude Code memory (CLAUDE.md) · code.claude.com · checked 12 Oct 2026
- Claude Code sessions · code.claude.com · checked 12 Oct 2026
- Claude Code headless mode · code.claude.com · checked 12 Oct 2026
- Claude Code changelog · code.claude.com · to 2.1.296, 9 Oct 2026
- Claude Code licence · github.com · checked 12 Oct 2026
- Codex repository · github.com · checked 12 Oct 2026
- Codex releases · github.com · 0.162.1, 9 Oct 2026
- Codex pricing · learn.chatgpt.com · checked 12 Oct 2026
- Codex models · learn.chatgpt.com · checked 12 Oct 2026
- Codex approvals and security · learn.chatgpt.com · checked 12 Oct 2026
- Codex sandboxing · learn.chatgpt.com · checked 12 Oct 2026
- Codex AGENTS.md · learn.chatgpt.com · checked 12 Oct 2026
- Codex hooks · learn.chatgpt.com · checked 12 Oct 2026
- Codex changelog · learn.chatgpt.com · to 8 Oct 2026
- Codex local, worktree and cloud modes · learn.chatgpt.com · checked 12 Oct 2026
- Hacker News: Claude Max vs Codex usage · news.ycombinator.com · 21 Aug 2026
- Ask HN: Codex or Claude Code? · news.ycombinator.com · 21 Jul 2026
Change log
- : First published, against Claude Code 2.1.296 and Codex 0.162.1.
Keep reading
- ComparisonsCursor vs Claude CodeCursor is an AI editor, Claude Code a terminal agent, and they work together. Price, models, approvals, privacy and the SpaceX deal, checked October 2026.
- ComparisonsOpenCode vs Claude CodeOpenCode vs Claude Code in October 2026: why a Claude Pro or Max plan can’t be used in OpenCode, plus price, models, permissions, sessions and using both.
- How-toClaude Code permissions, explained: modes, sandbox and --dangerously-skip-permissionsHow Claude Code’s six permission modes, allow/ask/deny rules, /sandbox and --dangerously-skip-permissions work in October 2026, with a safe starting policy.
- ConceptsClaude Code hooks, explained (with examples)Claude Code hooks in October 2026: the 33 events, settings JSON, stdin payload, matchers and exit codes, with notification and command-blocking examples.