Researchers present CliffCompaction, an autocompaction technique aimed at coding agents that need to process millions of tokens across multiple sessions. The underlying problem is familiar: limited context windows force periodic compression of interaction history, which often degrades information fidelity and, in turn, long-term agent performance.
CliffCompaction's distinguishing feature is its conservative approach to compression. Rather than paraphrasing or rewriting past content, the method only truncates or drops information, never rephrasing it. A second key principle is that compaction is never applied to previously compacted output — each pass works exclusively on original content, and earlier compressed outputs are discarded. This constraint is meant to prevent semantic drift from accumulating across repeated compression cycles.
According to the authors, this approach can reduce compute costs by up to 50 percent under a fixed context budget while maintaining or improving results on Terminal-Bench. The savings also translate into more efficient parallel test-time scaling: the technique reportedly adds over 10 percentage points on Terminal-Bench for less than the cost of two full-context runs. The authors further report that it allows a model such as Kimi K2.6 to match or exceed rival models at lower cost under this scaling regime.
On KernelBench, a benchmark focused on optimizing CUDA kernels, CliffCompaction is said to reach speedups of 2.23x after 200 steps and 3.58x after 400 steps — results the authors present as surpassing specialized search algorithms and agents trained specifically for the task, despite being a general-purpose compaction method. The team has open-sourced a scaffold-agnostic API-proxy implementation compatible with several agent harnesses, including Claude Code and Codex, which could ease adoption regardless of the underlying model.
If these results hold up at larger scale, they suggest that careful context management may become as important a lever for long-running agents as model size or training itself.