Blog
Engineering

What 'cost per merged PR' actually measures

Token dashboards tell you how much your coding agent talked, not what it was worth. Here is the metric that does.

Jun 22, 2026·5 min read
What 'cost per merged PR' actually measures
Cost per merged PR turns a noisy invoice into one number.

The number every dashboard skips

Most teams watching their coding agents are watching the wrong thing. Tokens, requests, lines suggested, hours "saved" measure how busy an agent was, not whether the work was worth anything. An agent can spend a small fortune generating code that nobody merges.

The question a CFO actually asks is simpler: what did this cost, and what did we get back? Cost per merged PR answers it in one line. Take everything you spent on the agent over a period and divide by the pull requests it produced that actually shipped.

Why "merged" is the load-bearing word

A suggestion is not value. A draft is not value. A pull request that sits open for three weeks and gets closed is not value. The merge is the moment a human decided the work was good enough to live in the codebase, which makes it the closest thing to ground truth a coding agent has.

That is why we anchor on it. Acceptance rate tells you the share of an agent's output that survives review; cost per merged PR puts a price on each unit that does. Together they turn an agent from a mystery line item into something you can reason about.

Watching it move

The number is only useful if you can act on it. When cost per merged PR climbs, something specific is wrong: the agent is retrying too much, reaching for an expensive model on trivial tasks, or shipping code that needs three rounds of review. Each is a fixable lever, a cheaper model on triage, a verify step before it opens the PR, a tighter prompt.

Measure it per agent and per repo and the picture sharpens. The agent that looks expensive in aggregate is often two agents: one doing real work cheaply, one burning money on a task it was never suited for.

Where it leads

Once you can price a merged PR, the idea generalizes. A resolved support ticket. A qualified lead. A validated research finding. Every agent does work, and every kind of work has an outcome you can count and a cost you can divide by.

That is the whole thesis behind Yardstick: measure the value, not the activity. Cost per merged PR is simply where it starts.

Stefan Stefanović · Co-founder & CEO

Builds the product. Seven years across full-stack and crypto and fintech engineering, including Request Network, IOHK, and Seamless.Finance.

Teilen

Messen Sie den Wert, den Ihre KI schafft.

Neue Beiträge und Produktnotizen, etwa einmal im Monat.