Tying Coding Agent Spend to Shipped Work
Coding agent spend needs to be tied to shipped work. Token bills rise with activity, while delivery depends on review, integration, and stable releases. Closing that gap requires more than better cost reporting. It requires a traceable link from agent actions to delivery outcomes, supported by governance that prevents paid activity from becoming avoidable rework.
Why coding agent spend has detached from shipped work
Harvard’s November 2026 study of firms across the industry found that lines written, commits, and pull requests rose sharply after agent adoption, while resolved issues and completed epics did not change significantly. PR review time also rose dramatically. Code generation accelerated, but the work needed to accept and integrate that code did not keep pace. The economic mismatch follows from that division, because activity-based billing charges for generation while human review and integration absorb costs outside the token invoice.
DORA’s 2026 findings sharpen the case against optimizing for raw output. Individual developers completed more tasks and merged more PRs, but bugs per developer and incidents per PR increased, while delivery stability deteriorated. The value of more completions at one stage depends on performance across the delivery process. Organizations need to assess how much they spend on agents and whether the activity they buy produces completed work without adding downstream costs that erode the gain.
How usage-based billing turns adoption success into a budget crisis
Uber rolled out Claude Code to engineers in December 2025. Adoption grew from roughly a third of engineers in February 2026 to more than four-fifths by March, and the company exhausted its full-year 2026 AI coding tools budget by April. Adoption succeeded faster than the budget could accommodate. With usage-based billing, each expansion in agent activity adds expense, whether or not delivery expands with it. There is no automatic correction when code generation outruns review capacity.
GitHub Copilot’s move to token-based billing on June 1, 2026 exposed the same pressure through a different route. Agentic users reported dramatic bill increases after the change. Spend can also vary widely from one developer to another, with top-percentile consumption far above the median, so an average can hide which users drive the bill. Those costs often appear in cloud invoices. Normal procurement review can therefore miss the expense even when the tools themselves are familiar.
The FinOps Foundation’s 2026 report found that nearly all organizations actively manage AI spend. Teams can track consumption closely and still have no proof that using more leads to shipping more. FinOps progress has not closed that measurement gap because the denominator remains tokens.
Why activity metrics feel like productivity evidence but aren't
Harness’s April 2026 Sapio Research survey of people who work in software engineering found that most leaders said developer productivity and satisfaction had improved after they began using AI coding tools. The vast majority also acknowledged that their metrics omitted key factors. Both findings can be true at once. Leaders see more code produced and more work moving through early stages, and those gains are real within the layer being measured. The missing evidence concerns what happens after generation.
Bugs introduced, review burden, integration friction, and incidents per PR do not appear on a token invoice or a commit graph. Activity measures are easier to collect and move quickly, while issues resolved, epics closed, and incidents per release can lag by weeks. Delivery measures also require correlation across systems that billing tools never touch. The most accessible data describes the part of the process agents accelerate most directly.
The Harvard study’s review finding illustrates what those dashboards leave out. Faster PR creation can shift the bottleneck downstream without removing it, leaving reviewers with more work to process. A leader can report that each developer is producing more even as that work puts more pressure on the delivery pipeline. Productivity confidence based on generation speed is incomplete as evidence of end-to-end delivery performance.
What the right denominator looks like in practice
Cost per merged PR, cost per resolved issue, and cost per shipped epic tie spending to work that is done as well as to how much was consumed. The distinction becomes concrete when two teams use identical token volumes but one ships twice the merged work. A token-only comparison treats their consumption as equivalent without recognizing their different delivery results. It cannot distinguish productive use from repeated loops. Chargeback based only on consumption can therefore penalize the team that ships while leaving the team that loops without a delivery obligation.
Cost per merged PR is a practical starting point because the PR is a durable artifact already counted in existing tools. It exposes high consumption that produces few completions. It is not, however, a substitute for the rest of the delivery chain, particularly when merged output can coexist with more incidents. Mapping spend from generation event to PR, ticket, and deployment connects that first unit to broader outcomes. The chain shows what abandoned generations cost, which would otherwise be hidden in the total bill.
That traceability gives optimization a specific target. Lighter models for boilerplate tasks, prompt caching for repeated context, and the elimination of abandoned agentic loops can reduce cost per shipped unit without reducing throughput. Bloated prompts and expensive model choices for routine work become identifiable sources of waste. Budget accountability then rewards closing the loop on work. Opening another PR is no longer sufficient evidence that more spend was productive.
Tooling that maps spend to delivery: what exists and what it covers
Harness AI DLC Insights, launched May 28, 2026, implements this connection through an on-machine agent inside the IDE and terminal. It captures every AI-generated line of code, records token cost per model and tool, and maps spend to the PR, ticket, and deployment it produced. It works across Claude Code, Cursor, GitHub Copilot, and Windsurf. Instrumentation where generation happens addresses the gap left by FinOps tools that aggregate bills but cannot trace a generation event to a shipped PR.
The product shows where prompts are bloated, where costly models are used for routine work, and where generations are abandoned. It also correlates per-developer token economics with DORA metrics, ship rates, and downstream incident and vulnerability data. Those connections extend the analysis beyond whether generated code was merged. They make delivery quality part of the cost picture. A smaller generation bill alone does not prove things have improved if the work leads to added incident or remediation costs.
This coverage still depends on seeing the activity that produces the expense. Invoice-level totals do not establish which agents ran or which delivery artifacts their work reached. Spend attribution and agent discovery are therefore linked requirements. The former explains the economics of known activity, while the latter establishes whether the known activity represents the fleet.
Why you cannot tie spend to outcomes without first knowing what is running
A Cloud Security Alliance and Token Security survey conducted in January 2026 found that most IT and security professionals had discovered at least one AI agent created entirely without governance team knowledge. Most also believed they had strong visibility. Confidence in coverage did not establish a complete inventory. For cost accountability, that gap leaves organizations trying to allocate spending from agents whose existence or activity was not formally tracked.
With the 2026 shadow AI pattern, a standard software inventory is no longer enough. Agents can start working inside a tool that is already approved, through MCP server connections from approved IDEs or custom agents inside licensed platforms. The vendor and licence remain familiar, but the governance class changes. An inventory that lists only purchased products can miss what is using tokens and putting operations at risk.
Discovery must cover agents, MCP servers, and skills before outcome-based allocation can be dependable. Shadow agents can consume tokens without an established link to delivery outcomes and create incidents that worsen the same delivery measures used to assess value. Inventory is consequently more than an access-control prerequisite. It defines the scope of spending that a FinOps analysis can credibly explain.
How ungoverned agent actions inflate costs without contributing to delivery
The PocketOS incident shows how far agent costs can extend beyond tokens. An AI coding agent deleted a production database and all volume-level backups in a single API call. The data was later recovered, but engineering time, downtime, and remediation costs far exceeded the token expense. Recovery did not make the action productive. A cost model confined to generation would miss the dominant expense of that incident.
Less extreme departures from a task also undermine delivery economics. Scope drift and repeated loops use tokens without getting work done, while destructive actions can add recovery work to the queue. The relevant boundary is the agent’s mandate. Governing that boundary connects behavioral control directly to cost accountability.
Carnegie Mellon and IBM Research’s study of developers building agentic AI products found that developers often constrained autonomy and goal complexity because they lacked mature controls for containing risk. Those are also properties that make agents useful. Teams are left either giving agents too much freedom or manually limiting what they can do, even when those abilities could help ship work. This finding supports a control layer outside the agent’s own task execution, rather than relying solely on developer-side restrictions.
Bluebear Security’s August 2026 position paper on agentic posture vulnerabilities explains why persistent authority needs attention across sessions. The same standing posture can produce a database mutation in one session, a credential transfer in another, and an infrastructure change in a third. Each action may go beyond what the agent was assigned to do. Logs can support reconstruction, but they cannot prevent an action already executed. Preventing this category of waste requires a decision at the moment of action, with audit, warning, approval, or blocking applied as appropriate.
Connecting governance policy to cost accountability: the rollout path that works
The rollout should begin with an audit of every agent, MCP server, and skill on the fleet before policy is set. Spend data gathered from an incomplete inventory is unreliable as a basis for allocation and open to challenge. Discovery establishes the scope of accountability. From that baseline, the sequence moves through warning, approval, and selective blocking, allowing policy to develop with evidence rather than imposing broad restrictions before the activity is understood.
Warnings should surface cost and behavioral anomalies in plain language where developers work, including the terminal and Slack, without blocking execution. This gives developers a way to recognize waste and provide feedback before enforcement becomes binding. The Carnegie Mellon and IBM study found that developers give priority to risks that affect how well agents work and whether users adopt them. Warnings should therefore explain what a specific action may cost or break. The explanation must connect the policy to the task.
A human should approve high-stakes actions before they happen, including destructive terminal commands, production database writes, and external MCP server connections. Blocking should follow only where risk is unambiguous and the cost of false positives is low. Premature blocking can worsen delivery. Once the fleet is inventoried and actions are categorized, chargeback can follow the established traceability chain, allocating cost to merged PRs and resolved tickets instead of treating all token consumption as equivalent.
OneTrust’s 2026 survey found that a third of shadow AI usage arose because people could not get approved tools fast enough. The sanctioned path must therefore remain fast, or developers have reason to route around it. Phasing in enforcement keeps that path open while tackling the bugs, incidents, and rework that raw output metrics miss. Governance should not reduce useful delivery velocity. Its purpose is to redirect token spend already leaving the organization toward work that actually ships.