Comparison Build Coding

Codex vs Claude Code: I quit Codex. Then I retested it.

Codex vs Claude Code from someone who dropped Codex in May over one specific flaw — and found it fixed in July. What changed, and what I'd still watch.

Codex vs Claude Code: I quit Codex. Then I retested it.
Contents

The short answer

I quit Codex in May over one specific flaw, so my Codex vs Claude Code answer felt settled. I retested Codex in July and that flaw is gone.

Try Codex
SituationPick this
Best if you already pay for ChatGPTCodex. It’s included, and better than its reputation
Best for a hard ceiling on spendClaude Code. Its credits are off by default
Best entry priceCodex. Limited access is free; Claude Code has no free tier

Where I stand, so you can weigh the rest: this site earns referral credits on Claude signups and nothing on Codex. That makes the finding below awkward for me, which is the best reason to trust it.

And one thing this post is not: a controlled head-to-head. I did not run the same task on both tools under the same conditions. Codex’s side is a documented test on 31 July 2026 — two runs, roughly twenty minutes, on a free ChatGPT plan — plus a month on the $20 tier back in May. Claude Code’s side is eight months of paid daily use against a production repo. That’s an honest asymmetry and I’d rather name it than dress it up as a scorecard.

So read this as Claude Code vs Codex from one side of the desk, not a lab result. I’ve run a properly matched head-to-head once — Claude Code vs Cursor, where I’d paid for both across a year — and this isn’t that.

Codex vs Claude Code: how they actually differ

The benchmark comparisons are everywhere and they age in weeks. These are the defaults — the things that shape a working day and don’t move with a model release.

DefaultClaude CodeCodex
Entry price$20/mo (Pro). No free tierFree tier has limited access
Shows its reasoningYes, raw tool-by-tool streamYes, a sentence of intent per step
Network by defaultNot sandboxed unless you enable itSandboxed. DNS blocked, asks first
Edits inside your workspaceAsks per edit in default modeSilent, no prompt
Edits outside your workspacePrompts for paths outside cwd; --add-dir widens itWill go looking, but asks before writing
Project memoryCLAUDE.mdAGENTS.md
Self-reported diff sizeNo cumulative badge to be wrongUndercounted in both my runs

Head-to-head on defaults: Codex wins entry price and network sandboxing, Claude Code wins per-edit approval and folder confinement (documented, not tested), and three axes are level, for a two-all draw

That works out at two apiece with three level, and it is about defaults, not code quality. Unlike the rest of this post it is a fair like-for-like comparison, because every row comes from vendor documentation or a behaviour I watched directly, rather than from the lopsided hands-on testing.

Before you read anything into that number, two rows deserve a caveat rather than a score. I am not counting the diff badge as a Claude Code win: Codex’s undercounts, which I measured, but Claude Code emits no cumulative badge at all, so there was nothing there to check. And I never ran the empty-directory test against Claude Code, so treat “stays in its folder” as a documented default on its side and a measured behaviour on Codex’s. Nobody should switch tools over a draw on configuration choices, but those choices are what you live with every day, and unlike a benchmark they don’t change with the next model release.

Two of those cells are the whole post, and neither is about code quality.

What changed in Codex since May?

My May complaint was narrow and total: Codex went quiet. It would accept a task and then sit there, and I could not tell a long job from a hung one. After a month I stopped opening it.

That is fixed. Thirteen seconds into the first July run, the screen showed a live elapsed counter, a log of files read and commands run, and this:

“I’ll trace the field through the schema, validation guard, and rendering path first, then patch the smallest set of files and run the project’s type-check so we know the rename really landed.”

By forty-five seconds there were six such blocks, each explaining what it was about to do and why, each separated by a tool line. It never went quiet once.

It’s worth being precise about the shape, because it isn’t the same as Claude Code’s. Claude Code streams the calls themselves — you watch it read a file, run a command, apply an edit. Codex writes a sentence of intent and then shows a collapsed summary of what that took. Codex is more readable; Claude Code is more auditable. If you want to know what happened, Claude Code. If you want to know why, Codex. Both solve “is this thing alive.”

I’d also flag the obvious: I quit over a UX gap that took one release to close. If you bounced off Codex before roughly mid-2026, your reason for leaving may not exist any more.

How did I test this?

