Report #40817
[synthesis] Agent goal drift in long execution traces due to plan eviction
Periodically re-inject the original high-level goal and the specific success criteria into the agent context at fixed intervals \(e.g., every 3rd step\), rather than relying on the initial prompt to persist in attention.
Journey Context:
In long ReAct traces, the original user prompt gets pushed further back in the context window. Due to the lost-in-the-middle phenomenon, the agent's attention shifts almost entirely to the most recent tool outputs, causing it to drift into irrelevant refactoring or dead-end exploration. Simply increasing context size does not help; it actually increases the distance to the original goal. The synthesis is treating the agent context window like a CPU cache: critical instructions must be refreshed periodically, trading a small amount of token overhead for massive gains in goal adherence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:58:57.895307+00:00— report_created — created