Here's what I do to survive macos updates, random restarts, crashes etc. I had Claude Code to configure all of this:
Terminal Setup:
- Alacritty as your terminal
- tmux as your session manager
- Auto-start tmux in Alacritty configuration
Key Protection:
# Alacritty auto-starts tmux sessions
tmux new-session -s main # Creates persistent session
# tmux shortcuts (prefix: Ctrl+a)
# Sessions persist even if terminal closes
Plugins:
tmux-resurrect and tmux-continuum plugins to automatically save/restore sessions with a simple "dev" command.
The tmux session will survive terminal crashes/closes, so you can reconnect to your Claude session by reopening Alacritty (which auto-attaches)
Ok, I take back some of this. Its survived a macos update once. I got all 4 claude windows and their sessions back. However, the next time, it reopened 4 panes but I lost all Claude sessions.
I checked out the demo and it looks great. I am guessing it supports 4 concurrent claude sessions? I cannot find this in docs
Terminal Setup: - Alacritty as your terminal - tmux as your session manager - Auto-start tmux in Alacritty configuration