The Agentic Team Report

Cost Attribution Across Parallel Agent Runs

How to connect agent costs to the work they actually paid for.

· 11 min read
Cover illustration for “Cost Attribution Across Parallel Agent Runs”
Parallel Agent Workflows · October 14, 2026 · 11 min read · 2,455 words

A platform team rolls out internal agents for code review, ticket triage, and content generation, and within a quarter LLM API costs run three times what anyone forecasted. The invoice that lands on the VP of engineering's desk is a single line, with no breakdown by team, feature, or task. This piece solves cost attribution across parallel agent runs, and explains why the tools most teams already have cannot produce it.

Engineering organizations now pay for AI through a mix of seat-based subscriptions, included usage allowances, token-based model charges, usage credits, and autonomous agent runs, often several of these inside a single delivery cycle, each metered on its own terms. "Total AI spend" sounds like one number, but it's actually several incompatible accounting systems stacked on top of each other. Standard LLM dashboards show aggregate model spend well enough, but they cannot say which workflow, which tenant, or which agent role burned through that budget. When agents commit code under a shared service account, or when a session carries no durable identifier tying it back to a task, cost data and engineering work cannot be reconciled, no matter how polished the reporting layer looks. The dashboard isn't broken; it's answering a question nobody in engineering leadership actually asked.

How parallelism and long agentic sessions compound costs

The pricing tables engineers consult when picking a model describe a world that doesn't match how agentic sessions actually run. In a multi-turn session, every API call re-sends the full accumulated context: the system prompt, retrieved files, edit history, prior error messages. Input token volume climbs with each turn while output stays comparatively flat, and input tokens end up driving roughly 85% of total cost. A pricing table built around per-token rates for input and output hides this because it treats each call as independent, when in practice the context an agent carries forward grows the whole time it works.

Parallelism multiplies the effect. Each additional agent running at the same time draws down the shared token quota on its own clock, and each one accumulates its own context independently of the others, so the total consumption isn't additive in any way a simple per-agent estimate would capture. Model choice turns this into a real budget line rather than a rounding error: the gap between a high-cost and a low-cost model on the same agentic workload can represent a substantial share of annual spend for a 25-person team running a realistic volume of sessions per developer per working day. Retry loops make it worse still. When an agent hits a test failure and retries at turn 40, that retry runs at whatever the context size has inflated to by that point, not at the original price, so three failed attempts can cost far more than three times a single attempt's price. None of this appears in a model's advertised rate card; it becomes visible only once sessions run long and agents run in parallel, which is exactly the condition most engineering teams are now operating under.

Why cost and work data live in different systems

The gap between spend and attribution isn't a reporting failure in the sense that someone built the dashboard wrong. Finance sees spend. Model vendors see token consumption. Engineering systems see commits and pull requests. Product systems see features shipped. Every one of those systems is doing its job correctly, and none of them knows that a specific agent run, on a specific model, produced the pull request that shipped a specific feature. That relationship, the join between a cost event and the engineering work it paid for, doesn't exist in any of the four systems by default. It has to be built on purpose.

Attribution used to be simple because AI was purchased like ordinary software: one tool, one line item, one owner, and the seat count answered every question finance might ask. Usage-based, multi-model, multi-agent billing broke that simplicity completely. A workable attribution model now has to connect five layers: origin, meaning who or what generated the cost; work, meaning which ticket, pull request, or feature it supported; output, meaning what got produced and whether it was accepted; outcome, meaning delivery, review effort, rework, and stability; and decision, meaning what the team actually does next with that evidence. A dashboard earns its keep only once it can move one of those decisions. Below that line, it's consumption data dressed up to look like management information.

The schema requirements that make per-run attribution possible: stable identifiers, versioned rate cards, and propagated context

