CLI Tool
Reboot your machine. Keep your Claude sessions.
claude-return detects running Claude Code sessions, bookmarks them, and restores each one in its own Yakuake tab after reboot. No more lost context.
Reboots kill Claude Code sessions.
You have five conversations going across five terminal tabs. You reboot. They're gone. You can dig through ~/.claude/projects/ to find session IDs, but matching them to the right project is painful.
claude-return snapshots your running sessions before shutdown and reopens each one in a dedicated Yakuake tab when you're back. One command to save, one command to restore.
$ creturn detect --save
found 4 claude sessions
saved to ~/.config/creturn/sessions.json
$ reboot
...
$ creturn restore
restored 4 sessions in Yakuake tabs
Three steps. Fully automatic.
Detect
Scans running processes with pgrep, walks the process tree, and matches each Claude session to its Yakuake tab via D-Bus.
Save
Matches processes to session files in ~/.claude/projects/ by timestamp proximity. Saves session IDs and working directories to a JSON bookmark file.
Restore
Opens a new Yakuake tab for each saved session and runs claude --resume with the session ID. You're back where you left off.
Details
Yakuake native
Uses qdbus to talk to Yakuake's D-Bus interface directly. Each session gets its own named tab, just like before the reboot.
Session management
List saved sessions with creturn show, remove specific ones with creturn rm, or clear everything with creturn clear.
Lightweight stack
Bash script with Python for JSON parsing. No dependencies to install, no daemon to run. Just a CLI you call when you need it.
Process tree walking
Doesn't just find claude processes. It walks up the process tree to find the parent terminal, matching session to tab automatically.
Install
Requires Yakuake (KDE terminal) and qdbus.
Clone the repo
git clone https://github.com/softwaresoftware-dev/claude-return.git
Add to your PATH
ln -s $(pwd)/claude-return/creturn ~/.local/bin/creturn
Save sessions before reboot
creturn detect --save