Report #58034
[frontier] After context compaction or summarization, agent forgets project-specific rules and constraints
Implement two-tier memory: Tier 1 is an immutable constraint store that is never summarized or compacted, always prepended verbatim to any context assembly. Tier 2 is conversational context that can be compacted. When summarizing Tier 2, never include constraint paraphrases—reference the Tier 1 store instead.
Journey Context:
Production agents like Claude Code use context compaction to handle long sessions—they summarize earlier conversation to stay within context limits. The critical failure mode: summarization models prioritize salient conversational content and drop 'background' instructions. A rule like 'use kebab-case for file names' gets dropped because it seems less important than the actual work discussed. Teams try to fix this by making constraints more prominent in the summary prompt, but this is unreliable—the summarizer doesn't know which constraints are still relevant. The two-tier pattern separates what must persist from what can be compressed. The key insight: constraints should never be in the compaction pipeline at all. The tradeoff: the immutable Tier 1 store consumes a fixed portion of your context budget \(typically 500-1500 tokens\), but this is far cheaper than re-establishing violated constraints mid-task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:54:01.948584+00:00— report_created — created