cmux · Claude Code · Codex
Save your cmux workspaces. Bring them back resumed.
sessionsnap takes named, versioned snapshots of your cmux workspaces and the coding-agent sessions in their tabs. Later it reopens only what is missing, with each agent resumed in its own folder with the flags it was started with.
$ sessionsnap save work
Saved work v3: 9 workspaces, 29 tabs (+2 tabs, 1 tab moved)
$ sessionsnap show work
work v3 · 2026-10-12T09:41:07+05:45 · +2 tabs, 1 tab moved
Cascadia (3 tabs) /Users/me/code/cascadia
#1 claude Fix login redirect
#2 codex Review payments PR
#3 shell dev server
…
$ sessionsnap restore work
+ create workspace Cascadia (3 tabs)
+ Fix login redirect
+ Review payments PR
+ dev server
= 26 tab(s) already open or skipped
Restore 3 tab(s)? [y/N] y
✓ create workspace Cascadia with 3 tab(s)
Install from Terminal
curl -fsSL https://sessionsnap.pawanpaudel.com.np/install.sh | sh
curl -fsSL https://sessionsnap.
pawanpaudel.com.np/install.sh | sh
Free and open source (MIT). macOS with cmux 0.64 or newer; one binary in
~/.local/bin, and nothing runs in the background. Update with
sessionsnap update; remove with sessionsnap uninstall.
On Linux, sessionsnap installs, updates and uninstalls, but saving and restoring don't work
yet: cmux on Linux is a different app with a different command line.
Save, edit, restore
Every snapshot is one you ask for. Nothing watches your terminal.
-
Save
Capture every open workspace, its tabs, and the agent session in each tab with the flags it was started with. Saving to an existing name adds a version.
save worksave work -w Cascadia -
Edit
Rename, reorder and remove workspaces, move tabs between them, or add an agent session by its ID. Each edit is a new version you can diff.
tabwshistorydiff -
Restore
See the plan first, then reopen only what is missing. Agent tabs come back resumed; plain tabs reopen in their folder.
restore work --planrestore work
What it does
A single Rust binary with a CLI, a web UI in the cmux Dock, and cmux palette commands.
- Snapshots with history
- Every
saveto an existing name is a new version. List, diff and restore any version, and prune old ones. - Agent-aware restore
- Agent tabs come back with
claude --resume <id>,codex resume <id>and so on, keeping their original flags. - Only what is missing
- A restore is a plan you can preview with
--plan. Workspaces and tabs that are already open are left alone. - Find lost sessions
recentlists agent sessions from the last day that are not open in cmux, and can reopen them.- Scriptable
- Every command takes
--jsonand--yes, with stable exit codes. A Claude Code skill teaches agents to use it. - Careful with your shell
- Every word of a restore command is shell-quoted and session IDs are checked. Credential-like flags and environment variables are never saved.
Supported agents
Claude Code and Codex are fully supported and tested. The others are resumed with the
command cmux documents for them, but have not been tried with sessionsnap yet.
sessionsnap agents shows which are on your PATH.
| Agent | Support | Resumes with |
|---|---|---|
| Claude Code | Full (tested) | claude --resume <id> |
| Codex | Full (tested) | codex resume <id> |
| Grok | Resume only (untested) | grok -r <id> |
| OpenCode | Resume only (untested) | opencode --session <id> |
| Pi | Resume only (untested) | pi --session <id> |
| omp | Resume only (untested) | omp --session <id> |
| Campfire | Resume only (untested) | campfire --session <id> |
| Amp | Resume only (untested) | amp threads continue <id> |
| Cursor Agent | Resume only (untested) | cursor-agent --resume <id> |
| Gemini CLI | Resume only (untested) | gemini --resume <id> |
| Antigravity | Resume only (untested) | agy --conversation <id> |
| Rovo Dev | Resume only (untested) | acli rovodev run --restore <id> |
| Hermes Agent | Resume only (untested) | hermes --resume <id> |
| GitHub Copilot CLI | Resume only (untested) | copilot --resume <id> |
| CodeBuddy | Resume only (untested) | codebuddy --resume <id> |
| Factory Droid | Resume only (untested) | droid --resume <id> |
| Qoder CLI | Resume only (untested) | qodercli --resume <id> |
Full support also reads the agent's session history: titles, sessions,
recent, and checking that a saved session still exists. cmux records
which agent runs in a tab; for agents other than Claude Code it does so only after
cmux hooks setup <agent>.
A web UI in the cmux Dock
sessionsnap ui serves a small page on
127.0.0.1 and shows it in the cmux Dock, or run
“sessionsnap: Open UI” from the cmux palette. It stops after 30 minutes without use.
Snapshots and history
Save what is open, update a snapshot from what is open, compare two versions, or restore an older one.
Edit by dragging
Rename, reorder and remove workspaces, drag tabs between them, and add agent sessions or shell tabs. Edits are previewed and saved as one version.
Restore and recent
Tick the workspaces and tabs you want, see what would open, then restore. Recent lists agent sessions that are not open in cmux.
Documentation
Reference
Install, every command and flag, JSON output and exit codes, the web UI, files, security, updating and uninstalling.
Source
The code, the architecture notes for adding an agent or a terminal, and releases.