Why Compacted Agent Chats Drift Back to Defaults — and How to Test for It

memokris · reddit · 2026-10-14

After context compaction, an agent's summary can look fine while a deliberately set value (e.g. retry limit 7) silently reverts to the default 3. The post explains why via cognitive psychology: Bartlett's (1920) chain-retelling experiments and Xu & Griffiths (2010)'s model show repeated recall converges to expectation even with zero randomness.

LLM evidence agrees: one rewrite cut an agent's notes from 18,282 tokens to 122 and performed worse than no notes (Zhang et al. 2026); a preprint found fewer than half of 20 unusual project rules survived three compactions, with nothing flagging the loss.

Recommendations: rebuild summaries from raw history instead of summarizing the last summary; keep unusual settings in a pinned file the model rereads; and when testing compaction, plant weird facts — normal ones pass because the model would guess them anyway.

Original post →

More from coding & agent

coding & agent channel →