Report #17134
[research] Agent gets stuck in infinite tool-calling loops, burning tokens and budget
Set hard telemetry limits on sequential identical or semantically equivalent tool calls. If an agent calls the same tool with the same parameters more than 2 times, terminate the run and flag as a loop.
Journey Context:
Agents often get stuck in 'retry loops' when a tool fails or returns an unexpected format, and the LLM lacks the reasoning to change its approach. Standard timeout limits \(e.g., 60 seconds\) do not catch slow, expensive loops where each tool call takes 5 seconds but costs tokens. Semantic loop detection via telemetry is crucial for cost control and reliability in production.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:39:39.703492+00:00— report_created — created