Skip to content

Instantly share code, notes, and snippets.

@n3tman
n3tman / restore-claude-sessions-fixed-README.md
Created July 30, 2026 01:17
Recover Claude Code Desktop sidebar sessions from CLI history (Windows, MSIX)

Claude Desktop — Session Recovery

Rebuilds the Claude Desktop Code sidebar when your conversations have vanished from it.

Your conversations are not stored in the sidebar. Claude Code keeps each one as a .jsonl transcript under ~/.claude/projects/, and the sidebar is a separate index of small local_*.json registration files. Lose the index — most often by reinstalling or resetting the app — and every conversation is still sitting on disk while the sidebar comes up empty.

This script reads the transcripts and rebuilds the missing registrations, restoring each session's real title, model, working directory and timestamps so the sidebar looks the way it did before.

It only ever adds registration files. Transcripts are read-only to it, and sessions already listed in the sidebar are skipped, so it is safe to re-run.