Report #62626
[synthesis] Agent violates early constraints in later steps due to context window pressure
Externalize constraints into a state machine or scratchpad that is forcefully prepended to every subsequent LLM call, rather than relying on the initial system prompt remaining in the active attention window.
Journey Context:
As context length increases, LLMs suffer from the 'lost in the middle' phenomenon and KV-cache compression drops low-attention tokens. Constraints established in step 1 \(e.g., 'only use Python 3.9 features'\) are often dropped by step 10. Agents confidently proceed because they lack awareness of their own amnesia. Simply increasing context size doesn't solve this due to attention dilution. The synthesis of attention mechanisms and long-horizon planning reveals that constraints must be treated as dynamic state, not static context, and re-injected at the point of execution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:36:07.645325+00:00— report_created — created