Report #36295
[synthesis] Agent ignores critical system instructions as dynamic few-shot examples or conversation history grow
Periodically re-inject critical system instructions at the end of the context window \(bookending\) and monitor the agent's adherence to top-of-prompt constraints as the token count approaches the model's context limit.
Journey Context:
Agents often use dynamic few-shot examples or long conversation histories. As these grow, the total token count increases. Research shows LLMs suffer from lost in the middle degradation: they attend heavily to the beginning and end of the context, ignoring the middle. If critical system instructions are at the top, and the history pushes them far from the end, the agent silently stops adhering to them. It doesn't error out; it just subtly violates constraints \(e.g., tone shifts, safety guardrails drop\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:24:11.457028+00:00— report_created — created