SWE-MeM introduces adaptive memory management for coding agents via synthesized trajectories and Memory-aware GRPO, reporting 43.4% and 60.2% resolve rates on SWE-Bench Verified for 4B and 30B models while beating baselines on performance and token use.
How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks
5 Pith papers cite this work. Polarity classification is still indexing.
abstract
The wide adoption of AI agents in complex human workflows is driving rapid growth in LLM token consumption. When agents are deployed on tasks that require a significant amount of tokens, three questions naturally arise: (1) Where do AI agents spend the tokens? (2) Which models are more token-efficient? and (3) Can agents predict their token usage before task execution? In this paper, we present the first systematic study of token consumption patterns in agentic coding tasks. We analyze trajectories from eight frontier LLMs on SWE-bench Verified and evaluate models' ability to predict their own token costs before task execution. We find that: (1) agentic tasks are uniquely expensive, consuming 1000x more tokens than code reasoning and code chat, with input tokens rather than output tokens driving the overall cost; (2) token usage is highly variable and inherently stochastic: runs on the same task can differ by up to 30x in total tokens, and higher token usage does not translate into higher accuracy; instead, accuracy often peaks at intermediate cost and saturates at higher costs; (3) models vary substantially in token efficiency: on the same tasks, Kimi-K2 and Claude-Sonnet-4.5, on average, consume over 1.5 million more tokens than GPT-5; (4) task difficulty rated by human experts only weakly aligns with actual token costs, revealing a fundamental gap between human-perceived complexity and the computational effort agents actually expend; and (5) frontier models fail to accurately predict their own token usage (with weak-to-moderate correlations, up to 0.39) and systematically underestimate real token costs. Our study offers new insights into the economics of AI agents and can inspire future research in this direction.
years
2026 5verdicts
UNVERDICTED 5representative citing papers
Introduces PACT protocol that projects agent outputs into action-state records, yielding comparable or better task performance with substantially fewer tokens in multi-agent LLM systems and production harnesses.
Derives unique closed-form decentralized policy minimizing worst-agent online regret that asymptotically converges to centralized Nash-optimal policy in mean-field limit, with added online mixture weighting.
Develops a framework linking token-level technical costs to workflow-level economic value and market design in AI foundation models.
Long-context prompting reached 73.1% correctness versus 65.4% for semantic RAG at 26 times the token cost across 972 answers in an expert-validated manufacturing benchmark.
citing papers explorer
-
SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents
SWE-MeM introduces adaptive memory management for coding agents via synthesized trajectories and Memory-aware GRPO, reporting 43.4% and 60.2% resolve rates on SWE-Bench Verified for 4B and 30B models while beating baselines on performance and token use.
-
What Should Agents Say? Action-state Communication for Efficient Multi-Agent Systems
Introduces PACT protocol that projects agent outputs into action-state records, yielding comparable or better task performance with substantially fewer tokens in multi-agent LLM systems and production harnesses.
-
MEMOA: Massive Mixtures of Online Agents via Mean-Field Decentralized Nash Equilibria
Derives unique closed-form decentralized policy minimizing worst-agent online regret that asymptotically converges to centralized Nash-optimal policy in mean-field limit, with added online mixture weighting.
-
AI Tokenomics: The Economics of Tokens, Computation, and Pricing in Foundation Models
Develops a framework linking token-level technical costs to workflow-level economic value and market design in AI foundation models.
-
The Token Tax of Epistemic Accuracy: Comparing RAG and Long-Context Architectures for Document-Grounded Generative AI Applications
Long-context prompting reached 73.1% correctness versus 65.4% for semantic RAG at 26 times the token cost across 972 answers in an expert-validated manufacturing benchmark.