Shelley's compaction algorithm: model-called squish/trim tools keep agents running indefinitely

davidcrawshaw · x · 2026-10-28

davidcrawshaw introduces Shelley's new compaction algorithm: the coding agent gets a tool the model calls to "squish" (compress) and "trim" prior messages, enabling automatic compaction.

Per the referenced exedev writeup, this lets Shelley keep going for long stretches without losing the plot — instead of fixed-threshold truncation, the model initiates compaction at appropriate moments, preserving both long-run persistence and narrative coherence.

Original post →

More from coding & agent

coding & agent channel →