[BUG] VSCode: Past Conversations dropdown missing most sessions (files intact on disk)
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?
The VS Code extension's "Past Conversations" dropdown only shows a fraction of actual sessions. Session .jsonl files remain intact on disk but are invisible in the UI.
Current state (2026-03-31):
- 247
.jsonlsession files exist in~/.claude/projects/<project>/ - Only ~15-20 appear in the "Past Conversations" dropdown
- Sessions as recent as 2 days old disappear after VS Code restart
cleanupPeriodDaysis set to99999— files are NOT being deleted- Searching in the dropdown does NOT find the missing sessions
CLI confirms data is intact:claude --resume in the terminal correctly lists and can resume ALL 247 sessions, including those invisible in the VS Code extension.
Previous Reports
This is a continuation of #29331 (auto-closed as stale, not fixed). Key findings from that investigation:
sessions-index.jsonis not the cause — rebuilding it from all.jsonlfiles has no effect on the UI- VS Code's
state.vscdbcontains no session tracking data for Claude Code - Sessions can disappear from open tabs — clicking a tab with a session can cause it to vanish
- The extension appears to use
mtime-based directory scanning with an undocumented limit on results
What Should Happen?
All session files on disk should appear in the "Past Conversations" dropdown, searchable and resumable. If there's a performance concern with large numbers of sessions, pagination or lazy loading would be preferable to silently hiding them.
Steps to Reproduce
- Use Claude Code VS Code extension over several weeks (accumulate 50+ sessions)
- Restart VS Code
- Open "Past Conversations" dropdown
- Compare visible sessions with files in
~/.claude/projects/<project>/*.jsonl - Many sessions are missing from the dropdown despite files existing on disk
Environment
- Extension:
anthropic.claude-code-2.1.72-win32-x64 - OS: Windows 11 Pro 10.0.26200
- Sessions on disk: 247
- Sessions visible in UI: ~15-20
cleanupPeriodDays: 99999
Related Issues
#29331, #32821, #28561, #30916, #31108, #22462, #24729, #18619
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