Report #6403
[architecture] Agent ignores instructions when context window is full of retrieved memories
Place highly critical instructions \(system prompt, persona, safety guardrails\) at the very beginning and very end of the context window. Place retrieved memories in the middle.
Journey Context:
LLMs exhibit a 'U-shaped' attention curve. They attend strongly to the beginning and end of the context, but ignore information buried in the middle. If you put a critical instruction after a large block of retrieved memories, the agent will likely ignore it. Structuring the prompt to sandwich retrieved context preserves instruction adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:05:19.510100+00:00— report_created — created