Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Claude Sessions RestoreNew to Visual Studio Code? Get it now.
Claude Sessions Restore

Claude Sessions Restore

Fahad Jabbar

|
2 installs
| (0) | Free
See every Claude Code session for this workspace and bring them back after a restart. Copy a session id, copy a ready-to-run resume command, or reopen the terminals you lost.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Claude Sessions

See every Claude Code session that belongs to the folder you have open, and bring back the ones you lost when VS Code or your machine restarted.

Why

Claude Code writes a durable transcript for every session, but the record of which sessions were open in which window is keyed by process id and is wiped the moment the process exits. After a restart the conversations are all still on disk — you just have no way to find out which ones belonged to the window you were working in.

What it does

  • Lists the sessions for the current workspace, grouped by folder, with the first prompt as the title plus branch, age and transcript size.
  • Click a session to read it. The conversation opens as a formatted, read-only document so you can work out which session you want before starting anything. Clicking never launches a process.
  • Search Sessions — find a session by something said in it, not by its title.
  • Resume in New Terminal (the terminal button on the row) — opens a terminal in the session's folder and resumes it. This is the only thing that starts a session.
  • Fork Session — resume into a new session id, leaving the original conversation untouched.
  • Copy Resume Command — puts a command on your clipboard that works from anywhere.
  • Copy Session ID — the bare id, for sharing or scripting.
  • Delete Transcript — reclaim disk, with a confirmation showing exactly what goes.
  • Warns you if Claude Code is set to delete your transcripts sooner than you'd expect, and offers to fix it.
  • Offers to reopen sessions that were running in this workspace last time the window was open. It always asks; nothing is restored automatically.

Finding a session

Two problems show up as soon as you have real history. A single workspace can easily hold a hundred sessions, and a session's title is its first prompt — which is almost never how you remember it. You remember the bug you were chasing, not how you opened.

So the tree groups by folder (switch to age, or turn grouping off, from the view's toolbar), and Search Sessions reads through the transcripts themselves for whatever you type. Search covers what was said — your prompts, Claude's replies, and the arguments of tool calls — but deliberately not tool output, because searching that makes every session match everything. Picking a result opens the conversation scrolled to the match.

Sessions whose working directory is under the system temp folder are hidden by default. Those are scratchpads Claude Code made for itself, not work you'd want back.

Copy Session ID vs Copy Resume Command

claude --resume <id> resolves a session id only from the directory the session was created in. From anywhere else it fails with No conversation found with session ID, even though the id is valid and the transcript exists.

So Copy Session ID gives you the raw id for pasting into an issue or a script, while Copy Resume Command gives you something that actually runs:

Set-Location -LiteralPath 'D:\Side Projects\my-app'; claude --resume 2c470112-…
cd '/home/you/my-app' && claude --resume 2c470112-…

Your transcripts are deleted after 30 days

This is worth knowing regardless of whether you use this extension. Claude Code's cleanupPeriodDays setting defaults to 30, and cleanup runs at startup as a hard delete — no Trash, no log, no prompt.

The extension checks this on startup and offers to change it for you. It writes only the one key, keeps a .bak of your previous file, and refuses to touch settings.json at all if it can't parse it. You can also do it by hand in ~/.claude/settings.json:

{
  "cleanupPeriodDays": 3650
}

This setting lives in your user settings and covers every project — you don't need it in each project's .claude/settings.local.json.

The extension can only show you sessions that still exist on disk. It cannot recover transcripts that have already been deleted.

Reading a conversation

The raw transcript is one JSON object per line and routinely tens of megabytes, so opening it directly is not much use. Clicking a session renders it instead: your prompts and Claude's replies, with tool calls summarized to a single line and tool output left out entirely — that output is the bulk of the bytes and almost none of the meaning.

The rendered document is virtual. It exists only in the editor, so there is no second copy of your transcript on disk. Very long sessions are capped at the first 500 messages. Open Raw Transcript in the right-click menu is still there if you want the underlying .jsonl.

Privacy

Everything is local. The extension reads ~/.claude/projects/ (honoring CLAUDE_CONFIG_DIR) and stores a small list of session ids and folder paths in VS Code's workspace state. No transcript content is copied anywhere, and nothing is sent over the network.

Be aware that transcripts themselves contain whatever passed through your sessions — file contents, environment variables, anything you pasted. Treat ~/.claude/projects/ as sensitive, and keep any backup of it out of synced folders.

Settings

Setting Default Description
claudeSessions.groupBy folder How the tree is grouped: folder, age or none.
claudeSessions.hideScratchpadSessions true Hide sessions whose cwd is under the system temp folder.
claudeSessions.warnAboutRetention true Warn when transcripts are set to be deleted sooner than expected.
claudeSessions.retentionWarningDays 90 The threshold that warning uses. Claude Code's own default is 30.
claudeSessions.promptToRestore true Offer to reopen sessions that are no longer running.
claudeSessions.snapshotIntervalSeconds 15 How often the live session registry is mirrored to durable storage.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft