Retry
Configure retry limits and delays between attempts.
You can control how many times TofuPilot retries a phase when it explicitly returns a Retry action. By default, TofuPilot allows up to 3 retry attempts.
phases:
- name: Network Connect
python: phases/network
retry:
limit: 5
delay: 1sTriggers
TofuPilot only retries phases when:
- The phase explicitly returns
PhaseResult.RETRYfrom Python - You configure a Next Action using
then:to retry on specific outcomes (e.g.,then: fail: retryorthen: error: retry)
The retry does not happen automatically on failure or measurement validation errors - you must explicitly trigger it.
Limit
The limit specifies how many retry attempts are allowed after the initial execution. For example, limit: 3 means up to 3 retries after the first attempt (4 total attempts). The default limit is 3 if not specified.
Delay
You can add an optional delay between retry attempts using human-readable format: ms (milliseconds), s (seconds), m (minutes), h (hours).
How is this guide?