For engineering managers How to see which pull requests your coding agents wrote, and what each cost.
Have the agent mark its commits and pull requests, price the sessions that built them, and join the two. The marking is a setting; the pricing and the join are the hard part, because a session’s cost lives on one developer’s computer.
Four ways to do it today, each with what it gives and what it does not. Facts about other tools are what their own pages say, linked, as read on 2026-12-04.
A trailer or label the agent writes
What it gives
Claude Code can add a trailer to the commits it makes and a line to the description of a pull request. Its settings reference lists attribution.commit to change or hide the trailer and attribution.pr for the pull request line. A search of git log or of the pull requests then shows which ones an agent wrote.
What it does not
It marks authorship. It carries no cost, so the question of what each cost is still open.
Sources: Claude Code settings reference
Matching session logs to branches by hand
What it gives
Claude Code keeps a plain text transcript of every session under ~/.claude/projects, one file a session, and its /usage command shows an estimated cost for the current session, worked out on your machine from token counts at list price. Match a session to a branch by its folder and its time and you have a cost for that branch.
What it does not
The costs page does not give a per-repository or per-pull-request figure, and the transcript page names no branch field. Transcripts are deleted after 30 days by default, they sit on one computer, and a team's figure means doing this on every machine.
Sources: Claude Code costs, The .claude directory
A vendor's usage export by day
What it gives
Anthropic's Usage and Cost API filters and groups usage by API key, workspace and model, in buckets of a minute, an hour or a day, and gives cost by workspace as a daily figure. Give each repository its own workspace or key and you get a cost per repository.
What it does not
The page does not mention repositories or pull requests, so the join to a pull request is yours to build. It covers one vendor, and it is the page's legacy API: the page points new work to its Analytics API.
Sources: Usage and Cost API
Caprock Teams
What it gives
Each developer's Caprock prices every agent session on their computer, including sessions started outside it, and reports the repository, the branch and the hashes of that developer's commits to a server your team runs. The server adds it up by repository, pull request and release, by work unit and not by person unless the team turns the person view on.
What it does not
It needs a server your team runs, and each developer joins it. It shows and warns; it does not stop a colleague's session. On a seat or a flat plan the figure is what the same work would cost through the API, not money spent.
More on the team version: Caprock Teams.