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.

Share

Keep reading

AI FinOps

Microsoft Cut Claude Code for Thousands of Engineers. The Bill Decided It, Not the Output.

Microsoft is pulling Claude Code from thousands of engineers in its Experiences and Devices division and moving them to GitHub Copilot, after token bills reportedly hit around $2,000 per engineer per month. The decision was framed as a benchmark. A benchmark on cost alone is half a benchmark, and the half that was missing is the one that actually decides whether the switch was right.

Vukašin Kitanović·Sep 2, 2026·8 min read
Guide

Your Team Says AI Saves Them Two Hours a Day. That Is the Least Reliable Number You Have.

Ask your engineers how much time AI saves them and someone will say two hours a day. It feels like proof the spend is working. A randomized trial found developers felt 20% faster with AI while actually finishing 19% slower, a perception gap of almost 40 points. Here is why self-reported time savings cannot go in a budget, and what number to use instead.

Vukašin Kitanović·Aug 26, 2026·7 min read
AI FinOps

Uber Ranked Its Teams by Token Spend. The Leaderboard Burned the Budget.

Uber put its engineering teams on internal leaderboards ranked by how much they used Claude Code and Cursor, then burned its entire 2026 AI budget in four months. Everyone points to the missing spend cap as the lesson. The real lesson is the metric at the center of the incentive. Here is the difference, and how to rank teams by outcome instead of activity.

Vukašin Kitanović·Aug 19, 2026·8 min read

Measure the value your AI creates.

Get new posts and product notes, about once a month.