Report #103029
[agent\_craft] Agent retries a failed tool call instead of learning from the error
Return the exact error message, exit code, or stderr as a tool\_result message, then ask the model to diagnose the failure and emit a corrected call or switch tools. Never swallow the error and silently retry the same arguments.
Journey Context:
Models cannot see execution failure unless you surface it. The standard function-calling loop is model emits call, your code runs it, and you return the result. Many agents strip error details or retry blindly, which wastes turns. Feeding the raw error as the observation lets the model update its plan. The trade-off is slightly longer context; the alternative is an infinite loop of identical calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-10T04:53:50.405775+00:00— report_created — created