Tool

Recover terminal workspaces after reboot

Restore tmux layouts, scrollback and coding conversations after a reboot while keeping deploy and development-server commands waiting for Enter.

Works with tmuxtmux resurrecttmux continuumclaude codecodex

88
Spark score
out of 100
Updated 3 days ago
Source checked never checked
Version 1.0.0
Models
claudegemini 2 0

Add to Favorites

Why it matters

Resume a tmux coding workspace after a reboot without rebuilding its layout or losing the active conversations.

Outcomes

What it gets done

01

Save tmux sessions, panes and scrollback periodically and at shutdown.

02

Find coding conversation identifiers and save their resume commands.

03

Restore the workspace while leaving deploys and development servers awaiting Enter.

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Overview

tmux-restore saves tmux layouts, directories and scrollback, then restores them when tmux starts. Supported coding tools reopen their previous conversations with the same flags, while commands such as deploys wait for Enter. Use it to recover a coding workspace after a reboot. Choose it when editors and monitors should restart but deploys and development servers should wait for confirmation.

What it does

tmux-restore saves a tmux workspace and restores it when tmux starts again, including after a reboot. It brings back sessions, windows, pane splits, working directories and scrollback. For panes running Claude Code, Codex, Gemini CLI, opencode or pi, it reopens the conversation that was active before shutdown, keeping the same flags.

The restoration policy distinguishes commands that restart from commands that need your confirmation. Editors and monitors restart automatically. Other commands, including a deploy or a development server, return typed at the prompt and wait for Enter. This lets you recover the workspace without automatically executing those commands again.

When to use - and when NOT to

Use it when a reboot would otherwise interrupt coding conversations and leave you rebuilding a collection of terminal windows. It is designed around preserving the working context of a tmux workspace across restarts.

It is less suitable if your goal is to restart every process unattended: the prompt-and-confirm behavior deliberately leaves some commands waiting for a manual action.

Inputs and outputs

The saved state comes from the current tmux workspace and the supported coding tools' own session files. A small adapter finds each conversation's identifier and records the command needed to resume it. The recovered result combines the terminal layout and history with commands that reopen the corresponding conversations.

Snapshots are taken every minute. A background service also performs a save as the machine begins shutting down, adding a shutdown save to the periodic schedule.

Integrations

tmux-resurrect records the workspace, while tmux-continuum restores it when tmux starts. The shutdown service uses systemd on Linux and launchd on macOS. Support for another coding tool can be added through an adapter described as one short file.

The installer supplies missing components, including tmux, TPM and the plugins, and enables them. Running the installer again updates the setup:

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

It is distributed under the MIT license.

Source README

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.

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.

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.