Beyond Compaction: Structured Context Eviction for Long-Horizon Agents
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
We present Context Window Lifecycle (CWL), a context-management scheme that gives long-horizon LLM agents an effectively unbounded working horizon. As a session accumulates history, CWL keeps the context within budget through graduated, semantically-aware eviction: the agent annotates its trajectory as typed, dependency-linked episodes as work proceeds, and a deterministic, LLM-free policy evicts content in priority order within that structure when a token budget is exceeded. CWL preserves user turns and the exploratory context the agent is actively reasoning over, while aggressively shedding action episodes whose effects are already persisted in the environment, keeping active context near a stable ceiling that also avoids the performance degradation associated with very large prompts. Compared to summarization-based compaction, CWL avoids four well-known limitations: unpredictable lossiness, destruction of causal structure, blocking model cost, and compression-induced hallucination. Compared to recency truncation, CWL is semantically aware: it drops the oldest-and-most-recoverable content according to the dependency graph rather than oldest-in-time regardless of relevance. We describe the annotation protocol, the episode graph, the eviction policy, and the token-accounting loop, and evaluate CWL on long-horizon agentic benchmarks: a single agent session completing 89 sequential tasks across 80 million tokens with no measurable degradation in task accuracy relative to per-task isolated sessions
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 10 of its 17 references that are in the map. First posted on arXiv 1 May 2026.
Builds on
10 of 17 references.
Closest ancestors · 3
Same direction, newest first
- 2025Scaling Long-Horizon LLM Agent via Context-Folding13 Oct
- 2025ReSum: Unlocking Long-Horizon Search Intelligence via Context Summarization16 Sep
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory28 Apr
Other references · 7
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
- 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 515
- 2025The Complexity Trap: Simple Observation Masking Is as Efficient as LLM Summarization for Agent Context Managementcited by 40
- 2026LongCLI-Bench: A Preliminary Benchmark and Study for Long-horizon Agentic Programming in Command-Line Interfacescited by 29
Built on by
Citing papers per year: 2026: 7.
7 papers.
- 2026Governance Decay: How Context Compaction Silently Erases Safety Constraints in Long-Horizon LLM Agentscited by 5
- 2026LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioceptioncited by 3
- 2026Cost-Utility Alignment in LLM Agent Trajectories:Profiling,Attribution,Diagnosis,Adaptation,and Evaluationcited by 1
- 2026Handover of In-Context Learning State Across Session Boundariescited by 0
- 2026What Eviction Destroys: A Restore-Counterfactual Audit of Forgetting in Agent Memorycited by 0
- 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agentscited by 0
- 2026When Can Agents Forget Their Reasoning? ICLR for Long-Horizon Agent Context Compressioncited by 0
- 2026When Can Agents Forget Their Reasoning? ICLR for Long-Horizon Agent Context Compression24 Sep 2026
- 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents22 Sep 2026
- 2026What Eviction Destroys: A Restore-Counterfactual Audit of Forgetting in Agent Memory8 Sep 2026
- 2026Cost-Utility Alignment in LLM Agent Trajectories:Profiling,Attribution,Diagnosis,Adaptation,and Evaluation25 Aug 2026
- 2026Handover of In-Context Learning State Across Session Boundaries14 Aug 2026
- 2026LLM Agents Are Latent Context Managers: Eliciting Self-Managed Context via State Proprioception29 Jun 2026
- 2026Governance Decay: How Context Compaction Silently Erases Safety Constraints in Long-Horizon LLM Agents21 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2026ACM: Agentic Context Management for Long Horizon Tasks
- 2026TokenPilot: Cache-Efficient Context Management for LLM Agents
- 2026ContextWeaver: Selective and Dependency-Structured Memory Construction for LLM Agents
- 2026Toward Reliable Context Compression for Long-Horizon Agents: An Empirical Study of Execution Instability
- 2026ContextPipe: Database-Inspired Context Assembly for Long-Horizon Agents
- 2026Context as an Environment: Programmatic Context Management for Long-Horizon Agents
- 2026ContextPilot: Teaching Agents for Proactive Context Management via Fine-grained RL
- 2026Continuous Context Management