Report #36950
[agent\_craft] Agent gets stuck in infinite loop when API returns 429/500
Implement exponential backoff with circuit breaker pattern: max 3 retries with jitter, then escalate to user or fallback tool. Never auto-retry the same parameters without modification.
Journey Context:
Agents often default to 'retry immediately' which burns tokens and hits rate limits harder. The alternative is giving up too fast. The right balance is backoff with jitter \(to avoid thundering herd\) and a circuit breaker state \(track consecutive failures per tool\). After 3 failures, switch to a degraded mode or ask user. This prevents token waste and respects API limits while maintaining robustness.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T16:29:39.803047+00:00— report_created — created