Report #6963
[research] Agent gets stuck in an infinite loop of tool calls, draining API credits without completing the task
Instrument OpenTelemetry spans for every tool call and implement a cycle detector on the tool\_name \+ arguments\_hash sequence. Break execution if the identical tool call is made more than twice in a row without a change in arguments.
Journey Context:
LLMs often get stuck in retry loops when a tool returns an unexpected error format or the model forgets the prior result. Standard timeout limits are too coarse and waste time and money. Telemetry-based cycle detection catches the exact semantic repetition early.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:33:35.801949+00:00— report_created — created