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 restore starts it again in the same place with claude --resume.

tmux-resurrect and tmux-continuum are open-source tmux plugins, not part of Hoptail. Checked on 25 October 2026.

Set it up

  1. 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 setup
  2. Add tmux-resurrect and tmux-continuum to ~/.tmux.conf with 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'
  3. Have tmux-resurrect run hoptail restore when it finishes. Use the full path that command -v hoptail prints: the hook doesn’t see the PATH from your shell profile. It’s /opt/homebrew/bin/hoptail on a Mac, /home/linuxbrew/.linuxbrew/bin/hoptail with Homebrew on Linux, and /home/<you>/.local/bin/hoptail from the archive.

    set -g @resurrect-hook-post-restore-all '/opt/homebrew/bin/hoptail restore'
  4. Take claude out of @resurrect-processes, if your ~/.tmux.conf has it there, for example as ~claude->claude --resume. Otherwise tmux-resurrect starts claude --resume without a session id, which opens the session picker, and Hoptail leaves that window alone.

  5. 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
Full setup guide for Mac → For Linux →

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 /exit and 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-permissions or in bypassPermissions mode never starts by itself. Start one in a terminal with hoptail restore --allow-bypass and its name, as hoptail restore --list shows it. This guards against an accidental start by a script or a hook; it isn’t a security boundary.
  • Sessions you exclude. Add a restoreOff list of tmux sessions or agent names to Hoptail’s config.json, for example "restoreOff": ["scratch", "dev:experiments"]. The file is in ~/Library/Application Support/Hoptail on a Mac and ~/.config/hoptail on Linux.
  • 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? claude is 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.