Report #103509
[agent\_craft] Agent enters infinite loop after a tool error
Catch every tool failure and return a structured result with status: error, a one-line message, and a boolean retryable. Never return raw stack traces or empty strings to the model.
Journey Context:
Raw exceptions are noisy and variable; the model cannot reliably map them to a recovery action. Empty responses make the model assume success and continue with stale data. A stable error envelope lets the model decide whether to retry, escalate, or ask the user. The common mistake is letting the tool throw and hoping the model figures it out. Standardize the envelope across every tool in the agent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:31:22.767921+00:00— report_created — created