How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks
This study examines how AI agents consume tokens during coding tasks, revealing that agentic workflows use significantly more tokens than simpler code-related tasks, with high variability and inefficiency across models. The research evaluates eight large language models on the SWE-bench Verified dataset, finding poor alignment between human-assessed task difficulty and actual token usage. Additionally, models struggle to predict their own token consumption, often underestimating costs despite moderate correlation in estimates.
- ▪Agentic coding tasks consume up to 1000 times more tokens than standard code reasoning or chat, driven primarily by input tokens.
- ▪Token usage varies by up to 30 times across runs on the same task, with no consistent gain in accuracy at higher token costs.
- ▪Models differ significantly in token efficiency, with Kimi-K2 and Claude-Sonnet-4.5 using over 1.5 million more tokens on average than GPT-5 for the same tasks.
- ▪Human expert ratings of task difficulty only weakly correlate with actual token consumption by AI agents.
- ▪Frontier models show weak-to-moderate correlation (up to 0.39) in predicting their own token usage and systematically underestimate real costs.
Opening excerpt (first ~120 words) tap to expand
Computer Science > Computation and Language arXiv:2604.22750 (cs) [Submitted on 24 Apr 2026] Title:How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks Authors:Longju Bai, Zhemin Huang, Xingyao Wang, Jiao Sun, Rada Mihalcea, Erik Brynjolfsson, Alex Pentland, Jiaxin Pei View a PDF of the paper titled How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Tasks, by Longju Bai and 7 other authors View PDF Abstract:The wide adoption of AI agents in complex human workflows is driving rapid growth in LLM token consumption.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at arXiv cs.AI.