{"slug": "summarize-vs-truncate-vs-pin-compaction-cracked-59-of-my-agent-s-rules", "title": "Summarize vs Truncate vs Pin: Compaction Cracked 59% of My Agent's Rules", "summary": "A new benchmark called ConstraintRot, detailed in the paper *Governance Decay* (arXiv:2606.22528), found that context compaction caused an agent to violate a prohibited action 59% of the time on DeepSeek-V4-Flash and 41% on GPT-5.4-mini, compared to 0% with the policy fully visible. The study, based on 1,323 episodes, shows that summarization preferentially loses safety rules, and AutoGen's stock BufferedChatCompletionContext led to 100% violations. The author cross-checked compaction code in LangGraph, LangMem, the OpenAI Agents SDK, and Anthropic's context-editing API, and built a ~40-line mitigation.", "body_md": "Member-only story\n\n# Summarize vs Truncate vs Pin: Compaction Cracked 59% of My Agent's Rules\n\nThe same agent that refused a prohibited action nine times in a row did it on the tenth — not because the model changed, but because the harness summarized the rule out of its context. With the policy fully visible, violation rate was **0%**. After one compaction pass, it hit **59%** on DeepSeek-V4-Flash and **41%** on GPT-5.4-mini. Run the same setup through AutoGen’s stock `BufferedChatCompletionContext`\n\nand it hits **100%**.\n\nThat’s from ConstraintRot, a 1,323-episode benchmark in a paper called *Governance Decay* (arXiv:2606.22528). I spent yesterday pulling it apart, cross-checking it against the compaction code that ships in LangGraph, LangMem, the OpenAI Agents SDK, and Anthropic’s own context-editing API — and then rebuilding the mitigation as ~40 lines you can drop into an existing agent today.\n\nThe uncomfortable part isn’t that summarization is lossy. Everyone knows summarization is lossy. It’s *what* it preferentially loses, and the fact that the loss is completely silent.\n\n## Why this is showing up now\n\nEvery serious agent harness in production compacts. It has to — a long-horizon coding or ops session blows past the window in an afternoon.\n\n**Claude Code** auto-compacts and has a manual`/compact`\n\n. The most-upvoted issues in…", "url": "https://wpnews.pro/news/summarize-vs-truncate-vs-pin-compaction-cracked-59-of-my-agent-s-rules", "canonical_source": "https://pub.towardsai.net/summarize-vs-truncate-vs-pin-compaction-cracked-59-of-my-agents-rules-9241fb596389?source=rss----98111c9905da---4", "published_at": "2026-08-05 12:54:40+00:00", "updated_at": "2026-08-05 13:37:12.955397+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "large-language-models"], "entities": ["DeepSeek-V4-Flash", "GPT-5.4-mini", "AutoGen", "LangGraph", "LangMem", "OpenAI Agents SDK", "Anthropic", "Claude Code"], "alternates": {"html": "https://wpnews.pro/news/summarize-vs-truncate-vs-pin-compaction-cracked-59-of-my-agent-s-rules", "markdown": "https://wpnews.pro/news/summarize-vs-truncate-vs-pin-compaction-cracked-59-of-my-agent-s-rules.md", "text": "https://wpnews.pro/news/summarize-vs-truncate-vs-pin-compaction-cracked-59-of-my-agent-s-rules.txt", "jsonld": "https://wpnews.pro/news/summarize-vs-truncate-vs-pin-compaction-cracked-59-of-my-agent-s-rules.jsonld"}}