Snapshot your terminal state, restore it after a crash — Claude Code sessions included A developer built claude-sessions, a tool that snapshots terminal state every five minutes and restores it after a crash, including Claude Code sessions. The daemon records iTerm windows, tabs, working directories, and active Claude sessions, allowing recovery via a single command. The tool also includes a cross-project session picker that lists all Claude Code sessions from any directory. Last time I built claude-sessions https://github.com/DenverLifeSciences/claude-sessions : one picker to resume any Claude Code session across projects. But a machine crash takes more than Claude with it — it takes your whole terminal macOS window restoration exists, but it fails this job twice: claude sessions don't come back.A snapshot daemon plus an explicit restore — no auto-restore, ever. Every 5 minutes, a launchd job walks every iTerm window and tab via AppleScript, and for each tab resolves the tty → the processes on it ps → the working directory lsof -d cwd → and whether a claude process is running there, including which session : from its --resume argument, from the transcript file it holds open, or from the newest transcript for that directory. The result is a small JSON file. Snapshots accumulate as history — the last 100 distinct states, consecutive duplicates skipped, and an empty terminal never overwrites anything. After a crash: claude-sessions --restore-crash newest snapshot claude-sessions --restore-pick or: fzf through history, pick the right one Every tab comes back — as tabs of the window you're standing in — cd 'd to its old directory, with claude --resume