Building that join starts with a stable identifier attached to every unit of agent work, something durable enough to survive a supervisor spawning sub-agents, a checkpoint restore, or a retry at turn 40, so that every cost event downstream can be traced back to one task. Standard observability tooling doesn't hand teams this for free. The OpenTelemetry GenAI conventions don't define tenant, project, or cost center attributes, so teams have to extend the schema themselves with custom attributes and make sure they propagate through W3C Baggage headers, alongside W3C trace context, across every distributed call an agent makes. If that step is skipped, the identifier dies at the first hop between services.

Rate cards need the same discipline. Model pricing changes, context caching changes the effective price of a call mid-session, and any attribution system that hard-codes a rate instead of versioning it will drift out of accuracy the first time a vendor adjusts pricing. None of this is provided out of the box by any platform. It's work a team has to do deliberately, and the teams that skip it are the ones whose cost data and engineering data never end up in the same room.

The two-layer cost model: separating direct measured cost from allocated shared cost

Once the schema is right, direct cost is easy to compute: sum the cost events tied to a given task identifier, and the per-run figure follows cleanly. The harder problem sits one layer up, in shared infrastructure. Vector clusters, embedding stores, and serving capacity benefit every run that touches them, but belong to no single run. A workable model allocates that shared cost proportionally, weighting by each workflow's direct cost instead of splitting it evenly, so a high-consumption pipeline carries a fair share of the overhead it actually drives.

Cache attribution deserves particular attention because it's the kind of error that looks correct until someone checks. A shared system prompt cached by one project's CI pipeline costs more to write the first time. When a second project's pipeline later benefits from that cache hit at a fraction of the cost, naive attribution hands the first project the entire cost and gives the second one a windfall it never paid for. Teams that ignore cache write costs end up under-attributing by a meaningful margin, especially on sessions built around long system prompts or repeated document context. The fix requires tagging at the gateway layer, at the moment of dispatch, since API calls to external model providers don't inherit cloud infrastructure tags the way a cloud-native service would. Project ID, team, pipeline step, and cost center all need to be injected there, booked to exactly one owner, because nothing further downstream will do it automatically.

Why per-workflow budget alerts miss noisy agents

A misconfigured agent that slips into a retry loop can burn through a shared budget before any workflow-level gate even notices. This is the noisy-agent problem, and it's the most dangerous operational consequence of running agents in parallel, precisely because it's invisible to aggregation done at the workflow level. By the time a per-workflow dashboard rolls up enough data to flag the spike, the budget is already gone.

Catching it requires per-call granularity in the cost event stream, not a summary computed after the fact. A per-workflow approach is cheaper to instrument, but it structurally cannot fire an alert in time, because it cannot see the fan-out pattern developing while it's still happening. The usual objection is instrumentation overhead: per-call tracing adds latency and storage cost on top of everything else running. For any production fleet of agents with shared budgets and tenant chargeback obligations, that overhead isn't optional. Per-workflow aggregation can still serve summary reporting, but it cannot substitute for per-call events when the job is catching a regression or a runaway agent in real time.

CI/CD cost gates as a systematic check on attribution regressions

Runtime alerting catches a problem after it starts. A CI/CD cost gate catches it before it reaches production. The gate should reject a deployment if it increases median or p95 per-task token cost by more than 15% against a shadow dataset of synthetic tasks, but only once a stable baseline exists, built over enough days of data. A gate applied before that baseline stabilizes will throw false positives, and a team that gets burned by false positives stops trusting the gate entirely, which defeats the purpose of building one.

The shadow dataset matters because it separates cost regression detection from the ordinary noise of production traffic. A new agent configuration that's genuinely more expensive registers against synthetic tasks before it ever touches a real user, and the signal arrives early enough to act on. This discipline also catches model substitution decisions before they cause damage: if a new model version shifts the cost per task past the gate threshold, that gets flagged before deployment, not after the invoice arrives. That matters directly for any team running a harness-agnostic setup, swapping between Claude Code, Codex, Cursor, Opencode, or whatever model ships next. Model flexibility is only safe at team scale if a gate is checking every substitution for a cost regression before it ships, not after.

