Report #92459
[synthesis] Agent loops indefinitely on the same tool call without throwing an error
Implement a stateful loop detector that hashes the tool name and arguments pair and aborts or escalates if the hash is seen more than twice in a trajectory, bypassing standard retry logic.
Journey Context:
Standard retry logic \(e.g., retry up to 3 times on failure\) doesn't catch the case where a tool succeeds but returns a state that causes the agent to immediately call the exact same tool again. The agent doesn't see it as an error; it sees it as a necessary step to reach its goal, but it is stuck in a local minimum. Simply counting total steps is too coarse. Hashing the tool call signature catches exact repeats, but agents can also loop with slight variations. The most robust approach is a combination of exact signature hashing and semantic embedding distance of the arguments to catch near-duplicates, but exact hashing is the necessary baseline.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:46:55.152012+00:00— report_created — created