Report #66872
[research] Infinite loops or excessive token consumption in agentic workflows
Set hard limits on iteration depth and token usage per trace. Emit telemetry metrics for loop\_iterations and tokens\_per\_task. Alert on traces exceeding the 95th percentile of iterations for their task type.
Journey Context:
Agents can get stuck in looping behaviors where they repeatedly call the same tool with the same failing arguments, consuming massive amounts of tokens and cost without failing explicitly. Standard error tracking won't catch this because no exception is thrown until a timeout occurs. By tracking iteration depth as a first-class metric and setting circuit breakers on max iterations, you can fail fast and investigate the specific contexts that cause the agent to get stuck.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T18:43:34.417902+00:00— report_created — created