Show HN: Tmux-restore saves tmux windows and agent sessions across reboots
TL;DR Highlight
It saves tmux state and agent conversations every minute and resumes them after reboot.
Who Should Read
Developers who lose dozens of tmux windows and Claude Code sessions on every reboot.
Core Mechanics
- It restores the whole tmux layout
- Sessions, windows, splits, working directories and scrollback come back.
- It is built on tmux-resurrect and tmux-continuum.
- Agents reopen mid-conversation
- Claude Code, Codex, Gemini CLI, opencode and pi are supported.
- Each one reopens its own conversation with the same flags.
- Saves every minute and again at shutdown
- A background service does the final save as the machine goes down.
- It uses systemd on Linux and launchd on macOS.
- Adapters find the conversation ID
- An adapter finds the ID in the agent's own session files.
- It saves the command that resumes that conversation.
- Risky commands are not re-run
- Editors and monitors restart.
- Deploys and dev servers are typed at the prompt and wait for Enter.
- Adding an agent takes one short file
- The README says an adapter is a single short file.
- See CONTRIBUTING.md for how.
Community Reactions
- Experience that resurrect alone missed agent sessions
- One user says long Claude Code sessions were not restored to their panes until this.
- They say everything is back in place after restore.
- Experience with the underlying plugins for 10+ years
- One user restores 40+ panes across 15+ windows after WSL restarts.
- They want to see whether this lives up to its foundations.
- Pointer to a similar tool
- session-keeper supports pi, Claude Code and Copilot CLI.
- It also saves long-running processes like tail -f and saves on keystrokes.
- Pushback on the need
- One comment says the terminal app could just handle --resume.
- Others note tmux v4.0 may get native save/restore, and VM hibernation is simpler.
How to Apply
- Read the install script, then install it today
- If you dislike piping to bash, download install.sh and read it first.
- Start an agent in tmux, wait for a save, then restart tmux and check the restore.
- Verify agent restore with a reboot test
- Open a few supported agent panes and one dev-server pane, then reboot.
- Check that conversations continue and the dev server waits for Enter.
- Write an adapter if your agent is missing
- Read CONTRIBUTING.md and write one adapter file.
- Find the conversation ID in the agent's session files and build the resume command.
Try It
# Paste into a terminal (read the install script before running it)
curl -fsSL https://raw.githubusercontent.com/andrewboldi/tmux-restore/main/install.sh -o install.sh
less install.sh
bash install.sh
# Next: start an agent in tmux, reboot, and check the same conversation reopensTerminology
Related Papers
How I Fight AI Brain Fry
Keeping tickets in git and deciding in one inbox tamed my 20-thread agent chaos
Goldman Sachs is pulling Claude Code from its bankers and traders
Goldman limits coding agents to engineers, cutting off traders and bankers
Agent memory needs its OpenTelemetry moment
Agent memory formats are fragmented, so this post proposes an OpenTelemetry-style shared spec.
Goodbye Claude, hello Pi
Frequent system prompt changes and token overhead pushed one dev from Claude Code to Pi.
The Components of Agent Memory
Giving Claude a memory folder plus dreaming lifted document QA scores from 13% to 48%
ChatGPT silently passes data between connectors and the bounty wants an ID card
With two connectors enabled, a follow-up tool call silently switched connectors
Claude Code sends your email address to websites
Claude Code put users' emails in curl User-Agent headers, prompting spam complaints and a built-in blocking mod
Launch HN: Rivet (YC W23) – Scale and Orchestrate Agents on S3
Running each agent as an Actor gave 4.99 ms p99 cold starts and 72 KB RAM per instance.