Pre-Execution Cost Prediction (Agent Self-Prediction)
An agent's (or a separate predictor's) attempt to estimate its own input/output token cost before executing a task, as groundwork for budget alerts, tiered pricing, and stop/go decisions โ distinct from agent-cost-attribution's after-the-fact explanation of realized cost.
Also known as: token consumption prediction, self-prediction of token cost, pre-execution prediction, budget alerts (agentic), cost forecasting (agentic)
Part of: Agent Cost Attribution
Documents (1)
- 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 (2)
- 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.