CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents
CliffCompaction cuts long-horizon agent costs by dropping or truncating original context instead of rewriting summaries, aiming to prevent drift across repeated compactions.
CliffCompaction reports **up to 50% lower cost** under bounded context while maintaining or improving Terminal-Bench performance. It only truncates or drops original material, never rewrites it, and never compacts an earlier compaction.
For long-running coding agents, preserve original evidence and regenerate each compacted view from that source instead of recursively summarizing summaries. The open API proxy works across Claude Code, Codex, and other harnesses, making the approach testable without replacing the scaffold.
CliffCompaction reports **up to 50% lower cost** under bounded context while maintaining or improving Terminal-Bench performance. It only truncates or drops original material, never rewrites it, and never compacts an earlier compaction. For long-running coding agents, preserve original evidence and regenerate each compacted view from that source instead of recursively summarizing summaries. The open API proxy works across Claude Code, Codex, and other harnesses, making the approach testable without replacing the scaffold. Results come from the authors' benchmark setup: Terminal-Bench gains exceed **10 percentage points**, while KernelBench reaches **2.23× at 200 steps** and **3.58× at 400 steps**. Whether these trade-offs hold for a builder's repositories and context mix remains open.
This sharpens context compaction into a source-preservation rule: derive each bounded view from original material instead of recursively rewriting prior summaries. That complements reversible eviction and externalized tool history while offering cross-harness benchmark evidence of lower cost; it also confirms that compaction policies must be tested against each repository and context mix rather than adopted from headline savings.