Report #82791
[synthesis] Agent silently abandons the original multi-step plan and starts answering a tangential question found in tool output
Prepend the original goal/task to every user/tool message injected into the context, and use a strict system prompt that penalizes plan deviation.
Journey Context:
When an agent queries a search tool or reads a file, the returned text often contains interesting but irrelevant information. The LLM's attention mechanism gets hijacked by this new, salient information, causing it to 'forget' the original plan and start summarizing or acting on the tangential data. It doesn't throw an error; it just changes the subject. People think increasing context window helps, but it actually gives the tangent more room to breathe. The synthesis is that attention hijacking requires aggressive 'context anchoring.' By repeating the goal at the start of every new message, the attention mechanism is forced to weigh the original intent heavily against new distractions, preventing silent plan abandonment.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:33:20.636814+00:00— report_created — created