What the attribution layer needs from the agent's environment

Every schema requirement and every alert described so far depends on one condition holding: the environment an agent runs in has to guarantee isolation. When multiple agents share a filesystem, a service account, or a network namespace, metadata from one agent's run can bleed into another's, and the task identifier that the whole attribution model depends on loses its integrity. Correct attribution is a property of the infrastructure underneath the tagging, not of good tagging alone.

Each agent run needs its own sandboxed environment: its own VM, its own credentials, its own dependency state, so that tool calls, package installs, browser actions, and service interactions stay scoped to exactly one task identifier and cannot cross into a concurrent run. Self-hosted or customer-controlled infrastructure adds a governance requirement alongside the technical one: every model interaction needs to be logged, auditable, and attributable to a specific authorized identity. The control plane, the orchestration logic, and the model routing all need to stay inside the organization's own visibility boundary. The kind of full analytics that gives a team attribution down to the source, the harness, the model, and the credential for every minute an agent runs, the observability that makes the two-layer cost model something teams can actually act on, depends on the environment itself emitting structured telemetry per run.

This is the condition platforms like Replicas are built around. Each task runs in its own isolated Linux VM, configured with the team's own environment settings, where the agent installs its dependencies and tooling at runtime. The environment boundary and the task identifier boundary become the same boundary: every run is attributable because it was isolated from the start, not because someone reconstructed its history afterward.

Connecting agent runs to pull requests, tickets, and delivery outcomes

Isolation and schema make per-run costs measurable. They don't on their own connect a cost figure to the work it paid for. A per-run cost number that can't be joined to the pull request it produced, the ticket it addressed, or the feature it shipped is still only a consumption number. It becomes a management decision only once it's joined to engineering context, which is the fifth layer of the attribution model described earlier: the decision layer, the one that depends on everything above it actually connecting.

That connection requires agents to be triggered from, and to report back into, the systems where engineering work already lives: Slack, Linear, GitHub, GitLab. An agent running in a separate tool that produces output with no native tie back to the existing delivery record breaks the join before it can even form. When an agent is triggered from a Linear issue or a Slack message and returns a pull request linked to that trigger, the cost event, the task identifier, and the work artifact all share a common key by construction. Replicas is one example of a platform built around this pattern: agents can be dispatched from Linear, Slack, GitHub, or GitLab, so a run's cost ties directly to the ticket or message that started it, reconciled by construction at dispatch. Attribution built in from the start differs from attribution reconstructed by hand after the work is already done.

What engineering leaders can decide once per-run attribution exists

Once cost events join cleanly to pull requests, tickets, and outcomes, AI spend stops being a line item and becomes a decision surface. A team with full attribution can expand the models and harnesses that reliably produce accepted pull requests at reasonable cost, pull budget away from agent configurations that generate heavy review load or repeated rework, and retire tools that consume large volumes of tokens while delivering little usable output. None of those three moves is possible from an aggregate invoice.

The harness-agnostic approach many teams now take, running Claude Code, Codex, Cursor, Opencode, or whatever model comes next, only holds up at team scale if every substitution between those tools is visible in the attribution data. Per-run cost and output tracking turns swapping one model for another into a decision made on evidence. A platform that measures cost-per-delivery separately for each agent configuration can show, directly, that model choice drives a large gap in annual cost, and can point to exactly which configuration is worth dispatching for which kind of task. Attribution also gives the productivity claim something to stand on. A team can move from asserting that AI is making the organization faster to stating that a specific configuration, on a specific class of task, produces merged pull requests at a known cost and a known review load, a claim that can be checked again next quarter and used to defend or challenge further investment.

The VP of engineering who opened this piece with a single-line invoice and no way to explain it is the same VP who, with this architecture in place, can trace that spend to the cost event, the pull request, the ticket, and the outcome it produced. The invoice hasn't gotten any smaller. It's finally become legible.

More in Parallel Agent Workflows