Context Tax (Retry-Driven Cost Accumulation)
Compounding inference cost from resending the full prior transcript/failure trace on every agentic retry, since input tokens dominate production billing.
Also known as: context tax, the context tax, retry-driven token accumulation
Part of: AI Unit Economics
How authors use it
Oldest first (extraction date when no publication date is known).
| Author | Their term | Their meaning |
|---|---|---|
| The Economics of Agentic AI: Engineering for Imperfection Artur Huk ยท 2026-07-24 | Context tax | The compounding inference cost created because each retry in a closed agentic loop resends the full prior transcript and failure trace, and because input tokens (not output tokens) dominate production billing. |
Documents (2)
- The Economics of Agentic AI: Engineering for Imperfection Artur Huk ยท 2026-07-24 source โ Reader ๐ฅ๏ธ
The runaway cost and catastrophic security failures of agentic AI both stem from treating a missing structural constraint (context, authority, evidence, or temporal validity) as a reasoning problem to be solved with more model intelligence, so enterprises must instead wrap probabilistic models in a deterministic governance 'airlock' โ syntactic, semantic, and temporal gates that treat model output as an unprivileged claim โ which converts model accuracy from a safety prerequisite into a tunable economic variable. - How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks Longju Bai; Zhemin Huang; Xingyao Wang; Jiao Sun; Rada Mihalcea; Erik Brynjolfsson; Alex Pentland; Jiaxin Pei ยท 2026 source โ Reader ๐ฅ๏ธ
Because agentic coding tasks burn tokens overwhelmingly through accumulating, cache-read input context rather than output generation -- and because that spend is highly variable, only weakly tied to human-perceived difficulty or to accuracy, and only weakly predictable by the executing agent itself before the task runs -- transparent upfront pricing for AI coding agents is not currently achievable, so consumption-based billing (with, at best, coarse-grained self-predicted budget alerts) is the only viable near-term model.
Open gaps (3)
- incomplete'Redundant' file view/edit actions are operationalized purely as repetition counts (viewing or modifying the same file more than once), with no independent check on whether any given repetition was actually unnecessary. A model re-reading a file because its context window evicted or compacted the earlier read is a mechanically different failure mode (context management / caching mechanics) from a model aimlessly re-exploring because it hasn't found the bug -- the paper's causal story ('redundant back-and-forth... reflecting inefficient search dynamics') doesn't distinguish these, even though they would call for entirely different fixes (better context retention vs. better search strategy).How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks โ read next: Look for work that instruments *why* an agent re-opens a file (context eviction vs. genuine re-exploration) rather than just counting repeats -- likely to intersect with this corpus's context-rot / context-engineering material.
- incompleteThe entire cost-decomposition analysis (Sec 5, Fig. 8-9) fixes the Anthropic cache-creation rate at the 5-minute write tier for all reported figures. Cache-write TTL is a pricing-policy choice, not an inherent property of the task -- a 1-hour cache tier (which Anthropic also offers) would materially shift the reported cost split between cache-creation and cache-read, and potentially which phase looks most expensive. The paper presents its cost breakdown as if it reflects an inherent property of agentic coding tasks, when part of it is actually an artifact of the specific cache-tier choice made for the study.How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks โ read next: Re-run the same phase/round cost decomposition (Sec 5.2-5.3) under the longer 1-hour cache-write tier to see how much of the 'cache reads dominate' finding is robust to the pricing-tier choice versus an artifact of the 5-minute TTL selected here.
- incompleteThe study is scoped entirely to coding tasks. Whether the central mechanistic finding -- that long-horizon, tool-using agents accumulate cost primarily through re-fed cache-read input context rather than output generation -- generalizes to non-coding long-horizon agents (research agents, browsing agents, ops/on-call agents) or is specific to code's characteristic re-read/re-edit access pattern on a small number of files is not discussed, despite the paper's own framing ('originally developed mainly for coding tasks... increasingly used in a wide range of tasks and domains beyond coding') explicitly raising and then dropping the question.How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks โ read next: Look for equivalent token-consumption breakdowns on non-coding agentic benchmarks (deep-research agents, browser-use agents, SRE/on-call agents) to test whether cache-read/input dominance is a coding-specific artifact or a general property of long-horizon tool use.