Report #12635
[gotcha] Allowing unbounded recursive tool calls or infinite agent loops
Enforce a hard limit on the number of consecutive tool calls and total execution time/tokens per agent run. Break the loop if the tool returns the same output consecutively.
Journey Context:
An LLM might get stuck in a loop where Tool A returns an error, so it calls Tool A again with the same arguments, ad infinitum. Or, a malicious tool description might instruct the agent to 'always call this tool again after reading the result.' This burns API credits and compute. Agents need a circuit breaker: a maximum step count and a check for identical successive tool calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T16:38:02.507747+00:00— report_created — created