Codex vs Claude Code vs Cursor: One Task, Three Tools
All three tools can add a form field and a test. That's not where they differ. They differ in where the work happens, what stops the agent from doing something you didn't want, and how you check the result before it merges.
This comparison walks one small, disclosed task through each tool's documented workflow, then compares capabilities and prices. It is built from vendor documentation and pricing pages read on September 26, 2026. No tool was run for this page and there are no benchmark numbers. For measured model quality, see the agent benchmarks directory and read each benchmark's methodology.
The task
A small Next.js App Router app has a signup form with name and email. The task:
Add a required "company" field to the signup form. Validate it on the server: 2 to 100 characters, trimmed. Show the error under the field. Add a unit test for the validator and update the existing form test. Don't change anything else.
It touches four or five files: the form component, the server action or API route, a validation module, and two test files. It's small enough to review in one sitting and specific enough that "done" is checkable: the tests pass and the diff stays inside those files.
Claude Code on the task
Where it runs. A terminal session in the repo, or the VS Code and JetBrains extensions, the desktop app, or a cloud session. The work happens in your local checkout by default.
Instructions. Claude Code reads CLAUDE.md from the repo root and parent folders at launch. The test command and "don't touch unrelated files" belong there (CLAUDE.md and AGENTS.md guide).
Planning. Plan mode reads and proposes without editing until you approve (permission modes). On a five-file change, reading the plan's file list is the cheapest scope check you'll get.
Guardrails. Permission modes set the baseline, from Manual (reads only without asking) to acceptEdits to auto, where a classifier reviews actions instead of you. Per the docs, auto is the starting mode for interactive terminal and VS Code sessions from v2.1.283. Deny rules block in every mode. A PreToolUse hook can refuse git commit until lint and tests pass, and a hook's deny holds even in bypass mode (hooks for coding agents).
Checking the result. Claude runs the tests in your terminal and you review the diff locally, or it opens a pull request. A read-only reviewer subagent can check the diff against the stated scope (subagents and parallel work).
Codex on the task
Where it runs. The CLI, the IDE extension, the desktop app, or Codex cloud, where the task runs in a cloud environment and comes back as a diff or pull request (Codex cloud docs).
Instructions. Codex reads AGENTS.md from ~/.codex and from each folder between the project root and your working directory, up to 32 KiB by default (Codex AGENTS.md guide).
Guardrails. This is where Codex is most distinct. The recommended local preset for a version-controlled folder pairs a workspace-write sandbox with on-request approvals: Codex can edit and run commands in the workspace, and needs approval to edit outside it or use the network. Network access is off by default (Codex approvals and security). In cloud tasks, internet access is blocked during the agent phase by default, while setup scripts can still install dependencies. For this task that's a feature: the validator and tests need no network, so a sandbox that can't reach one removes a whole class of surprises.
Checking the result. Locally, review the diff as with any agent. In the cloud, the result arrives as a diff or pull request, and @codex review asks for a review on GitHub. Codex hooks can gate commits too, with a trust review before a new hook runs.
Cursor on the task
Where it runs. Inside the Cursor editor, with the agent in a side pane that searches, edits files, and runs terminal commands (Cursor Agent overview). Cloud agents run the same kind of task in an isolated VM on their own branch, launched from the editor, the web, Slack, or an @cursor comment on GitHub (Cursor cloud agents).
Instructions. Project rules in .cursor/rules, which can apply always, by file glob, by the agent's judgment, or when mentioned. Cursor also reads AGENTS.md, including nested files (Cursor rules docs). A glob rule on src/lib/validation/** is a natural fit for "validators must have tests".
Guardrails. Cursor asks before running MCP tools by default, supports hooks in .cursor/hooks.json with allow, deny, or ask decisions on events like beforeShellExecution, and creates local checkpoints before significant changes so you can roll back (Cursor hooks).
Checking the result. This is Cursor's strength for a task this size. The edits land in the editor you're already reading, next to the form component, so you can inspect each change in context as it happens rather than reviewing a finished diff later. The Cursor review covers that trade in more depth.
Capabilities side by side
| Claude Code | Codex | Cursor | |
|---|---|---|---|
| Main surface | Terminal, plus IDE extensions, desktop, cloud | CLI, IDE extension, desktop, cloud | The Cursor editor, plus cloud agents and CLI |
| Instruction file | CLAUDE.md | AGENTS.md | .cursor/rules, AGENTS.md |
| Default local guardrail | Permission modes; auto mode starts by default from v2.1.283 | Sandbox with workspace writes, on-request approvals, network off | Approval for MCP tools; hooks; checkpoints |
| Hooks | Yes, 30+ events, settings.json | Yes, hooks.json or config.toml, trust review | Yes, .cursor/hooks.json |
| Skills | .claude/skills, /name | .agents/skills, $name | .agents/skills or .cursor/skills, / |
| Subagents | Built-in and custom, worktree isolation option | Custom agents in .codex/agents | Subagent hooks documented; cloud agents run in parallel |
| MCP config | claude mcp add, .mcp.json | codex mcp add, config.toml | .cursor/mcp.json |
| Headless | claude -p | codex exec, read-only by default | agent -p, writes need --force |
| GitHub | claude-code-action, @claude | codex-action, @codex | @cursor on PRs and issues |
Sources: the Claude Code, Codex, and Cursor documentation pages linked above, read September 26, 2026. The advanced pages in this series cover each row in detail: MCP servers, skills, and headless and CI use.
The rows converge more than they differ. All three read AGENTS.md or an equivalent, load skills in the same open format, speak MCP, and have hooks. A repo set up well for one is mostly set up for the others, which makes the choice less permanent than it looks.
What it costs
Subscription prices as of September 26, 2026. The Claude and ChatGPT rows match the site's coding agent cost calculator data; the Cursor rows are from Cursor's pricing page read the same day.
| Plan | Monthly price | What it includes for coding |
|---|---|---|
| Claude Pro | $20 ($17 a month billed annually) | Claude Code, sharing the plan's usage limit (Claude pricing) |
| Claude Max 5x | $100 | Claude Code, 5x Pro usage per session (Max plan) |
| Claude Max 20x | $200 | Claude Code, 20x Pro usage per session |
| ChatGPT Plus | $20 | Codex at the plan's usage limit (ChatGPT pricing) |
| ChatGPT Pro 5x | $100 | Codex, 5x Plus usage (Pro tiers) |
| ChatGPT Pro 20x | $200 | Codex, 20x Plus usage; new sign-ups paused since September 10, 2026 |
| Cursor Pro | $20 | Agent with extended limits, cloud agents (Cursor pricing) |
| Cursor Pro Plus | $60 | Same plan family as Pro at a higher usage tier; the page doesn't state included amounts (Cursor plan docs) |
| Cursor Ultra | $200 | The top individual tier; included amounts not stated |
Three notes change the math:
- Usage limits, not prices, decide the tier. Each vendor describes the higher tiers as multiples of usage, not features. A small task like this one fits comfortably on an entry plan. Running several agents in parallel all day does not.
- Cloud and CI runs can bill differently. Cursor's docs say cloud agents use API pricing for the selected model. Codex runs with an API key bill at API rates. Claude's GitHub action bills at API rates on an API key, or against your subscription with an OAuth token.
- API rates vary by model. As of September 26, 2026, the calculator's data lists Claude Sonnet 5 at $2 per million input tokens and $10 per million output, Claude Opus 5.5 at $4 and $20, and gpt-5.3-codex at $1.75 and $14 (Claude pricing, OpenAI API pricing). Plug your own volume into the calculator rather than trusting a rule of thumb.
Which one for which working style
Pick by where you want to spend the minutes between asking and trusting, not by a leaderboard.
- Choose Cursor if you want to watch the edit happen. For a task like this one, reviewing each change inside the editor as it lands is the lowest-friction review there is. It suits people who already live in a VS Code-style editor and do most tasks interactively.
- Choose Codex if you want the sandbox to be the default. Workspace-only writes with the network off, locally and in the cloud, means the safe setup is the one you get without configuring anything. It suits handing off tasks and reviewing a finished diff or pull request, and teams already paying for ChatGPT.
- Choose Claude Code if you want to shape the agent. Hooks with the most events, permission rules, custom subagents with worktree isolation, and skills with dynamic context give the most control over how the agent works in your repo. It suits terminal-first developers and anyone automating the agent into scripts and CI.
If you pay for one and are curious about another, the cheapest experiment is the same small task on the entry plan of each, with the same AGENTS.md. Compare the diffs, not the demos. The Claude Code vs GitHub Copilot comparison covers the editor-completion side of the market that this page leaves out.
Previous in the series: Headless and CI use of coding agents.
