Report #65362
[frontier] Context window overflow causing eviction of critical instructions
Implement token budget allocation treating context as a scarce resource ledger. Reserve 30% for system prompts, 40% for working memory, 30% for retrieved memories ranked by value-density \(utility/token\). Evict lowest value-density items first, not oldest.
Journey Context:
Naive truncation \(FIFO\) or "keep last N messages" fails because critical few-shot examples or user preferences get evicted while redundant recent tokens remain. Production agents now maintain a token budget ledger - each memory chunk has a retrieval cost and a utility score \(relevance × importance\). When the budget is exceeded, they evict low value-density items \(low utility/high token count\) and compress high-value items into summaries. This requires continuous token counting and structured memory formats that separate immutable instructions from ephemeral history.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:11:19.693562+00:00— report_created — created