Make OpenClaw agent workflows restart-safe using checkpoint files, idempotent step tracking, wake/resume handoff, and stale-checkpoint monitoring. Use when u...
Implement restart-safe execution with this sequence:
scripts/checkpoint_tool.py for deterministic checkpoint lifecycle:
start, update, resume, complete, listscripts/checkpoint_selfcheck.py for stale unfinished checkpoint alerts without LLM/tool-token usage..tmp then rename).memory/checkpoints/*.jsonmemory/checkpoints/*.json at workspace rootAdd this exact section:
## Restart-safe workflow rule
On startup, check `memory/checkpoints/*.json` for unfinished workflows. If found, acquire resume lock, validate checkpoint schema/hash, and continue from the last completed idempotent step.
Use host scheduler (launchd/systemd/cron), not LLM cron jobs.
checkpoint_tool.py start before risky step.checkpoint_tool.py update --complete <step> --step <next>.checkpoint_tool.py resume and continue.checkpoint_tool.py complete when done.ZIP package — ready to use