Cost per Merged PR: What 3 Months of My Claude Code Ledger Show
My Claude Code cost per merged PR fell from $73 to $32 in a month, then rose 42% by early October. Three months of ledger data, and my counting mistake.
Jul–Oct 2026 · Own setup · Claude Code
If your team's agent spend grows faster than what it merges, this is the per-PR method I use, and the counting mistakes it took to get there.
My agent cost per merged PR fell from $73 to $32 between July and August, the month I cut the text loaded on every turn, though the drop started before the first cut. From September to the first days of October it went from $49 to $69, and the first version of this page compared those numbers across a counting change it shouldn't have.
Short answer: I track Claude Code cost per merged PR in a ledger that records tokens, commits and merged PRs per day. July to August, on one counting method, cost per merged PR fell 57% in the month I cut the text loaded on every turn. On the current method, September averaged $49 per merged PR and the first 11 days of October $69. Subagent turns doubled, headless runs jumped and the mix of work across my accounts shifted while merged PRs per day fell, and I haven't measured which of those drove it. The dollars are list-price replacement cost, not my invoice, and at the Opus 5.5 rates most sessions ran on they would be half to two thirds of that.
How I count
- Ledger. A nightly script records tokens, commits and merged PRs per day across all my Claude Code accounts, totals only. Tokens are priced at Opus 5 list rates (Anthropic pricing, fetched 12 Oct 2026); most sessions ran on the cheaper Opus 5.5, so the real list cost is half to two thirds of these dollars, by my arithmetic. It isn't my invoice: the sessions ran on flat-fee Claude subscriptions.
- A counting change on 11 September. Before it, the ledger counted each API response about twice and read two of my four accounts. Compare July with August and September with October, never across.
- Per merged PR first. A merged PR passed review; agent commits are checkpoints, so cost per commit moves with commit habits.
What changed between July and August
I matched the weekly cost against the commit history of my Claude Code config.
The first drop came before any change. Subagent turns per prompt halved in the first week of August, and cost per PR fell with them. No config commit landed that week. My workflow changed, and no file records how, so I don't claim a cause.
Less text injected into every turn (10 August). A hook added a reminder to every message I sent, and nothing showed it saved anything, so I turned it off. The same change parked ten skills for stacks I wasn't using, because every installed skill adds its description to what each session loads.
Shorter instructions (23 August). An audit of my own setup cut CLAUDE.md and the rule files from 9,976 words to 4,106 (wc -w at the config commits before and after: the rules went from 8,803 words to 2,933, and CLAUDE.md stayed at 1,173). Sessions load them at the start, and the model rereads them from the cache on every turn.
Full months, same method:
| July | August | Change | |
|---|---|---|---|
| Cost per merged PR | $73.4 | $31.6 | −57% |
| Cost per commit | $35.2 | $11.4 | −68% |
| Merged PRs | 477 | 395 | −17% |
| Commits | 995 | 1,091 | +10% |
| Subagent turns | 144k | 43k | −70% |
Cost fell after both dated changes and stayed low. They line up with the drop. I can't show how much of it they caused, and one more thing moved: the mix of work across my accounts and clients shifted from month to month, which changes cost per PR on its own.
September and October, week by week
After the counting change, cost per merged PR rose every week but one: $52, $51, $56, $65. Comparing September with the first 11 days of October on the same method:
| Per active day | September (19 days) | 1–11 October (11 days) | Change |
|---|---|---|---|
| List-price cost | $932 | $1,126 | +21% |
| Merged PRs | 19.1 | 16.3 | −15% |
| Commits | 80.7 | 47.0 | −42% |
| Subagent turns | 1,411 | 3,059 | +117% |
| Cost per merged PR | $49 | $69 | +42% |
Spend per day rose a fifth, and merged PRs per day fell. Subagent turns per day more than doubled. In the first ten days of October, 618 of my 770 Claude Code sessions were headless scripted runs, against 14 of 279 in September (counted from my session logs). The mix of work across my accounts also moved most in October. I haven't measured how much of the cost the headless runs or the mix account for, so the cause is open. The ledger did its job: it caught a 42% rise within a month, while the monthly total would have looked like a busy month.
What I got wrong in the first version
The first version of this page said September was "roughly $23 on the old count, twice August" and that early October was "back above July". Both compared numbers across the counting change. The old method also read only two of my four accounts, so a 2x conversion can't bridge the gap, and I don't know the real ratio. The page also led with cost per commit, which my own ledger rates as the weaker metric. This version leads with merged PRs and compares only like with like.
How much does Claude Code cost per developer?
Anthropic's docs put the enterprise average at about $13 per developer per active day and $150–250 per developer per month, with 90% of users under $30 per active day (Claude Code docs, fetched 12 Oct 2026). Gartner, as reported in June 2026, found that nearly a quarter of tech leaders spend $200–500 per developer per month on AI coding tools and about 6% spend more than $2,000 (DevOps.com, 30 Jun 2026; Gartner's own release returned an error when I fetched it).
At Opus 5 list price my setup costs about $930 per active day, around 70 times Anthropic's average, or roughly 35 to 45 times at Opus 5.5 rates. I'm not a typical seat: up to 18 sessions at once, over a thousand subagents in 66 days, and orchestration runs that start other agents. That is why I run on flat subscriptions, and why the useful number for a buyer is the unit cost: about $49 per merged PR in September at Opus 5 list prices, $25–32 at Opus 5.5 rates.
Why measure per merged PR, not per commit?
A commit from an agent is a checkpoint, and agents that commit every working step can double the commit count without doing more work. September had 1,533 commits and 362 merged PRs. A merged PR passed review and changed the product, so cost per merged PR moves only when the cost of shipping moves.
What I'd check first on a team's setup
- Cost per merged PR, weekly, on one counting method. A monthly total would have hidden a 42% rise in mine.
- What loads on every turn. A hook that injects text into every message, unused skills and a long
CLAUDE.mdare paid for on every turn. My cut from 9,976 to 4,106 words lined up with the July–August drop. - Headless runs and subagent turns, counted apart from interactive work. In my October data subagent turns per day doubled and headless sessions went from 14 to 618, while merged PRs per day fell.
The measurement is what lasted. Without the ledger I would have reported "57% lower" in August and missed the climb in October.
AI Code Audit · from €1,500
Find where your agent tokens go
I measure cost per commit and per merged PR on your setup, send the ranked fixes in 2–3 days, and ship the top one as a PR.
or book a free 30-minute scoping call →