mlsanityData to 24 Nov 2026

Re-Reading Is Not Free: Token Traces and Cache-Aware Energy Estimation for LLM Agents in Software Engineering

arXiv 2611.20873 ↗Submitted 16 Nov 2026cs.SE cs.AIcited by 0

On the map: LLM agents and tool use → Software engineering coding agents also fits: Tool learning and function calling

Abstract (arXiv)

As large language models (LLMs) evolve from conversational assistants into autonomous agents embedded in software development workflows, estimating their environmental footprint requires moving beyond conventional token-based accounting. Existing energy estimators focus on isolated request-response interactions, overlooking the repeated processing of accumulated context, cache reuse, and work delegated to subagents. We analyze nearly one billion tokens collected across 42 sessions and 752 task episodes over ten weeks of real-world AI-assisted software development. Cached-context reads make up 94.8% of all API-reported tokens, while uncached input accounts for only 0.017%; for every generated token, approximately 260 cached tokens are read. Context grows 5.3-fold over a session compared with 1.4-fold within individual tasks. To quantify the energy implications, we extend an existing analytical inference-energy model to account for cached-context processing, yielding a cache-aware hybrid estimator. It estimates approximately 250 kWh for the workload, compared with approximately 10 kWh from the output-based estimator EcoLogits, a 25-fold difference largely driven by cached-context reads. Neither estimator has been validated on long cached contexts, but no modeling assumption we varied closes the gap. Starting each task from a fresh context would lower our estimate by about 60%. We also find that parent-session logs report only a subagent's final internal call, undercounting delegated tokens by a factor of ten; for this workload the correction changes the energy estimate by about 5%, but token-volume studies are fully exposed to it. Our findings expose a substantial gap between how current energy estimators and agentic workloads treat context, highlighting the need for workflow-level energy accounting that captures context accumulation, cache reuse, and delegated execution.

Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 11 of its 27 references that are in the map. Submitted 16 Nov 2026.

Builds on

11 of 27 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May

Other references · 10

  1. 2020Scaling Laws for Neural Language Modelscited by 7,118
  2. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 6,685
  3. 2022Training Compute-Optimal Large Language Modelscited by 3,290
  4. 2023Prompt Cache: Modular Attention Reuse for Low-Latency Inferencecited by 307
  5. 2023Power Hungry Processing: Watts Driving the Cost of AI Deployment?cited by 206
  6. 2023From Words to Watts: Benchmarking the Energy Costs of Large Language Model Inferencecited by 184
  7. 2025Energy Considerations of Large Language Model Inference and Efficiency Optimizationscited by 65
  8. 2025Measuring the environmental impact of delivering AI at Google Scalecited by 41
  9. 2026From Tokens to Watt-hours: Analytical Energy Estimation for LLM Inference on Modern GPUscited by 6
  10. 2026SWE-Opt: A Benchmark for Evaluating LLMs on Performance-Oriented Repository-Level Optimizationcited by 4

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026The Real Cost of Context: Predicting Compute Time and Energy Consumption in LLM Prefill and Decode Phases
  2. 2026Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering
  3. 2026PACE: Keeping the Right Tokens in the KV Cache Is Not Enough for Long-Horizon LLM Agents
  4. 2026Characterizing Performance-Energy Trade-offs of Large Language Models in Multi-Request Workflows
  5. 2026Don't Break the Cache: An Evaluation of Prompt Caching for Long-Horizon Agentic Tasks
  6. 2026TokenCast: Forecasting Token Consumption During LLM Agent Execution
  7. 2025TokenPowerBench: Benchmarking the Power Consumption of LLM Inference
  8. 2025How Do Agentic AI Systems Deal With Software Energy Concerns? A Pull Request-Based Study