anthropics / anthropics/claude-code
VSCode extension: Session History panel empty/stale due to missing or orphaned sessions-index.json
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
**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//` 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.json` doesn't exist at all, despite multiple session transcripts being present.
- For a third project, `sessions-index.json` exists but lists only one session from over a month ago (`2026-02-09`), pointing to a `fullPath` file that **no longer exists** on disk. Two newer sessions from `2026-09-09` and `2026-09-17` (the current one) are present as `.jsonl` files 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**
1. Open a project folder in VSCode, start a Claude Code session, exchange a few messages.
2. Open a second, different project folder in a separate VSCode window and do the same.
3. Return to the first project's Claude Code panel and open Session History.
4. Compare the sessions listed in the UI against the `.jsonl` files actually present in `~/.claude/projects//`.
**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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Session History panel and the per-project sessions-index.json manifest; compare its entries and fullPath values with the .jsonl transcripts under ~/.claude/projects//. Reproduce the problem using two concurrent VSCode windows, then verify that the index reflects every existing transcript and removes or ignores stale paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100