Measuring the value of AI coding agents

To measure the value of AI coding agents, pick an outcome your team already tracks, such as merged pull requests per developer, and record it before rollout. Claude Code’s docs count usage, cost and contributions, but none of the pages we checked defines value.
Checked against Claude Code’s costs, analytics and monitoring docs, fetched 2026-11-01. The pages name no CLI version for the metrics, counters or dashboards described here. The one version cited, v2.1.242, is for the modelPricing setting.
Why usage and cost are not value
A cost line tells you what a developer’s sessions were billed or estimated at. It does not tell you whether the work shipped or was worth the money. The cost tracking post covers how to attribute spend to a person. This post starts where that one ends: with the question of what the spend bought.
The cost figure is the first thing to read carefully. The costs page says Claude Code computes the dollar figure locally from token counts at list price, unless a modelPricing table is in effect. The figure is an estimate. Treat cost as one side of a ratio, and write down the outcome you expect before you look at either number.
What the vendor docs measure
Each surface counts something different, and none of them counts delivered value. The table lists what each one counts and the limit its own page states.
| Surface | What it counts | Limit the page states |
|---|---|---|
| OpenTelemetry export | Sessions started, lines added and removed, pull requests, commits, cost in USD, tokens, active time | Each metric is described by its counting rule only |
| Team and Enterprise analytics | PRs with Claude Code, lines of code with Claude Code, suggestion accept rate, lines accepted, daily users and sessions | Figures are “deliberately conservative” and “an underestimate” |
| Claude Console dashboard | Lines of code accepted, suggestion accept rate, daily users and sessions, spend per member | Spend figures “are estimates for analytics purposes” |
| Team and Enterprise spend report | Estimated spend per user and per model | Covers usage-credit spend only. Seat allowance usage is not metered in dollars |
The costs page calls OpenTelemetry the only option that streams per-user token and cost metrics into your own observability stack in near real time. The monitoring page defines active time, claude_code.active_time.total, as time “spent actively using Claude Code, excluding idle time.”
Contribution metrics depend on attribution
The Team and Enterprise dashboard counts a merged pull request as Claude Code-assisted when Claude Code sessions edited matching files in a window. Lines are normalized before matching. Code a developer rewrote by more than 20 percent is not attributed, and generated files such as lock files, build output and minified code are excluded.
The “PRs with CC” and “Lines of code with CC” figures therefore describe matched code, not all code Claude Code touched. The analytics page calls these figures an underestimate. You can also search GitHub for pull requests labeled claude-code-assisted to query the same data.
Accept rate and accepted lines measure suggestions
Suggestion accept rate is the percentage of times users accept Claude Code’s code-editing suggestions, including Edit, Write and NotebookEdit. Lines of code accepted excludes rejected suggestions and does not track later deletions.
These measures show what developers accepted in the session. They do not show whether the code passed review, stayed in the codebase or fixed the problem it targeted. Only a team’s own delivery records can show that.
What the docs say about ROI
The analytics page uses the word. It says contribution metrics “help answer ‘Is this tool worth the investment?’ with data from your own codebase,” and it suggests using them alongside DORA metrics, sprint velocity or other engineering KPIs.
The page does not say how to combine those measures, which one decides the question, or what a good result looks like. Its “PRs per user” chart divides merged pull requests per day by daily active users. A rising line shows more pull requests per active user. It does not show a return.
Set your own value baseline
- Choose one outcome your team already reports, such as merged pull requests per developer. Pair it with one vendor counter, such as the “PRs per user” chart.
- Record the baseline before rollout. A chart that starts after the first developer turns on Claude Code cannot show a before.
- Add the delivery measures your team already uses. The analytics page links DORA as one example. Use the measures you already trust, not a benchmark from a vendor.
- Put cost on the same scale. Set your contracted rates with
modelPricing, which needs Claude Code v2.1.242 or later, so the cost side reflects what you pay. The figure stays an estimate. If your traffic goes through a gateway, read the AI gateway routing post. - Set the threshold before you read the result. Write it down with the period you will compare. The docs give no threshold, so the number is yours to defend.
Gotchas that skew the numbers
- Scope. Contribution metrics cover only users in your claude.ai organization. The docs say usage through the Claude Console API or third-party integrations is not included.
- Availability. Contribution metrics are in public beta and need the Claude GitHub app. They are not available for organizations with Zero Data Retention. Repositories on GitHub Enterprise Server show usage metrics only.
- Cloud providers. The analytics dashboards and the Analytics API do not cover Claude Code on Amazon Bedrock, Google Cloud or Microsoft Foundry. Use OpenTelemetry or a gateway for those developers.
- Window. Sessions more than 21 days before or 2 days after the merge date are not considered.
- Estimates. The
/usagedollar figure is computed at list price unlessmodelPricingis set. Theapi_requestevent’scost_usdattribute is described as “Estimated cost in USD”; theclaude_code.cost.usagemetric is described as “Cost of the Claude Code session.”
Enforcing this with AIControls
Vendor dashboards show each tool’s own counts. None of them knows which outcome your team chose to value, so the baseline belongs in your own reporting.
AIControls issues per-user tokens and sets per-user and per-session cost and budget limits for Claude Code through the gateway. That lets you cap spend per developer while you measure outcomes elsewhere. For the governance side of coding agents, see governance for AI coding agents. For the cap side, read how to cap AI coding agent spend per developer.
Frequently asked questions
Is the Claude Code dollar figure a measure of value?
No. Claude Code computes its cost figure locally from token counts at list price, unless a modelPricing table is in effect. The costs page calls the figure an estimate and points to the Console usage page for authoritative billing. Cost shows what was spent. It does not show what was delivered, so pair it with an outcome your team measures itself.
Do Claude Code's analytics measure return on investment?
The analytics page does not define ROI or a value measure, although it says contribution metrics help answer whether the tool is worth the investment. Its counts are pull requests and lines with Claude Code assistance, which it calls an underestimate. Set your own threshold from a baseline recorded before rollout.
Why do the contribution numbers look low?
The analytics page calls its attribution deliberately conservative. A pull request counts only when Claude Code sessions edited matching files in a window around the merge date. Code rewritten by more than 20 percent and generated files are excluded. The gotchas section lists the window and the other rules.
Which measures cover Claude Console API usage?
The Claude Console dashboard shows lines of code accepted, suggestion accept rate, daily users and sessions, and spend per member. Contribution metrics with GitHub integration are not available for API customers. The docs say Console spend figures are estimates for analytics purposes, so use the billing page for actual costs.