Compaction hooks in practice: keep last n messages verbatim, summarize the rest for full agent continuity
MoonL88537 · x · 2026-10-21
The author details a working compaction-hooks setup: keep the last n messages verbatim, use a summarizer to pick the split point, strip and compress everything earlier, pop in grounding docs, and boot into that conversation file. It works so seamlessly the model 'can't tell' it ran — full continuity once dialed in. A concrete, reproducible recipe for maintaining memory in long-running agent sessions.
More from coding & agent
- Burkov: without explicit checklists, coding agents hand you 80%-done work — burkov · 2026-10-21
- Laude Institute launches Slingshots FOUR: 14 projects across 8 top institutions — a1zhang · 2026-10-21
- Research agent Épi sets 120 records, narrows n-queens constant interval 84x — dair_ai · 2026-10-21
- The blank prompt box hides real operational burden: context, workflow and supervision fall on users — _AustinCalvert_ · 2026-10-21
- DeepMind paper: self-evolving agents forget as they learn — fastest learner GEPA also breaks old tasks most — rohanpaul_ai · 2026-10-21
- arXiv: Are Self-Evolving Agents Continual Learners? Plasticity comes at the cost of stability — rohanpaul_ai · 2026-10-21