A tool call is a metered event

Claude Code and tools like it are usually described in terms of what they let a developer do: read a codebase, run tests, open a pull request, delegate a side task to a subagent, react to a webhook while the developer is away. Every one of those actions is also something else, less visible and more consequential for how much of this work can actually happen: a metered event. A tool call sends tokens to an inference cluster, occupies accelerator memory for as long as it takes to produce a reply, and returns a result that itself becomes tokens the next turn has to carry. None of that is abstract. Each step has a price set in a published pricing table, a joule cost nobody publishes for this specific case, and a ceiling set by how fast memory can move bytes on the hardware actually serving the request.

This article is about that meter, not about whether agentic coding tools work. It asks three separate questions and keeps them separate throughout: what a task like this actually costs in dollars, given how these systems are billed; what it costs in energy, to the extent that can be estimated at all from public information; and what physically stops the number of such tasks from growing without limit, independent of anyone’s budget. The three questions have different kinds of answers. The first has a documented, checkable answer, because Anthropic publishes exact pricing tables and Claude Code publishes its own token-usage accounting [1, 3]. The second has only a partial, order-of-magnitude answer, because no vendor discloses joules per Claude Code session, and the closest public disclosures come from other companies’ other products, cited here only for scale, never as a stand-in for Claude’s own footprint. The third is the most durable of the three, because it follows from memory bandwidth and electricity supply rather than from any pricing decision.

What follows tries to keep fact, vendor claim, independent analysis, illustrative scenario, and dated prediction visibly separate at every step, because the economics of agentic coding are exactly the kind of subject where those categories get quietly collapsed into one confident number.

ADVERTISEMENT
A pulse-output electric meter mounted beside a billing-mediation terminal block, its indicator LED caught mid-flash the instant before a wire lead carries the pulse onward to the register
Figure 1. A token is billed the moment it is produced, the same way a utility meter turns one unit of consumption into a line on an account before any bill is printed.Image prompt and art direction by Brecht Corbeel; generation pending.

What a single turn actually bills

Anthropic prices the underlying Claude models per million tokens, separately for input, output, and two cache operations, and the published table is unambiguous enough to reason from directly. Claude Sonnet 5, the tier most Claude Code sessions default to, lists at two dollars per million input tokens and ten dollars per million output tokens; a cache read costs one tenth of the base input rate, a five-minute cache write costs one and a quarter times it, and a one-hour cache write costs twice the base rate [1]. Prompt caching is not a footnote to this pricing: Claude Code turns it on automatically, because an agentic session is close to the workload caching was built for — a growing transcript resent, nearly unchanged, on every turn [2].

Two structural consequences follow directly from that documented pricing, and they are analysis, not disclosure, since Anthropic states the multipliers but does not publish this derivation. Model a session as a sequence of turns. At turn i, the agent resends the accumulated transcript, c sub i-minus-one, as a cache read; adds a batch of new tokens, delta sub i, as a cache write, from a tool result or a newly opened file; and produces o sub i output tokens. Writing p-in and p-out for the base input and output prices, the billed cost of that turn is

Ci=0.1pinci1  +  1.25pinΔi  +  poutoi,ci=ci1+Δi. C_i = 0.1\,p_{\mathrm{in}}\,c_{i-1} \;+\; 1.25\,p_{\mathrm{in}}\,\Delta_i \;+\; p_{\mathrm{out}}\,o_i, \qquad c_i = c_{i-1} + \Delta_i.

Summed across an N-turn session, the accumulated-context term is a triangular sum that grows in proportion to the square of the turn count whenever new context arrives at a roughly steady rate, even though every token in it is billed at a ninety percent discount. Doubling the length of a session does not double its context-carrying cost; holding the per-turn addition fixed, it roughly quadruples it. This is an accounting identity that follows mechanically from the documented multipliers, not a measured benchmark, and it matches what Anthropic’s own guidance says qualitatively about why usage climbs in a long session: the full conversation is resent with every request, and each tool call adds another such request carrying that batch of results, so a one-line question in a session left open all day still draws usage for the whole conversation behind it [3]. The discount makes long sessions affordable turn to turn; it does not make them cheap in aggregate, because the thing being discounted is itself growing.

