Manage the team and the numbers

Budgeting agent capacity and cost

Agent spend behaves unlike a software licence: it varies with how the work is done, it can rise sharply without anyone approving anything, and the cheapest run is often not the cheapest outcome. This page covers what actually drives the cost, how to budget it, which controls work, and how to compare it against the thing it replaced.

Published September 1, 2026. Editorial.

Key takeaways

  • The cost driver is rarely the model price. It is how much context each attempt carries and how many attempts happen.
  • Budget it as variable delivery cost, reviewed monthly, not as a fixed licence agreed once a year.
  • The cheapest run is not the cheapest outcome. A cheap attempt that fails review twice costs more than an expensive one that succeeds.
  • Compare cost per delivered change over time against your own baseline, not against a vendor's saving claim.

Agent spend is the first engineering cost in a while that behaves like a utility bill: it is variable, it is driven by usage patterns most people cannot see, and it can move sharply without anyone signing anything. Finance teams are not used to that from a development tool, and engineering leaders are often asked to explain a number they have not been given the data to explain.

What actually drives the cost

Three things, in order of size.

Context volume per attempt. Every request carries the conversation, the files read, and the command output. A session that has read forty files is paying for those forty files on every subsequent step. This is why managing context matters: Anthropic's own guidance treats the context window as the most important resource to manage, and recommends clearing between unrelated tasks and using subagents so exploration does not consume the main context [1].

Number of attempts. A task that succeeds on the first try costs once. A task that succeeds on the fourth costs four times, plus the review time on three failures. Most cost overruns we see are attempt counts, not model prices, and the fix for high attempt counts is a better specification and a check the agent can run, which is the whole argument in what done means when an agent writes the code.

Unbounded exploration. An agent told to investigate something without a scope reads hundreds of files. Anthropic names this as a failure pattern and recommends scoping investigations narrowly or delegating them to subagents [1]. It is also the single easiest thing to fix.

Model choice matters, but less than these three, and choosing a cheaper model that needs three attempts is a false saving.

How to budget it

Treat it as variable delivery cost, in the same conversation as infrastructure, and review it monthly against delivery output rather than in isolation.

The number worth tracking is cost per delivered change, meaning total agent spend divided by changes that reached production, plotted over time. It is simple and it measures the right thing: it goes down when the process improves, and it goes up when the team keeps failing and retrying, which is exactly the behaviour you want a budget line to reveal.

Two things to set up early. Attribute spend to a team or a repository rather than to individuals, so the number describes work rather than a person's habits. And set an alert on the rate of change rather than only on the total, since the failure mode is a loop that runs all weekend rather than a slow increase.

Controls that work

Four, with the most effect per hour of setup first.

A hard limit that stops work. A budget cap that stops work rather than sending a notification. Anything that only warns will be exceeded on the day something goes wrong, which is exactly when a loop runs out of control.

Scoped tasks. Small, well-specified units cost less because they need less context and fewer attempts. Everything in decomposing work for coding agents is also a cost control, which is a useful match: the practices that improve quality also reduce spend.

Checks the agent can run itself. An agent that can test its own work can retry and fix it without waiting for a human. Waiting for a human costs a person's attention, which is far more expensive than tokens, and it usually adds a day of delay.

Managing context as a habit. Clearing between unrelated tasks, using subagents for exploration, and keeping the always-loaded instruction file short [1]. Nobody sees this habit, but its effect on the bill is clear.

Do not optimise the wrong number

The most common budget mistake is optimising the model bill while ignoring the two costs that rise when it falls.

The first is engineer time. If a cheaper configuration produces work that takes a senior engineer an extra hour to correct, it is not cheaper by any measure a business cares about. Engineer time remains the dominant cost in almost every team we work with, and agent spend is small next to it.

The second is defect cost. A configuration that releases more defects costs incident time, customer trust and rework, none of which appears on the tool invoice. Compare configurations on delivered outcomes, using the numbers in measure delivery, not generated output, rather than on spend alone.

Comparing against what it replaced

Leaders are frequently asked to show the saving. Two honest positions are available, and a third one that is not.

The honest positions: report cost per delivered change against your own historical baseline, or report the total engineering cost of a comparable piece of work before and after, stating clearly what else changed in between. Both are defensible and both are approximate, because the work is never identical.

The position that is not honest is quoting a percentage saving from a vendor, or extrapolating from one project to a company-wide figure. There is a reason we describe our own pricing as a mechanism rather than a number: we use AI instead of hiring more engineers, so the same build takes a smaller team, and that saving goes into the client's price. That is a description of how it works, and it is stated without a percentage because no percentage has been measured.

When the bill jumps

It will, and the response is usually the same four checks in the same order.

Look at attempts before anything else. A jump is far more often a task that ran twenty times than a price change, and the twenty attempts have a cause: a specification that was not checkable, a check the agent could not run, or a goal it could not reach because something in the environment was broken. Fixing that cause is cheaper than any configuration change.

Then look for the unbounded run. An investigation with no scope, a loop with no exit condition, or a job that retried all weekend produces a sudden jump in the bill rather than a slow rise. This is what the hard limit is for, and if the jump happened it means the limit only warned.

