The short version, up front: on a 12k-LOC Next.js 15 repo, Cursor 2.0 Composer finished four refactor tasks in 21 min 40 sec of wall-clock time. Claude Code with /agents finished the same four in 34 min 55 sec. But Claude Code's diffs passed CI on the first try three out of four times. Cursor passed once. If your bottleneck is typing time, Cursor wins. If your bottleneck is review time, that verdict flips fast.
I've been running both in real work for the last two months. I kept catching myself in the middle of the same argument: which one actually saves the day when the task is not "vibe-code a landing page" but "change the shape of something real." So I sat down with a stopwatch.
The setup, so you can decide if this transfers
- Repo: internal Next.js 15.4 app, ~12,000 LOC TypeScript, App Router, Drizzle ORM, tRPC, Tailwind, Vitest + Playwright.
- Both tools: latest as of 2026-07. Cursor 3.3 with Composer 2.5, Claude Code CLI with Sonnet 4.6 as the lead and Haiku 4.5 as the subagent model.
-
Method: I gave each tool the same prompt for each task, from a clean git branch. No prior chat context, no tuned system prompt beyond
AGENTS.mdon the Cursor side and a matchingCLAUDE.mdon the Claude side. I timed from prompt-send to "agent stopped." Then I ranpnpm typecheck && pnpm test && pnpm buildand counted whether it passed.
Four tasks, chosen so none of them are toy problems and none are moonshots:
-
Add strict types to an untyped util module. ~180 lines,
anyeverywhere, called from 12 places. - Convert a component test suite from "shallow render + snapshot" to "user-event + role queries." 8 test files.
-
Fix an N+1 in a Drizzle query. Nested
.map()doing per-row selects, needs to become a single join with a groupBy. - Migrate one route's styling from Tailwind utility soup to CSS Modules. Preserve responsive behavior, don't regress dark mode.
The actual numbers
| Task | Cursor 2.0 Composer | Claude Code /agents | First-try CI |
|---|---|---|---|
| 1. Strict types | 3 min 10 s | 6 min 05 s | Cursor: fail. Claude: pass. |
| 2. Test-suite rewrite | 6 min 20 s | 9 min 40 s | Cursor: fail. Claude: pass. |
| 3. N+1 to join | 4 min 55 s | 8 min 25 s | Cursor: pass. Claude: pass. |
| 4. Tailwind → CSS Modules | 7 min 15 s | 10 min 45 s | Cursor: fail. Claude: fail. |
| Total | 21 min 40 s | 34 min 55 s | 1/4 vs 3/4 |
The wall-clock gap is 60% in Cursor's favor. The CI-pass gap is 200% in Claude's favor. If you weight only one of them, you will pick the wrong tool for your team. I know because I spent the first month of this comparison quietly convinced Cursor was winning, right up until I added up the time I'd burned rewriting its diffs.
Where the timing gap actually comes from
Cursor 2.0 Composer runs one long agentic loop with a 320k-token context, so it holds the whole slice of the repo it needs to touch and rarely pauses to re-read a file. That's the speed advantage in one sentence. It types.
Claude Code's /agents model does something different. The lead agent plans, then spawns subagents for chunks it decides are independent, each one in its own context window. The subagents can run in parallel, but the plan-then-fanout step itself has overhead, and the lead re-reads results before it commits. That accounting is where the extra ~13 minutes went in my four tasks. On task 2 alone (the test rewrite), Claude spent 90 seconds planning before touching a file. Cursor's first edit_file call happened 4 seconds in.
For any task that fits in one head, Cursor's typing speed wins. The moment the task has three or four distinct parts, the fan-out amortizes and Claude closes the gap. My tasks were sized for a single generalist agent, so the ceiling for parallelism was low. Your mileage will change fast if you're doing something like "add tests for these 22 files" or "port this feature to four locales."
Where the diff-quality gap actually comes from
The pattern I saw across all four failed CI runs was the same. Cursor moves fast and often finishes a file before it has confirmed the shape it's producing matches the imports elsewhere.
Task 1, strict types: Cursor added a type Foo = { … } that was almost right, but it inlined the type at the call site instead of exporting it from the util module, so three consumers were still typed as any. Typecheck passed only in the util file. Claude, slower, first grepped for callers, then wrote the exported type, then updated the imports, then wrote the util.
Task 2, test rewrite: Cursor replaced snapshots with getByRole('button') queries that were correct in isolation but broke because two of the components render two buttons and it didn't know that until the test failed. Claude ran a subagent that literally read the component's JSX for each test before writing the query.
Task 4, both failed: this one is the honest one to include, because I want you to trust the other three. The CSS Modules migration lost the sm: breakpoint on one grid, in both diffs. Neither tool had a way to see the responsive behavior; they translated the tokens without running the page. Both would have needed a browser subagent (or me) to catch it. This is the class of task where AI agents in 2026 still hand you homework.
The two-line summary: Cursor's loop rewards you when the task is "write this file." Claude's fan-out rewards you when the task is "keep these files consistent with each other." Refactoring is mostly the second thing.
The decision I actually landed on
I keep both. I use them for different work.
Cursor 2.0 Composer for:
- Greenfield features where the shape of the code doesn't yet exist.
- Anything where the review pass is going to be mine anyway, and I'd rather have a fast, wrong-in-known-ways diff to argue with than a slow, correct one.
- One-file surgery — extract a component, rename a hook, convert a switch to a lookup table.
Claude Code /agents for:
- Cross-file refactors where the diff has to survive
pnpm typecheckand I don't want to babysit. - Anything with a real test matrix. The subagent-per-file pattern is genuinely how I'd break the work down by hand.
- Migrations. Any time the phrase "keep everything consistent" is in the task, subagents earn their keep.
If I only had one, on a Next.js repo, I'd keep Claude Code, because I hate rewriting broken diffs more than I hate waiting an extra ten minutes. But that is a taste call. A team where PR review is expensive and typing is cheap should flip that. A solo dev shipping a demo tomorrow should absolutely not pick Claude Code and lose 60% of their afternoon.
What I'd measure if this were your repo
Don't take my four tasks as canonical. Take the method:
- Freeze a branch with real work waiting on it.
- Pick four tasks that fit in 5–15 minutes each by hand.
- Run both tools, stopwatch on, from clean.
- Measure two things separately: time-to-agent-stop, and CI pass on first try.
- Also count lines-of-diff-you-had-to-rewrite — the hidden cost neither tool reports.
The second and fifth numbers are the ones that will change your mind. Wall-clock is the flashy metric, but rewrite-cost is the one you'll feel next Wednesday afternoon when the PR is still open.
For anyone going deeper on the Claude Code side, the mental model of subagents and how the /agents planner decides what to fan out is one of those things that pays back the reading time within a week — I have a Kindle write-up on that below.
If you want the full mental model for Claude Code — subagents, hooks, skills, and the parts of /agents I didn't have room for here — I wrote it up in a book:

Top comments (0)