Report #86694
[synthesis] Agent forgets the original goal in long-running tasks because the initial instruction is evicted from the context window
Implement a goal persistence mechanism that dynamically injects the original objective and success criteria into the latest user or assistant turn, preventing eviction.
Journey Context:
In long ReAct loops, the agent's context fills up with tool outputs and intermediate reasoning. The initial system prompt or user goal is naturally evicted due to FIFO or attention decay. The agent then starts solving a tangential problem it encountered in the tool outputs, thinking it is the original goal. Simply increasing the context window does not help; it just makes the goal harder to find. The synthesis is that agent memory must be treated as a circular buffer with a priority queue. The fix is to programmatically append the original goal to the most recent context, ensuring it is always within the active attention window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:06:22.225720+00:00— report_created — created