tmux-restore

agent
Security Audit
Fail
Health Pass
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 60 GitHub stars
Code Fail
  • rm -rf — Recursive force deletion command in install.sh
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Reboot-proof tmux: every session, layout and scrollback comes back, and Claude Code, Codex, Gemini CLI, opencode and pi reopen the conversations they were in.

README.md

tmux-restore

Reboot-proof tmux. Your coding agents pick up mid-conversation.

tests MIT license tmux plugin

What it does · Install · How it works · Agents · Caveats · Contributing

Ever rebooted and lost a dozen tmux windows, along with the agent conversations running in them?
tmux-restore saves everything every minute and right before shutdown, and puts it back when tmux
starts. Panes running Claude Code, Codex, Gemini CLI, opencode or pi reopen the exact
conversation they were in.

A tmux window with Claude Code, vim and a dev server. tmux is killed and started again: the conversation, vim and the layout come back, and the dev server's command waits on the prompt.

What it does

  • Everything comes back. Sessions, windows, splits, working directories and scrollback.
  • Agents resume mid-conversation. Each one reopens its own conversation, with the same flags.
  • Saved at shutdown, not just on a timer. Every minute, plus once more as the machine goes down.
  • Nothing risky re-runs. Editors and monitors restart. Anything else (a deploy, a dev server)
    comes back typed on the prompt, waiting for Enter.

Install

curl -fsSL https://raw.githubusercontent.com/andrewboldi/tmux-restore/main/install.sh | bash

It installs whatever is missing (tmux, TPM, the plugins) and turns everything on. Run it again to
update. Rather not run a script? Install by hand.

How it works

  1. Save. Every minute, tmux-resurrect
    records every session, window, pane and its scrollback.
  2. Rewrite. For each pane running an agent, a small adapter finds the conversation's id in
    the agent's own session files and saves the command that resumes it.
  3. Shutdown. A background service (systemd on Linux, launchd on macOS) saves once more the
    moment the machine starts going down.
  4. Restore. When tmux starts, tmux-continuum
    puts it all back, and the agents reopen their conversations.

More in how it works. Using another agent? An adapter is one short file;
see CONTRIBUTING.md.

License

MIT. Built on tmux-resurrect and tmux-continuum by Bruno Sutic and contributors.

Reviews (0)

No results found