Beyond Token Savings: A Systematic Study of Context Compression in LLM Agents
Ritul Satish, Prasoon Sinha, Akiho Kawada, Neeraja J. Yadwadkar
Abstract
As LLM agents tackle longer tasks, they increasingly compress growing histories of reasoning, actions, and tool outputs. Compression can reduce token use, but it also changes the information available for later decisions. Existing agentic harnesses bundle decisions about what to compress, when to compress, and how much to remove into fixed policies. A systematic characterization is needed to disentangle these decisions and reveal how each affects task success and execution cost. We systematically vary these decisions across three open-weight models on SWE-bench Verified and Terminal-Bench 1.0. Across nearly 35,000 agent runs, we measure task success, token use, end-to-end latency, and estimated cost. We find that fewer tokens need not mean faster or cheaper execution: on Terminal-Bench with Qwen, policies using roughly one-third as many tokens can take 20-80% longer than the uncompressed agent. Policies with similar overall success can solve different tasks, while the same policy can perform quite differently across models. Our results motivate evaluating compression by its effects on agent execution and tailoring policies to the task, model, and workload.
Create a lesson
Metadata
- Categories
- cs.LG, cs.AI
Related papers
Token-Level Credit Assignment via In-Context Value Learning
Shared title terminologycs.LGRohin Manvi, Joey Hong, Kevin Frans et al.
Beyond Timestamps: Decision-Aligned On-Policy Distillation for Long-Horizon Agents
Shared title terminologycs.LGMingju Chen, Can Lv, Jinrong Liu et al.
Save Your Saturated Data: Learning Beyond Reward Saturation in Group-Based RL
Shared title terminologycs.LGZiyuan Yang, Yike Wang, Shangbin Feng et al.
Token Tells: Prompt Tokens That Copy a Steering Vector Need Its Direction
Shared title terminologycs.LGAniket Ghosh, Mohamed Amine Merzouk, Adam Oberman
Scaling Context Down for On-Device Tabular Foundation Models
Shared title terminologycs.LGShuting Luo, Henry Xiao, Luiz Pizzato et al.
Compressing Collections of Trees with Decision Equivalence
Shared title terminologycs.LGHayden McTavish, Jon Donnelly, Margo Seltzer et al.