Report #59992
[frontier] Critical instructions evicted from context window by irrelevant tool documentation
Implement tiered memory architecture with explicit budget enforcement: System tier \(30% - immutable instructions\), Episodic tier \(40% - compressed history\), Working tier \(20% - active tool results\), Tool tier \(10% - schema docs\) with LRU eviction per tier
Journey Context:
Naive RAG retrieves by semantic similarity alone, which destroys temporal criticality and instruction hierarchy; tool documentation \(similar to user queries\) often evicts the system prompt containing safety constraints. 'Lost in the middle' effects compound this. Tiered memory \(emerging in LangGraph's memory system and production agent frameworks\) explicitly partitions the context window into hard allocation buckets: immutable system prompts with guaranteed reservation, compressed episodic summaries with rolling eviction, active working memory for current task state, and tool schema buffers with aggressive truncation. This prevents tool documentation from evicting task instructions and enables guaranteed safety context preservation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T07:11:13.090184+00:00— report_created — created