Recover from tool errors
SetonError: "return-to-model" when the model can recover from a tool failure. The error becomes a structured tool result and the run can choose another action. Keep fail-run behavior for unsafe or unrecoverable operations.
Handle model, tool, validation, timeout, and continuation failures in PHP agents.
onError: "return-to-model" when the model can recover from a tool failure. The error becomes a structured tool result and the run can choose another action. Keep fail-run behavior for unsafe or unrecoverable operations.