The authors introduced CliffCompaction, a method for automatically shrinking context for agents that work with code.
It is intended for tasks where agents need millions of context tokens and several sessions. The authors estimate that the method cuts costs by up to 50% with a bounded context window while maintaining or improving results.
CliffCompaction only truncates or drops parts of the original context and does not rephrase them.
Each pass works only with the original content, and the previous compacted output is discarded so that context drift does not accumulate. The authors released the implementation as open source, and it can be used with Claude Code, Codex, and other harnesses.
Claim check:
- The authors introduced CliffCompaction, a method for automatically shrinking context for agents that work with code. (confirmed by the publication itself: evidence; «We develop CliffCompaction, an autocompaction technique»)
- The authors say the method is intended for tasks where agents need millions of context tokens and several sessions. (confirmed by the publication itself: evidence; «Agents often work on complex problems that require millions of tokens of context, which necessitates compacting across sessions due to limited context windows.»)
- The authors estimate that CliffCompaction cuts costs by up to 50% with a bounded context window while maintaining or improving results. (confirmed by the publication itself: evidence; «reduces cost by up to 50% under a bounded context while maintaining or improving performance»)
- The method only truncates or drops parts of the original context and does not rephrase them. (confirmed by the publication itself: evidence; «it keeps compacted information faithful by only truncating or dropping content, never rephrasing or rewriting it.»)
- Each pass works only with the original content, and the previous compacted output is discarded so that context drift does not accumulate. (confirmed by the publication itself: evidence; «We never compact a compaction—each pass operates only on original content, and prior compacted output is discarded, preventing context drift from accumulating.»)
- The authors released the implementation as open source, and it can be used with Claude Code, Codex, and other harnesses. (confirmed by the publication itself: evidence; «We open-source a scaffold-agnostic API-proxy implementation of CliffCompaction usable with Claude Code, Codex and other harnesses.»)
Primary sources:
score 70.7 out of 100 · kind: research