Sidebar shows no sessions after restoring .jsonl transcripts from old install (data intact on disk, sessions-index.json absent)
Environment
- Claude Desktop, Windows 11 Pro (10.0.22631)
- Claude Code version 2.1.234
- entrypoint:
claude-desktop
Summary
After a Windows reinstall, my project moved from D:\CLAUDE_AI to F:\CLAUDE. The old Windows install was preserved on a secondary drive. I manually copied the old project's session data — 36 .jsonl transcripts (~105MB) plus their tool-results subfolders — from ~/.claude/projects/D--CLAUDE-AI (old install) into ~/.claude/projects/F--CLAUDE (current project), matching the exact schema of a live session file (same sessionId-per-line structure, same queue-operation header lines as an active session's transcript).
The Sessions sidebar for F:\CLAUDE shows none of the restored sessions — only the currently active one.
Steps to reproduce
- Have an existing project with session transcripts under
~/.claude/projects/<project>/*.jsonl - Copy additional valid
.jsonltranscripts (from another project or another machine's~/.claude/projects/<other-project>/) into that folder, matching the existing filename/schema convention - Fully quit and relaunch Claude Desktop (confirmed via PID change in
~/.claude/sessions/*.json, i.e., a real process restart, not just a window close) - Open the project — sidebar still only shows sessions that were live-created through the app itself
What I checked
- No
sessions-index.jsonexists anywhere under~/.claude/projects/F--CLAUDE/or the source project folder in this build — so if the sidebar is index-backed (per #66499), the index isn't being generated at all here, and there's no local file I could hand-edit to fix it. - The
mcp__ccd_session_mgmtlist_sessions/get_sessiontools also don't recognize the restored session IDs, though based on response latency (~5ms local IPC) this appears to be a separate "active session" tracking feature, not the transcript history store. - Reconnecting the original drive (
D:\CLAUDE_AI) that the sessions were originally created under made no difference. - The project registry entry in
~/.claude.jsonfor the current project exists and is otherwise normal.
Expected: Sessions with valid, correctly-placed .jsonl transcripts show up in the sidebar/resume picker regardless of how they got there.
Actual: Sidebar shows zero old sessions; data is fully intact and readable directly from the transcript files.
This looks closely related to #85209, #66499, #29220, and #76430 — reporting with a fuller repro in case the difference (no sessions-index.json present at all vs. a stale one) is useful signal.
3 Comments
For restored JSONL that does not appear in the sidebar, please test discovery from the restored project root and report only sanitized metadata.
Thanks for the detailed report. This is a good candidate for a bounded recovery check. Vetto 0.2.0-alpha.2 is available from npm and adds an experimental read-only Claude adapter. It treats Claude JSONL as opaque; it does not resume, rewrite, or reconstruct provider state. On a disposable copy, try:
npm install --global @shleddy/vetto@next;vetto rescue --adapter claude --root <CLAUDE_STATE_ROOT> --json scan; then use the exact returned key withdiagnoseandsnapshot ... --output ./vetto-recovery/session.jsonl. Please report OS, Claude/Vetto versions, sanitized JSON, and source SHA-256 before/after; never upload raw transcripts, settings, credentials, prompts, or tokens. An explicit unavailable/unsupported result is useful too.The 36
.jsonlfiles and the missingsessions-index.jsonare the useful evidence here: the conversation history is intact on disk, while Desktop's session list has not created or discovered matching metadata after the reinstall. That points to a missing-metadata or index path rather than deleted transcript files.I built
BasedGPT/claude-code-session-recoveryfor this file-versus-session-list case. From the toolkit checkout, runpython tools/diagnose.pyfirst and follow the exact command it prints. If it routes tosynth_session_metadata.py, review the dry-run rows before applying them, because restoring every orphan can also bring back sessions deliberately removed from Desktop. Keep copies of%APPDATA%\Claude\claude-code-sessions\and~\.claude\projects\, fully quit Claude Desktop including its tray process, and apply only the reviewed rows. The generated metadata needs to point itscliSessionIdat each existing transcript file.If
diagnose.pyidentifies an MSIX install, keep the result read-only because write-bearing metadata repairs may not surface through that install's internal index. The read-only Vetto scan suggested in the thread is also reasonable on a disposable copy if you want a second inventory; report only sanitised metadata and source hashes. Never upload raw transcripts, settings, credentials, prompts, or tokens.Hope this helps, if my tools are able to help you, would appreciate a ⭐ :)
The 36 intact .jsonl files with a missing sessions-index.json matches the pattern where Desktop's sidebar is projection-only. For a second opinion while waiting on indexing:
npx --yes @shleddy/vetto rescue --adapter claude --root <your-claude-state-root> --json scanwalks the projects tree directly, read-only and copy-only. It is labeled experimental precisely because Claude's format is treated as opaque - it will list what survived on disk without claiming to reconstruct the index.