Worth being explicit, because the evidence on the two sides is not the same weight and I’d rather you knew that than discovered it.

EvidenceCodexClaude Code
Paid time on it1 month ($20 tier, May 2026)8 months (Max 5x, ongoing)
Observed test runtime~20 min, 31 July 2026n/a, daily use
Plan tested onFreeMax 5x
Same task run on both?NoNo
Results checked againstgit + parsersinvoices + dashboards

Codex. A month on the $20 ChatGPT tier in May 2026, which I abandoned. Then two driven runs on 31 July 2026, on a free plan, roughly twenty minutes of observed runtime. The task was a real one from a real repo: rename a field end to end across SQL, n8n workflow JSON and Python. Every claim about Codex in this post comes from those runs, and every result was checked against git and a parser rather than read off the transcript, because an agent’s self-report is a claim rather than evidence. Its diff badge was wrong both times, which rather makes the point.

Claude Code. Eight months of paid daily use on Max 5x against a production repo, plus four published posts in this cluster and real invoices. That is a much richer picture and a far less controlled one.

What I did not do: run the same task on both and score the results. That would be the rigorous thing, and I am not doing it for a reason worth stating. This site’s editorial work runs on Claude Code, so a head-to-head would be one tool grading itself. Twenty minutes on a free tier also cannot be weighed against eight months of production use without flattering whichever side you already prefer. Since we earn referral credit on Claude and none on Codex, the direction that bias would run is not subtle.

So where I have measured evidence, I give numbers. Where I do not, I say so. I score the defaults below, because I watched those directly on both tools. I do not score code quality, and you will not find a winner declared on it here, because twenty minutes against eight months cannot support that claim.

Claude Code: strengths and gaps

Where it earns the money. Long multi-file sessions where context handling is the constraint. CLAUDE.md as persistent project memory — the single most valuable file in my repo, and it compounds. A default posture that asks before each edit, which is tedious on day one and reassuring on day ninety. And a cost shape that cannot surprise you: it stops rather than bills.

Where it’s weaker. No free tier at all — $20 monthly, $17 annual, is the floor, and Pro defaults to Sonnet 5 where Max defaults to Opus 5, with the 1M-token Opus context included on Max but needing usage credits on Pro. Nothing is sandboxed unless you deliberately turn it on, and on Windows sandboxing requires WSL 2. The two-limit system (a rolling five-hour window plus a weekly cap) is genuinely easy to misread; I’ve written a whole pricing guide mostly because of it.

I use it daily and I’m keeping it. That’s a statement about my workload, not a verdict on the other tool — and the full case is in my Claude Code review.

Codex: strengths and gaps

Where it surprised me. Everything below came out of one 20-minute test, and I checked all of it against git rather than believing the transcript.

I gave it a genuinely awkward job: rename a field end to end across a repo, touching SQL, n8n workflow JSON, and Python. Twenty-three references to b_roll_suggestions across seven files, plus ten more to b_roll_prompts, the name the same field travels under in the render-service API.

It got all thirty-three. Here is what it changed, measured with git rather than read off the screen:

FileLanguageChange
supabase-init.sqlSQL−2 (dropped the legacy column)
sf-4-video-render.jsonJSON + embedded JS+3 −3
render_server.pyPython+5 −14
sf4-add-branch-b.pyPython+3 −7
sf4-add-branch-d.pyPython+2 −5
smoke-end-to-end.pyPython+2 −2
CLAUDE.mdMarkdown+1 −1

Every file still parsed afterwards. I verified that independently rather than taking its word: JSON.parse on the workflow (28 nodes intact), node --check on the JavaScript extracted from inside it, and py_compile on all four Python files.

The hardest edit is the one worth dwelling on. That n8n workflow file stores its code-node bodies as escaped JSON strings — JavaScript inside a string inside JSON. Codex spotted it:

“The workflow file stores the code-node bodies as escaped JSON strings, so I’m using a structured JSON edit for that one instead of hand-splicing a giant one-line string.”

It wrote a small node script to parse, modify and re-serialise, rather than reaching for a regex. Then it checked its own work, found the first pass incomplete, and said so unprompted: “The first JSON edit removed the SQL select cleanly, but the embedded JavaScript string still had the fallback.” That is not junior behaviour.

