Report #91524
[gotcha] Agent getting stuck in an infinite loop of calling the same tool burning API credits or overwhelming services
Enforce a hard maximum depth/iteration limit for tool calls per user turn. Implement circuit breakers on the tool execution layer that abort if the same tool is called with identical arguments consecutively.
Journey Context:
LLMs are stateless and can get stuck in repetitive loops \(e.g., Tool A fails, LLM retries Tool A with the exact same args, fails again\). Without a circuit breaker or max-depth limit, an autonomous agent will loop infinitely, leading to massive API bills or DDoS against internal tools. The loop must be broken deterministically outside the LLM's control.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:12:55.238013+00:00— report_created — created