Unofficial VSCode extension — Automatically restore Claude Code CLI sessions after restart
v1.1.0-beta: This version adds urgent support for the resume dialog introduced in Claude CLI v2.1.90+. Because the CLI change was not accompanied by a public API, this extension detects the dialog via terminal output matching — behavior may be fragile. Please report issues at GitHub Issues.
v1.1.0-beta: このバージョンは Claude CLI v2.1.90+ で追加された resume ダイアログへの緊急対応です。CLI 側に公開 API がないため、ターミナル出力のパターンマッチで検知しており、動作が不安定になる可能性があります。不具合は GitHub Issues へ報告してください。
Features
Status bar shows live and idle session counts for the current project
QuickPick session manager: start new sessions, resume interrupted or completed sessions
Automatically restores interrupted sessions when VSCode restarts
Reset stale sessions — clear "active" entries whose terminal no longer exists
Diagnostic logging in the Output panel (channel: "TS Recall") for troubleshooting
Requirements
Claude Code CLI must be installed and available on your PATH
Settings
Setting
Default
Description
claudeResurrect.autoRestore
true
Automatically restore interrupted sessions on startup
claudeResurrect.autoRestoreMaxAge
24
Maximum age (hours) of sessions to auto-restore
claudeResurrect.claudePath
"claude"
Path to the Claude CLI executable
claudeResurrect.resumeDialogAction
"summary"
How to handle CLI's large-session resume dialog: summary, full, or ask
Limitations
Only sessions started through this extension are fully tracked. The status bar "live" count and auto-restore only cover sessions launched via the QuickPick menu or auto-restore. Sessions started manually in a terminal (e.g., claude or claude --resume) are not tracked as "live" — they may appear as idle in the session list even while running.
This extension does not manage session data. It only reads what Claude CLI creates. Sessions with no conversation (e.g., opened and immediately closed) are excluded from the session list, but cannot be deleted by this extension.
Read-only by design. Deleting or modifying ~/.claude/ data is out of scope. Use Claude CLI directly to manage session history.
WSL2 terminals are not fully supported. Shell integration does not reliably activate in WSL2 terminals, which can cause session restore commands to be sent before the shell is ready. If you need session persistence in WSL2, consider using tmux or similar terminal multiplexers instead. See #63 for details.
Data Access
This extension reads the following from ~/.claude/:
history.jsonl — session history (session ID, project path, first prompt, timestamp)
Directory listing of projects/<slug>/ (file names only, to locate session files)
File size of session JSONL files via stat() (content is not read)
This extension does NOT:
Write to ~/.claude/ (read-only access)
Read authentication tokens or API keys
Parse full conversation history
Send any data over the network
Collect telemetry
How we enforce this
All ~/.claude/ access is isolated in a single read-only module (claude-dir.ts)
CI checks block PRs that introduce write APIs or network calls outside allowed modules
The extension is open source — you can audit the code
日本語
非公式 VSCode 拡張 — Claude Code CLI のセッションを VSCode 再起動後に自動復元