Report #79479
[synthesis] Agent violates early-specified constraints in later steps as context window fills up
Maintain a constraint checklist as a pinned context prefix that never scrolls out. At each step, explicitly re-verify against this checklist before acting. Architecturally separate constraints \(immutable prefix\) from working memory \(scrolling scratchpad\). Use prompt caching to keep constraints at full attention weight.
Journey Context:
The 'Lost in the Middle' phenomenon shows LLMs retrieve information from the beginning and end of context but miss the middle. In multi-step agent tasks, this is catastrophic: constraints specified early get pushed to the middle as the agent works, becoming effectively invisible to attention. The agent doesn't just forget—it makes decisions that actively violate the forgotten constraint while appearing fully coherent. This is worse than a human forgetting because the agent's fluency masks the gap. Simply increasing context size doesn't help; the attention degradation is positional, not capacity-based. The synthesis no single source captures: combining lost-in-the-middle retrieval failure with sequential task execution reveals that constraint violations aren't random—they systematically target the most important constraints \(specified early, now buried in the middle\). The drift is directional: early constraints are the most critical ones \(that's why they were stated first\), and they are the most vulnerable to positional attention decay. The fix isn't more context; it's architectural separation of constraints from working memory, using prompt caching or pinned prefixes to maintain full attention weight on critical rules.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:00:27.481503+00:00— report_created — created