Beyond Compaction: Researchers Demonstrate 80M-Token Agent Sessions Without Accuracy Loss
Key Takeaways
- ▸CWL enables continuous agent sessions to run for 80+ million tokens across 89 sequential tasks without accuracy loss
- ▸Progressive, deterministic context eviction based on dependency graphs eliminates the need for lossy LLM-based compaction
- ▸Approach reduces inference costs by 20–70% vs. uncapped sessions while maintaining baseline accuracy across multiple benchmarks
Summary
A research team from Kiz8 has published a novel approach to managing context windows in long-horizon LLM agents, demonstrating that a single agent session can process 89 sequential tasks across over 80 million tokens with no measurable accuracy degradation. The technique, called Context Window Lifecycle (CWL), replaces the standard "compaction" paradigm—where agents pause to compress context via LLM summarization—with a structured, progressive eviction strategy that annotates work in real-time and selectively removes information based on task dependencies and relevance.
CWL treats agent execution as a typed episode graph, distinguishing between exploratory episodes (information gathering like file reads or searches) and action episodes (durable work like edits or shell commands). Rather than lossy summarization, the approach progressively evicts context in graduated priority order—starting with reasoning traces, then bulk outputs, then intermediate artifacts—while respecting dependency edges to ensure critical information is never discarded while actions that depend on it remain active.
When benchmarked against Terminal Bench 2.0, SWE-bench Lite, Recovery Bench, and LongCLI Bench, CWL matched per-session baselines within run-to-run variance (within ~3 percentage points), while reducing inference costs by 20–70% compared to uncapped sessions. The team released their implementation as an open-source fork of pi.dev, accompanied by a detailed arXiv paper and full reference implementation.
- Open-source implementation available; positions structured context management as a potential industry standard for long-horizon agent infrastructure
Editorial Opinion
This research challenges a fundamental assumption in long-context AI engineering: that lossy LLM-based summarization is necessary to fit agent work history into finite context windows. By treating the agent's execution as structured, typed data and using deterministic eviction policies rather than model-based compression, CWL demonstrates that you can preserve task performance while eliminating hallucination risk and blocking costs. If these results generalize beyond coding tasks, this approach could reshape how production AI agents manage memory and context—shifting from reactive compression to proactive, intelligent forgetting based on task dependencies.



