β‘ Workflows
Retry & Rollback (resilient task execution)
Ensure tasks complete reliably by retrying on transient failures, rolling back partial changes on permanent failures, and escalating when recovery is impossible.
Bundle files
πORCHESTRATION.mdβ Orchestration
1# ORCHESTRATION.md
2
3## Diagram
4
5 ββββββββββββββββββββββββββββββββββββββββββββ
6 β Task Assigned β
7 ββββββββββββββββββββββ¬ββββββββββββββββββββββ
8 βΌ
9 ββββββββββββββββββββββββββββββββββββββββββββ
10 β Executor Agent β
11 β (attempt task) β
12 ββββββββββββββββββββββ¬ββββββββββββββββββββββ
13 βΌ
14 βββββββββββ
15 β Success?β
16 ββββββ¬βββββ
17 yes β no
18 ββββββββββββ΄βββββββββββ
19 βΌ βΌ
20 ββββββββββββββββ βββββββββββββββββββββ
21 β Deliver β β Retry budget β
22 β Result β β exhausted? β
23 ββββββββββββββββ ββββββββββ¬βββββββββββ
24 no β yes
25 ββββββββββββ΄βββββββββββ
26 βΌ βΌ
27 ββββββββββββββββ ββββββββββββββββββββ
28 β Backoff + β β Rollback Agent β
29 β Retry β β (compensate + β
30 ββββββββ¬ββββββββ β restore state) β
31 β ββββββββββ¬βββββββββββ
32 βΌ βΌ
33 ββββββββββββββββ ββββββββββββββββββββ
34 β Executor β β Escalate to β
35 β (re-attempt)β β Human β
36 ββββββββββββββββ ββββββββββββββββββββ
37
38
39## Workflow
40Retry & Rollback (resilient task execution)
41
42## Objective
43Ensure tasks complete reliably by retrying on transient failures, rolling back partial changes on permanent failures, and escalating when recovery is impossible.
44
45## Roles
46- **Executor:** attempts the task and reports success/failure with context.
47- **Retry Controller:** decides whether to retry (transient) or abort (permanent), manages backoff.
48- **Rollback Agent:** reverses partial changes using compensation actions.
49- **Escalation Target:** human or supervisor notified when all recovery is exhausted.
50
51## When to use
52- Tasks that modify state (deployments, data migrations, API calls).
53- Environments with transient failures (network, rate limits, timeouts).
54- Any workflow where partial completion is worse than no completion.
55
56## Protocol
571. Executor attempts the task and checkpoints state before mutations.
582. On failure, classify error:
59 - **Transient** (timeout, 429, 503): retry with exponential backoff.
60 - **Permanent** (4xx, validation, logic error): skip to rollback.
613. Retry up to N attempts (configurable budget).
624. If retries exhausted β trigger Rollback Agent.
635. Rollback Agent executes compensation actions in reverse order.
646. If rollback succeeds β report clean failure with context.
657. If rollback fails β escalate to human immediately.
66
67## Retry policy
68- **Max retries:** 3 (configurable per task)
69- **Backoff:** exponential (1s, 2s, 4s) with jitter
70- **Timeout per attempt:** 30s default
71- **Circuit breaker:** after 3 consecutive failures, pause all retries for cooldown
72
73## Rollback rules
74- Compensation actions must be idempotent.
75- Execute in reverse chronological order.
76- Each rollback step is itself retried once on failure.
77- Full rollback log with timestamps.
78
79## Rules
80- Never retry permanent errors.
81- Always checkpoint before mutation.
82- Rollback must leave system in a known-good state.
83- All attempts and outcomes logged for audit.
84
85## Deliverables
86- Execution attempt log (attempt #, error, classification)
87- Rollback action log (if triggered)
88- Final status: success | rolled-back | escalated
89- Metrics: attempts used, total elapsed time
90
Lines: 90 | Words: 415
Install
Copy bundle to your OpenClaw workspace.
curl -fsSL https://raw.githubusercontent.com/cerealskill/openclaw-agents/main/install.sh | bash -s workflow retry-rollback ENRate this agent
Loading...
Sign in to rate this agent
Includes
- β ORCHESTRATION.md
Info
- Slug
- retry-rollback
- Lines
- 90
- Words
- 415
