Report #12087
[research] Autonomous agents get stuck in infinite tool-calling loops, draining token budgets.
Instrument telemetry to track the loop depth and semantic similarity of consecutive tool calls. Set a hard circuit breaker on depth, and a soft alert on similarity > 0.95, indicating the agent is retrying the same failing action.
Journey Context:
Simple loop counters \(max\_iterations\) are too rigid; sometimes an agent needs 10 steps, sometimes 3. However, if an agent calls read\_file three times in a row with the same arguments, it is stuck. Telemetry must capture the arguments of the tool calls, not just the function names, to detect semantic loops versus legitimate sequential steps.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T15:07:34.786035+00:00— report_created — created