Tim Dettmers Open-Sources CliffCompaction, Cutting Long-Context Agent Token Costs by 50%
On September 23, Tim Dettmers released the second project of his open-source week: CliffCompaction (with the work done by his students Trang and Eulrang Cho), accompanied by a paper, code, a PyPI package, a blog post, and a video walkthrough. It is an automatic context compaction tool for coding agents that supports million-token sessions within a bounded context and cuts token costs by up to 50%.
Confirmed
- Release format: paper, code, PyPI (pip install cliff…), blog post, and video tutorial all available; second release of open-source week
- Integration: connects with two commands, works easily with Codex and Claude Code, and is already integrated into Dettmers' autonomous research harness bitsandbytes code
- Results: Dettmers says he has used it for months and wouldn't use agents without it; it makes million-token sessions manageable and quotas last longer
Not yet confirmed
- Claims like "50% cost savings" and "open-source models overtaking closed-source on long horizons" mainly come from Dettmers' own usage observations and follow-up discussion threads, and lack independent third-party verification so far
Why it matters
- Dettmers notes the tool works best alongside full thinking traces, consistent with what frontier labs have said—OpenAI's math and ARC-AGI results are believed to owe much to chain-of-thought
- From this, he observes a usefulness divergence between open and closed models (the latter often hide their reasoning): in long-horizon sessions, open-weight models are notably stronger, and different models differ in "compaction quality" itself
- He also revealed his current main models are DeepSeek v4.1 and MiMo v2.6 Flash, which combined with CliffCompaction easily beat Astra on long-horizon, medium-complexity tasks (such as engineering and kernel development); this suggests context management tools could shift 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 ·
- With CliffCompaction, open-weight models beat closed ones in long-horizon sessions — 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
- [source] 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
- Tim Dettmers releases CliffCompaction, a two-command context compaction tool for Codex and Claude Code — Tim_Dettmers · 2026-09-23