How to bring your Claude Code agents back after a reboot
Last updated 25 October 2026
What a reboot takes away.
Claude Code runs inside tmux, and when your computer restarts, tmux goes with it. The conversations are still on disk, and claude --resume can open any of them. The hard part is remembering which session ran in which window, in which folder, with which model and permission mode, for every agent you had open.
Who brings back what.
tmux-resurrect.
Saves your tmux sessions, windows and panes with their folders, and restores them. It can also restore what was on screen.
tmux-continuum.
Saves for tmux-resurrect every 15 minutes and restores the last save when tmux starts.
Hoptail.
Remembers each Claude Code agent in tmux: its window and pane, folder, session id, model and permission mode.
hoptail restorestarts it again in the same place withclaude --resume.
tmux-resurrect and tmux-continuum are open-source tmux plugins, not part of Hoptail. Checked on 25 October 2026.
Set it up
Install Hoptail 0.1.10 or later on your Mac or Linux machine and run setup. Already have it? Run
brew upgrade hoptail, or install the new archive on Linux. Hoptail remembers an agent once it starts or finishes a turn.brew install hoptail-app/tap/hoptail hoptail setupAdd tmux-resurrect and tmux-continuum to
~/.tmux.confwith TPM, the tmux plugin manager, then press prefix + I in tmux to install them. If a theme sets your status line, keep tmux-continuum last in the list.set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @continuum-restore 'on'Have tmux-resurrect run
hoptail restorewhen it finishes. Use the full path thatcommand -v hoptailprints: the hook doesn’t see thePATHfrom your shell profile. It’s/opt/on a Mac,homebrew/ bin/ hoptail /home/with Homebrew on Linux, andlinuxbrew/ .linuxbrew/ bin/ hoptail /home/from the archive.<you>/ .local/ bin/ hoptail set -g @resurrect-hook-post-restore-all '/opt/homebrew/bin/hoptail restore'Take
claudeout of@resurrect-processes, if your~/.tmux.confhas it there, for example as~claude->claude --resume. Otherwise tmux-resurrect startsclaude --resumewithout a session id, which opens the session picker, and Hoptail leaves that window alone.Reload the config, then see what Hoptail remembers and what it would start.
tmux source-file ~/.tmux.conf hoptail restore --list hoptail restore --dry-run
What happens after a reboot.
When tmux starts, tmux-continuum restores the last saved layout, and tmux-resurrect then runs hoptail restore. For each agent it remembers, Hoptail finds the window and pane by their names and numbers. If the pane holds an empty shell, Hoptail types one line there: cd to the agent’s folder and claude --resume with its session id, model and permission mode. Claude Code opens the conversation and waits, just as after a claude --resume of your own. Hoptail types nothing to the agent itself.
hoptail restore prints a line for each agent, such as dev:2: started or notes:main: skipped — its session is gone (no transcript). Your agents then show up in the Hoptail app on your iPhone as usual. No tmux-resurrect? Run hoptail restore --create yourself after a reboot: it makes each missing tmux session or window in the agent’s folder. You get your agents back, though not the rest of your layout.
What it leaves alone.
- Agents you quit. Leave an agent with
/exitand Hoptail forgets it. Closing the pane or the reboot itself doesn’t. - Busy panes. If a pane runs anything other than an empty shell, Hoptail skips it, so the line can’t land in another program. An agent that tmux-resurrect already started is skipped the same way.
- Agents without permission prompts. An agent that ran with
--dangerously-skip-permissionsor inbypassPermissionsmode never starts by itself. Start one in a terminal withhoptail restore --allow-bypassand its name, ashoptail restore --listshows it. This guards against an accidental start by a script or a hook; it isn’t a security boundary. - Sessions you exclude. Add a
restoreOfflist of tmux sessions or agent names to Hoptail’sconfig.json, for example"restoreOff": ["scratch", "dev:experiments"]. The file is in~/Library/on a Mac andApplication Support/ Hoptail ~/.config/on Linux.hoptail - Other flags. Hoptail brings back the model and the permission mode. A first prompt, an MCP config and other flags aren’t carried over.
Troubleshooting
- An agent didn’t come back? Run
hoptail restore --dry-run: it shows each agent and why it would be skipped. - The windows came back, the agents didn’t? Check the path in the hook against
command -v hoptail. - The session picker opened instead of the conversation?
claudeis still in@resurrect-processes. Take it out, as in step 4. - The list is empty? Hoptail notes an agent when it starts or finishes a turn. Check that Hoptail is running and its hooks are in place with
hoptail status.
FAQ
Do I need tmux-resurrect?
No, but it saves you work. Without it, run hoptail restore --create after a reboot and Hoptail makes the missing tmux sessions and windows for your agents.
Does it type into my agents?
No. It types one line into an empty shell, the same claude --resume you’d type yourself. The agent opens its conversation and waits for you.
Does it work with Codex?
Not yet. Today Hoptail remembers Claude Code agents.