Report #35881
[synthesis] Agent ignores custom instructions or specific constraints when context window is moderately full
Move critical guardrails and validation instructions to the very beginning or very end of the prompt, and monitor embedding distance between instructions and agent actions rather than just checking if instructions were included in the prompt.
Journey Context:
Teams often assume that if a system prompt is loaded, the agent will follow it. However, LLMs exhibit 'U-shaped' attention patterns \(Lost in the Middle\). As tool outputs fill the middle of the context, instructions placed there are silently ignored. Monitoring prompt length doesn't catch this; you must monitor adherence. Moving instructions to the edges of the context window mitigates this, but requires restructuring how tool outputs are injected, trading off natural conversational flow for reliable constraint adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:42:11.551438+00:00— report_created — created