Cmux Restore — Development skill for Claude Code
Save and restore Claude Code sessions across cmux restarts.
How to install Cmux Restore
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open STRML/cmux-restore and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Cmux Restore does
Save and restore Claude Code sessions across cmux restarts.
Alternatives in Development
- Claude Supermemory — Persistent memory across sessions and projects using Supermemory 2.3k ★
- Tmux Claude Session Manager — Run many Claude Code sessions across your projects, each in its own tmux session — then list them, see which a 380 ★
- Harness Remote — Native-session control plane for Codex, Claude Code, OpenCode, OMP and PI 356 ★
README
cmux-restore
Resume Claude Code sessions after restarting [cmux](https://cmux.dev). When you quit cmux, all your running Claude sessions die. This saves them and brings them back.
How it works
- A Claude Code hook (
SessionStart) records each session's ID and cmux surface UUID as sessions start cmux-savesnapshots all running Claude processes, pairing each with its surface UUID and session IDcmux-restoresendsclaude --resumeinto each surface by UUID after cmux restarts
Surface UUIDs persist across cmux restarts, so restore targets each surface directly — no position matching or prompt parsing needed.
Why not just `claude --continue`?
`--continue` resumes the most recent session per project. If you have multiple Claude sessions in the same directory (common with monorepos or long-running tasks), `--continue` can't distinguish them. The SessionStart hook tracks the exact session ID per surface.
Install
git clone https://github.com/STRML/cmux-restore.git
cd cmux-restore
bash install.sh
This symlinks `cmux-save` and `cmux-restore` into `~/bin` and installs the hook script.
Then add the hook to `~/.claude/settings.json`:
{
"hooks": {
"SessionStart": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash $HOME/.claude/hooks/session-restore/on-session-start.sh",
"timeout": 5
}
]
}
]
}
}
Restart Claude Code or run `/hooks` to apply.
Usage
# Before quitting cmux: snapshot all Claude sessions
cmux-save
# After cmux restarts: resume all sessions
cmux-restore
# Preview without restoring
cmux-restore --dry-run
# Restore even if some Claude sessions are still running
cmux-restore --force
Requirements
- cmux
- Claude Code
jq- macOS (uses
lsofandps ewwfor process inspection)
H
Related Skills
Memo
Memo MCP -- save and restore conversation across agents
Resume Skills
Offline, local-only context migration skills across 9 coding-agent sources × 9 destination hosts (registry-der
Cmux Session Manager
Snapshot and restore cmux workspaces with Claude Code session resumption
Einstein Map
Persistent memory for OpenAI Codex and Anthropic Claude Code. Reuse context across sessions, search past conve
Rex Durable
Keep the programs in your Rex tabs across server restarts and reboots. fx, Claude Code, and Codex chats reopen
Claude Telegram Supercharged
Run Claude Code 24/7 from Telegram. Drop-in upgrade for the official plugin: voice notes both ways, a self-hea
Related Agents
Database Reliability Engineer
Use this agent to review database schema, indexing, backup/restore posture, and replication/failover configura
Scribe Agent
You are a specialized documentation agent. Your job is to create and maintain handoffs, update continuity ledg
Claude Code Tools
by Prasad Chalasani - Well-crafted toolset for session continuity, featuring skills/commands to avoid compacti