Retry
Classified re-attempt with backoff conditioned on failure type
Mechanism
Intelligent re-attempt of failed coordination with failure-informed strategy. After BREAK + COMPENSATE, agent evaluates: (1) CLASSIFY failure—transient (timeout, rate-limit, network blip) vs persistent (capability gap, protocol mismatch, explicit rejection). (2) CHECK retry_hint from BREAK (partner may say 'don't retry' or 'wait 30s'). (3) CONSULT failure_history—same error repeating? CircuitBreaker threshold reached? (4) COMPUTE Backoff—adaptive based on failure type: transient uses ExponentialBackoff, persistent uses longer fixed delay or triggers abort. (5) VERIFY changed_conditions—has something changed that makes retry worthwhile? (6) EXECUTE retry if within budget and conditions favor success, else ABORT with retry_exhausted status. Retry CARRIES FORWARD: failure context, partner state observations, environmental data. Retry RESETS: coordination state (fresh start, don't resume mid-stream). It handles transient failures by re-queuing the task, distinguishing them from terminal failures that trigger Break and Compensate.
Invariants
- Classifies the failure before deciding, and records the classification.
- Backoff applied between attempts.
- Attempts do not exceed `max_attempts`.
Parameters
- max_attempts: type=Integer, range=[1, 10], description=Attempts before giving up. Referenced by the third invariant, which previously named a Max_Retries nothing defined.
Preconditions
- A failure has occurred and its details are available to classify
Postconditions
- Success or definitive failure
Failure modes
- Misclassifying persistent failure as transient (wastes retry budget).
- Misclassifying transient as persistent (gives up too soon).
- Backoff too aggressive (slow recovery from transient issues).
- Backoff too timid (hammers already-failing system).
- CircuitBreaker too sensitive (abandons recoverable situations).
- Retry succeeds but same failure recurs (didn't address root cause).
- Changed_conditions check misses relevant changes.
Where this came from
—
Builds on
- CircuitBreaker references
- Compensate references
- Break references
- Backoff references
- ExponentialBackoff composes_with
Used by
- ContingencyPlan references
- FrameError references
- Plateauturn references
- ReAttempt references
Related
Identity
- Ref:
Retry#4f9f - Hash: sema:Retry#mh:SHA-256:4f9fdfc5b1dafd31221e9426d62c02af80c6356ef5b446eddd3f50da961d1aa2
- Library: bootstrap 0.11.0, root a6a3d1ff0f98
- License: Not stated; check the repository