Recovery restores progress after a failure without assuming that every action is safe to repeat. For agent workflows, it includes both reconciling external effects and repairing failures within a defined authority boundary. section 6.4.4 section 7.3.1
Recover an uncertain external commit
An executor submits a backfill job, but crashes before recording the service’s receipt. Mark the step VERIFYING and query the service using the same commit identity rather than immediately replaying the call. Record a confirmed success as DONE, return a confirmed rejection to a retry path, and keep an unresolved result blocked or send it for human review. section 6.4.4
Idempotency requires an explicit contract: a service recognizes the same intended operation through a request token and rejects reuse with different parameters. The token record and mutation must be coordinated. This is not the same as exactly-once delivery. For partially failed workflows, saga transactions can use compensating actions, but those actions also require tracking and verification. section 6.4.4
Figure 7.2 The Self-Heal Loop. The agent captures a baseline, diagnoses a failure, checks repair authority, applies a change atomically, verifies it, and either recovers, retries, rolls back, or hands off.
The Self-Heal Loop shows the path from baseline and diagnosis through authorized repair, verification, retry, rollback, or handoff. section 7.3.1
A recovery loop should verify every mutation, preserve a rollback point, and stop when progress stalls. Its writable scope can include the current artifact, allow-listed tool arguments, and isolated temporary state; the verifier, acceptance criteria, and protected tests remain read-only. Shared rules and configuration changes start as proposals, while production policy, credentials, the main branch, and safety boundaries stay outside the loop. section 7.3.1
Recovery cannot supply authoritative knowledge the system lacks. Request that knowledge or hand off the task instead of repeating the loop. Local repairs also need cross-run evaluation: a successful fix does not by itself justify a permanent shared rule. Verification, retries, and repair history add latency, cost, and state complexity, while shared external state may be difficult to restore. section 7.3.1 section 7.0









