Comparison Build Coding

Claude Code vs Codex vs Cursor: one brief, three results

Claude Code vs Codex vs Cursor, measured. I gave all three the same brief and used every app they built. All three passed — here is what separated them.

Claude Code vs Codex vs Cursor: one brief, three results
Contents

The verdict

Best code: Claude Code. The only one of the three that wrote tests, and the only one that refused to start until it understood the job.

Best unattended run: Codex. Handed the brief, it finished in 2 minutes 44 seconds without asking me anything, then checked its own syntax.

Best for everyday editing: Cursor. Fastest of the three by a distance, and the only one that is an editor rather than an agent.

I gave all three the same brief. One paragraph, six numbered requirements, handed over verbatim with no follow-up prompts, then I used every app that came back rather than reading each tool’s summary of itself.

All three passed. Six of six requirements, first attempt, no corrections. That is the finding that reframes this comparison: every ranking article you will read on these three is arguing about capability, and at this size of task capability is not in dispute. What differs is what each one does around the code — whether it asks first, whether it checks itself, and what it costs you when the month ends.

The three compared

Claude CodeCodexCursor
ShapeTerminal agentTerminal / cloud agentVS Code fork
Result on the brief6/66/66/6
Time~8.5 min2 min 44 sunder 1 min
Lines written1,052585581
Wrote testsYes — 28 assertionsNoNo
Asked before buildingYes — 8 exchangesNoNo
Ran unattendedNoYesNo
Cost of this build~$2.56$0 (bundled)$0 (free Hobby)
Free tierNoneYesYes
Model choiceAnthropic onlyOpenAI onlyAny major vendor
Alley Rating4.74.44.2

Three-column comparison of what Claude Code, Codex and Cursor each hand back from the same prompt

The row that matters most is the one competitors leave out. Two of three wrote no tests at all, and the one that did is also the one that took longest and cost most. That is not a coincidence — it is the trade, stated plainly.

Claude Code: strengths and gaps

It refused to build, and that was the right call. Given a one-shot brief with no follow-ups, Claude Code wrote zero files. It opened with “Question 1 of ~3”, asked three clarifying questions, produced a two-part design document, and only then built. Eight exchanges before a single line of code existed. Nothing blocked it — the permission denials in the session log were empty. It chose to ask.

It was the only one that verified its own work. A 74-line test file with 28 assertions covering corrupt JSON, non-array payloads, storage that throws on read, negative input and float precision. I ran them myself: 28 passed, 0 failed.

It made a judgement call nobody asked for, correctly. Told to handle money properly, it chose integer cents unprompted and volunteered why — that 9.99 + 19.99 in floating point gives 29.979999999999997. Neither of the others raised it.

It was the slowest and the dearest. About eight and a half minutes, and roughly $2.56 in metered API billing for a result no better on the brief’s own terms than a free tool produced in under a minute.

It has no free tier at all. Codex and Cursor both completed this brief for nothing. Claude Code cannot be tried without paying.

All three appear in our best AI for coding roundup, measured against five more tools on the same brief.

Try Claude Code

Codex: strengths and gaps

It is the one you can walk away from. Codex took the brief and ran for 2 minutes 44 seconds without a single question, producing 585 lines in one self-contained file. Of the three, it is the only one that behaved like a background worker rather than a collaborator.

It checked itself, just not with tests. It ran its own syntax check before handing back, and volunteered something none of the others did — that the folder was not a git repository, so it had no git status to report. That is a tool with a working model of what it does not know.

It handles multi-file work impressively. On a harder task, asked to rename a field, it changed 33 references across 7 files in a single run with no corrective prompt. I verified that against git and it held.

It edits things you did not authorise. On that same task it modified the project’s rules file without asking, deleting the line that made its own change wrong. Everything inside the workspace is ungated by default. Its diff badge also reported six changed files where git showed seven — which is exactly why you read the diff and not the summary.

You are locked to OpenAI models. No switching, unlike Cursor.

Try OpenAI Codex

Cursor: strengths and gaps

It was the fastest tool in the test. Under a minute to a complete, correct 581-line app, on the free Hobby tier, which is considerably better than most write-ups give it credit for.

It is an editor, not an agent, and that is the point. Claude Code and Codex live in a terminal and hand you a result. Cursor replaces VS Code and puts the AI beside your cursor, with inline completions and visual diffs. On a greenfield brief that advantage is invisible. In an existing codebase you work in daily, it is the whole product.

It is the only one with real model choice. Anthropic, OpenAI and Google models inside one workspace, switchable per task. If you do not want to bet on a single vendor, this is the only option of the three.

