Report #44700
[frontier] Agent context window fills up and loses critical system prompts during long conversations
Implement a priority-weighted context management system where system prompts and recent user queries have higher retention priority than older successful tool results, using retention scores rather than FIFO truncation
Journey Context:
Instead of simple FIFO truncation or naive summarization, treat context as a resource budget. Assign retention scores: system prompt \(infinite\), recent user message \(high\), failed tool calls \(high for debugging\), successful tool results from >5 turns ago \(low\). When approaching token limit, evict lowest priority first. This prevents the 'prompt amnesia' where agents forget their core instructions. Anthropic's long-context guidelines explicitly recommend preserving system prompts and distinguishing between ephemeral tool outputs and critical instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:29:50.218723+00:00— report_created — created