It also refused to fake a result. Asked for a passing type-check, it hit a sandboxed DNS failure, requested network access, was denied — and then reported the failure precisely rather than claiming success:

“I could not show the requested passing TypeScript type-check because scripts/remotion-service has no local node_modules… I requested networked dependency install… but that approval was rejected, so I stopped there rather than fetching anything.”

Then it noticed the empty package store its aborted install had left behind and asked to remove it, “so your worktree only contains the intended code changes.”

Codex renamed 33 references across 7 files and 3 code languages, every file still parsing afterwards

Where I’d be careful. Two things, both specific.

It will leave the folder you point it at. In my first run I aimed it at an empty directory. It didn’t stop. It widened the search, found an unrelated production repo elsewhere on disk, and planned edits against it. It was honest about every step and it did ask before writing outside the workspace, so nothing landed. But “workspace” scopes where it begins, not where it can reach.

On the second run I added a single sentence: work only inside this path, don’t read or modify anything outside it. It held that line rigorously, even placing a package store inside the directory to comply. One line of prompt fixes it. You have to know to write it.

It rewrote the rule that forbade what it was doing. My repo’s CLAUDE.md said, in terms: b_roll_suggestions is a legacy column kept for back-compat, don’t drop the legacy column. Codex dropped it, then edited CLAUDE.md to remove that instruction, replacing it with a description of the new state.

The charitable reading is probably correct — I asked for an end-to-end rename, and leaving documentation asserting a constraint the code no longer honours would be worse. It listed the change in its own summary rather than hiding it. But the asymmetry is real: CLAUDE.md is the file that instructs future agents, and an agent that revises the rulebook to match what it just did erases the evidence a rule ever existed. The next session reads a clean file. And it happened with no approval prompt, because the file sits inside the workspace.

Try Codex

Is Codex cheaper than Claude Code?

Yes, for most people. Codex is free to try and bundled into a plan you may already be paying for; Claude Code starts at $20 a month with no free tier at all. The nuance is what happens at the top of each ladder, where the two converge.

Does Codex really cost $200 a month?

This is where the public comparisons are least reliable, so start with the correction: Codex does not require ChatGPT Pro at $200 a month. You will see that claimed, and it is wrong. Both of the tests in this post ran on a free ChatGPT plan, on an account whose billing page reads “Free plan, ₫0/mo”.

Codex is bundled into a ChatGPT subscription rather than sold on its own, and access is graded rather than gated. The plan comparison grades it: Free and Go get “Limited” Codex, Plus gets “Expanded Codex usage”, Pro gets “Maximum Codex tasks”. So the marginal cost of trying Codex, if you already pay for ChatGPT, is zero, and it stays zero if you don’t.

Claude Code has no free tier. Pro at $20 a month, or $17 on annual billing, is the floor, and there is no way to run it without paying something. Above that, Max 5x is $100 and Max 20x is $200, and every figure excludes tax: my own $100 plan bills $110 once my 10% rate lands. The full breakdown, including team seats and the API rate card, is in my Claude Code pricing guide.

TierClaude CodeCodex
FreeNot available”Limited” Codex access
Entry paidPro, $20/mo ($17 annual)Go, then Plus: “Expanded Codex usage”
HigherMax 5x, $100/moChatGPT Pro: “Maximum Codex tasks”, 5× Plus
HighestMax 20x, $200/moChatGPT Pro at its upper price point, 20× Plus
Billed asIts own subscriptionPart of your ChatGPT plan
Past the limitStops, unless you enable creditsCredits on Plus/Pro, stops on Free/Go

Two things about the Codex column need saying, because they look like a contradiction and aren’t. Codex grades access in three steps — Limited, then Expanded, then Maximum — which is the framing I use in the FAQ. But the top step, ChatGPT Pro, itself spans two price points, offering 5× and 20× Plus’s limits. Three grades of access, four price points. The plan page shows both.

I’ve given Claude Code’s tiers in dollars and Codex’s in multiples deliberately, because that is what I could stand behind at the time. The dollar figures have since been verified in the Codex pricing guide: Go $8, Plus $20, Pro 5x $100, Pro 20x $200. Both ladders express their top two tiers as 5× and 20× the entry plan, which is not a coincidence.

The interesting comparison isn’t the sticker, though — it’s the shape.

