CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Agents often work on complex problems that require millions of tokens of context, which necessitates compacting across sessions due to limited context windows. We develop CliffCompaction, an autocompaction technique that reduces cost by up to 50% under a bounded context while maintaining or improving performance on Terminal-Bench and achieving new levels of efficiency for test-time scaling and state-of-the-art results on KernelBench. The per-rollout savings of CliffCompaction make the performance--cost trade-off of test-time scaling more efficient, adding over 10 percentage points on Terminal-Bench for less than the cost of two full-context runs. Under parallel test-time scaling, CliffCompaction lets Kimi K2.6 match Opus 4.7, and exceed Opus 4.6 and GPT-5.3 Codex at lower cost. The key to CliffCompaction's effectiveness is that it keeps compacted information faithful by only truncating or dropping content, never rephrasing or rewriting it. We never compact a compaction---each pass operates only on original content, and prior compacted output is discarded, preventing context drift from accumulating. These properties sustain continual learning over sessions exceeding a million tokens: on KernelBench, CliffCompaction reaches CUDA kernel speedups of 2.23× after 200 steps and 3.58× after 400 steps, surpassing specialized search algorithms and trained agents despite being a general-purpose compaction technique. We open-source a scaffold-agnostic API-proxy implementation of CliffCompaction usable with Claude Code, Codex and other harnesses.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 33 of its 38 references that are in the map. First posted on arXiv 22 Sep 2026.
Builds on
33 of 38 references.
Closest ancestors · 6
Same direction, newest first
- 2026CUDA Agent: Large-Scale Agentic RL for High-Performance CUDA Kernel Generation27 Feb
- 2026SWE-Replay: Efficient Test-Time Scaling for Software Engineering Agents29 Jan
- 2026SERA: Soft-Verified Efficient Repository Agents28 Jan
- 2025Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scaling31 Jul
- 2024OpenHands: An Open Platform for AI Software Developers as Generalist Agents23 Jul
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering6 May
Other references · 27
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
- 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 515
- 2026Kimi K2.5: Visual Agentic Intelligencecited by 449
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 343
- 2025ReasoningBank: Scaling Agent Self-Evolving with Reasoning Memorycited by 253
- 2025KernelBench: Can LLMs Write Efficient GPU Kernels?cited by 206
- 2025Scaling Long-Horizon LLM Agent via Context-Foldingcited by 136
- 2025ACON: Optimizing Context Compression for Long-horizon LLM Agentscited by 126
- 2025S*: Test Time Scaling for Code Generationcited by 95
15 more
- 2025Kevin: Multi-Turn RL for Generating CUDA Kernelscited by 73
- 2025DeepAgent: A General Reasoning Agent with Scalable Toolsetscited by 69
- 2023Recursively Summarizing Enables Long-Term Dialogue Memory in Large Language Modelscited by 62
- 2023Experiential Co-Learning of Software-Developing Agentscited by 57
- 2024AutoManual: Constructing Instruction Manuals by LLM Agents via Interactive Environmental Learningcited by 52
- 2025CodeMonkeys: Scaling Test-Time Compute for Software Engineeringcited by 46
- 2024The Larger the Better? Improved LLM Code-Generation via Budget Reallocationcited by 41
- 2025LongCodeZip: Compress Long Context for Code Language Modelscited by 38
- 2026Active Context Compression: Autonomous Memory Management in LLM Agentscited by 15
- 2025CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generationcited by 14
- 2026Scaling Test-Time Compute for Agentic Codingcited by 11
- 2026Self-Compacting Language Model Agentscited by 11
- 2026Beyond Compaction: Structured Context Eviction for Long-Horizon Agentscited by 7
- 2026PABU: Progress-Aware Belief Update for Efficient LLM Agentscited by 6
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generationcited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026AutoCompact: Learning When to Compact Context in Long-Horizon Coding Agents
- 2026SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks
- 2026ISO-Bench: Can Coding Agents Optimize Real-World Inference Workloads?
- 2026LoopsBench: From Harness Engineering to Loop Engineering in Coding Agent Evaluation
- 2026CodeComp: Structural KV Cache Compression for Agentic Coding
- 2026An Empirical Cost Attribution of Context-Compression Gateways in Multi-Turn Coding Agents
- 2025DARS: Dynamic Action Re-Sampling to Enhance Coding Agent Performance by Adaptive Tree Traversal
- 2026CORVUS: Context Optimization and Reduction Via Underlying Synchronization for LLM Coding Agents