Its bill is the least predictable thing here. Metered usage accrues in arrears on top of the subscription, and the free Hobby tier excludes frontier models, MCPs and cloud agents — so the tier that completed my brief is not the tier you would work in.

Try Cursor free

How they differ on price

All three cost about $20 a month, and that sentence is the most misleading true thing in this comparison.

Claude Code has no free tier. It is bundled into a Claude plan: Pro at $20 a month ($200 a year), Max 5x at $100, Max 20x at $200. What you buy is an allowance policed by a rolling session limit and a weekly cap. You can hit a wall and have to wait. What cannot happen is a bill you did not expect, because the plan is the ceiling.

Two limits run at once there, which is worth understanding before you pick a tier: a rolling session window of roughly five hours and a separate weekly cap. Switching models resets neither, though it does clear a model-specific Opus limit. So the failure mode on Claude Code is being told to come back later, and the way you buy your way out of it is a bigger plan rather than a bigger invoice. Our Claude Code pricing guide has the full ladder, including the hidden costs — extended thinking bills as output tokens, and cache lifetime drops from an hour to five minutes once you draw on usage credits.

Codex has no separate subscription at all — it comes with a ChatGPT plan, and its free tier completed my entire brief without a card. If you already pay for ChatGPT, you already own Codex. For most people that makes it the cheapest serious option here by default rather than by discount.

Cursor is where the arithmetic breaks. Hobby is free, Pro is $20, Pro+ $60, Ultra $200 — and then usage meters in arrears on top. Eleven months of my own invoices came to $510.70, against the $220 that eleven months of a $20 plan implies.

Stat card showing $510.70 as the real eleven-month cost of a Cursor subscription advertised at $20 a month

That is not a scandal — I used it heavily and metered pricing charges for use. But it is the difference between a subscription and a utility bill, and only one of these three is the latter. If predictability matters more to you than ceiling, that single fact decides this comparison.

One route worth checking before you buy anything: GitHub Copilot Pro at $10 a month lists access to third-party agents including Claude Code and Codex. Our GitHub Copilot pricing guide has the detail, but the short version is that the cheapest plan in this space may already contain two of the three tools on this page.

How they differ on quality

Every ranking of these tools implies a quality gap. My test found none on the deliverable and a large one on everything supporting it.

All three produced a working app. All three handled the brief’s two deliberate traps: an annual $2,400 plan that had to be derived to $200.00 a month rather than displayed as typed, and a cancelled subscription that had to leave the running total while staying visible. All three survived a hard reload with state intact. On the thing you actually asked for, they are interchangeable.

The separation is in verification.

Checked its own work?How
Claude CodeYes74-line test file, 28 assertions — 28 passed, 0 failed when run
CodexPartlyRan a syntax check before handing back
CursorNoNothing

Claude Code wrote 28 assertions and they passed. Codex ran a syntax check. Cursor checked nothing. If you are prototyping something disposable, that ranking is irrelevant. If the code is going to live somewhere, it is the only ranking that matters, because it is the difference between “it worked when I clicked it” and “something proved it works.”

Volume is the second axis, and it cuts against the winner. Claude Code wrote 1,052 lines where Codex and Cursor wrote 585 and 581 for the same six requirements. Some of that is the test file, and the rest is thoroughness you may or may not want. More code is more to read, more to review and more to maintain, and the brief did not ask for any of it.

There is one behaviour all three shared, and it is worth more than any individual verdict: all three invented a Restore button. The brief asked for cancellation and never mentioned undo. Every one of them built it anyway, without flagging it. Whatever you specify, expect to receive decisions you did not make.

How they differ on speed and workflow

The stopwatch says Cursor, then Codex, then Claude Code — under a minute, 2 minutes 44 seconds, about eight and a half minutes. But wall-clock time is close to the least useful number here, because the three are not doing the same job.

Cursor is fast because it is an editor and you are in the loop. You watch the diff appear, accept or reject it, and move on. The speed you feel is the speed of your own hands, and its real advantage — inline completion against a codebase it already understands — is something this greenfield brief could not test at all.

Codex is fast in a different sense: it is fast to finish without you. Two minutes 44 seconds of no attention required is worth more than a supervised minute if you have something else to do. That is the argument for it, and the rename task is the proof — 33 references across 7 files in one run is not something you would want to babysit.

Claude Code is slow on purpose and slow by accident. The eight exchanges before any code were the deliberate part, and they are why the output was the best of the three. The build itself was simply longer. Whether that is patience or friction depends entirely on whether you wanted a conversation.

Decision tree for choosing between Claude Code, Codex and Cursor based on whether you want to supervise the work

Who should pick which

