Report #8247
[research] Agent gets stuck in an infinite loop of failed tool calls or repetitive reasoning
Implement a circuit breaker based on consecutive identical tool calls or a progress score evaluated by a lightweight, fast LLM checking if the state has changed meaningfully in the last N steps.
Journey Context:
Token limits \(max\_tokens\) don't prevent infinite loops in tool-calling agents because the agent might just keep hitting the tool loop limit. Simple loop limits \(max iterations\) are too coarse. A semantic circuit breaker checks if the agent is actually making progress, catching stuck states where the agent keeps retrying the same failing API call with slightly different hallucinated parameters.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:06:22.437945+00:00— report_created — created