Report #4237
[research] Agent gets stuck in an infinite loop of tool calls, draining token budgets
Instrument telemetry to track tool call depth and consecutive identical tool calls; automatically abort and alert if the agent exceeds a threshold \(e.g., 3 consecutive identical calls with identical arguments\).
Journey Context:
LLMs sometimes get stuck in repetitive action loops, especially when a tool returns an unexpected error format. Standard timeout limits don't catch this because the agent is actively making calls. Tracking the hash of consecutive tool calls in the trace allows you to break the loop early.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:04:54.040406+00:00— report_created — created