Pick Claude Code if you are changing code that matters and being wrong is expensive; you will read the diff; you want something that pushes back before it builds; or you want tests without asking for them. Not if you want to type one line and receive an app — the interview will feel like an obstacle.

Pick Codex if you already pay for ChatGPT and want to stop evaluating; you want to hand over a defined task and leave; or you work across many files at once. Not if you need to switch model vendors, and not before you gate your rules files.

Pick Cursor if you live in an editor all day and want the AI beside your cursor rather than in a terminal; you want to switch between Anthropic, OpenAI and Google models per task; or you are working in a large existing codebase, which is the scenario this brief cannot measure. Not if an unpredictable monthly bill would bother you.

Pick two of them if your work splits. Codex for the defined tasks you walk away from, Claude Code for the ones where you want an argument first. They fail differently, which is the actual case for running both.

If you are choosing for a team, invert the criteria. Individually you optimise for peak capability; across ten people you optimise for predictability, because one person’s heavy week is everyone’s problem when the bill or the cap is shared. That argues against a metered model at scale — a $20 sticker that billed me $510.70 over eleven months is not a number you can put in a budget with ten of them beside it.

It also argues for standardising on one rather than letting people mix. Not because a second licence costs much, but because migration cost multiplies: every rules file, every ignore file and every convention has to be rewritten per tool, and that work scales with headcount while the licence saving does not.

If you…Pick
Change code where being wrong is expensiveClaude Code
Want tests without asking for themClaude Code
Already pay for ChatGPTCodex
Want a task done while you do something elseCodex
Live in an editor all dayCursor
Refuse to bet on one model vendorCursor
Are buying for a teamWhichever ceiling you can name in advance

Final word

Three tools, one brief, three passes — so stop asking which one is best and start asking which one is shaped like your work.

If you want the best code and will pay for it, that is Claude Code, and our Claude Code review covers what $110 a month actually buys. If you already have ChatGPT, Codex is sitting in your account for nothing and will do most of this. And if you want the AI in your editor rather than your terminal, Cursor is the only real answer here — just watch the meter.

We have compared each pair on its own too: Codex vs Claude Code, Claude Code vs Cursor and Cursor vs Codex.

Try Claude Code

Frequently asked questions

Which is better, Claude Code, Codex or Cursor?

On capability, none of them — and I say that having given all three the identical six-requirement brief rather than as a hedge. All three met every requirement on the first attempt, so the build itself separated them not at all.

What separated them was everything around the build. Cursor was the fastest at under a minute. Codex ran completely unattended and checked its own syntax. Claude Code wrote 28 tests that actually passed and cost about $2.56 for the privilege, the most expensive of the three by a wide margin. Pick on how you work, because on whether they can write the code, the question is settled.

Is Cursor or Claude Code cheaper?

Cursor's sticker price is lower and its real bill can be much higher, which is the trap in this comparison. Cursor is $20 a month for Pro against Claude Code's $20 Claude Pro, so they look identical — but Cursor meters usage in arrears on top of the subscription. I paid for Cursor for eleven months and the total came to $510.70, not the $220 the sticker implies.

Claude Code's plans are capped instead: Pro $20, Max 5x $100, Max 20x $200, with session and weekly limits rather than an open meter. You can hit a wall on Claude Code. You cannot get a surprise invoice from it.

Is Codex free?

There is no separate Codex subscription — it comes bundled with a ChatGPT plan, and its free tier completed my entire six-requirement brief without a card.

That makes it the cheapest serious option of the three for most people, because if you already pay for ChatGPT you already own it. The trade is that you are locked to OpenAI's models, where Cursor lets you switch between Anthropic, OpenAI and Google models inside one workspace.

Which one is safest for an existing codebase?

Claude Code, on the evidence I have, and Codex is the one to watch. Codex is genuinely impressive on multi-file work — asked to rename a field it changed 33 references across 7 files in a single run with no corrective prompt, and I verified that against git.

But on that same task it edited the project's rules file without asking, deleting the line that made its own change wrong, because everything inside the workspace is ungated by default. Its own summary also reported six changed files where git showed seven. Neither is a reason to avoid it; both are reasons to gate your rules files and read the diff rather than the summary.

Can you use Claude Code and Codex together?

Yes, and a lot of people do, because they fail differently. Codex is the one you hand a well-defined task and walk away from. Claude Code is the one you want on anything where being wrong is expensive, because it is the only one of the three that wrote tests unprompted.

There is also a cheaper route than two subscriptions that most comparisons miss: GitHub Copilot Pro at $10 a month lists access to third-party agents including Claude Code and Codex. If you are already paying GitHub, check what your plan already includes before buying anything else.

Share