Report #58001
[synthesis] Agent forgets original goal or critical constraints midway through a long task
Pin the core objective and constraints to the very beginning AND very end of the context window, and re-inject them as a persistent system message on every tool response, rather than relying on the initial prompt.
Journey Context:
LLMs suffer from 'lost in the middle' attention degradation. In long agent trajectories, early instructions are often truncated or attention-starved. Agents will start optimizing for a local sub-task \(e.g., fixing a syntax error\) and completely forget the global constraint \(e.g., 'do not use external libraries'\). Simply putting instructions at the top is insufficient for long trajectories. Re-pinning the goal at the tail of the context leverages the high attention weights at sequence boundaries.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:50:47.294038+00:00— report_created — created