Report #14643
[research] Agent gets stuck in an infinite loop of calling the same tool with the same arguments
Implement a stateful loop detector in the orchestration layer that hashes the \(tool\_name, tool\_args\) pair and raises an exception or forces a strategy change if the identical hash is observed N times consecutively.
Journey Context:
LLMs, especially when encountering an unresolvable API error, will often retry the exact same action indefinitely, burning tokens and costs. Standard retry mechanisms \(like exponential backoff\) don't prevent the LLM from deciding to retry. The orchestrator must maintain a sliding window of action hashes to detect and break these cycles, feeding the agent a 'you are stuck, try something else' message.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:09:33.758737+00:00— report_created — created