Skip to main content
Use output validation when downstream PHP code requires a predictable shape. Model retries cover transient request failures; keep retries for side-effecting tools inside the tool itself and make them idempotent.

Configure retries

The run result contains its status, steps, messages, normalized usage, stop reason, and final output. Inspect these fields instead of treating the final text as the complete execution record.
Use stop conditions to enforce budgets and errors and troubleshooting to choose recoverable failure behavior.
Last modified on July 26, 2026