TL;DR: Compaction is lossy by design, and the loss compounds across passes. After a few compactions, your agent remembers the gist but loses the why — and you become its memory, re-typing the same constraints week after week. agent-crystallize is a small open-source CLI that fixes this at the boundary: checkpoint work context into durable local Markdown before it gets compressed away.
Somewhere in your last long agent session, you caught yourself typing the same rule for the third time that week.
Not because the agent is bad. Because you compacted. And compaction is lossy — not as a bug, but as the whole point.
What compaction actually does
Long coding sessions outgrow the context window. Across major harnesses — Codex, Claude Code, Cursor — the pattern is similar: when the active context gets too large, older conversation state is compacted or summarized so work can continue on top of the compressed version. The model survives. The session keeps going.






