Skip to content
Agentmart
Submit a tool

cmux-recover-sessions

Bulk recover Claude Code sessions after a crash, power loss, OOM kill, or reboot by scanning the .jsonl files Claude Code persists automatically.

Skill by devseunggwan

IndexedMIT★ 1
Write a review

Chalk Labs

Need help deploying cmux-recover-sessions?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/devseunggwan-cmux-recover-sessions

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Bulk recover Claude Code sessions after a crash, power loss, OOM kill, or reboot by scanning the .jsonl files Claude Code persists automatically. Interactive interview chooses recovery scope and layout. Use this when sessions died and you need them back. The .jsonl scan reflects each session's real final state, so no snapshot taken before the crash is needed.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/cmux-recover-sessions

What's inside

Skill name
cmux-recover-sessions
Description
Bulk recover Claude Code sessions after a crash, power loss, OOM kill, or reboot by scanning the .jsonl files Claude Code persists automatically. Interactive interview chooses recovery scope and layout. Use this when sessions died and you need them back. The .jsonl scan reflects each session's real final state, so no snapshot taken before the crash is needed.
License
MIT
Instructions
285 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • files: referenced but missing: scripts/install.sh
  • body: contains an absolute path from the author's machine

Files (3)

  • SKILL.md
  • claude-recover-scan
  • cmux-recover-sessions

SKILL.md (first lines)

# Recover Sessions (cmux)

## Overview

Bulk recover Claude Code sessions after crash or power loss into cmux workspaces.
The bundled `claude-recover-scan` finds the sessions on disk; `cmux-recover-sessions` reopens each one through the cmux workspace/split API.

**Core principle:** Claude Code conversations are safely persisted to disk as `.jsonl` files. Recovery = find saved sessions and open them in cmux workspaces.

## The Iron Law

```
RECOVERY IS NEVER DESTRUCTIVE. LIVE WORKSPACES MUST NOT BE TOUCHED.
```

Recovery reads `.jsonl` files and re-opens them in new cmux workspaces. It must never:
- Close or replace any currently running cmux workspace
- Overwrite or delete saved conversation files
- Modify working directories — `cwd` is informational only

## When to Use

- After a Bun segfault crash that killed a Claude Code session
- After a Mac power loss when all cmux workspaces are gone
- After reboot when previous work sessions need to be restored

## Prerequisites

- `cmux-recover-sessions` script bundled at `${CLAUDE_SKILL_DIR}/cmux-recover-sessions`; no install step (`scripts/install.sh` can additionally symlink it into `~/.local/bin` for running the tool from a terminal — optional, not part of this skill's flow)
- `claude-recover-scan` (the session scanner, `python3` standard library only) bundled next to it at `${CLAUDE_SKILL_DIR}/claude-recover-scan`; the wrapper resolves it as a sibling, through symlinks
- cmux running (`cmux ping` should succeed) — not required for `--plain` and `--list` modes

## Process

### Step 1: Locate the Script

`${CLAUDE_SKILL_DIR}` is the directory holding this SKILL.md, regardless of the current working directory, so every step below addresses the bundled script by that path. Confirm it resolves:

```bash
"${CLAUDE_SKILL_DIR}/cmux-recover-sessions" --help
```

Also verify cmux is running:

```bash
cmux ping
```

### Step 2: Interview — Recovery Scope

Ask the user via `AskUserQuestion`:

**Q1: When did the crash happen?**

```
When did the crash occur?
1. Today (recover sessions from yesterday)
2. Yesterday
3. Earlier this week
4. Custom date range
```

- Option 1 → `--from <yesterday> --to <yesterday>`
- Option 2 → `--from <2 days ago> --to <yesterday>`
- Option 3 → `--from <this Monday> --to <yesterday>`
- Option 4 → Ask follow-up for start/end dates (MM-DD or YYYY-MM-DD)

### Step 3: Scan and Present Results

Run the scan with determined date range:

```bash
"${CLAUDE_SKILL_DIR}/cmux-recover-sessions" --list --from <start> --to <end>
```

Present the results to the user. If 0 sessions found, suggest widening the range.

### Step 4: Interview — Session Selection

Ask the user via `AskUserQuestion`:

**Q2: Which sessions to recover?**

```
Found N sessions. How to filter?
1. All (recover everything)
2. Date filter (narrow to specific day)
3. Implementation/dev sessions only
4. Large sessions only (>1M)
5. Let me pick by number
```

### Step 5: Interview — Layout

Ask the user via `AskUserQuestion`:

**Q3: How should sessions be arranged in cmux?**

```
How should sessions be opened?
1. Tabs — 1 workspace per session (default, recommended)
2. Split 1x2 — 2 sessions per workspace (top/bottom)
3. Split 2x1 — 2 sessions per workspace (left/right)
4. Split 2x2 — 4 sessions per workspace (grid)
5. Custom split (enter CxR)
6. Plain — output resume commands only (no workspace creation)
```

Show calculated workspace count: "N sessions ÷ P panes = W workspaces"

### Step 6: Final Confirmation

Present the recovery plan summary and ask for **explicit approval** before executing:

```
═══════════════════════════════════════════════
 Recovery Plan (cmux)
═══════════════════════════════════════════════

From devseunggwan/praxis, MIT.

More from devseunggwan/praxis

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Oct 23, 2026 (8 days ago)
Last release
Oct 24, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from devseunggwan

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get cmux-recover-sessions running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying cmux-recover-sessions?

CallGet help
Cite this page

cmux-recover-sessions skill. Agent Mart. https://agentmart.dev/skills/devseunggwan-cmux-recover-sessions (last updated 2026-10-24)