Codex vs Claude Code vs Cursor: A Fair Test Protocol You Can Run Yourself
9 November 2026 · Updated 28 November 2026 · 14 min read · by Yang Kai
Codex, Claude Code and Cursor compared on surface, delegation, customisation, context and pricing — plus a repeatable test protocol for deciding on your own codebase.
Table inside: Scored comparison table and repeatable test protocol
Contents
- In a hurry? The verdict table
- How we researched this
- In-editor flow
- Terminal and automation
- Background delegation
- Customisation: hooks, skills, rules and MCP
- Context and instruction files
- Model choice
- Safety and sandboxing
- Pricing: three shapes of meter
- A test protocol you can run
- Tool comparison protocol (run identically per tool)
- The verdict, by use case
Every comparison of these three tools has the same flaw: the numbers are not yours. Someone ran Codex, Claude Code and Cursor on their repo, with their prompting habits, on tasks they chose — then published scores as if they were properties of the tools rather than of that afternoon.
This article does the honest version. You get a criterion-by-criterion comparison built from the three vendors’ own documentation and pricing pages, checked in November 2026, with a declared winner per criterion.
And because a desk comparison can only take you so far, you also get the real prize: a fixed test protocol you can run in an afternoon on your own codebase, producing scores that mean something because they are yours.
In a hurry? The verdict table
| Criterion | Winner | Why |
|---|---|---|
| In-editor flow | Cursor | Tab completions and inline diffs inside a purpose-built editor |
| Terminal and automation | Claude Code | Hooks, skills, headless mode and CI from the same configuration |
| Background delegation | Codex | Sandboxed cloud tasks fired off and reviewed when they return |
| Customisation | Claude Code | Hooks, skills, subagents and MCP, all file-based and shareable |
| Context and instructions | Claude Code | Deepest instruction system; AGENTS.md keeps Codex close |
| Model choice | Cursor | Frontier models from several vendors in one subscription |
| Safety and sandboxing | Codex | Sandboxed by default on every OS; cloud tasks never touch your machine |
| Entry cost | Codex | A limited free tier and an $8 plan with frontier-model access; Cursor’s $8 tier is Grok-only, Claude Code starts at $20 |
Short version: the three tools are three different bets about where an agent should live — your editor, your terminal, or a cloud sandbox. Pick the bet that matches your day, then verify it with the protocol at the end.
How we researched this
This comparison is desk research. We read OpenAI’s Codex documentation and ChatGPT pricing pages, Anthropic’s Claude Code documentation and pricing pages, and Cursor’s documentation and pricing pages, all in November 2026.
The winner lines are judgements, and they follow from documented behaviour — surfaces, features and prices — not from benchmark runs. We publish no code-quality or speed scores, because scores from our repos would not transfer to yours.
That is also why the article ends with a protocol instead of a podium. Prices carry a “checked November 2026” note throughout, because all three vendors revise plans often.
In-editor flow
Cursor
Cursor is a fork of VS Code with the agent woven into the editing experience. Its centre of gravity is flow: staying in the file, steering inline, accepting or rejecting diffs at the speed of thought.
Its Tab completion predicts your next edit from recent changes, across lines — a feature neither rival has, because neither sits in your edit loop. For work where you pair closely with the model line by line, that tightness is the whole argument.
Claude Code
Claude Code has IDE integrations, and they are competent. But the editor is a viewport onto a terminal agent, not the product’s home, and it shows in the details: no completions, no inline steering of the kind Cursor Tab gives you.
Codex
Codex ships an IDE extension alongside its CLI and cloud surfaces. It brings the agent into VS Code and compatible editors, but the extension is one door into a delegation product, not an editor built around the agent.
Winner: Cursor. If most of your agent value arrives while your hands are on the keyboard, this criterion outweighs several others combined.
Terminal and automation
Claude Code
Claude Code is terminal-native. It lives in your shell, works from instruction files, and runs headless in scripts and CI with the same configuration as your interactive sessions.
That continuity is rare and valuable: the workflow you tune at your desk is the workflow your pipeline runs at night. The CI guide shows what that looks like in practice.
Codex
Codex also ships a capable CLI, with sandboxing and approval modes designed for local runs. It is a genuine terminal tool, not a cloud wrapper.
Where it falls behind is the automation layer around the agent: Claude Code’s hooks and skills give you more file-based machinery to shape unattended runs.
Cursor
Cursor’s agent can run from its editor’s terminal, and Premium and above add cloud agents. But automation is an extension of an editor product, and unattended pipelines are not what it is built for.
Winner: Claude Code. Scripting instincts are rewarded here more than in either rival.
Background delegation
Codex
Codex’s centre of gravity is delegation to sandboxed cloud tasks. You hand off a task from the web, the CLI or GitHub, it runs in an isolated environment, and you review the result — a diff or a pull request — when it returns.
Plus and above add automatic code review on GitHub repositories. If you like parallel background tasks with clean review boundaries, this is the most developed version of that idea.
Claude Code
Claude Code delegates well locally — parallel terminal sessions on separate branches are a normal way to run it — and it also offers web and desktop surfaces.
Its delegation model is still anchored to sessions you start and supervise, rather than a task queue you feed and forget.
Cursor
Cursor’s cloud agents, on Premium and above, run tasks away from your machine and return pull requests. They close much of the gap, but they read as an add-on to an editor rather than the product’s main shape.
Winner: Codex. Firing off three tasks before lunch and reviewing them after is Codex’s home turf.
Customisation: hooks, skills, rules and MCP
Claude Code
Claude Code extends through hooks (your commands, run at defined points in a session), skills (packaged workflows in SKILL.md files), subagents, and MCP servers. All of it is file-based, versionable, and shareable across a team through the repo.
The skills explainer and the hooks reference guide cover the two biggest pieces.
Codex
Codex supports MCP servers, skills and hooks of its own, plus the AGENTS.md convention for instructions. The toolkit is real and growing, but younger: fewer documented extension points, and less team-sharing machinery around them.
Cursor
Cursor offers rules in .cursor/rules/, MCP servers, and its own skills and hooks inside the editor. Customisation is aimed at shaping interactive sessions rather than building unattended workflows.
Winner: Claude Code. It has the deepest and most documented extension system of the three, and it is not close in late 2026.
Context and instruction files
Claude Code
Claude Code leans on CLAUDE.md files — layered from enterprise, user, project and local scopes — and explores the codebase fresh at task time. The CLAUDE.md guide details the system.
Depth is the strength: few tools let you encode as much project knowledge where the agent will reliably load it.
Codex
Codex reads AGENTS.md, the open convention several tools now share, with nested files applying to subdirectories. Its portability is the strength: one file can serve Codex, and increasingly its rivals too.
The trade is depth — AGENTS.md is deliberately simpler than the CLAUDE.md stack. What transfers and what does not is mapped in AGENTS.md vs CLAUDE.md.
Cursor
Cursor indexes your codebase with embeddings and retrieves automatically, then layers rules files on top. Asking questions about a large repo is where this shines.
The cost is control: retrieval is a judgement the tool makes for you, and on precision work you end up pinning files manually anyway.
Winner: Claude Code, for depth of instruction. If you run several tools and want one shared file, Codex’s AGENTS.md route is the pragmatic pick — see the AGENTS.md field guide.
Model choice
Cursor
Cursor lets you pick among frontier models from Anthropic, OpenAI and Google, plus its own models, inside one subscription — from Premium up, since the $8 Plus tier is Grok models only. Third-party picks sit outside the included pool and bill at API list price, so the picker is also a budget dial.
Codex
Codex runs OpenAI’s models — currently the GPT-6 family for coding, with OpenAI publishing per-plan estimates such as roughly 15–160 messages per five-hour window on Plus for its top coding model. One vendor, tuned deeply.
Claude Code
Claude Code runs Anthropic’s Claude models, on subscription or via API, Bedrock and Vertex. One vendor again — with the same tuning argument as Codex, and the same lock-in.
Winner: Cursor. It is the only one of the three where switching model vendors is a menu choice rather than a product change.
Safety and sandboxing
Codex
Codex is sandboxed by default on every operating system, including native Windows, and its cloud tasks run in an isolated environment that never touches your machine at all.
Approval modes then decide how much runs without asking. For delegated work — the kind you are not watching — default sandboxing is the strongest starting posture of the three.
Claude Code
Claude Code layers permission modes and allow/deny rules over an OS-level sandbox for shell commands on macOS and Linux. On native Windows the sandbox does not apply, which narrows its lead there.
The depth is real: rules can be set per tool, path and command, and they hold in unattended runs. The permissions and sandboxing guide works through the settings.
Cursor
Cursor’s controls are approval-based: command allowlists, blocklists, and checkpoints before agent edits so you can roll back.
That fits supervised, interactive work. It offers the least policy machinery of the three for runs nobody is watching.
Winner: Codex, for the default posture. Claude Code’s rule system is deeper once configured, but Codex starts safe before you have configured anything — and its cloud sandbox removes your machine from the blast radius entirely.
Pricing: three shapes of meter
Codex
Codex is bundled with ChatGPT; there is no separate subscription. Checked November 2026:
- Free: $0, with limited Codex access.
- Go: $8/month, light use.
- Plus: $20/month — CLI, IDE extension, web and cloud tasks, automatic code review.
- Pro: $100, $200 or $500/month, higher allowances; the $500 tier adds the fastest mode.
- Business: $20 per user/month billed annually ($25 monthly).
Since April 2026, usage beyond a plan’s allowance runs on purchasable credits priced by tokens, so heavy months can cost more than the sticker. An API-key route exists, but cloud features such as GitHub review are not included on API-key usage.
Pricing: from $0; serious use from $20/month. Checked November 2026.
Claude Code
Claude Code is included in every paid Claude plan and not in the free plan. Checked November 2026:
- Pro: $20/month, or $17/month billed annually.
- Max: $100/month, at 5x Pro’s usage.
- Ultra: $200/month, at 10x Pro’s weekly usage with no five-hour limit for verified accounts.
- Team: $20 per seat/month billed annually ($25 monthly); Premium seats $100 ($125).
Usage is capped by rolling five-hour and weekly limits shared with Claude chat, instead of a dollar meter — the subject of the Claude Code cost ladder.
Pricing: from $20/month via Claude Pro. Checked November 2026.
Cursor
Cursor is now sold through the X Subscription. Checked November 2026:
- Free: $0, with limited Agent requests and Tab completions.
- Plus: $8/month — Cursor included, but the included pool covers Grok models only.
- Premium: $30/month — four times the Plus pool, plus cloud agents.
- Super: $100/month, at fifteen times the Plus pool.
- Ultra: $200/month, at fifty times the Plus pool.
The included pool refreshes weekly and covers Cursor’s and Grok’s models only; third-party models bill at API list price, from Premium up. The old Pro ($20/month) and Pro+ ($60/month) plans are grandfathered for existing subscribers but no longer sold. The full plan structure is in the Cursor setup guide.
Pricing: from $8/month for Plus; frontier-model work from $30/month on Premium, plus API rates for third-party models. Checked November 2026.
Winner: Codex, on entry cost only — its free tier and $8 Go plan both reach OpenAI’s frontier coding models, while Cursor’s $8 Plus tier is Grok-only and its frontier models start at $30. At the level where most developers actually land, the three differ less in sticker price than in how the ceiling arrives: credits (Codex), limits (Claude Code), or a meter (Cursor).
A test protocol you can run
Run this in one afternoon. It is designed to be unfair to nobody: same repo, same tasks, same starting state, minimal prompt coaching.
## Tool comparison protocol (run identically per tool)
### Setup
- Pick a real repo you know well. Snapshot it (git tag: test-base).
- Prepare instruction files natively per tool
(CLAUDE.md / AGENTS.md / Cursor rules) with the SAME rules.
- Use each tool's comparable model tier. Note the plan/cost.
### The three tasks (in order, fresh reset to test-base each time)
1. TARGETED FIX: a real bug with a known cause in 1–2 files.
Prompt: state symptom + expected behaviour only.
2. PATTERNED FEATURE: add a feature that must follow an existing
pattern elsewhere in the repo (do not name the pattern's file).
3. RECOVERY TEST: a change whose first attempt should fail the
build (e.g. rename a widely-used export). Let it run.
### Score each task (1–5 each)
- Found the existing pattern without being told?
- Diff size vs. ideal diff (eyeball: minimal / ok / sprawling)
- Build green at the end without your intervention?
- Number of your corrective messages needed
- Constraint violations (files touched that were off-limits)
### Record
- Wall-clock time, your interventions, final diff line count
- Cost: tokens or plan usage consumed, if visible
- One sentence: would I merge this diff as-is?
### Decide
Weight the scores by YOUR task mix (mostly fixes? features?
long autonomous runs?) — the weighted winner is your tool.
Two protocol details matter. Resetting to the same snapshot between tools is non-negotiable; without it you are comparing different problems.
And the “would I merge this” sentence is the most valuable data point you will collect. It compresses quality, trust and review effort into the unit that actually costs you time.
The verdict, by use case
Editor-first developer: pick Cursor. Tab, the index and inline review serve the way you already work, and the other two are guests in that world.
Terminal-first builder and automator: pick Claude Code. Hooks, skills, subagents and CI continuity make it the deepest tool here for shaped, repeatable workflows — the two-way version of this fight is in Cursor vs Claude Code.
Delegator with a task queue: pick Codex. Sandboxed cloud tasks with clean review boundaries are its design centre — and if you already pay for ChatGPT, it is the only one that costs you nothing extra to start. The longer two-way comparison is Claude Code vs Codex compared.
Already paying for one ecosystem: start there. ChatGPT Plus includes Codex; Claude Pro includes Claude Code. A month on the tool you already own teaches you more than any comparison — including this one.
Two neighbours worth knowing: Gemini CLI vs Claude Code covers the free-tier terminal option, and the Windsurf guide covers the fourth editor in this conversation.
Run the protocol. An afternoon of your own evidence is worth a year of other people’s leaderboards.
FAQ
Why does this article refuse to publish benchmark scores? Because scores from someone else’s repo, prompts and week tell you almost nothing about your work. A repeatable protocol you run yourself — same tasks, same repo, scored the same way — produces a decision you can trust, which is worth more than a league table.
What tasks should the test protocol use? Three real ones from your backlog: a bug fix with a known cause, a small feature that must follow an existing pattern in several files, and a change whose first attempt should fail the build. Score time-to-mergeable, number of corrections, and whether you would ship the result.
Is Cursor easier for beginners than Claude Code or Codex? For many people, yes — the editor is visible and familiar, while Claude Code and the Codex CLI live in the terminal. Codex’s cloud surface is the gentler on-ramp of the two terminal-leaning tools, since tasks run in a sandbox you review afterwards. That comfort is a real factor, and the protocol weights it rather than pretending it away.
Which is cheapest to run seriously? For frontier-model work, Claude Code lands at $20/month and Cursor at $30/month (Premium), checked November 2026. Codex is cheapest to start — limited access is free, and Go is $8/month; Cursor’s $8 Plus tier exists too, but covers Grok models only. Past the entry plans, the answer depends on how each ceiling fits your usage: Codex sells credits, Claude Code sells bigger limits, Cursor meters a weekly usage pool.
Can I use two of them together? Plenty of builders do — one for daily driving, one for long autonomous runs or cloud delegation. If you go that route, keep your shared rules in AGENTS.md so every tool follows the same project facts.
Category: Claude Code & Context Engineering · Tags: #claude-code #ai-coding #comparison #testing
Next step: this article is part of Claude Code guides, which covers the full topic from first setup to advanced use.