Codex defaults to containment: an operating-system sandbox with a writable workspace, network off, and the model deciding when to ask. Claude Code defaults to consent: permission modes that range from approving every action to a classifier-vetted auto mode, with plan mode as the gate for anything unfamiliar. Their heavy-use price ladders differ, so compare the plans as published rather than forcing them into matching rungs. Running both and letting one review the other is a genuinely good pattern.
- Both are included with a consumer subscription: ChatGPT for Codex, Claude for Claude Code.
- Codex contains the agent with an OS-level sandbox (Seatbelt, bubblewrap, the Windows sandbox). Claude Code gates it with permission modes and a classifier.
- Both now have both. The difference in 2026 is the default posture, not the available machinery.
- ChatGPT publishes Go at $8, Plus at $20, and Pro at $200 with maximum Codex tasks. Claude publishes Pro at $20, Max 5x at $100, and Max 20x at $200.
- Codex exposes reasoning effort as a first-class dial. Claude Code exposes plan mode as a first-class gate. Those are the two levers that matter most.
- The strongest pattern is both: one implements, the other reviews, and you get two independent quotas.
Containment, which drives everything else
Both put an agent in your terminal. The design disagreement is about how to stop it doing something you did not want.
| Codex | Claude Code | |
|---|---|---|
| Primary mechanism | OS sandbox with a writable workspace root | Permission modes plus allow, ask, and deny rules |
| Default | workspace-write sandbox, on-request approvals, network off | Manual mode: reads run, everything else prompts |
| Hands-off setting | -a never inside a tight sandbox | auto mode, where a classifier vets each action first |
| Research-only setting | -s read-only | --permission-mode plan |
| Enforcement | Seatbelt on macOS, bubblewrap on Linux and WSL2, the native sandbox on Windows | In-process policy, with a separate sandboxing feature for shell commands |
| Feels like | Delegating to a contractor with a locked office | Pairing with someone who asks before each step |
The 2026 correction
The old summary of this comparison, "Codex sandboxes and Claude Code asks", is now a statement about defaults rather than capabilities. Claude Code has its own sandboxing for shell commands and an auto mode where a classifier reviews actions before they run, and Codex has an untrusted approval policy that will prompt on anything off a trusted list. Pick on default behaviour, because the default is what you will actually live with.
The models behind each one
This is where a lot of the felt difference comes from, and both lineups moved in 2026.
Model families as presented by each vendor in August 2026.
| Codex | Claude Code | |
|---|---|---|
| Everyday model | GPT-5.6 Terra | Sonnet class |
| Hardest work | GPT-5.6 Sol | Opus class |
| Cheap and fast | GPT-5.6 Luna | Haiku class |
| Effort control | model_reasoning_effort: minimal, low, medium, high, xhigh | Model choice plus extended thinking |
| Preview tiers | GPT-5.3-Codex-Spark on Pro plans | Newer models roll out across plans |
Codex making reasoning effort an explicit setting matters more than it sounds. It means the same model is three different tools depending on one config key, and it is the largest lever you have on both quota and wall-clock time. Claude Code puts the equivalent decision in model selection and in whether you use plan mode.
Cost
List prices checked 7 August 2026 on each vendor’s pricing page.
| Codex (ChatGPT) | Claude Code (Claude) | |
|---|---|---|
| Free | Included, small allowance | Included, small allowance |
| Entry | Go $8/mo, Plus $20/mo | Pro $20/mo (about $17 annually) |
| Mid | No separate published rung | Max 5x, $100/mo |
| Top individual | Pro, $200/mo | Max 20x, $200/mo |
| Business | $20/user/mo annual, $25 monthly | Team Standard $20/seat annual, $25 monthly |
| Overage | Credits, priced per million tokens by model | None on subscription; you wait for the window |
| API option | Yes, per token | Yes, per token |
The ladders match at the $20 entry tier but differ above it, which makes plan shape part of the choice. ChatGPT has an $8 Go tier with no Claude equivalent, and publishes Pro at $200. Codex also sells credits for overage, so a heavy day can continue at a price, where a Claude subscription simply stops until the window refills.
How each one meters you
- Codex counts messages against a 5-hour window that scales with your plan. As of August 2026 OpenAI publishes an indicative range of roughly 25 to 200 local messages per window on Plus for the everyday model, and describes Pro as offering maximum Codex tasks. Cloud tasks share the same window.
- Claude Code counts tokens weighted by model against a rolling 5-hour window plus a separate weekly cap. There is no message count, which is why the same plan feels generous on a Haiku day and tight on an Opus one.
The two-subscription argument
At $20 plus $20 you get two independent quotas and two independent opinions. When you exhaust one, you switch rather than stop. For anyone doing this full time that is a better use of $40 than a single upgrade, and it is the single most common setup among heavy users.
What people consistently report
Filtering months of comparisons down to the claims that recur across independent sources rather than appearing once:
| Dimension | Tends to favour | The observation |
|---|---|---|
| Speed on simple tasks | Claude Code | Faster to first useful output |
| Thoroughness on hard problems | Codex | Slower at high effort, but more likely to actually solve it |
| Long multi-turn sessions | Claude Code | Degrades less over hours of work |
| Context efficiency | Codex | Gets more done per token of context |
| Large outputs | Claude Code | Handles big refactors and long files better |
| Hands-off autonomy | Codex | Interrupts less, finishes more unattended |
| Interactive steering | Claude Code | Easier to redirect mid-task |
| Hard safety boundary | Codex | OS-level containment rather than in-process policy |
| Working away from the desk | Claude Code | Desktop, web, and mobile surfaces plus Remote Control |
Running both, properly
Not "have both installed", but an actual division of labour. The patterns that hold up:
Implement with one, review with the other
The reviewer has no attachment to the implementation and no context about why a shortcut was taken. It catches things the author will not. Codex ships a codex review subcommand for exactly this; Claude Code does it with a read-only session or a plan-mode prompt. This is the highest-value pattern by a distance.
Race them on genuinely hard problems
Give the same difficult task to both in separate worktrees, then read both diffs and take the better one, or the better half of each. Twice the cost, and worth it when the failure mode is a design you live with for a year.
Split by task shape
Codex at high reasoning effort for the long unattended grind where you want it to just finish. Claude Code for the interactive work where you will be steering, and for anything you want to approve from a phone.
Fail over on limits
Hit a Claude window at 3pm and move to Codex rather than stopping. Two quotas is the practical benefit people notice first, and it is worth more than a single larger plan for most people.
# Claude Code makes its own worktree
claude --worktree feature-auth
# Codex in a second worktree, with the main repo writable so git works
git worktree add ../myapp-codex -b feature-auth-codex
cd ../myapp-codex
codex --add-dir ~/code/myapp
Measuring which one is actually earning its keep
Neither vendor can tell you what the other is costing, so if you run both you have no total. Both write their history to disk in a form you can read, which is the only place a real answer exists.
| Codex | Claude Code | |
|---|---|---|
| History location | ~/.codex/sessions/ | ~/.claude/projects/ |
| Format | One rollout file per session | One JSONL per session, filed by encoded project path |
| Carries token counts | Yes | Yes |
| In-session check | /status | /status |
du -sh ~/.codex/sessions/ ~/.claude/projects/
ls -t ~/.codex/sessions/ | head -5
ls -t ~/.claude/projects/ | head -5
That tells you volume, not dollars. Pricing it properly means joining each turn’s token counts to the rate for the model that produced them at the time it ran, which is what dedicated tooling exists to do.
Picking one
| If | Pick |
|---|---|
| You already pay for ChatGPT | Codex. It is included; start there. |
| You already pay for Claude | Claude Code. Same logic. |
| You want maximum hands-off autonomy | Codex |
| You want to steer mid-task | Claude Code |
| You need a hard OS-level safety boundary | Codex |
| You run very long sessions on big refactors | Claude Code |
| You want to approve work from a phone | Claude Code |
| You want the cheapest way in at all | ChatGPT Go at $8 |
| You are doing this professionally, full time | Both, at $20 + $20 |
If you genuinely have no prior subscription and no preference, start with whichever ecosystem you already trust with your data. That constraint is more durable than any current quality gap, because the quality gap will invert at least twice before your subscription renews.
Questions people ask
Neither dominates. Codex tends to be more thorough on hard problems at high reasoning effort and more hands-off; Claude Code tends to be faster to first output and stronger over long sessions. The gap moves with every release.
Yes, and it is a good pattern. Put each in its own git worktree so their edits cannot collide, and use one to review the other. Remember to pass --add-dir to Codex inside a worktree or its git operations will fail.
They match at the $20 entry tier, then differ: ChatGPT publishes Pro at $200, while Claude publishes Max tiers at $100 and $200. ChatGPT also has an $8 Go tier, and Codex sells credits for overage where a Claude subscription simply stops until the window refills.
How often it interrupts you, and what happens when it wants to do something outside the box. Codex is contained by the operating system and asks when it needs to leave the sandbox. Claude Code is gated by permission modes and asks according to the mode you chose.
Not by that name. Running with a read-only sandbox achieves the same thing: it can research and propose without the ability to change anything. Claude Code’s version is more formal, with a plan artefact and an approval prompt you can edit with Ctrl+G.
Codex is more context-efficient per token; Claude Code degrades less over long sessions and large outputs, and its subagents keep exploration out of the main context. For a huge refactor in one sitting, Claude Code. For a careful change in a sprawling repo, Codex.
Yes. codex exec and claude -p both run non-interactively and exit. Use an API key rather than a subscription login in a pipeline, and pin the permission or sandbox settings explicitly instead of inheriting a default that may move.
Whichever ecosystem you already trust with your source code. Both are $20 to try, both are monthly, and switching costs a month. That is a cheaper experiment than reading another comparison.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.
- Codex pricing ChatGPT plan prices, window ranges, credit rates
- Codex sandboxing sandbox modes and platform enforcement
- Claude plans and pricing Pro, Max, and Team prices
- Claude Code: permission modes plan, auto, and the rest