Report #56272
[research] Agent stuck in infinite tool-calling loops, burning through tokens without failing
Set a maximum iteration limit per agent run, and implement a telemetry alert on the 'tool call to completion' ratio; a ratio > 3:1 almost always indicates a loop.
Journey Context:
Agents often get stuck in loops \(e.g., tool returns error, agent retries with same args\). Standard timeout limits might be too generous, leading to massive bills. Monitoring the ratio of tool calls to final answers in real-time allows you to kill the run early. The iteration limit acts as a hard circuit breaker for runaway context windows.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:56:40.882743+00:00— report_created — created