Report #35945
[frontier] Agent context window fills with stale history while critical recent tool results get evicted
Implement explicit context budgeting: allocate fixed token budgets to system instructions, recent history, tool results, and scratchpad. When a budget is exceeded, apply tiered eviction—summarize oldest turns first, retain recent tool results, always preserve system instructions.
Journey Context:
The assumption that larger context windows solve context management is wrong. Research shows models degrade on information in the middle of long contexts \('lost in the middle' phenomenon\). Production systems are moving to explicit budget management: e.g., 15% system, 35% recent turns, 40% tool results, 10% scratchpad. When tool results exceed budget, summarize or truncate them. When history exceeds budget, rolling summarization of oldest turns. The critical insight is that not all context is equal—recent tool results are almost always more important than conversation turns from 20 messages ago, yet naive implementations treat them the same. Without explicit budgets, you get silent degradation: the model still responds, but with increasing hallucination and decreasing relevance as context fills with noise.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:49:01.506861+00:00— report_created — created