[BUG] Claude Desktop MSIX — session history lost on restart (Windows 10)
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?
After closing and reopening Claude Desktop (MSIX/Windows Store version), the sidebar/history shows no previous sessions. Sessions are not lost — the .jsonl transcript files remain intact under %USERPROFILE%\.claude\projects\ — but the sidebar index is empty on every restart.
Root cause diagnosed:
The sidebar populates from Electron LocalStorage (LevelDB). Two problems found:
cached-sessionsis always[]— The LocalStorage key that indexes sessions for the sidebar is persistently written as an empty array. Confirmed across all.ldband.logfiles in the LevelDB store.
- Individual session entries have empty values — Each
cc-local_{uuid}entry stores{"value":"","tabId":"...","timestamp":...}— thevaluefield (which should contain session metadata JSON) is always an empty string.
Meanwhile, session metadata IS correctly written to .json.tmp files under the packaged cache (claude-code-sessions/{orgId}/{userId}/), but these are never finalized (atomic rename to .json fails silently) and the sidebar doesn't read from them anyway.
Evidence:
- 23
.jsonlsession transcripts exist on disk (no data loss) - 11
.json.tmpmetadata files with valid content (title, cwd, model, timestamps) - 0 finalized
.jsonmetadata files cached-sessionsin LocalStorage =[]in every LevelDB file- Manual rename
.json.tmpto.jsonworks fine (filesystem permissions OK) - Consistently reproducible across every app restart
What Should Happen?
Sidebar should show all previous sessions with correct titles and metadata after restarting Claude Desktop. The session metadata should be persisted to LocalStorage (or read from the .json.tmp files on disk as a fallback).
Error Messages/Logs
No error messages displayed. The failure is silent.
LocalStorage LevelDB analysis shows:
- cached-sessions key = [] (empty array) in all .ldb/.log files
- cc-local_{uuid} entries have {"value":"","tabId":"...","timestamp":...} (empty value field)
Session metadata .json.tmp files contain valid data but are never renamed to .json:
{"sessionId":"local_...","cliSessionId":"...","cwd":"...","createdAt":...,"lastActivityAt":...,"model":"claude-opus-4-6","isArchived":false,"title":"...","permissionMode":"default"}
Steps to Reproduce
- Install Claude Desktop from Microsoft Store (MSIX package:
Claude_pzs8sxrjxfjjc) - Open Claude Desktop, create one or more sessions
- Close Claude Desktop completely (including system tray)
- Reopen Claude Desktop
- Sidebar shows zero previous sessions
To verify sessions still exist on disk:
dir %USERPROFILE%\.claude\projects\*\*.jsonl
To verify LocalStorage has empty index:
grep -a "cached-sessions" "%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\Local Storage\leveldb\*.ldb"
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.63 (Claude Code) / Claude Desktop 1.1.5368.0 (MSIX)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
This bug is specific to the MSIX/Windows Store packaged version of Claude Desktop. The issue is in the Electron app's session persistence layer, not in Claude Code CLI itself.
Key paths involved:
- Real session transcripts:
%USERPROFILE%\.claude\projects\{project-hash}\{sessionId}.jsonl(intact, no data loss) - Session metadata cache:
%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\{orgId}\{userId}\local_{sessionId}.json.tmp - LocalStorage LevelDB:
%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\Local Storage\leveldb\
The bug appears to be that the Electron frontend writes session metadata to .json.tmp files on disk correctly, but fails to:
- Finalize the atomic rename from
.json.tmpto.json - Persist the session metadata into LocalStorage (the
cached-sessionsindex andcc-local_{uuid}value fields are always empty)
Windows 10 Home 10.0.19045, MSIX package Claude_pzs8sxrjxfjjc version 1.1.5368.0.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