Skip to content

Beyond Token Savings: A Systematic Study of Context Compression in LLM Agents

Sep 2026 · 0 citations · 43 references
Computer Science

TL;DR

It is found 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.

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.

View source

Similar papers

Review

Context Compression for LLM Agents: A Survey of Methods, Failure Modes, and Evaluation

A unified taxonomy of agent context compression along three dimensions is introduced: compression target (what is compressed), compression mechanism (how it is transformed and retained), and control policy (who decides when compression is triggered).

Unknown authors · 10 citations
#artificial intelligence Preprint Sep 2026

CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents

CliffCompaction is developed, an autocompaction technique that reduces cost by up to 50% under a bounded context while maintaining or improving performance on Terminal-Bench and achieving new levels of efficiency for test-time scaling and state-of-the-art results on KernelBench.

Trang Nguyen, Eulrang Cho, Bing-Qing Chen et al. · 0 citations
#artificial intelligence Preprint Sep 2026

TokenCast: Forecasting Token Consumption During LLM Agent Execution

TokenCast is proposed, which learns a composable cost representation for each execution segment, recording its own consumption and the context growth it introduces, and captures the extra input cost incurred when context from earlier segments is re-read by every later call.

Chao-Qian Ouyang, Ling Yue, Li-Bin Zheng et al. · 0 citations
#natural language process... Preprint Aug 2026

An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents

This work instrument a production compression gateway between coding agents and frontier LLMs, and decompose the token bill of real sessions into three independent levers: tool-schema filtering, content compression of file reads and tool output, and history summarization, which distill the results into an actionable re...

Lu Chen, Jiayu Shi · 0 citations
Preprint Oct 2026

Where Do the Tokens Go? Understanding and Reducing Costs in LLM Agents for Vulnerability Discovery

LLM agents can spend millions of tokens during vulnerability discovery without producing a working proof of concept (PoC). What consumes that budget, and why does it fail to produce results? We diagnose these costs and failures through a multi-axis open-coding study of 200 CyberGym traces, spanning four agents (i.e., C...

Li Lu, Yan-Jie Zhao, Hong-Jie Chen et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Sep 29, 2026

Who we become when we talk to machines

Professor Sherry Turkle’s new book, “Artificial Intimacy,” offers a withering critique of chatbots and the antisocial dynamics she believes they encourage.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.