- Transient errors: Temporary issues like network failures or rate limits. Restate automatically retries these until they succeed or the retry policy is exhausted.
- Terminal errors: Permanent failures like invalid input or business rule violations. Restate does not retry these. The invocation fails permanently. You can catch these errors and handle them gracefully.
Retrying LLM calls
LLM API calls can suffer from transient failures (rate limits, network issues, provider outages). Restate retries failed LLM calls so your agents recover automatically.Default behavior
Setting a retry policy
Tool execution errors
Restate makes tool execution resilient by retrying transient errors and propagating terminal ones.Transient errors
Setting a retry policy on run actions
Terminal errors
For errors that should not be retried (invalid input, business rule violations, resource not found), use aTerminalError in your tool. Restate does not retry these: