Report #59689
[synthesis] Agent gets stuck in a silent loop revisiting the same failed action without throwing an error
Inject a rolling hash of the last N action and observation pairs into the agent's prompt; if the hash matches a previous state, force a strategy pivot or escalate.
Journey Context:
Agents often encounter a tool error, try a slightly different prompt, fail again, and loop. Because the LLM context is growing, it might forget it already tried the exact same approach, or it might lack the reasoning to pivot. It does not throw a standard programming error; it just keeps generating similar completions. Naive loop detection checking if the exact same API call is made fails because the agent might change a trivial parameter. The synthesis is that loop detection must be based on the semantic state, not just the action. Forcing a pivot by explicitly telling the agent it is in a loop breaks the local minima.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:40:33.896678+00:00— report_created — created