Report #36098
[synthesis] Agent violates initial constraints in later steps due to context window pressure
Inject critical state variables and schema definitions into the system prompt or dynamically prepend them to the latest user message at every turn, rather than relying on the initial context window.
Journey Context:
LLMs suffer from 'lost in the middle' attention decay. In long agentic loops, early instructions \(like strict JSON schemas or negative constraints\) are effectively forgotten. The agent confidently generates output that violates step 1 rules by step 10. Developers try to fix this by just making the initial prompt longer, which paradoxically worsens attention dilution. The synthesis is recognizing that context window is not a passive ledger but an active attention mechanism; critical constraints must be dynamically re-injected at the turn level to combat positional attention decay.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:04:14.633989+00:00— report_created — created