A second, independent tax applies before any of that: declaring a tool costs tokens whether or not the tool is ever used. Anthropic’s pricing documentation itemizes this precisely — a bash tool definition adds on the order of two hundred fifty to three hundred twenty-five input tokens per request beyond the standard tool-use overhead, a text editor tool adds roughly seven hundred, and the newer computer-use and browser-use toolsets add on the order of four thousand five hundred and six thousand six hundred tokens respectively just to declare the actions each one makes available [1]. None of that is the work; it is the fixed cost of the agent being capable of doing the work, paid on every request regardless of outcome.

Delegation multiplies the meter, not just the work

Every mechanism Claude Code offers for delegating work — subagents, MCP-connected tools, hooks, agent teams — changes the shape of the meter as much as it changes the shape of the work. None of them are free abstractions; each is a specific, documented trade of one kind of token spend for another.

ADVERTISEMENT

A subagent’s headline benefit is architectural: it runs in its own, isolated context window, so verbose output that would otherwise flood the main conversation — logs, search results, a large file’s contents — stays inside the subagent and only a summary returns [5]. That isolation is also a cost, because a non-forked subagent starts from nothing and may need to re-read files or re-establish context the main conversation already had; Anthropic’s own documentation frames this explicitly as a trade of fresh startup cost against long-term context savings, not a free win in either direction [5]. The clearest evidence for how large that trade can run comes from Anthropic’s account of building its own multi-agent research system: agents were reported to use roughly four times the tokens of an ordinary chat interaction, and a full multi-agent configuration roughly fifteen times, with token usage alone accounting for eighty percent of the variance in one evaluation’s outcomes [8]. That is a vendor’s own account of its own system, offered as an engineering finding rather than an audited third-party benchmark, but it is a rare case of a vendor publishing the actual multiplier rather than leaving it to be inferred, and Claude Code’s own cost documentation reports a comparable order of magnitude for its agent-teams feature — roughly seven times the tokens of a standard session — because each teammate keeps a fully separate context window running until it exits [3].

MCP servers add a different kind of overhead: each connected server can expose many tool definitions, and every one of those definitions occupies context whether or not it is ever invoked. Claude Code’s stated mitigation is to defer full tool definitions by default, loading only names and short server instructions into context until a specific tool is actually used [7]. Hooks sit on the other side of the ledger: because a hook executes as a deterministic shell command, HTTP call, or pre-connected tool invocation rather than as a fresh pass through the model, it can filter or summarize data before the model ever sees it — Anthropic’s own worked example shows a hook reducing a ten-thousand-line test log to the handful of lines that actually failed, before any of it becomes billable context [6]. The same delegation machinery that multiplies spend in one configuration is what removes it in another; which one applies is a design choice made per task, not a fixed property of the tool.

A branch-circuit power-distribution unit feeding a compute rack, one outlet's digital current readout caught mid-refresh as it climbs while neighbouring outlets sit at a steady lower draw
Figure 2. A subagent fanning out into parallel tool calls draws on the same shared capacity as the rest of the rack; the fan-out shows up on the meter before it shows up on any invoice.Image prompt and art direction by Brecht Corbeel; generation pending.

Memory, context, and the cost of remembering

Memory is usually framed as a capability question — does the agent remember what it was told yesterday — but it is exactly as much a cost question, because everything Claude Code remembers is context it pays to load again. CLAUDE.md files and the auto-memory notes Claude writes about a project are both loaded at the start of every single session, not on demand [4]. That is precisely why Anthropic’s own guidance sets an explicit budget on both: it recommends keeping a CLAUDE.md file under two hundred lines, stating plainly that longer files consume more context and reduce how reliably Claude follows them, and it caps the auto-memory index file at two hundred lines or twenty-five kilobytes, whichever comes first, dropping anything past that threshold from the next session’s load rather than letting it grow unbounded [4]. A memory system with no budget would not merely be slower; under the pricing model above, its fixed per-session tax would compound every single time it is paid.

