Report #90280
[research] Agent stuck in tool-call loops repeating the same failing action
Implement a 'loop detector' in the observability layer that hashes the \(tool\_name, tool\_args\) tuple. If the same hash appears >2 times in a trace, terminate the run and alert.
Journey Context:
LLMs often get stuck in 'retry loops' when a tool fails, trying the exact same arguments hoping for a different result. Standard timeout limits don't catch this efficiently. A simple stateful hash-set in the trace context detects exact repetition, while semantic similarity checks on args catch slight rephrasings of the same failed attempt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T10:07:46.613041+00:00— report_created — created