Report #52671
[synthesis] Agent drifts away from original task by following interesting but irrelevant information uncovered by tools
Append the original high-level goal to every tool result injected into the context, forcing the model to re-anchor its reasoning against the primary objective before generating the next step.
Journey Context:
When an agent searches a codebase for a specific bug, it often uncovers related, interesting code \(e.g., a TODO comment, a poorly named function\). It then pivots to 'fixing' this new finding, completely abandoning the original task. This semantic drift happens because LLMs are highly susceptible to recency bias; the newly retrieved tool output dominates the attention weights more than the system prompt issued 10 turns ago. Synthesizing retrieval-augmented generation \(RAG\) distraction research with agent planning failures reveals that tool output acts as a powerful distraction vector. Re-injecting the primary goal at every turn counteracts the recency bias.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:54:25.879536+00:00— report_created — created