The cache that makes all of this affordable turn to turn is itself a perishable resource, and its expiry is where a second, easy-to-miss cost appears. The default cache lifetime is five minutes on an API key basis, extending to an hour on a subscription plan; the first message after a gap longer than that lifetime misses the cache entirely and reprocesses the full accumulated context at the uncached rate [3, 2]. A session left open overnight and picked back up the next morning does not resume where the discount left off; it pays the full, undiscounted price for everything it is about to resend, once, before caching resumes. Compaction, the mechanism that summarizes old history once a session’s context approaches its limit, is not exempt from this either: reading the conversation it is about to compress is itself a large billed request, so the fix for a context that has grown too expensive to carry is, for one turn, more expensive than simply carrying it further [3]. None of this is a flaw exclusive to Claude Code; it falls directly out of billing a growing transcript at a discount rather than not billing it at all, and it means the practical lever for controlling a session’s cost is the same lever that controls what the agent remembers: how much gets carried forward, and for how long.

A mechanical rolling-demand meter with its indicating pointer caught mid-sweep past the drag pointer's previous high mark, the drag pointer still sitting at the old position
Figure 3. A session's billed context is a rolling peak, not a running total; each re-read of a growing transcript resets what the next one has to carry past.Image prompt and art direction by Brecht Corbeel; generation pending.

The energy behind the meter

Nothing above says anything about energy, and that gap is real rather than an oversight in this article: Anthropic does not publish a joules-per-query or joules-per-session figure for Claude models, and neither do most frontier labs. What exists instead is a small number of disclosures from other companies about their own systems, useful only for establishing scale, never as a substitute number for Claude Code’s own footprint, which depends on a different model, a different serving stack, and a different mix of hardware that none of these figures describe.

The most detailed such disclosure comes from Google, about its own Gemini apps: it reports a median text prompt consuming roughly zero point twenty-four watt-hours, with tensor processing units contributing the majority of that figure and the remainder split across host compute, reserved failover capacity, and data-center overhead, and it further reports that this median figure fell by a factor of roughly thirty-three over a single year as serving efficiency improved [10]. That is a vendor’s own account of its own measurement methodology for its own product, not an independent audit and not a number that transfers to any other company’s model or infrastructure; it is cited here only to establish that one ordinary chat exchange, at hyperscale efficiency, sits in the range of a fraction of a watt-hour, and that such figures have been falling quickly as an engineering matter rather than staying fixed. An agentic coding turn is a different shape of workload than the median chat prompt this figure describes — longer context, tool-use overhead, typically more output — so treating even this order-of-magnitude figure as a Claude Code equivalent would be exactly the kind of unsupported cross-vendor transfer this article is trying to avoid.

ADVERTISEMENT

Independent, peer-reviewed measurement broadly supports the idea that these totals vary enormously rather than clustering near one number. Luccioni, Jernite, and Strubell measured energy per inference across a range of deployed model architectures and task types and found spreads across roughly two orders of magnitude between the smallest and largest systems tested, driven by model size and by whether a task uses a general-purpose generative model where a smaller, task-specific one would do [11]. Applied to agentic coding, the implication is structural rather than numerical: whatever a single inference call costs in energy, a session that Anthropic’s own account puts at four to fifteen times the token volume of an ordinary exchange should be expected to cost a comparable multiple in energy, for the same reason it costs that multiple in dollars — it is the same meter.

At the level of the electricity system rather than the individual query, the trend is measured rather than estimated. The International Energy Agency reports data-center electricity consumption at roughly four hundred fifteen terawatt-hours in 2024, projects this more than doubling to around nine hundred forty-five terawatt-hours by 2030, and attributes the acceleration specifically to AI-driven demand growing at roughly thirty percent a year against nine percent for conventional data-center load — and it names, as a fact rather than a forecast, that data centers concentrate geographically in a way that makes their integration into a local grid harder than an equivalent amount of more distributed demand, such as electric vehicles [12]. Whatever any individual coding session costs, it draws on a supply that is itself growing unevenly and running into siting and interconnection constraints independent of how efficient any one model becomes.

What physically bounds how much of this can run

Underneath all of the pricing mechanics sits a constraint pricing cannot remove: generating one token from a large language model is, for most of a request, bound by how fast bytes can move through accelerator memory rather than by how much arithmetic the accelerator can perform. Producing each token requires reading the model’s active weights and the accumulated key-value cache for that request from memory once; the arithmetic performed per byte read is low, so decoding is memory-bandwidth-bound while only the initial processing of a long prompt is compute-bound, a distinction Pope and colleagues formalized in their analysis of transformer inference efficiency [15]. Approximately,

