[BUG] VS Code extension: deleting a session is instant and permanent - no confirmation, no undo, transcript unlinked
Preflight Checklist
- [x] I have searched existing issues and this bug hasn't been reported yet (closest is #81064, which is about the desktop app, where a confirmation modal does exist — see "Additional context")
- [x] This is a single bug report (not multiple issues)
What's Wrong?
In the VS Code extension, clicking delete on a session in the session list deletes it immediately, with no confirmation prompt. One mis-click permanently destroys the session.
It is also unrecoverable. The delete unlinks ~/.claude/projects/<project-slug>/<session-id>.jsonl outright:
- The file does not go to the Recycle Bin (on Windows), so there is no OS-level undo.
- There is no in-app undo, no archive, and no "recently deleted" view.
~/.claude/backups/holds only.claude.jsoncopies, not transcripts.~/.claude/file-history/<session-id>/(edit snapshots) is not a fallback — it only exists for sessions that made file edits, and holds no conversation.- Nothing usable remains in
~/.claude/debug/,~/.claude/cache/, or~/.claude/sessions/— the pid record insessions/*.jsonkeeps the session id, but the transcript it points at is gone.
So the only remaining recovery paths are VSS "Previous Versions" (if System Protection happens to be enabled) or a raw disk undelete tool. For a long session that represents hours of work, a single unconfirmed click is a lot to lose.
What Should Happen?
At minimum, deleting a session should require a confirmation step.
Better: make the delete recoverable instead of irreversible — delete immediately with an Undo toast, and move deleted sessions to a "Recently deleted" list with explicit permanent removal and/or expiry after N days. That way accidental deletes cost nothing and there is no per-delete modal tax when pruning several sessions.
If neither is in scope soon, moving the transcript to the OS trash/Recycle Bin instead of unlinking it would at least make recovery possible.
Error Messages/Logs
None — the deletion succeeds silently. There is no log entry recording which session was deleted, which also makes it impossible to identify afterwards what was lost.
Steps to Reproduce
- Open the Claude Code VS Code extension in a project with existing sessions.
- Open the session/resume list.
- Click the delete action on a session.
- The session disappears at once, with no confirmation dialog.
- Check
~/.claude/projects/<project-slug>/— the corresponding<session-id>.jsonlis gone, and it is not in the Recycle Bin.
Claude Code Version
2.1.251
Platform
VS Code extension (entrypoint: claude-vscode)
Operating System
Windows 11 Pro (10.0.26200)
Additional context
Related: #81064 asks for the desktop app's delete-session confirmation modal to be replaced with an undoable delete plus a "Recently deleted" view. The two are complementary — the desktop app has a confirmation and wants recoverability instead, while the VS Code extension currently has neither. A shared "delete is instantly undoable, transcript retained for N days" behaviour across surfaces would resolve both.