Distil adds statistically gated context compression for LLM agents and ties full context on SWE-bench

chandu1221 · reddit · 2026-07-26

Distil adds statistically gated context compression for agents

The project introduces Distil, a context compressor for LLM agents that does not rely on blind trust. Instead of assuming shorter context is safe, it runs each compression setting through a paired non-inferiority test (TOST/McNemar) on real agent trajectories and rejects any setting that changes tool calls or outputs.

Key claims:

The author says an earlier version failed in practice: aggressive summarization looked good per turn, but end-to-end agent success collapsed. They also learned that rewriting the top of the prompt can invalidate prefix caching, so Distil keeps the prefix byte-stable and only compresses the tail.

A no-key demo is available via:

bash

uvx --from distil-llm distil bench

Repo: dshakes/distil.

Original post →

More from coding & agent

coding & agent channel →