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)
Example session: save a snapshot named work with 9 workspaces and 29 tabs, show its workspaces and tabs, then restore it. Only the one closed workspace is reopened, with its Claude Code and Codex sessions resumed; the 26 tabs already open are left alone.

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.

  1. 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
  2. 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
  3. 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 save to 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
recent lists agent sessions from the last day that are not open in cmux, and can reopen them.
Scriptable
Every command takes --json and --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.

AgentSupportResumes with
Claude CodeFull (tested)claude --resume <id>
CodexFull (tested)codex resume <id>
GrokResume only (untested)grok -r <id>
OpenCodeResume only (untested)opencode --session <id>
PiResume only (untested)pi --session <id>
ompResume only (untested)omp --session <id>
CampfireResume only (untested)campfire --session <id>
AmpResume only (untested)amp threads continue <id>
Cursor AgentResume only (untested)cursor-agent --resume <id>
Gemini CLIResume only (untested)gemini --resume <id>
AntigravityResume only (untested)agy --conversation <id>
Rovo DevResume only (untested)acli rovodev run --restore <id>
Hermes AgentResume only (untested)hermes --resume <id>
GitHub Copilot CLIResume only (untested)copilot --resume <id>
CodeBuddyResume only (untested)codebuddy --resume <id>
Factory DroidResume only (untested)droid --resume <id>
Qoder CLIResume 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.

Read the docs

Source

The code, the architecture notes for adding an agent or a terminal, and releases.

Open on GitHub