VSCode extension: Session History panel empty/stale due to missing or orphaned sessions-index.json
Environment
- Claude Code: 2.1.216
- VSCode: 1.136.2 (Windows)
- OS: Windows 11 (build 10.0.26200)
- Project folders located under a Google Drive–synced path (
...\MyDrive\...) - Habitually run multiple VSCode windows simultaneously, each on a different project folder
Problem
The Session History panel in the VSCode extension shows no sessions (and nothing under Archived) for several projects, even though the underlying transcript files exist on disk and are actively being written to.
Inspecting ~/.claude/projects/<project>/ directly shows real, growing .jsonl transcripts, but the Session History UI has nothing to display. Investigation shows the panel is driven by a per-project sessions-index.json manifest, not the .jsonl files themselves, and that manifest is unreliable:
- For two of my active projects,
sessions-index.jsondoesn't exist at all, despite multiple session transcripts being present. - For a third project,
sessions-index.jsonexists but lists only one session from over a month ago (2026-02-09), pointing to afullPathfile that no longer exists on disk. Two newer sessions from2026-09-09and2026-09-17(the current one) are present as.jsonlfiles but are absent from the index.
Impact
Transcripts aren't actually lost, but the extension gives the strong impression that chat history has disappeared, since the only user-facing way to browse past sessions (Session History) is empty or stale.
Suspected trigger
Running multiple concurrent VSCode windows across different project folders may cause the index writer to skip updates or race/fail silently. A synced-drive project path (Google Drive) may also be a factor, though the index files themselves live under the local ~/.claude directory, not the synced project folder.
Repro steps
- Open a project folder in VSCode, start a Claude Code session, exchange a few messages.
- Open a second, different project folder in a separate VSCode window and do the same.
- Return to the first project's Claude Code panel and open Session History.
- Compare the sessions listed in the UI against the
.jsonlfiles actually present in~/.claude/projects/<encoded-project-path>/.
Expected: Session History reflects all transcripts present on disk for that project.
Actual: Session History is empty, or shows only a stale entry pointing at a since-deleted transcript file.