ttoken    2Nactiveβ+KV(c)BW, t_{\mathrm{token}} \;\gtrsim\; \frac{2\,N_{\mathrm{active}}\,\beta + \mathrm{KV}(c)}{\mathrm{BW}},

where N-active is the number of parameters actively read per token, beta the bytes each occupies at the serving precision, KV of c the memory footprint of the key-value cache at context length c, and BW the accelerator’s memory bandwidth. Nothing about pricing changes this floor; it only changes which side of it a given task sits on. Kwon and colleagues showed that KV of c is frequently larger than it needs to be in practice, because conventional cache allocation reserves memory contiguously and wastes much of it to fragmentation, motivating the PagedAttention scheme that manages key-value memory the way an operating system manages virtual memory, in fixed-size pages rather than one contiguous block per request [16]. That is an engineering fix for waste inside the bound, not a repeal of the bound itself: a longer agentic session, carrying more context turn over turn in exactly the way the earlier accounting model describes, grows the key-value footprint and therefore grows the minimum time every subsequent token in that session can take, independent of price.

A second kind of physical bound is administrative rather than architectural, but it behaves like one in practice: Anthropic meters Claude Code usage on subscription plans against a rolling five-hour session window and a separate weekly window, both shared across models, that reset on a schedule rather than a token budget the caller can spend down predictably [9]. On the API side the mechanism differs but the effect is the same — Anthropic’s own guidance for provisioning Claude Code across a team recommends token-per-minute and request-per-minute allowances that shrink sharply as the team grows, from roughly two to three hundred thousand tokens per minute per user for a team of five, down to ten to fifteen thousand for an organization of five hundred or more, on the stated assumption that fewer users work concurrently as an organization scales [3]. That is a provisioning heuristic, not a law of physics, but it functions as a hard ceiling from the point of view of any one session: a burst of parallel subagent activity that exceeds it is throttled or denied regardless of the balance in anyone’s account. Between the memory-bandwidth floor on a single token and the rate ceiling on a whole team’s concurrent sessions, the amount of agentic coding work that can run in a given window is bounded well before it becomes unaffordable.

A row of moulded-case circuit breakers with one handle caught mid-throw at its trip point, the toggle half out of its detent while its neighbours sit firmly set
Figure 4. A rate limit behaves like a breaker, not a suggestion; once a session's draw crosses the threshold, supply is interrupted rather than merely discouraged.Image prompt and art direction by Brecht Corbeel; generation pending.

Verification is a metered step too

Nothing above accounts for the cost of finding out whether an agentic session’s output was actually correct, and that step is not free by construction. Claude Code’s documented cost-reduction advice is explicit that verification and course-correction consume tokens directly: plan mode, which has Claude explore and propose an approach before any edit, is recommended specifically because it prevents expensive re-work when the initial direction is wrong, and giving the agent verification targets — tests, expected output, a screenshot to compare against — is recommended so mistakes are caught before a human has to ask for a fix, which is itself a way of moving verification earlier and cheaper rather than removing it [3]. Hooks can make part of this verification deterministic rather than model-driven, and therefore cheap: a PreToolUse hook can block or rewrite a command before it runs at all, enforcing a rule regardless of what the model decides, at the cost of a shell script rather than another pass through the model [6].

The reason this line item is growing rather than shrinking is a documented trend in what agents are being asked to do autonomously between checkpoints. METR’s measurement of the length of software task, expressed as the duration a human professional would need, that frontier models can complete autonomously with fifty percent reliability found this duration doubling roughly every seven months across six years of models, a trend the authors describe as remarkably consistent, though they caution that even a ten-fold error in their own measurement would shift the extrapolated timeline by only about two years [13]. That is a measured trend in capability, not a statement about verification cost, but the two are connected by construction: the longer a task an agent is trusted to run before a human looks at the result, the more it can have gone wrong in the interval, and the more a single verification pass has to cover. A check that once accounted for a few minutes of autonomous work now has to account for a proportionally longer, and more expensive, stretch of unsupervised action — the check has to scale with what it is checking, the same way a meter’s own reading is only as good as the last time it was checked against an independent standard.

A meter calibration test bench with a revenue meter under test wired beside a rotating reference standard, the standard's spinning disc caught mid-blur as the comparison runs
Figure 5. What a system reports about its own consumption is trusted only after it is checked against an independent standard; verification is a separate, metered step, not a property a reading carries on its own.Image prompt and art direction by Brecht Corbeel; generation pending.

