Feature: Workspace-level session save/restore (multi-session persistence)
Problem
Power users running multiple Claude Code sessions simultaneously (5-10+ tabs across multiple terminal windows) lose their entire workspace layout after system reboots. Restoring requires manually:
- Opening the correct number of terminal windows with the right tab count
- Navigating to the correct working directory in each tab
- Using
claude --resumeand finding the correct session ID for each tab
This is particularly painful on Windows where automatic restarts (Windows Update) are common and unavoidable.
Current workarounds
claude --resume <session-id>works for individual sessions but requires knowing which session was where~/.claude/sessions/<PID>.jsonprovides PID→sessionId mapping but only while processes are alive- No built-in way to snapshot or restore a multi-session workspace
Proposed solution
claude workspace save [name]
Snapshots all currently running Claude Code sessions:
- Session IDs
- Working directories
- Terminal window/tab grouping (via process tree)
- Optional: session display names
Saves to ~/.claude/workspaces/<name>.json
claude workspace restore [name]
Restores a saved workspace:
- Opens terminal windows with the correct tab layout
- Runs
claude --resume <session-id>in each tab - Restores working directories
claude workspace list
Lists saved workspaces with session counts and last-saved timestamps.
Auto-save option
claude workspace autosave --interval 5m — periodic snapshots for crash recovery.
Why this matters
As Claude Code becomes a primary development tool, users naturally accumulate multiple long-running sessions for different concerns (debugging, feature work, research, DevOps, etc.). The inability to persist this workspace state is the #1 friction point after unexpected reboots.
Technical notes
- Session persistence data already exists in
~/.claude/projects/and~/.claude/sessions/ - Windows Terminal CLI (
wt) supports programmatic window/tab creation - On macOS/Linux,
tmuxor similar could be used for restore - The grouping of sessions into windows can be determined from the process tree (terminal → shell → node)
Environment
- Claude Code 2.1.76+
- Windows 11 / macOS / Linux
- Windows Terminal / iTerm2 / any terminal emulator with CLI
Related issues
- #35005 — session restore in VS Code webview
- #33130 — lost chats after restart
- #9258 — history sessions lost
---
Authored with Claude Code — the irony of using the tool to request the feature that would make the tool more usable is not lost on me.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