[BUG] VS Code extension wipes ~/.claude/sessions/ index on restart after VS Code update, clearing sessions panel history

Resolved 💬 3 comments Opened Apr 30, 2026 by theandrewmillett Closed May 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Describe the bug

After a VS Code update, the Claude Code VS Code extension re-initialized its local state and wiped all files in ~/.claude/sessions/. The sessions panel is now completely blank. The actual conversation data (.jsonl files in ~/.claude/projects/) survived intact — only the sessions index layer was cleared.

This is distinct from #53717 (Desktop app, empty JSONL stubs). Here the JSONL files have full content (5.5 MB), but the index files that point to them are gone.

Environment

  • OS: Windows 11 Pro (10.0.26100)
  • Claude Code: VS Code extension (not Desktop app, not standalone CLI)
  • VS Code: updated prior to incident

Evidence / Investigation

All files under ~/.claude/ show the same reset timestamp (8:42 AM on the day of the VS Code update), indicating the extension re-initialized its entire local state:

~/.claude/sessions/        ← wiped; only one new file (294 bytes, current session)
~/.claude/.credentials.json
~/.claude/session-env/
~/.claude/shell-snapshots/
~/.claude/ide/

The ~/.claude/projects/<project>/ directory was not wiped:

deaab55a-b316-4e6f-a91c-2390d315603a.jsonl   5,749,117 bytes  (04/29)
1fedb810-94c8-4ae1-95e5-033fb095c213.jsonl     256,810 bytes  (today, current session)
77031f06-a401-4f84-b0a8-4fc8ed69f776.jsonl      75,603 bytes  (today)

The session index file format (from the surviving entry) is:

{
  "pid": 18364,
  "sessionId": "1fedb810-94c8-4ae1-95e5-033fb095c213",
  "cwd": "s:\\...",
  "startedAt": 1777557381494,
  "procStart": "...",
  "version": "2.1.123",
  "peerProtocol": 1,
  "kind": "interactive",
  "entrypoint": "claude-vscode"
}

Since the JSONL files are intact, --resume <session-id> via CLI would theoretically recover them, but the standalone CLI is not installed (VS Code extension only).

What Should Happen?

Session history should persist across VS Code updates. At minimum, the sessions panel should be able to reconstruct its list from the existing .jsonl files in ~/.claude/projects/.

On startup, if ~/.claude/sessions/ is empty but ~/.claude/projects/ contains .jsonl files, reconstruct the sessions index from the existing project files rather than starting blank.

Error Messages/Logs

Steps to Reproduce

  1. Use Claude Code VS Code extension on Windows with existing session history
  2. Apply a VS Code update and restart
  3. Reopen Claude Code panel — sessions history is blank

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.123

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