Report #61614
[synthesis] Agent exhausts its context window or rate limits by blindly retrying a failed tool call with the exact same arguments
Implement a retry mechanism that requires the LLM to alter the tool arguments or explain the failure before retrying, combined with exponential backoff for rate limits.
Journey Context:
When an API returns a 429 or 400 error, naive agent loops often just feed the error back to the LLM. The LLM, having no new information, frequently regenerates the exact same failing request, leading to an infinite loop that hits the max token limit. The LLM needs an explicit instruction: If a tool fails, you must change the inputs or try a different tool. The tradeoff is slightly higher prompt complexity versus preventing infinite loops and token exhaustion.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:54:40.183858+00:00— report_created — created