alexcpn

Claude Restore — Development skill for Claude Code

Development community

Restore Claude Code sessions on Linux after a reboot, crash or accidental terminal close.

How to install Claude Restore

This entry records only its repository, not the path inside it, so there is no exact command to give. Open alexcpn/claude-restore and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Restore does

Restore Claude Code sessions on Linux after a reboot, crash or accidental terminal close. Reopens them with claude --resume as gnome-terminal tabs in the right folders: automatically at login, or from a GTK picker of your 15 most recent sessions. Single Python file, systemd user timer, GNOME.

Alternatives in Development

README

claude-restore

Bring your [Claude Code](https://claude.com/claude-code) terminal sessions back on Linux, after a reboot, a crash, or an accidental quit.

  • Pick from a list: press Super, type restore, tick the sessions you want, and they reopen as tabs in one new terminal window.
  • Automatic after a reboot: sessions that were open when the machine went down reopen at login.

It is a single Python file. The only dependency beyond Python is the GTK 3 bindings that GNOME desktops already ship.

Requirements

  • Linux with a GNOME-style desktop and gnome-terminal
  • PyGObject with GTK 3 for the picker dialog; most GNOME desktops include it
  • systemd user services
  • Python 3.8 or newer
  • Claude Code, with claude on your PATH or at ~/.local/bin/claude

Developed and tested on Pop!_OS (GNOME, X11). On Debian or Ubuntu, the desktop packages can be installed with:

sudo apt install gnome-terminal python3-gi gir1.2-gtk-3.0

Install

git clone https://github.com/alexcpn/claude-restore.git
cd claude-restore
python3 claude_restore.py install

`install` records the absolute path of the script, so if you move the folder, run it again.

It creates three things, all in your home directory:

File Purpose
~/.config/systemd/user/claude-restore-snapshot.{service,timer} Records running sessions every minute
~/.config/autostart/claude-restore.desktop Reopens the previous boot's sessions at login
~/.local/share/applications/claude-restore.desktop Adds "Claude Restore" to the app launcher

If the app does not appear when you search for it, log out and back in.

Usage

Press **Super**, type **restore**, and press Enter. The list shows the 15 most recent sessions that are not running, with their last-active time, title and folder.

Key Action
↑ ↓ Move between sessions
Space Tick or untick the highlighted session
Enter Reopen the ticked sessions, or the highlighte