November 6, 20268 min read

Cost per successful task ranked the coding agent that lost every head to head 1st

Cost per successful task/PR is starting to become the default in how we measure coding agent impact, as cited by inference providers like Baseten as the “most important metric to track”.

On the surface level it’s easy enough to understand — it’s how much each PR that was successfully merged by an agent costs (total spend / # successes).

On my repo, optimizing for this crowns GPT-6 Luna low as #1 at $0.26 per success, even though it went 0-13 against all other configurations. Meanwhile, the #1 value workhorse on the board (GPT-6.1 Sol medium, $2.64 per success) gets buried at #7 when measuring cost per successful task.

In my last post, I explored how I built a 24 task benchmark from my own repo’s tasks that agreed with FrontierCode v1.1 on model rankings (0.96 correlation). Despite the agreement, my total dollar costs across the tasks ran 3.5× to 5× higher.

Because my costs were so much higher, the industry standard advice, from inference providers to software factories, is to track cost per successful task (or cost per merged PR) on your own repo. When I computed it on my board, it inverted the rankings.

Cost per success puts the weakest model first.

Left: cost per successful task. Right: head-to-head Stet score.

Hover, tap or tab to a row to follow its line.

Success means the task's new hidden tests pass. These tasks did not run the repo's existing tests, so a patch that breaks existing behavior can still count. One attempt per configuration on 24 tasks from Stet's own Git history; spend includes failed attempts. Stet score is 0–100, where 50 is an even chance against the field, with a 95% range from 10,000 resamples. SWE-2 Max has no recorded cost and is left out.

Cost per successful task subtly shifts the denominator of what we’re measuring — it is an average over survivors, and doesn’t reflect the full spectrum of work that leads to the PR.

Here’s where and why it breaks down, and why I rely on paired relative quality and cost on separate axes instead.

What cost per successful task is trying to measure

Cost per successful task creates a single unit economic number ($ / merged PR) so leadership can compare frontier models against small / open source models, and decide which one to roll out across the org.

It’s good to have a topline metric — but this is the wrong one, for three reasons:

  • Survivorship bias on task difficulty
  • Cheap quitters beat thorough workers
  • Binary gates flatten taste

Survivorship bias on task difficulty

We have two models: GPT-6.1 Sol medium (10/24, $2.64/success), and GPT-6 Luna low (5/24, $0.26/success). Dividing each model’s total spend by its own successes ($1.28 / 5 vs. $26.40 / 10) normalizes away the denominator, which ignores the fact that Sol solves twice as many tasks as Luna.

Software engineering tasks aren’t coin flips where you can reroll a cheap model 4x to solve a hard task. Sometimes the agent just can’t solve the task! All 5 tasks Luna low passed were small single commit fixes where 12 to 14 out of 14 models succeeded (and on 3 of the 5, all 14 models passed 100%). On the 14 multi-file feature tasks, Luna low went 0 for 14.

I’d rather pay more money for a model that actually does the work I need it to.

GPT-6 Luna low only solves tasks nearly every model solves.

Each square is one attempt. Bars on top count how many of the 14 configurations solved the task.
Tests passJudged equivalent, tests failPatch failsNo patchNo result
GPT-6 Luna low$0.05 a taskSmall 5/10Large 0/14
Muse Spark 1.3$0.10 a taskSmall 8/10Large 2/14
Claude Haiku 5.5 low$0.25 a taskSmall 8/10Large 3/14
GPT-6 Luna max$0.37 a taskSmall 7/10Large 5/14
GLM 5.3 Flash high$0.41 a taskSmall 7/10Large 2/14
DeepSeek V4.1 Flash max$0.49 a taskSmall 8/10Large 4/14
GPT-6.1 Sol medium$1.10 a taskSmall 9/10Large 4/14
GPT-6 Sol medium$3.01 a taskSmall 9/10Large 5/14
Claude Haiku 5.5 max$3.85 a taskSmall 7/10Large 5/14
Grok 4.7 high$5.76 a taskSmall 9/10Large 4/14
Claude Opus 5 medium$6.78 a taskSmall 10/10Large 4/14
Claude Opus 4.8 medium$7.05 a taskSmall 9/10Large 4/14
Pareto 26.9$12.47 a taskSmall 10/10Large 3/14
SWE-2 Maxcost not recordedSmall 9/10Large 7/14

Hover or tap a square, or tab into the grid and use the arrow keys, to read one attempt.

Rows run from cheapest per attempt to priciest. Columns are the 10 small fixes, then the 14 multi-file features, each sorted by how many configurations solved them. Solved means the hidden tests pass or the judges found the patch equivalent to the merged change. A hatched square is a run that never finished.

Cheap quitters beat thorough workers

A model that takes 2 turns, decides the problem is too hard, and quits will spend less than a model that takes 50 turns, attempts to solve the problem, and fails.

On my board, GPT-6 Luna low averaged 2.2 median minutes and 12.6k output tokens ($0.05/try). On 3 multi-file tasks, it quit without producing a patch, each in under 4 minutes for less than $0.06. On an example task (Windows runtime evidence), Luna low edited three stub files (117 diff lines) in about 4 minutes ($0.02) and stopped, whereas Luna max worked for nearly two hours ($0.79) across 21 files, building the CI workflow, the adapter, a PowerShell runner, and tests.

Under total spend / successes, quitting in 4 minutes for $0.02 keeps Luna low’s numerator near zero ($1.28 total across all 24 tasks!).

Which is more aligned with human intent — the model that writes a stub and quits, or the model that gives it a fair shot but falls short? Is that difference worth paying for? It’s at least worth knowing about.

Quitting early is cheap.

GPT-6 Luna low failed 18 tasks for $1.20. GPT-6 Luna max spent $6.14 on 12 failures and solved 7 more.
Tests passJudged equivalent, tests failPatch failsNo patchNo resultSquare area is what the attempt cost:$0.05$0.25$1.00
GPT-6 Luna lowSpent failing $1.20Solved 5/24
GPT-6 Luna maxSpent failing $6.14Solved 12/24

Tap or hover a square to read what the attempt cost and how long it ran.

The same model at low and max reasoning effort, on the same tasks. A failure is a patch that fails the hidden tests and the equivalence judge, or no patch at all.

Binary gates flatten taste

Binary pass/fail gates that determine “success” or “failure” likely depend on hidden “golden” tests. This is great for determining if the agent implemented the desired behavior, yet it fails to capture some subtler parts of software engineering, such as taste and maintainability. Just because a PR passes CI obviously doesn’t mean that we should merge it.

With the firehose of slop code coming out of coding agents, humans need to be arbiters of what’s “good enough” to merge into the codebase. Review cycles waste scarce human attention. Finding models that are highly aligned with your codebase standards is therefore crucial to maintaining, and even improving, the quality of the codebase.

Pass/fail scores these 9 patches the same.

Claude Haiku 5.5 low's patch passes while inverting the flag rule. The quality score puts 3 patches clearly above it.

Task · Strip stale Pest targets after boolean flags

±σ judge noise around Claude Haiku 5.5 low

  1. 1GPT-6.1 Sol medium+2.9σ0.963
  2. 2GPT-6 Sol medium+2.1σ0.944
  3. 3Claude Opus 5 medium+1.0σ0.918
  4. 4DeepSeek V4.1 Flash max+0.9σ · noise0.915
  5. 5GPT-6 Luna max+0.9σ · noise0.913
  6. 6Claude Opus 4.8 medium+0.8σ · noise0.912
  7. 7Pareto 26.9+0.5σ · noise0.905
  8. 8Claude Haiku 5.5 low0.892
  9. 9Muse Spark 1.3−0.5σ · noise0.881
Quality score combines a behavioural checklist, code review and diff footprint. The band is ±σ of judge noise (σ = 0.025) around Claude Haiku 5.5 low's patch; gaps inside it count as ties.

Failures aren’t free

A counter argument (and how most model routing works!) is essentially “if GPT-6 Luna low is $0.05 per attempt, and GPT-6.1 Sol medium is $1.10 per attempt, let’s just run Luna and escalate to Sol when it fails”.

A naive implementation misses the fact that failures are often not immediately obvious, and in production systems, can manifest in bugs for the customer.

Cheap-first routing saves $19.51 and ships 5 more failing patches.

A patch that fails hidden tests looks like a success to the router, so it ships.
Tests passJudged equivalent, tests failPatch failsNo patchNo resultEscalated to GPT-6.1 Sol medium
GPT-6.1 Sol mediumruns every task aloneSpend $26.40Solved 13/24Failing shipped 11
Visible escalationSol on no patch or no resultSpend $6.89Solved 8/24Failing shipped 16
Oracle escalationSol on every failureSpend $25.66Solved 13/24Failing shipped 11

Tap or hover a square to see which model shipped it and what it cost.

A replay of recorded single attempts, not a live router. GPT-6 Luna low tries every task first; a missing patch or unfinished run goes to GPT-6.1 Sol medium, paying for both attempts. Escalating every failure, even ones only hidden tests catch, would save just $0.74.

This is an exercise of de-risking, both on the part of the engineer, and on the part of the company. Neither can use the excuse of a dumb LLM if breaking a customer’s experience. Using more expensive tokens is (usually) worth it to ship fewer bugs, especially if you have big customers paying you big bucks. For most people currently, due to the difficulty of evals, it’s then worth it to accept some slippage, and route most reasonably difficult requests to the frontier.

But, your CFO wants to save money, and you only get $200 of tokens per month. Thus, the optimal policy is to only route GPT-6 Luna low the tasks we actually know it can handle reasonably well. The problem is that it’s hard to know ahead of time which tasks Luna can do! The solution is to “slice” tasks, and perform routing to cheaper models based on shown capabilities. And to find those slices, you first need a ranking method that can compare models head to head on the same task.

How I rank instead

Instead of cost per successful task, I measure quality relative to all other agents being measured. Why?

I’m interested in knowing which agent to use for a specific task — not how good the agent is in a vacuum. These sound similar, but are subtly different things.

Usually, benchmarks measure whether or not the agent solves a task with held-out tests, producing a binary score. Some benchmarks include qualitative grading on top of this (would a maintainer accept this PR?). Either way — the end result is a score that is: # passes / total tasks, avg(quality score as determined by LLM), or a combination of both.

Stet grades tasks using a combination of hidden tests, behavioral checklists, code quality, and equivalence to the merged task. This is fundamentally similar to how other benchmarks score agent patches.

The difference is in how we aggregate the scores to answer the question of “which agent is better”.

For every task in the dataset, we compare every agent configuration (harness x model x effort x context) against every other configuration, and compute the wins, ties, and losses each one accumulates. An agent that passes tests will always beat one that fails, and when agents both pass (or fail), we use code review and behavioral similarity to the original patch to break the tie (only counting a win when the measured gap exceeds the judge noise).

Correctness first, then quality beyond judge noise.

A higher rung wins the task outright. On the same rung, drag the gap: inside ±σ it counts as a tie.

Task · Strip stale Pest targets after boolean flags (small fix)

1 · Correctness first

  1. 1.00Tests pass
  2. 0.70Judged equivalent
  3. 0.25Patch fails
  4. 0.00No patch

GPT-6.1 Sol medium

Claude Haiku 5.5 low

2 · Same rung: compare quality score, discount judge noise

tie band ±σ, σ = 0.0250.00.51.0−3σ−2σ−σ0+σ+2σ+3σA − B quality score →share for A

Same rung. Gap +0.071 is 2.9σ outside the judge noise, so the table counts a win and the fit gets a share of 1.00.

σ = 0.0247 is the judge noise of a quality-score difference, estimated from repeat judging on this board. Inside ±σ the win-tie-loss record counts a tie while the fit still splits credit along the curve. A run that never finished leaves the pair undecided for that task.

We then create Elo for the models (Bradley-Terry, same math behind chess rankings and chatbot arena) to turn the head to head matrix into each configuration’s expected win share from 0-100, where 50 is average.

On the 5 easy tasks that GPT-6 Luna low passed, it mostly tied the other models, and on the other 19 tasks, it lost 198 of 234 decided matchups. Its aggregate pair record is 0-13, putting it at the bottom of the board with a score of 21.2.

(There is a lot of very interesting math here, and I will likely do a further post going deeper into it.)

GPT-6 Luna low trails all 13 others.

Each square is one pairing's share of task credit. A dot marks a pair that separates beyond resampling noise.
Row winsEvenRow losesPair separates
Score 66.4, 95% range 56.8 to 75.4
Score 65.3, 95% range 55.6 to 74.6
Score 65.1, 95% range 54.8 to 74.9
Score 63.2, 95% range 52.2 to 73.2
Score 59.1, 95% range 48.8 to 69.2
Score 58.6, 95% range 47.5 to 69.0
Score 57.6, 95% range 49.5 to 65.7
Score 50.0, 95% range 40.1 to 59.3
Score 47.8, 95% range 37.5 to 58.0
Score 41.3, 95% range 34.8 to 47.8
Score 40.2, 95% range 30.3 to 50.3
Score 33.2, 95% range 24.3 to 42.4
Score 31.0, 95% range 21.5 to 41.5
Score 21.2, 95% range 12.5 to 31.2

Tap or hover a square to read one pairing, or a name for its whole row. Replay the fit to watch every score start at 50 and settle.

12 of its 13 losses separate; 45 of all 91 pairs do. Scores are one Bradley-Terry fit over every pair, read as average win chance against the field, so they average 50. The fit adds 0.5 of a virtual tie to each pair. Ranges and separation use 10,000 paired resamples of the tasks and a Holm-adjusted sign-flip test.

Slicing

If topline cost / success is broken, then how do we use benchmarks to drive the cost of coding agents down?

The approach I take is to slice the tasks by workload shape and constraints, and look for slices where a cheaper configuration can do as well as more expensive configurations. In other words, figure out where Luna is about as good as Sol, and use Luna in those cases.

Here are some example slices from my work:

Slice 1: Small, scoped fixes vs. multi-file features (where effort & model tier diverge).

  • 10 small tasks (median 2 files, a few dozen lines):
    • Haiku 5.5 low ($0.25, 4.7 min median) and Luna low ($0.05, 2.2 min) get most of their passes here.
    • Raising effort to Haiku max ($3.85, 46.7 min) is net negative on small tasks — the agent over-edits, loses diff focus, and scores lower on our code review checklist.
  • 14 large multi-file tasks:
    • Cheap low-effort models collapse, failing to perform the work.
      • Luna low median 3.5 files / 144 lines vs Luna max 15 files / 1,430 lines.
      • Luna max beats low on the checklist on 10 of 13 tasks.

Cheap models stay close to Sol on small fixes, not on features.

Dots are solve rates. Records are wins–ties–losses against GPT-6.1 Sol medium on each slice.
Small fixes (10)Multi-file features (14)

Hover, tap or tab to a row to read its numbers.

Rows run from cheapest per attempt to priciest. Solved means the hidden tests pass or the judges found the patch equivalent to the merged change. Records apply the step-1 rule per task, so a configuration can lose a task it also failed by failing worse. With 10 and 14 tasks, one task moves a share by 10 or 7 points.

Slice 2: Interactive agents vs. one shot background agents (the time axis).

  • Cost per task ignores wall clock.
  • GPT-6 Luna max ($0.37) is the strongest cheap candidate for asynchronous background tasks, if you can wait 54.6 median minutes (vs 11.0 minutes for Sol 6.1), though GPT-6.1 Sol medium ($1.10) still beat it 13–7–4 head to head.
  • For interactive agent usage or fast turnaround scoped work, Haiku 5.5 low ($0.25, 4.7 min median) is the cheap candidate worth testing, while Sol 6.1 medium ($1.10, 11.0 min) remains the default when correctness matters more (13–10–1 over Haiku low).

GPT-6 Luna max costs a third as much as GPT-6.1 Sol medium and takes 5× as long.

Stet score and 95% range against median minutes per task.

Hover, tap or tab to a point to read it.

Wall clock per attempt in each model's native harness; each point's readout gives its cost per task. Ranges are 95% from 10,000 resamples of the 24 tasks; overlapping ranges mean the board can't yet order those two.

Conclusion

Metrics are semantic and encode implicit assumptions. “Cost per successful task” assumes failures are free/cheap, success is binary, and every ticket in your backlog is equally hard.

If you’re building these sorts of evals: be thoughtful, and measure what you actually care about. For me that looks like “how good is this agent configuration compared to every other agent configuration” and “can I do this same type of task for cheaper”.

Compare on the leaderboard

Stet's 24-task board mined from Stet's own repository (compare board generated October 17, 2026): 14 model and reasoning-effort configurations, one attempt per task, each model in its native harness.

Methodology →