# Tool comparison overview

URL: https://developertoolkit.ai/en/comparison/
Description: Cursor, Claude Code, and OpenAI Codex run one agent loop on three surfaces. Pick by supervision style and unattended work, then prove it with a bake-off.

Cursor, Claude Code, and OpenAI Codex execute the same coding-agent loop—read the repository, plan a multi-file change, edit code, run checks, and retry—across three primary surfaces. Cursor embeds the loop inside an editor, Claude Code centers on a programmable terminal harness, and Codex spans local tools and cloud environments.

Developers, tech leads, and CTOs spend weeks debating brand names in Slack when the real choice is architectural: how closely you supervise edits and what runs unattended. Below is the surface decision table, a one-task bake-off protocol that settles the choice with evidence, and links to deep head-to-head guides.

## Which coding agent fits which workflow?

| If your priority is… | Start with | Because |
| --- | --- | --- |
| Visual steering inside an editor, diff by diff | Cursor | Plan Mode, inline diffs, and scoped `.cursor/rules/*.mdc` live beside your open files |
| Long terminal runs, deterministic hooks, and CI scripting | Claude Code | Lifecycle hooks (`PreToolUse`, `PostToolUse`, `Stop`), subagents, and headless runs enforce rules reliably |
| Tasks triggered from trackers, PRs, or cloud sandboxes | Codex | Hierarchical `AGENTS.md`, isolated cloud environments, and explicit sandbox/approval policies travel across surfaces |
| Standardizing a multi-person team | The tool most engineers prefer plus one shared CI gate | Shared repository instructions and machine-checked evidence matter far more than uniform editor branding |

Many teams pair an editor-centric agent for visual UI work with a CLI harness for multi-file refactors and CI automation.

## How does each surface run the agent loop?

**Cursor**

    Cursor brings the agent into a VS Code-based editor. Use **Plan Mode** to review intent before edits land, scope conventions with `.cursor/rules/*.mdc` (`alwaysApply`, `globs`, `description`) or `AGENTS.md`, offload parallel work to Cloud and Background Agents, and review pull requests with **Bugbot** and `.cursor/BUGBOT.md`. See the [Cursor guide](/en/cursor-ide/) or the [official Cursor docs](https://cursor.com/docs) for current plans and features.

**Claude Code**

    Claude Code starts in the terminal with `CLAUDE.md` (or `AGENTS.md`), explores with isolated subagents under `.claude/agents/`, executes multi-file edits inside worktrees, and enforces hard invariants through `PreToolUse`, `PostToolUse`, `Stop`, and managed hooks. Headless execution fits directly into CI and automated code review. See the [Claude Code guide](/en/claude-code/) or the [official Claude Code docs](https://code.claude.com/docs).

**Codex**

    OpenAI Codex runs across a CLI, IDE extension, desktop app, and managed Cloud environments, guided by a hierarchical `AGENTS.md`. Execution safety separates `sandbox_mode` (`read-only`, `workspace-write`, `danger-full-access`) from `approval_policy` (`on-request`, `never`, `granular`), with worktree isolation and schema-validated CI outputs. See the [Codex guide](/en/codex/) or the [official Codex docs](https://developers.openai.com/codex).

## Proving the choice with a one-task bake-off

Feature matrices cannot predict how an agent handles your repository. Before comparing tools, run `npx @wondelai/harness-audit` (see [the harness audit](/en/harness-audit/)) to confirm your repository has standing instructions and a reliable test loop; otherwise you benchmark missing tests rather than tools.

1. Pick one closed or backlog task touching three to five files with an existing test pattern.
2. Run the same specification prompt in each finalist inside a fresh session and clean git worktree.
3. Score every run on **evidence**: did CI pass, did the agent add tests covering every acceptance criterion, did it stay within scope, and how many steering turns did it require?
4. Let the tech lead sign off on the winning workflow and commit shared repository rules before rollout.

**Copy-paste prompt: one-task bake-off**

```text
Add cursor-based pagination to GET /api/posts using Post.createdAt as the cursor
and returning nextCursor. Default page size 20, maximum 100. Follow the existing
pattern in /api/users. Add tests for first page, middle page, last page, and an
invalid cursor. Run the full test and typecheck commands and fix failures before
stopping. End with changed files, exact commands run, and exit results.
```

## Where all three agents fail in the same way

- **Missing project instructions:** Every agent invents conventions when `AGENTS.md`, `CLAUDE.md`, or `.cursor/rules/` is absent or stale. Commit concise instructions before running a bake-off.
- **Unverifiable goals:** Vague prompts give the loop no stop condition. Supply concrete acceptance criteria and the exact verification command.
- **Long, drifting sessions:** Early constraints lose weight as context fills. Reset to a clean session per task once a branch merges or a direction changes.
- **Unguarded test files:** Any agent can weaken an assertion to make a run look green unless CI and review guard existing oracles. See [protecting the oracle](/en/workflows/test/protect-the-oracle/).

## Where to go next with tool comparisons

- [Cursor vs Claude Code](/en/comparison/cursor-vs-claude-code/) — Editor steering versus terminal hooks and headless automation, task by task.
- [Codex vs Cursor and Claude Code](/en/comparison/vs-codex/) — Where multi-surface cloud execution and two-axis sandboxing win, and what they cost.
- [Side-by-side tool comparison](/en/compare/) — A shareable comparison view of the three primary coding agents.
- [Audit your repository harness](/en/harness-audit/) — Score your repo across six Software Factory stations in under two seconds.
- [Agent ecosystem overview](/en/ecosystem/) — Choose between AGENTS.md, skills, MCP servers, hooks, plugins, and models.
- [The Autonomy Ladder](/en/ladder/) — Why machine-checked evidence replaces line-by-line diff reading from Level 3 to 5.
