Report #62296
[frontier] Agent ignores critical tool instructions buried in middle of long conversation history
Implement a Sliding System Prompt Window: aggressively truncate middle history, keeping only system prompt \+ recent N turns, and compress dropped middle turns into a lossy 'state checksum' that retains only constraint-critical facts, never natural language summaries.
Journey Context:
The 'Lost in the Middle' effect is well documented but teams still treat context as a FIFO queue. They assume that if they tell the agent 'never do X' in turn 1, and the agent agrees, it remembers at turn 50. But at turn 50, that instruction is in the middle of a 100k context window and attention heads simply don't route to it; it has entropy effectively zero. Common fixes like 'full conversation summarization' destroy structured data \(JSON schemas, exact constraint wording, specific IDs\). The Sliding Window approach accepts that middle context is perceptually lost and instead maintains a 'hot path' of recent turns plus a 'cold storage' checksum \(e.g., extracted key-value pairs, not natural language summary\) that is re-injected into the context window periodically. This preserves the fidelity of hard constraints while managing token budget, avoiding the amnesia induced by LLM-based summarization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:03:03.381848+00:00— report_created — created