| name | boot-resume |
| description | Zero-cooperation session recovery after gateway restart. No checkpoints, no hooks, no agent involvement — just reads the evidence and picks up where it left off. Use when: the gateway was killed mid-task (SIGTERM, OOM, SIGKILL, crash), sessions were interrupted mid-turn with tool calls in progress, the agent stopped responding after a restart, a user reports the agent went silent after a crash, you need to manually check whether any sessions need recovery, or you want automatic resume without writing any checkpoint logic.
|
| version | 1.1.0 |
| homepage | https://github.com/Belugary/boot-resume |
| license | MIT |
| user-invocable | true |
| metadata | {"openclaw":{"emoji":"⚡","category":"ops","tags":["restart","recovery","session","resilience","resume","crash","gateway"],"requires":{"bins":"[Truncated]"},"files":["install.sh","scripts/boot-resume-check.sh","templates/boot-resume.conf","templates/boot-resume-wake.service"]}} |
Boot Resume
Zero-cooperation session recovery after gateway restart. No checkpoints, no hooks, no agent involvement — just reads the evidence and picks up where it left off.
Problem
When the gateway restarts, any in-flight agent turn dies mid-execution. Session history is preserved on disk, but the agent doesn't know it needs to continue. Users must manually tell each interrupted session to resume.
Checkpoint-based approaches require the agent to save state before dying. Unexpected kills (SIGKILL, OOM, power loss) bypass this entirely.
Solution
A deterministic shell script runs on every gateway start via systemd ExecStartPost. No LLM in the detection loop.
┌─────────┐ ┌──────────┐ ┌──────────┐
│ Scan │ ──▶ │ Detect │ ──▶ │ Resume │
│sessions │ │ JSONL │ │ cron add │
│ .json │ │ tail │ │--sys-evt │
└─────────┘ └──────────┘ └──────────┘
- Scan — finds sessions updated within the last 20 minutes
- Detect — reads the last 5 JSONL lines to classify session state
- Resume — schedules a one-shot
openclaw cron add --system-event --wake now to inject a continuation prompt
Key insight: the JSONL session files already contain all the evidence needed to detect an interruption — no pre-save required.
Detection Rules
| Last JSONL Entry | Status | Meaning |
|---|
toolResult | INTERRUPTED | Tool returned, agent never processed it |
assistant (empty text) | INTERRUPTED | Tool call dispatched, killed before response |
user (non-trivial) | INTERRUPTED | Message received, never processed |
assistant (with text) | COMPLETE | Session ended normally — skip |
user (trivial: "ok", emoji) | TRIVIAL | No meaningful request pending — skip |
Install
One command
bash {baseDir}/install.sh
Deploys three components: