Tim Dettmers Open-Sources CliffCompaction, Cutting Long-Context Agent Token Costs by Half
On Sept 23, Tim Dettmers released CliffCompaction, the second project of his open-source week, with work carried out by his students Trang and Eulrang Cho; paper, code, a PyPI package, blog and video are all available. The tool auto-compacts coding-agent context, supports million-token sessions within bounded context, and cuts token costs by up to 50%. Dettmers says he has used it for months and would not use agents without it, and that it lets open-weight models overtake closed ones in long sessions.
Confirmed
- Released with paper, code, PyPI (pip install cliff…), blog and video tutorial, as the second drop of his open-source week
- Two commands to integrate; works easily with Codex and Claude Code, and is already built into Dettmers' autonomous research harness bitsandbytes code
- Dettmers reports using it for months, easier million-token sessions, 50% token savings and longer quota life
- His current daily drivers are DeepSeek v4.1 and MiMo v2.6 Flash, which with CliffCompaction beat Astra on long-horizon, medium-complexity tasks like engineering and kernel development
Unconfirmed
- Claims such as 50% cost savings and open models overtaking closed ones mainly come from Dettmers' own observations and thread follow-ups, lacking independent third-party validation
Why it matters
- Dettmers notes the tool works much better with full thinking traces, consistent with frontier-lab accounts that OpenAI's math and ARC-AGI results owe much to chain-of-thought
- He observes a usefulness split: open-weight models are notably stronger in long sessions, and models differ in compression quality themselves
- Context-management tooling may thus reshape the relative competitiveness of open versus closed models
2026-09-23 ~ 2026-09-23 · 8 related posts
Primary sources
- Dettmers releases CliffCompaction: 50% token savings for million-token coding agent sessions — Tim_Dettmers ·
- CliffCompaction installs in two commands; DeepSeek v4.1 compacts best, says Dettmers — Tim_Dettmers ·
- Tim Dettmers releases CliffCompaction, a two-command context compaction tool for Codex and Claude Code — Tim_Dettmers ·
- [source] Dettmers releases CliffCompaction: 50% token savings for million-token coding agent sessions — Tim_Dettmers · 2026-09-23
- Tim Dettmers releases CliffCompaction: million-token agent sessions at 50% less cost — Tim_Dettmers · 2026-09-23
- Dettmers says CliffCompaction saves 50% token costs over months of use — Tim_Dettmers · 2026-09-23
- Dettmers: CliffCompaction works much better with full thinking traces — Tim_Dettmers · 2026-09-23
- With CliffCompaction, open-weight models beat closed ones in long-horizon sessions — Tim_Dettmers · 2026-09-23
- Dettmers switches to DeepSeek v4.1 and MiMo v2.6 Flash for long-horizon work — Tim_Dettmers · 2026-09-23
- [source] CliffCompaction installs in two commands; DeepSeek v4.1 compacts best, says Dettmers — Tim_Dettmers · 2026-09-23
- [source] Tim Dettmers releases CliffCompaction, a two-command context compaction tool for Codex and Claude Code — Tim_Dettmers · 2026-09-23