🚀NEW COURSEVibe Coding AI Apps with Claude Code 🤖✨Enroll now
Safety · Agents

What Compaction Destroys

First page
What Compaction Destroys
Paper summary

If you keep safety rules or coding standards in an AGENTS.md or a CLAUDE.md, this one is worth your time. Researchers measured what context compaction actually destroys across 20 production agent configurations, and safety rules are among the first casualties.

Ask this paper

Key points
01

Everything gets summarized at the same rate: A safety rule and an episodic log compete for the same tokens, and when the budget overflows both get compressed equally. Only the rule needs exact wording to stay enforceable, and nothing in the pipeline knows that.

02

The decay is steep: Claude Code compact on Sonnet 4.6 preserves 53% of safety rules after one round. After five rounds it drops to 10%, which is the regime any long-running agent session ends up in.

03

Type-aware routing is the fix: Knowledge Triage classifies each line of the knowledge base by type, then routes each type through its own retention policy using three deterministic operators for compaction, partitioning, and retrieval.

04

Why it matters: The approach preserves 2 to 4x more safety rules at every compression ratio with 96% recall over five rounds. The framing generalizes past safety too. Anything in your context that depends on exact wording needs a different retention policy from the narrative around it.

Every Monday
Get next week’s papers.
Subscribe on Substack