Report #28980
[frontier] AI agent stuck in an infinite loop of failed tool calls
Enforce a strict 'tool call budget' per task step \(e.g., max 3 retries\). If a tool fails, return a highly structured error message including the exact schema expected and the invalid parameters passed. If the budget is exhausted, force the agent to stop and ask the user for help or try a different approach.
Journey Context:
When an agent calls a tool with malformed arguments and fails, it often receives a generic error string. It then 'apologizes' and tries the exact same malformed call again, entering an infinite loop. This burns API credits and hangs the system. The common mistake is relying on the LLM to self-correct from vague errors. The fix requires deterministic orchestration logic: the orchestrator must count failures and format errors to explicitly show the mismatch between the agent's output and the tool's schema, breaking the cognitive loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:02:10.571634+00:00— report_created — created