Claude Code’s shape is a ceiling. When you hit a limit it stops and tells you when the window resets. You can turn on usage credits to keep going, but they’re off by default, so the bill is what the plan says plus tax. That predictability is the single thing I value most about it, and it’s why I left Cursor’s metered billing to get here.

Codex’s shape is an allowance inside a subscription you’re probably already paying for. You don’t get a separate invoice, and you don’t get a separate decision. That is genuinely simpler, and it also means the cost of Codex is invisible to you in a way Claude Code’s never is. Whether that’s a feature depends on whether you’d rather know.

For a moderate user the honest answer is that Codex is cheaper, possibly free, and that is not a small advantage. For a heavy user, the question is which ceiling you hit first and how much you mind waiting. I don’t have comparable heavy-usage data on Codex to answer that, because twenty minutes on a free tier doesn’t produce it.

Claude Code vs Codex: which writes better code?

I’m going to be careful here, because this is exactly where a post like this usually overreaches.

I have one rigorous data point on Codex: a 33-reference rename across seven files, executed correctly and verified against disk. That tells me it can do precise, wide-reaching, syntactically delicate work, including the escaped-JSON surgery that would defeat a naive find-and-replace. It does not tell me how it handles architectural ambiguity, a long debugging session, or a week-old codebase it has never seen.

On Claude Code I have eight months of daily use against a production repo, which is a much richer picture and a much less controlled one.

One gap I should name rather than let you discover. Every other comparison I read leads with benchmark scores, and this one has none. That’s deliberate: I have no first-hand benchmark data, and second-hand scores go stale within weeks of a model release, so quoting one would be borrowing authority I haven’t earned. If a SWE-bench number is what you came for, take it from each vendor’s own current eval page rather than from any article, this one included — the figure moves faster than anyone can keep up with in prose.

So rather than declare a winner on code quality, here’s what I’d actually say: on the axis I could measure, Codex was excellent, and better than I expected from a tool I’d written off. The self-correction is the part that stayed with me — it noticed its own incomplete edit before I did, and said so without being asked. That behaviour matters more over a long session than any benchmark delta.

Here is what it ran when I denied it the network, and what I ran afterwards to check it:

CheckCodex ranI ran independentlyResult
Stragglersrg for old field namesgrep -rn across the repo0 left in pipeline code; 45 left in frozen planning docs
Workflow JSON validJSON.parsejson.load — 28 nodesvalid
Embedded JS validnot runnode --checkparses
Python validpy_compilepy_compile ×4all pass
Whitespacegit diff --checkpass
TypeScriptblocked (no network)n/a, no TS in scopenot run

One caveat that cuts both ways: b_roll_suggestions still appears 29 times under docs/superpowers/, and b_roll_prompts another 16, across four dated plan and spec files. Leaving those alone is arguably correct — they are a record of what was decided in May, not live instructions, and this repo explicitly banner-marks one of them as a frozen artefact. But Codex didn’t flag the decision, and my own first pass at checking its work missed them because I scoped the grep to code extensions. Neither of us covered ourselves in glory there.

What I can compare directly is verification behaviour, because both were tested against the same constraint. Anthropic’s best-practices guide names the trust-then-verify gap as one of five common failure patterns: a plausible implementation that doesn’t handle edge cases, presented as done. Codex did not fall into it. Denied the network it needed for a type-check, it chose the checks still available to it (a grep for stragglers, a JSON parse, a Python compile, a whitespace check) and then stated plainly what it had not been able to verify.

That’s the right instinct, and it’s rarer than it should be.

The one place its self-reporting failed is mechanical rather than moral: its own diff badge undercounts. It reported “6 files changed, +13 −31”. git said seven files, +16 −34. It undercounted mid-run too. If you’re approving changes on the strength of that number, you’re approving more than it’s telling you. Check git status, not the badge.

How do Codex and Claude Code differ day to day?

Claude Code is terminal-native and asks a lot of you. In default mode it prompts before every edit, which is the right default and also the reason people reach for acceptEdits by the tenth approval. That mode quietly auto-approves mkdir, touch, mv, cp, sed and rm inside your working directory, per the permission-modes docs. Worth knowing before you press Shift+Tab once.

Codex is app-native and asks less. Inside its configured workspace it simply edits, with no prompt and no dialog. The gate fires on two things: writes outside the workspace, and network egress. Both of mine fired correctly and both were legible, naming the exact file and diff size, or the exact command.

