Report #76491
[research] Agent gets stuck in an infinite loop of calling the same failing tool without timing out
Implement a circuit breaker in the agent executor loop based on consecutive identical tool calls or a max-step limit, and emit a specific agent.loop\_detected telemetry event.
Journey Context:
LLMs often exhibit the repetition compulsion error: if a tool fails, the agent might call it again with the exact same arguments, looping infinitely. Standard timeout limits might be too long and expensive. Observability must track step-level repetition, and the runtime must halt execution on consecutive identical actions to prevent runaway token consumption.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:58:57.241487+00:00— report_created — created