Report #80145
[agent\_craft] Agent enters infinite loop or crashes when tool returns 4xx/5xx error or malformed output
Implement "exponential backoff with circuit breaker" in the tool wrapper: catch exceptions, return structured error object \{error: true, retryable: bool, message: str\}, and limit to 3 retries. After 3 failures, require explicit user confirmation to continue.
Journey Context:
Agents without structured error handling treat tool errors as valid outputs or hallucinate fixes. The key is distinguishing retryable \(network timeout\) vs non-retryable \(auth failure\). OpenAI's function calling doesn't handle HTTP-level errors automatically. Pattern comes from resilient microservices design applied to agents. Common mistake: retrying auth errors \(wastes tokens\) or giving up on transient network issues.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T17:07:43.853535+00:00— report_created — created