The short version
Coding agents are the largest agentic AI system most companies already run, and most companies measure them as a seat count and an invoice. Point the agents' native OpenTelemetry feed at one backend, carry the session ID onto each commit, and you get the number that matters: cost per merged change, by team.
The biggest AI system you run is one you don't own
This note started with a suggestion from Andrew Lee at AWS, who read a draft of my book's reference architectures and made the case that the coding-agent fleet belonged alongside them as a pattern in its own right. He was right, and the argument is simple: in most organizations the coding agents on developer laptops are the largest agentic system in production and often the largest generative line on the bill, and almost nobody measures them like a system.
Claude Code, Cursor, OpenAI Codex, and GitHub Copilot are agents in every sense that word carries in enterprise AI. They plan, call tools (the editor, the shell, a test runner, MCP servers), spawn subagents, and iterate until the task is done. The difference from every other AI system you run is that the loop belongs to the vendor. You cannot add a span to it, compress its prompt, or route its calls to a cheaper model. What you can do is observe it, because the harness emits telemetry.
Ignoring generative AI for coding is not an option anymore. The 2025 Stack Overflow survey put AI tool use at 84 percent of developers, and the enterprise seat licenses that followed put an agent loop on every workstation whether or not anyone decided to run one. The question for leadership is not whether to allow it; it is whether to measure it, and by what.
Three things make a fleet different from everything else you measure
The unit of work is a session, not a request. One developer's task runs for minutes to hours across dozens or hundreds of model calls, with tool results and subagent output fanning the token count out in ways no single prompt shows. Per-request dashboards built for a chatbot tell you nothing here.
The context tax is the bill. Instruction files (CLAUDE.md, AGENTS.md), skill definitions, MCP server manifests, and the working tree are re-sent on every turn. The prompt cache that absorbs that cost is the single largest lever on the invoice. A fleet whose cache hit rate slides from 80 percent to 60 percent has had its price raised by roughly a third, with no change in the work done.
The outcome lands somewhere else. What a session produced is a pull request, a passing CI run, a closed ticket. None of those appear in the harness's telemetry. Until each session is joined to them, the fleet is observable only as a bill.
Until each session is joined to the change it produced, the fleet is observable only as a bill.
One feed, four audiences: the architecture
The diagram below is the generalized shape. Telemetry is born on developer laptops and CI runners, passes through a collector that stamps identity, lands in whichever OTLP receiver you already pay for, gets joined to the systems of record, and is displayed four different ways to four different audiences. Every box in the right-hand column reads the same feed.
Scroll sideways to see all four columns →
Three paths carry telemetry off a workstation, and only one of them suits a fleet.
Native OpenTelemetry export is the enterprise path. Claude Code emits OTLP metrics (claude_code.token.usage, claude_code.cost.usage, claude_code.session.count) and events for tool results, edit decisions, and permission prompts, straight to a collector or to a cloud OTLP endpoint. Identity arrives as resource attributes (user.email, team.id, department, cost_center) stamped by managed settings at the source, so every dashboard downstream can slice on them without a lookup table. Codex and Copilot expose comparable streams and admin APIs.
Who receives that feed is a choice you have mostly already made. On AWS, Amazon CloudWatch's Coding Agent Insights consumes it over the CloudWatch OTLP endpoint and ships fleet dashboards for Claude Code, Codex, and Copilot out of the box; the AWS Cloud Operations team documented the direct-to-endpoint path and the resource-attribute identity scheme in their CloudWatch and OpenTelemetry write-up this summer. Grafana Cloud has a Claude Code integration, Datadog has its Agent Console in preview, Honeycomb and SigNoz take the feed as ordinary OTLP, and Dash0 adds spans and pull-request linkage. If you would rather hold the data yourself, a self-hosted store such as ai-observer, or ClickHouse behind an OpenTelemetry Collector, works the same way. The receiver is a procurement decision; the feed is identical.
The hook path is different in kind. The harness fires a callback on each tool call, a policy engine evaluates it, and findings (a blocked shell command, a secret that nearly left the machine) flow to the SIEM or to an OpenTelemetry sink. Prismor and Kodem sell control planes for this; you can also write your own. It is the only path on which something can act rather than report, which is why it matters for the security note that follows this one.
Session files are the third path, and it is the one I had wrong in the first draft of this note. Every harness writes a session file to the developer's disk, and tools such as ccusage, CodeBurn, and agentsview read those files to give one developer an accurate picture of their own spend, cache behavior, and cost per session, with nothing leaving the machine. For ccusage and agentsview that is where it ends: the right tool for the individual and a dead end for the fleet. CodeBurn can go further. AWS's PRISM D1 Velocity sample runs codeburn sync push on a twelve-hour schedule, batching the session data as OTLP into a collector that lands it in S3 and DynamoDB and feeds CloudWatch and QuickSight dashboards per user, per tool, and per team. Batch push is not the live stream the native export gives you, and PRISM is a reference implementation rather than a product, but it shows the path: session files aggregate once something pushes them.
The same numbers, climbing the ladder
The right-hand column of the diagram is the part most architecture drawings skip, and it is the part that decides whether the telemetry changes anyone's behavior.
At the bottom, the developer's terminal shows this session's tokens, cache reads, and cost so far; a status line or an editor HUD such as Claude Code Prism is enough. One rung up, the team dashboard in Grafana, CloudWatch, or Datadog shows cache hit rate, tokens per session, tool calls by tool, and subagent fan-out, which is where an engineering manager notices that one squad's sessions got 40 percent more expensive the week after someone edited the instruction file. Above that, FinOps reconciliation puts the harness's own cost estimate next to the invoice; the two will disagree, because the harness prices from list and finance pays seat plus metered plus API, and the monthly reconciliation is where that gets settled. At the top, the executive scorecard carries one line per team: cost per merged change, rework rate, unattributed share.
Same feed, four audiences. If your fleet telemetry stops at the team dashboard, the executive still sees only the invoice, and the invoice is the one view that cannot tell good spend from bad.
The join is the only engineering you have to do
Everything above is configuration: switch on the export, point it at a backend, stamp the resource attributes. The one piece of actual engineering in the pattern is small and entirely yours: the harness's session identifier has to travel with the commit, usually as a commit trailer or a pull-request label written by the same managed settings that stamp identity. Without that one field there is no join. PRISM D1 does it with a prepare-commit-msg git hook that writes the AI tool and the tokens consumed since the last commit as trailers on every commit, which is as simple as the mechanism gets. With it, a join tool such as XTrace, Dash0's pull-request linkage, or about sixty lines of SQL against your warehouse produces the fleet's four measures that hold up:
- Tokens per merged change, compared within the same kind of work. A documentation fix and a schema migration do not cost the same and should not be averaged together.
- Rework rate: the share of merged changes reverted or substantially rewritten within thirty days.
- Review rounds per change, which is where agent-written code that reads well but reasons badly shows up first.
- Unattributed share: the fraction of spend that attached to no merged change at all. This is the fleet-scale form of an agent that is busy without making progress, and it is the number I would look at first.
A note on story points, because it is the first question a CFO asks. If your teams already size work in points, the join gives you tokens per story point for free; the ticket is in the systems of record and the session ID is on the commit that closed it. It is a reasonable normalizer for the like-for-like problem above, with two cautions that predate AI. Points are team-relative, so never compare them across teams. And they inflate the week they become a target; a team that learns its agent spend is judged per point will size a two into a five by the next sprint. Use points to compare a team with itself over time, and use merged changes and rework rate to compare teams with each other.
An illustrative 200-developer fleet (your numbers will differ)
The economics: cache hit rate moves the bill more than model choice does
Treat the numbers above as a shape, not a benchmark. The shape is what matters. Vendors price cache reads at a steep discount to fresh input, on the order of ten cents on the dollar, and a coding session re-sends the same instruction files and working tree on every turn. So the effective price of a session is set less by the model's list price than by how much of each turn is served from cache. Two teams on the same model and the same seat plan can pay very different per-change costs because one of them edits CLAUDE.md every morning and invalidates the cache for the whole squad.
That is also why the vanity metrics mislead. Lines of code accepted rewards verbosity and says nothing about whether the change survived review. Seat utilization rewards activity. Edit acceptance rate rewards agreeable developers. All three are the busy half of busy-without-progress. The measures that hold up are the ones the join produces, and they are the only ones that let you tell a team that is spending well from a team that is spending.
| Metric | What it actually rewards | Use instead |
|---|---|---|
| Lines of code accepted | Verbosity; says nothing about survival through review | Tokens per merged change, within work type |
| Seat utilization | Activity, including activity that produces nothing | Unattributed share |
| Edit acceptance rate | Agreeableness; near 100 percent is a warning, not a win | Rework rate and review rounds per change |
| Monthly invoice | Nothing; it cannot tell good spend from bad | Cost per merged change by team, reconciled to the invoice |
| Harness cost estimate alone | List prices; disagrees with finance by design | Monthly reconciliation of seat, metered, and API spend |
| Cost per story point, across teams | Whichever team sizes most generously | Tokens per story point within a team, tracked over time; merged changes and rework rate across teams |
One caveat that governs every dollar figure here: flat-rate seats, metered overage, and pay-as-you-go API billing coexist inside a single fleet, and the harness's own cost metric is computed from list prices, not read from an invoice. The reconciliation is not optional. The fleet is simply one more row in it, and usually the largest.
Two of these numbers are oversight signals, not productivity signals
A developer working with a coding agent is a reviewer. The harness proposes an edit and the developer accepts or rejects it; the harness asks permission for a tool call and the developer grants or denies it. An edit accept rate approaching 100 percent while the time between proposal and acceptance collapses is the rubber-stamp signature, now with a two-hundred-line diff where a twenty-second review used to be. A permission denial rate falling to zero across a team usually means someone configured the harness to auto-approve everything and removed the human from the loop. Both come out of the same feed; read them as a review queue, not as a leaderboard.
Next note: when the code the agent wrote is the risk
Everything in this note is about performance and cost. The same architecture carries a second job I have deliberately left for the next note: the cyber side. AI-written code ships at a volume no review process was sized for, and the hook path in the diagram is the one place where an organization can check, as the calls happen, that the agent is not writing a dependency it should not, reaching a host it should not, or committing a secret it should not. Observational AI applied to the fleet's own output, with the permission decisions, the policy findings, and the diffs joined to the same session IDs, is how you check that code written by an AI does not do bad things. That is the next note.
For now the ask is smaller. Switch on the export. Pick the receiver you already pay for. Put the session ID on the commit. Then look at unattributed share by team and ask the team with the highest number what their sessions were doing.
Where this lands on the four pillars
Key takeaways
- The coding-agent fleet is the largest agentic AI system most organizations already run; the loop belongs to the vendor, so the only lever is what you observe.
- Native OpenTelemetry export with identity stamped as resource attributes is the collection path that scales; hooks are for control; session-file readers stay local unless something pushes them, as PRISM D1 does with CodeBurn.
- Prompt cache hit rate moves the bill more than model choice; a slide from 80 to 60 percent is roughly a one-third price increase for the same work.
- Carry the session ID onto the commit and report tokens per merged change, rework rate, review rounds, and unattributed share by team; drop lines accepted and seat utilization.
- Same feed, four audiences: developer terminal, team dashboard, FinOps reconciliation, executive scorecard. If it stops at the team dashboard, leadership still only sees the invoice.
Field Notes by email
Get the next note in your inbox.
One email per article, no more than a few a month. Unsubscribe in one click.
Delivered by Buttondown. Prefer a reader? RSS feed.Want a second set of eyes on your AI stack?
Brian Ray LLC helps leadership teams pick the right tools, cut token spend, and design deployments that hold up under scrutiny.
Start a conversation
Discussion
Comments run on Giscus, backed by GitHub Discussions. A GitHub account is required to post; nothing is tracked beyond that.