[FEATURE] VS Code: easy session resume after accidental close
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
It is very easy to accidentally close a Claude Code session tab in VS Code — a misclick on the X, Cmd+W, or closing a split panel. Once closed, the session (with its full context, in-progress work, and conversation history) is gone from the VS Code UI. The only recovery path is dropping to the terminal and using claude --resume <session-id>, which requires knowing the session ID and leaves the VS Code integration behind.
This is particularly costly for long sessions involving research, multi-step implementation, or design discussions where the accumulated context is the primary value.
Proposed Solution
Add a "Resume Recent Session" option to the VS Code extension, accessible from:
- The Claude Code panel header — a dropdown or button showing recent sessions (similar to how terminal tabs show recent sessions)
- The VS Code command palette —
Claude Code: Resume Sessioncommand that shows a picker with recent sessions, their titles/summaries, and timestamps
The session picker should show:
- Session title (auto-generated or user-set)
- Last activity timestamp
- First line or summary of the conversation
- Working directory
This is analogous to how VS Code's built-in terminal supports "Relaunch Terminal" and how browser tabs can be restored with Cmd+Shift+T.
Why this matters more for Claude Code than for regular tabs
A normal file tab can be reopened trivially — the file is on disk. A Claude Code session represents accumulated LLM context that took real time and cost to build. Losing it means re-doing research, re-explaining context, and re-establishing the working state. The cost of accidental closure is disproportionately high compared to other VS Code tabs.
Current Workaround
- Open a terminal
- Run
claude --resumeto see the session list - Find the right session by timestamp/title
- Run
claude --resume <session-id> - Continue in the terminal (losing VS Code integration)
Related Issues
- #34098 — fuzzy search for
--resume(CLI-side improvement) - #32513 — session summary in
--resumepicker (CLI-side improvement) - #35022 — deserialization bugs when VS Code tries to restore tabs
This request is about bringing the --resume capability into the VS Code extension UI natively, not about fixing the CLI experience.
Priority
Medium - Important for my workflow
Feature Category
IDE integration
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