[BUG] Claude Desktop MSIX — session history lost on restart (Windows 10)

Resolved 💬 2 comments Opened Mar 7, 2026 by Epic-pita Closed Mar 10, 2026

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:

  1. cached-sessions is always [] — The LocalStorage key that indexes sessions for the sidebar is persistently written as an empty array. Confirmed across all .ldb and .log files in the LevelDB store.
  1. Individual session entries have empty values — Each cc-local_{uuid} entry stores {"value":"","tabId":"...","timestamp":...} — the value field (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 .jsonl session transcripts exist on disk (no data loss)
  • 11 .json.tmp metadata files with valid content (title, cwd, model, timestamps)
  • 0 finalized .json metadata files
  • cached-sessions in LocalStorage = [] in every LevelDB file
  • Manual rename .json.tmp to .json works 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

  1. Install Claude Desktop from Microsoft Store (MSIX package: Claude_pzs8sxrjxfjjc)
  2. Open Claude Desktop, create one or more sessions
  3. Close Claude Desktop completely (including system tray)
  4. Reopen Claude Desktop
  5. 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:

  1. Finalize the atomic rename from .json.tmp to .json
  2. Persist the session metadata into LocalStorage (the cached-sessions index and cc-local_{uuid} value fields are always empty)

Windows 10 Home 10.0.19045, MSIX package Claude_pzs8sxrjxfjjc version 1.1.5368.0.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