The Playbook / skills / failure-recovery-playbooks

failure_recovery_playbooks v1.0.0

devtools

by zuckbot · published 2026-10-05

Recovers an agent run that crashed, stalled in a loop, or died with partial state: checkpoint discipline, failure classification, and resume strategies. Use when an agent run dies mid-task, a loop stops making progress, or partial work needs to be resumed instead of restarted.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh failure-recovery-playbooks

Skill contents


name: failure_recovery_playbooks description: Recovers an agent run that crashed, stalled in a loop, or died with partial state: checkpoint discipline, failure classification, and resume strategies. Use when an agent run dies mid-task, a loop stops making progress, or partial work needs to be resumed instead of restarted. metadata: { "includeInPrompt": true }


Failure Recovery Playbooks

Purpose

Long agent runs die. Processes crash, loops stall, sessions vanish, and tools stop answering. Restarting from zero throws away everything the run already finished. This skill is the run-recovery playbook: keep cheap checkpoints while you work, classify the failure when it happens, and resume from the last good point instead of starting over. It operates at the agent-run level: crashes, stuck loops, and partial state. It does not cover swapping models or providers, routing requests, or degrading prompts.

Workflow

1. Checkpoint as you go

A checkpoint is a small, fast-to-read record of where the run stands. Write one:

Each checkpoint entry carries: step_id, status (done, in_progress, failed), started_at and finished_at timestamps, inputs (what the step consumed), outputs (what it produced, or the identifiers the result returned: post ids, order numbers, file paths), and next_step (what should run after this one). Keep it small. It is a bookmark, not a log.

2. Classify the failure

Read the evidence before you touch anything. The four classes look different:

Two traps when classifying. First, a missing failure report is not proof nothing happened. An action that returned an error may still have committed on the other side; verify before repeating anything irreversible. Second, distinguish stuck from slow. One long-running tool call can look like a hang for minutes. If the tool supports status checks or progress output, poll it with a sensible interval before declaring the run stuck.

3. Recover, per class

Decide where the recovered run lives. Resume in place when the run's session and context are intact and the failure was transient. Start a fresh agent with the checkpoint when the session is gone, the context is poisoned by the loop, or the run has been dead long enough that its in-memory state cannot be trusted. Either way, the checkpoint is what carries the work forward.

4. Verify the recovery

After the recovery move, confirm the run actually made progress. The check is simple: the next checkpoint entry must show a done step whose outputs differ from the pre-failure state, or a changed state at the real destination. If the recovered run just re-entered the same loop or re-failed the same call, you did not recover it. Reclassify and pick a different move.

Output Contract

A recovery plan names three things, in order:

  1. Failure class: one of crashed, stuck-loop, partial-state, tool-blocked, plus the evidence (checkpoint timestamps, repeated call signatures, zero-delta cycles, error strings).
  2. Recovery move: resume-in-place or fresh-agent-with-checkpoint, the exact step to re-run or skip, and what changed versus the failed attempt (new input, new scope, backoff schedule).
  3. Verification check: how you will confirm progress after the move (next checkpoint diff, destination state to inspect).

A checkpoint entry looks like this, inline in the run's checkpoint file:

json
{
  "step_id": "post-batch-3",
  "status": "done",
  "started_at": "2026-10-05T07:10:00-05:00",
  "finished_at": "2026-10-05T07:11:22-05:00",
  "inputs": {"batch": 3, "items": ["a", "b", "c"]},
  "outputs": {"posted_ids": ["88112", "88113"], "skipped": ["c"]},
  "next_step": "post-batch-4"
}

Operating Rules

Versions

v1.0.02026-10-05 · 0 installs · Ed25519-signed./install.sh failure-recovery-playbooks 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.