The price curve, and where the disagreement actually is

A single, clean claim about the direction of these costs does not survive contact with the actual data, and the honest description is a tension rather than a verdict. Epoch AI’s tracking of inference pricing over time finds that the price of reaching a fixed capability bar has fallen extremely quickly — by their account, achieving a fixed level of performance on a graduate-level science benchmark cost roughly sixty dollars per million tokens when the earliest models able to reach it launched, and a few cents per million tokens today, with different capability thresholds showing decline rates spanning roughly nine-fold to nine-hundred-fold per year [14]. That is a real and large effect, and it is the basis for any claim that agentic coding is getting cheaper over time.

The same source is explicit about the other half of the picture: while the price of a fixed capability tier keeps falling, the cost of running whatever counts as the frontier model at any given moment has been rising, on the order of three-fold to eighteen-fold a year by their own estimate, because each generation’s marginal capability gain increasingly comes from spending more inference computation per answer rather than from a cheaper model reaching the same bar [14]. Both statements are true at once because they fix different things: one fixes a capability level and asks what it costs over time; the other fixes whatever is newest and asks the same question. A team that pins its agentic workflow to a specific, unmoving capability bar should expect its bill to keep falling. A team that always adopts the newest frontier model, for the reasoning or context-length gains that come with it, should expect the opposite, and there is no way to average these two facts into one number without erasing the distinction that makes them both correct.

Predictions, with the observations that would falsify them

These are forecasts, kept explicitly separate from the sourced analysis above. Horizon: the twenty-second of August, 2029.

One. Discounted re-use of context — the caching mechanism this article’s cost model is built on — will keep expanding rather than being displaced by falling base prices, because it is structurally the cheapest available lever for exactly the workload agentic coding produces: long sessions that resend a growing, mostly unchanged transcript. Disconfirmed if a major provider removes or substantially narrows its cache-read discount while base per-token prices fall by a comparable margin, making caching no longer the dominant saving relative to just-cheaper tokens.

Two. Teams running agentic coding tools at scale will shift their primary cost metric from spend per million tokens to spend per completed, accepted unit of work — a merged change, a resolved ticket — because token-denominated cost cannot by itself distinguish an efficient session from one that used fifteen times the tokens of a chat exchange and still failed. Disconfirmed if, by the horizon date, mainstream cost-tracking tooling from major vendors still reports primarily in token or dollar terms with no outcome-normalized metric offered alongside it.

Three. Administrative throttles — rolling session windows, per-minute token and request caps — will bind more agentic coding teams in practice than sticker price will, because per-token prices are falling faster than most teams’ willingness to provision headroom above their typical concurrency. Disconfirmed if major providers move to pure consumption billing with no session or per-minute ceiling, or if capacity growth outpaces demand so completely that these tiers stop being a binding constraint for typical teams.

Four. Electricity supply and grid interconnection, not chip availability or model efficiency, will be the first-named bottleneck in mainstream reporting on why a planned expansion of AI compute capacity was delayed. This follows from the International Energy Agency’s own observation that data-center load concentrates geographically in a way that strains local grids more than an equivalent amount of distributed demand. Disconfirmed if, by the horizon date, energy-and-AI reporting of comparable institutional standing still attributes AI capacity delays chiefly to chip supply or capital availability rather than to grid interconnection queues or generation siting.

What to take away

An agentic coding session is not one purchase; it is a running meter with several dials that move independently. The dollar dial is the most legible, because Anthropic publishes the exact multipliers that set it: a base price, a ninety percent discount on re-read context, a fixed tax for every declared tool, and a further four-to-fifteen-fold multiplier for delegating work to subagents or a multi-agent team. The energy dial is the least legible, because no vendor publishes it for this specific workload, and every number available for calibration belongs to somebody else’s product, measured somebody else’s way. The physical dial is the least negotiable, because it is set by how fast bytes move through accelerator memory and how much electricity a grid can deliver to one place, and no pricing change moves either of those.

Treat a claim about what agentic coding costs the way this article has tried to: ask whether it is a documented price, a vendor’s account of its own system, an inference drawn from that documentation, an illustrative scenario borrowed from another company’s product, or a dated prediction with a stated way to prove it wrong. A number that cannot answer which of those five it is has not yet earned a place in a budget.