Report #30249
[synthesis] Agent loops on the same tool call or thought without throwing an error
Implement stateful deduplication by hashing the last N tool calls and their arguments. If a duplicate is detected, inject a system prompt forcing a different strategy or abort the step.
Journey Context:
Agents often get stuck in a local minimum where the LLM keeps generating the same thought/tool call because the context window still contains the same problem. Simply setting a max\_steps limit doesn't prevent the wasted steps; it just delays failure. Deduplication breaks the cycle early and forces the agent to reconsider its approach rather than burning through the context window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:09:40.530189+00:00— report_created — created