# how to resume bernstein after a crash

Canonical URL: https://bernstein.run/q/how-to-resume-a-killed-bernstein-run
Markdown URL: https://bernstein.run/q/how-to-resume-a-killed-bernstein-run.md
Tags: recovery, lifecycle

bernstein writes a write-ahead log to .sdd/runtime/wal/<run-id>.wal.jsonl on every state transition. when you restart with bernstein run, the orchestrator loads the wal, rebuilds the task table, re-attaches to live worktrees under .sdd/worktrees/, and continues from the last persisted checkpoint. tasks that were mid-flight when the process died are re-queued with a +1 attempt counter; the prior worktree is preserved so you can diff it before the retry overwrites the branch. bernstein verify --wal-integrity <run-id> checks the log's hash chain before you resume. never grep for the literal string bernstein and kill matches; use the pid file under .sdd/runtime/ instead (bernstein stop --hard does this for you).

## Related

- https://bernstein.run/q/how-do-i-stop-or-pause-bernstein
- https://bernstein.run/q/fail-closed-agent-orchestrator
