Report #24016
[synthesis] Agent drifts from original goal in long planning horizons due to recency bias
Periodically inject the original user objective and the high-level plan into the agent's context, and require a brief alignment check before starting a new major step.
Journey Context:
In long-running tasks, the agent's context fills with intermediate tool outputs and error recovery steps. The LLM's attention mechanism prioritizes recent tokens. The agent starts optimizing for local sub-problems \(e.g., fixing a linting error\) and completely forgets the original task \(e.g., 'add a new API endpoint'\). Re-injecting the primary goal combats context-window amnesia.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:43:18.424820+00:00— report_created — created