Report #74596
[research] Agent gets stuck in an infinite tool-call loop, draining API credits without failing
Implement a hard max\_steps circuit breaker in the agent runtime, and emit a specific telemetry span \(loop\_detected\) when the agent calls the same tool with the same arguments consecutively.
Journey Context:
LLMs can get trapped in repetitive action loops \(e.g., repeatedly searching for a file that doesn't exist\). Without a circuit breaker, this runs forever. Telemetry must distinguish between 'long task' and 'stuck in a loop' to trigger alerts and prevent cost overruns.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T07:48:29.970194+00:00— report_created — created