Then look at context. A session that reads the whole repository before every task pays for it every time, and the fix is managing context: clearing between unrelated tasks, delegating exploration, and keeping the always-loaded file short [1].

Only then look at model choice and pricing, which is where most people start. It is the smallest of the four in almost every case we have examined, and changing it while the first three are unaddressed just moves the same waste to a cheaper unit price.

The forecasting problem, stated plainly

Agent spend is hard to forecast twelve months out, and anyone who tells you otherwise is guessing. Prices change, model efficiency changes, and your own usage patterns change as the team learns. What you can do is limit the risk: set a hard limit that stops work, review monthly, and keep the spend attributable so a jump can be explained rather than simply paid.

That is a less satisfying answer than a spreadsheet, and it is the accurate one.

The question to bring to a budget conversation

Finance does not need to understand tokens. It needs to know three things, and they are all answerable.

What is the limit, and what happens when it is reached. If the answer is that work stops, the risk is limited and the conversation is short. What drives the number up, in business terms rather than technical ones: more projects running at once, and work that was specified badly enough to need several attempts. And what is being bought, expressed as cost per delivered change against the same figure six months ago.

Framed that way, agent spend is an ordinary variable cost with an unusual name. The mistake is presenting it as a strategic technology investment that cannot be measured, which invites either an unlimited budget nobody controls or a cap set low enough to slow the team down for no saving worth having.

Where this connects

Cost follows from practice. Well-scoped work with checks the agent can run is cheaper, faster and better, which is the argument running through decomposing work and the definition of done. The delivery numbers that tell you whether spend is buying anything are in measure delivery, not generated output, and the broader question of what software costs to build this way is the software development cost guide. The main guide has the full model.

Best for

  • Treating agent spend as variable delivery cost, reviewed monthly against delivered changes
  • A hard budget limit that stops work rather than sending a notification
  • Attributing spend to a team or repository so a jump can be investigated

Avoid if

  • You are choosing a cheaper configuration that needs more attempts or more correction from a senior engineer
  • The comparison is against a vendor's claimed saving rather than your own baseline
  • Spend is being mixed into the delivery scorecard, where a drop can look like an improvement while releases fall

Check before you decide

  • Confirm the limit stops work when reached, since a limit that only warns is exceeded exactly when something has gone wrong
  • Track cost per delivered change over time rather than total spend
  • Check the attempt count on expensive tasks before blaming the model price

Common questions

What actually drives AI agent costs on a software project?

Context volume per attempt, the number of attempts, and unbounded exploration. A session that has read forty files pays for those files on every subsequent step, and a task that succeeds on the fourth attempt costs four times plus the review time on three failures. Model price matters less than any of these.

How should agent spend be budgeted?

As variable delivery cost reviewed monthly, in the same conversation as infrastructure, rather than as a fixed annual licence. The number worth plotting is cost per delivered change: total spend divided by changes that reached production. It falls when the process improves and rises when the team keeps failing and retrying, which is what a budget line should reveal.

Is a cheaper model always cheaper overall?

No. A cheaper configuration that needs three attempts, or that produces work taking a senior engineer an extra hour to correct, costs more by any measure a business tracks. Engineer time remains the dominant cost in most teams, and agent spend is small beside it, so optimise the total rather than the invoice.

How do we prevent a runaway agent bill?

Set a hard limit that stops work rather than sending a notification, because a limit that only warns gets exceeded exactly when something has gone wrong. Then alert on the rate of change rather than only the total, since the real failure mode is a loop running all weekend instead of a slow increase.

Does better engineering practice reduce agent cost?

Directly. Small, well-specified units need less context and fewer attempts, and a check the agent can run lets it retry without waiting for a human, which costs attention and a day of delay. The practices that improve quality are the same ones that reduce spend, which makes the trade-off unusually easy.

Should agent spend be attributed to individual engineers?

No, attribute it to a team or a repository. Individual attribution turns a cost line into a performance metric, which changes behaviour without improving delivery. Team-level attribution still lets you investigate a jump, which is the only operational reason to break the number down at all.

How can we show what AI-native development saved us?

Two honest options: cost per delivered change against your own historical baseline, or the total engineering cost of comparable work before and after, stating what else changed in between. Quoting a vendor percentage or extrapolating from one project to a company-wide figure is not evidence, however confident the source sounds.

Why is context management a cost issue and not just a quality issue?

Because every request carries the conversation, the files read and the command output, so a long session full of old material pays for its history repeatedly. Anthropic treats the context window as the most important resource to manage and recommends clearing between unrelated tasks and using subagents for exploration, which lowers both the error rate and the bill.

Can agent spend be forecast a year ahead?

Not reliably, and anyone presenting a confident twelve-month figure is guessing. Prices change, model efficiency changes, and your own usage patterns change as the team learns. What you can do is limit the risk: a hard limit that stops work, monthly review, and attribution good enough to explain a jump.

Where does agent spend belong in engineering reporting?

Next to the delivery metrics, not inside them. Keeping it separate stops a spending reduction being read as an improvement when it actually came from releasing less. Report cost per delivered change alongside throughput and stability so the three can be read together.

Start a project