Report #92433
[synthesis] Agent loops on a failing approach because prior failed attempts in context bias its reasoning
Implement a 'context scrub' or 'pivot' mechanism: if an agent fails the same sub-task more than twice, automatically summarize the failures into a single 'what not to do' bullet, clear the conversation history, and re-initialize the agent with only the original goal and the failure summary.
Journey Context:
Agents suffer from conversational momentum. If the context contains three failed attempts using a specific library, the LLM will almost always try a fourth variation of that same library rather than switching to an alternative. It is trapped by its own context. Standard loop detection looks for identical outputs, but this is a semantic loop. The synthesis reveals that the context itself is the poison; you cannot escape a sunk-cost loop by adding more context to the same window. You must destroy the window and restart, because the LLM will always assign high probability to tokens that are semantically similar to the immediate history, even if that history is a chain of failures.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:44:26.440515+00:00— report_created — created