Practical guide · 3 min read

Compare coding agents on a real repository task

Test Claude Code, Codex, Cursor, Antigravity or GitHub Copilot on the same bug fix and measure diff quality, retries and real usage cost.

What you’ll finish with A side-by-side scorecard showing which agent finishes real work cleanly in your codebase.

AI-generated guide · Content revised · Allow about 25 minutes for the exercise

The walkthrough

  1. Pick one reproducible bug with a real test

    Choose a self-contained issue in a branch you can throw away: a failing parser edge case, a broken filter, or a missing validation check. Write down the exact test command that fails today and should pass afterward.

  2. Run each agent from the same clean commit

    Reset the branch before every trial and paste the exact same brief, file hints and test command. Keep permissions consistent so one agent does not succeed only because it was allowed to skip checks.

  3. Inspect the diff, not just the test pass

    Check whether the agent fixed the root cause, left unrelated files alone, followed local conventions and avoided adding unnecessary dependencies or weakening an existing assertion.

  4. Record retries and allowance burn

    Note how many follow-up turns it took to reach a mergeable diff and how much of your five-hour window, monthly credit allowance or API balance disappeared in the process.

Text to start with

Replace the bracketed sections with your own details.

Investigate this failing behavior in [files]: [describe bug]. Reproduce it with [test command] first, then explain the root cause before editing. Make the smallest clean patch that follows existing conventions, add a regression test and run [test command]. Do not touch unrelated files or loosen existing tests.

A complete worked example

Run two coding agents against the exact same failing test on a throwaway branch. The rows below illustrate what to record — not a measured score for any provider.

Sample comparison scorecard

Swipe or scroll across the table to see every column.

Sample comparison scorecard
CheckAgent AAgent B
Reproduced failure firstYes, ran test commandEdited code before running tests
Files touched2 files (+18 / -4 lines)5 files (+92 / -31 lines, reformatted unrelated code)
Follow-up turns needed02 (had to undo weakened assertion)
Allowance or API spendRecorded from provider meterRecorded from provider meter

Decision rule

Prefer the agent whose diff you would merge with the least cleanup, even if another agent finished 30 seconds faster. Repeat on a second task — such as a cross-file refactor — before switching plans.

When it goes wrong

Judging only by a green test after the agent silently loosened the test or rewrote unrelated files.

How to correct it

Run git diff before accepting any change and check whether the new regression test actually fails when your fix is reverted.

Finished when

You have a clean, minimal diff and real allowance numbers from your own codebase.

Check the result

  • Did the agent reproduce the failure before editing?
  • Is the diff small enough to review and revert cleanly?
  • How much of the plan allowance or API budget did the task consume?

Before paying

Headline subscription prices hide very different usage pools. Claude Code shares limits with Claude chat, Cursor shares a pool with Grok on The X Subscription, GitHub Copilot meters stronger models in AI Credits, and Codex scales by plan tier. Measure cost per merged task, not per month.

Official references

References checked October 22, 2026. Feature access, sharing and plan limits can change; check the linked documentation before committing.

Tools to consider

Choose around the task and access you have. These are options to try, not a measured ranking.

See 4 more options for this workflow

Try another workflow