cd /news/ai-agents/summarize-vs-truncate-vs-pin-compact… · home topics ai-agents article
[ARTICLE · art-87675] src=pub.towardsai.net ↗ pub= topic=ai-agents verified=true sentiment=↓ negative

Summarize vs Truncate vs Pin: Compaction Cracked 59% of My Agent's Rules

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.

read1 min views2 publishedAug 5, 2026
Summarize vs Truncate vs Pin: Compaction Cracked 59% of My Agent's Rules
Image: Pub (auto-discovered)

Member-only story

The 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

and it hits 100%.

That’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.

The 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.

Why this is showing up now #

Every serious agent harness in production compacts. It has to — a long-horizon coding or ops session blows past the window in an afternoon.

Claude Code auto-compacts and has a manual/compact

. The most-upvoted issues in…

── more in #ai-agents 4 stories · sorted by recency
── more on @deepseek-v4-flash 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/summarize-vs-truncat…] indexed:0 read:1min 2026-08-05 ·