Technique 11 / 14
Cold cache reformatterPro
Use the moment the cache goes cold to rewrite a leaner prefix instead of the same bloated one.
Interactive model
See the context change.
A session idle past five minutes, with stale reads and repeated test runs in context.
Stale results collapsed
- 01
5 stale results → one-line placeholders
- 02
Latest read of src/cart.ts kept
- 03
Latest npm test run kept
- 04
Edits and todos kept
- 05
viewraw restores any original
Conceptual demonstration. Counts illustrate the flow, not measured production savings.
How it works
Less context. Same thread of work.
While the cache is warm, editing old messages would throw away the cache hit, so stale results stay put. Once it has gone cold, the next request rewrites the whole prefix at full price regardless. DistilCode uses that moment to collapse tool results that no longer help.
A file read that a later read covers, a read of a file edited since, a command run again later, volatile output such as git status, and all but the latest image become one-line placeholders. Edits, todo lists and task results are never collapsed, and the original output stays available through viewraw.
In practice
The operating loop
- 01
Wait for cold
Collapsing only happens once the five-minute cache window has passed.
- 02
Find what went stale
Re-reads, edited files, repeated commands, volatile output and older images are flagged.
- 03
Leave a pointer
Each collapsed result becomes a placeholder that says why, and viewraw restores it.
