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.
More from coding & agent
- ChipAgents and NVIDIA launch Build-A-Chip-Bench: top AI model scores just 16.6% on end-to-end chip design — WilliamWangNLP · 2026-10-15
- Alexandria Launches Product Search for Agents: 50+ Providers, 1 API Key — devdigest · 2026-10-15
- One user's AI stack: a Grok Bot agent team for daily life plus Claude Code as the workhorse — dscape · 2026-10-15
- Tencent and Fudan's WorkForge synthesizes 16.7K verifiable environments, lifting GDPVal from 45.5 to 73.6 — Tencent-Hunyuan · 2026-10-15
- LangChain Details 5 Context Engineering Techniques in Deep Agents to Fight Context Rot — LangChain · 2026-10-15
- Claude Code desktop app overhaul makes running parallel sessions much easier — ns123abc · 2026-10-15