ActionClaude Code (default mode)Codex
Read a fileNo promptNo prompt
Edit inside the workspaceAsksNo prompt
Edit outside the workspacePrompts; --add-dir widens itAsks
Run a shell commandAsksNo prompt inside workspace
Reach the networkPrompts as a shell command; no OS-level block unless sandboxedAsks, and blocked by default

Read the edit outside the workspace row carefully: both tools gate the write. The asymmetry I actually measured is behavioural, not architectural — Codex went looking for a repo unprompted, and Claude Code was never put through the same empty-directory test.

That difference in posture produces genuinely different days. With Claude Code you are in the loop by default and opt out. With Codex you are out of the loop by default, within a boundary, and the boundary is where you get pulled back in.

Which is better depends entirely on whether you trust the boundary, and my first run is the argument for checking. Pointed at an empty folder, Codex went and found a real repo. The gate did its job and I denied the write. But if the workspace had been slightly wrong rather than empty, say a sibling checkout or an old clone, the edits would have been inside the boundary, silent, and against the wrong code.

The network default cuts the other way, and in Codex’s favour. Egress is blocked out of the box; it hit ENOTFOUND, diagnosed it correctly, and asked. Claude Code does not sandbox unless you turn it on with /sandbox, and on Windows that needs WSL 2. For anyone running agents against a repo with credentials in it, that’s a meaningful difference in what happens when you haven’t configured anything.

Can you run both?

This turns out to be the most common answer among people who have used both seriously, and it took me a while to stop treating it as a cop-out.

The shape people describe is some version of a handoff: Claude Code plans and Codex executes, or Codex drafts and Claude Code reviews, or one implements while the other critiques the diff. I’ve seen enough of it to think the question has quietly moved from which one to which one for which half of the job.

SplitWho does whatWhy it works
Plan / executeClaude Code plans, Codex buildsSeparates deciding from doing
Build / reviewEither builds, the other critiques the diffFresh context, no self-defence
Draft / finishCodex drafts, Claude Code refinesDifferent failure modes cancel

There is a structural reason it works. A reviewer running in a fresh context sees the change without the reasoning that produced it, so it judges the result on its own terms rather than defending choices it made, and doing that across two vendors gets you a second read on a different model with different blind spots.

The practical catch is that both tools want to own your project memory. Claude Code reads CLAUDE.md; Codex reads AGENTS.md. Maintaining two files that drift apart is how you end up with two agents following different rules in the same repo. The clean fix is to keep one file and have the other import it: Claude Code reads AGENTS.md’s contents happily if your CLAUDE.md is a one-line @AGENTS.md import, which keeps a single source of truth. I go into how to structure that file separately.

I have not run a two-tool workflow long enough to recommend a specific split, so I will not pretend otherwise. But if you are paying for ChatGPT anyway, the cost of trying Codex as a second opinion on work Claude Code just did is zero, and a fresh-context reviewer is the highest-value thing you can point a second agent at.

Who should pick Claude Code?

  • Anyone who needs the bill to have a ceiling. This is the case I lived, and it’s why I switched here from a metered tool. A capped plan that makes you wait beats an unbounded one that doesn’t.
  • People who want to be asked. Per-edit approval by default, and a permission model with genuinely protected paths. If you’d rather opt out of oversight than opt in, this is your side.
  • Long-session, multi-file work in a repo you’ll maintain for years. CLAUDE.md compounds, and context handling over a long session is the thing it’s tuned hardest for.
  • Terminal natives. If you already live in a shell, adding an app you don’t want is a cost.
Try Claude Code

Who should pick Codex?

  • Anyone already paying for ChatGPT. It’s included. The marginal cost of finding out is zero, and it is materially better than its reputation among people who tried it early and left.
  • Anyone who wants a sandbox without configuring one. Network blocked by default, with a legible prompt when it needs out. That’s a better out-of-the-box posture for unattended work.
  • People who’d rather read intent than watch calls. A sentence explaining why before each step is easier to follow than a raw tool stream, especially if you’re not going to audit every action.
  • Anyone who bounced off it before mid-2026. If you left for the reason I left, the reason is gone. Re-testing costs you nothing.

The final word

I went into this retest expecting to confirm a decision I’d already made, and came out with a closer call than I started with.

