What should context compression keep? I looked at how six agents handle it[D]
Summary
An analysis of how six AI coding agents (Claude Code, Codex CLI, OpenCode, Cline, Cursor, Amp) converge on layered progressive compression for long contexts, differing in what they protect (user messages, stateful tool outputs) and whether they inform the model of compression, with tradeoffs between cost and accuracy.
Similar Articles
What Context Does a Coding Agent Actually Need to Act?
This paper investigates the minimal context needed for coding agents to edit code, finding that natural-language summaries of code are ineffective and that surrounding context matters little, with compressed context achieving equal results at a third of the tokens. It also reveals a noise floor due to temperature-0 API inference.
Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instability
This empirical study investigates how recurrent context compression affects long-horizon agent behavior, showing that compression can weaken recent interaction influence and cause instability. The authors introduce TRACE, a verifier-guided framework that improves compression reliability and performance on AppWorld.
@FinanceYF5: It's 2026 already, so why are Agents' context compressions still relying on summarization prompts? Jev found a more dir…
Jev introduced on-the-fly compression for AI agents, which scores each tool call to retain important content and delete irrelevant data directly, eliminating the need for model-based summarization and making context compression faster and more lightweight.
@dair_ai: New paper from Microsoft on compressing agent context at test time. If your agent gets worse as its interaction history…
Microsoft's M365 Research introduces FOCUS, a training-free test-time method that compresses LLM agent interaction histories by retaining only the units that causally shape future decisions, cutting peak context by up to 48% and boosting task success by up to 8.9 points over full-history execution.
Compression Is All You Need - A thesis on Long term AI memory
An essay arguing that compression, not longer context windows, is the load-bearing primitive for long-term AI memory and relational continuity, drawing an analogy to compute and storage in computing.