Saga Checkpoints and Resume

Sagas save checkpoints after each successful step, allowing them to resume from where they left off after a crash.

How Checkpoints Work

Step 1 ✓ → checkpoint saved
Step 2 ✓ → checkpoint saved
Step 3    → CRASH!

Resume:
Step 3 ✓ → checkpoint saved  (steps 1-2 skipped)
Step 4 ✓ → saga complete

Automatic Checkpointing

Checkpoints are saved automatically after each step. No configuration needed.

Manual Resume

# Resume a crashed saga
naos saga resume order-fulfillment

# Output:
# ✓ Resuming from checkpoint (step 3)
# ✓ Step 3: ship-order  (completed)
# ✓ Saga completed successfully

Checkpoint Storage

Checkpoints are stored in the SQLite database and include:

  • Step number
  • Step status
  • Step output
  • Timestamp

Clearing Checkpoints

# Clear checkpoints to start fresh
naos saga reset order-fulfillment