Skip to main content

🔁 Failure handling & retry policy

When a scheduled job or agent run fails, ToothFairyAI detects the failure and retries it automatically — up to 3 attempts by default, with a customisable re-attempt policy. No human needs to intervene, click retry, or re-trigger the run: the platform notices the failure on its own and re-executes.

Automatic retry​

  • Default: 3 attempts. A failed job is automatically re-attempted up to three times before it is surfaced as failed.
  • Customisable re-attempt policy. The number of retries is configurable per job, so teams running critical routines can raise the attempt count and teams running cheap idempotent tasks can lower it.
  • Zero-touch recovery. Transient failures — a tool timing out, a rate limit, a temporary connection drop — are absorbed by the retry loop without any operator action.

Structured error responses​

The SDK returns structured, typed error responses so calling code can distinguish failure classes and react programmatically (see SDK Errors). A failure produces a real, machine-readable error — never a silent stop.

What this means operationally​

ScenarioWhat happens
A tool call times out mid-RoutineThe run fails, is detected, and is retried automatically (up to the configured attempt count)
A scheduled Task fails on a transient errorAutomatic re-attempt per the retry policy — the next scheduled run also proceeds normally
All retry attempts exhaustedThe job is surfaced with its failure state and structured error details for diagnosis