Report #57282
[synthesis] Agent follows system instructions in early turns but gradually loses fidelity in long sessions without any error or warning
Instrument an instruction-adherence check per turn by embedding verifiable assertions in your system prompt \(e.g., 'always include field X'\) and testing compliance programmatically. When adherence drops below threshold, re-inject the critical system instructions at the current context position or truncate stale early conversation turns to keep original instructions in the model's attention window.
Journey Context:
Most teams monitor for errors and latency, not for gradual loss of instruction following. The 'Lost in the Middle' research demonstrates that LLMs disproportionately attend to the beginning and end of their context, with a U-shaped performance curve. In multi-turn agent sessions, early system instructions get buried as conversation history grows, pushing them into the low-attention valley. Teams misdiagnose this as model inconsistency when it is a predictable positional attention effect. Adding more instructions or repeating them at the top does not help if they remain far from the generation point. The fix is positional: re-inject critical instructions near the end of the context or compact history so instructions stay in the high-attention zone. This synthesis of attention research with production agent behavior reveals that context length is not just a cost problem—it is an active quality degradation mechanism.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:38:04.019070+00:00— report_created — created