[BUG] VSCode: Past Conversations dropdown missing most sessions (files intact on disk)

Resolved 💬 7 comments Opened Mar 31, 2026 by xmeloun Closed Jun 19, 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?

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 .jsonl session 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
  • cleanupPeriodDays is set to 99999 — 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:

  1. sessions-index.json is not the cause — rebuilding it from all .jsonl files has no effect on the UI
  2. VS Code's state.vscdb contains no session tracking data for Claude Code
  3. Sessions can disappear from open tabs — clicking a tab with a session can cause it to vanish
  4. 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

  1. Use Claude Code VS Code extension over several weeks (accumulate 50+ sessions)
  2. Restart VS Code
  3. Open "Past Conversations" dropdown
  4. Compare visible sessions with files in ~/.claude/projects/<project>/*.jsonl
  5. 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

View original on GitHub ↗

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