A clear, actionable error returned as the tool result (what failed and how to fix it, such as a missing argument or a rate limit), not a crashed loop and not a raw stack trace.
Distinguish retryable errors (timeouts, rate limits: retry with backoff) from permanent ones (bad arguments, no permission) so the agent corrects or stops.
Cap retries, and for long-running actions return a handle that the agent polls instead of calling again.
Loading…