I’m staying on Claude Code. My reasons are specific and they’re about me: a hard ceiling on spend, per-edit approval as a default rather than a setting, and eight months of CLAUDE.md that would cost real time to rebuild. None of those are claims that it writes better code, because I don’t have the evidence for that claim and neither, I’d gently suggest, do most of the posts asserting it.

What I can say with evidence is that Codex did a piece of delicate work correctly, caught its own mistake, refused to fake a result it couldn’t produce, and cleaned up after itself — on a free plan, in twenty minutes, after I’d written it off. The two things I’d watch are that it will wander outside the folder you name unless you tell it not to, and that it will quietly update your project’s rulebook to match what it just did.

If you’re choosing today: try Codex first if ChatGPT is already on your card, because it costs nothing to find out. Pay for Claude Code when you want the bill to have a ceiling and the tool to ask before it acts.

And if you quit Codex sometime before the middle of this year — go and check whether your reason still exists. Mine didn’t.

Frequently asked questions

Is Codex better than Claude Code?

Neither wins outright, and anyone telling you otherwise is selling a verdict. They now overlap on the things that used to separate them: both narrate their reasoning while working, both read your repo and edit files, both gate risky actions behind approval.

The defaults are what actually differ. Codex sandboxes network access by default and asks before egress; Claude Code does not sandbox unless you turn it on. Claude Code's default mode asks before every edit; Codex edits silently inside its configured workspace and only prompts when something crosses that boundary. Pick on which default matches how you want to work, not on a benchmark score.

On the one axis I tested rigorously rather than described from memory — verification behaviour — Codex outperformed its reputation. It caught its own incomplete edit and said so unprompted, and when it was denied the network it needed for a type-check it reported the failure precisely instead of claiming success. That is a real, scoped result rather than a verdict on which one writes better code.

Is Codex free?

Partly, and this is the most commonly misreported fact in this comparison. Codex is bundled into a ChatGPT subscription rather than sold separately, and access is graded by tier rather than gated: Free and Go get limited Codex, Plus gets expanded usage, Pro gets the maximum, as chatgpt.com/pricing spells out plan by plan.

You will see it claimed that Codex requires ChatGPT Pro at $200 a month. That is wrong, and I can be specific about why: I ran both of the tests in this post on a free ChatGPT plan, and it worked.

Claude Code has no free tier at all: the cheapest way in is Claude Pro at $20 a month. So on entry price, Codex genuinely undercuts it, including at zero. If you already pay for ChatGPT, trying Codex costs you nothing at all, which makes the usual "which should I buy" framing the wrong question for most people asking it.

Did Codex fix the problem where you couldn't tell if it was working?

Yes, and that is the headline of this post because it is why I stopped using it. On the $20 trial in May 2026 it would go quiet mid-task, and I could not distinguish a long job from a hung one.

Retesting on 31 July 2026, that is gone. A live elapsed timer runs from the first second, and it narrates continuously — six separate blocks in the first 45 seconds of one run, each explaining what it was about to do and why, interleaved with a log of the files it read and commands it ran.

It is a different shape from Claude Code's raw tool-by-tool stream: Codex writes a sentence of intent where Claude Code shows you the call. Both solve the problem.

Can Codex edit files outside the folder you point it at?

Yes, and this is the finding I would most want a new user to know. I pointed Codex at an empty directory and asked for a rename. Instead of stopping, it searched the wider filesystem, located an unrelated production repository, and planned edits against it.

It was transparent throughout and it did ask before writing outside the configured workspace, so nothing happened without approval. But the workspace setting scopes where it starts, not where it can go.

On the second run I added one sentence — work only inside this path, do not read or modify anything outside it — and it held that boundary rigorously, even routing a package store inside the directory to comply. The fix is one line of prompt; you just have to know to write it.

Which one should I actually pay for?

If you already pay for ChatGPT, try Codex before paying for anything else. It is included, it is much better than its reputation among people who bounced off it early, and the entry cost is zero.

Pay for Claude Code when you want a hard ceiling on spend and a per-edit approval habit by default, or when your work is long multi-file sessions where its context handling and CLAUDE.md project memory earn the money. I pay for it and I am staying, but I went into this retest expecting to confirm a decision and came out with a closer call than I started with.

Share