[BUG] Claude Desktop (Windows Store / MSIX): Code sessions silently fail to persist due to EXDEV error inside MSIX sandbox, even when everything is on C: — resolved by switching to Win32 installer

Resolved 💬 6 comments Opened Apr 15, 2026 by o-samurai Closed Jun 16, 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?

When Claude Desktop is installed from the Microsoft Store (MSIX package) on Windows, Code sessions (including pinned ones) silently disappear from the sidebar after every app restart, even when all Claude-related paths (install location, AppData, temp, project working directory) reside on the same C: drive.

This is the same underlying fs.rename() EXDEV symptom as #32533, but the trigger is different:

  • #32533 triggers EXDEV because projects live on a different drive than %AppData%.
  • This issue triggers EXDEV because MSIX filesystem virtualization treats two paths as different "devices" inside the MSIX container, even though both physically resolve to C:\.

The compound failure is:

  1. The session save logic uses an atomic rename (<session>.json.tmp<session>.json) that fails with EXDEV: cross-device link not permitted inside the MSIX virtualization sandbox. No session is ever successfully persisted — every file remains stuck as .json.tmp.
  2. MSIX path virtualization redirects %APPDATA%\Claude\ to %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\, and scandir on the documented path fails with UNKNOWN: unknown error.

Switching to the Win32 installer from https://claude.ai/download resolves the issue. After migration, sessions and pinned state persist correctly across restarts.

What Should Happen?

Code sessions and pinned sessions should persist across Claude Desktop restarts on all supported install methods, including the Microsoft Store (MSIX) version.

Error Messages/Logs

[error] Failed to save session local_<uuid>: EXDEV: cross-device link not permitted,
  rename 'C:\Users\<user>\AppData\Roaming\Claude\claude-code-sessions\<accountId>\<orgId>\local_<uuid>.json.tmp'
  -> 'C:\Users\<user>\AppData\Roaming\Claude\claude-code-sessions\<accountId>\<orgId>\local_<uuid>.json'

[error] Failed to load persisted sessions: UNKNOWN: unknown error, scandir
  'C:\Users\<user>\AppData\Roaming\Claude\local-agent-mode-sessions\<accountId>\<orgId>'

[error] [LocalAgentModeSessionManager] loadSessions failed during account transition
  UNKNOWN: unknown error, scandir '...'

[error] Failed to read sessions directory: UNKNOWN: unknown error, scandir
  'C:\Users\<user>\AppData\Roaming\Claude\claude-code-sessions\<accountId>\<orgId>'

[info] Loaded 0 persisted sessions from
  C:\Users\<user>\AppData\Roaming\Claude\claude-code-sessions\<accountId>\<orgId>


Direct inspection of the real (MSIX-virtualized) session storage confirms that all session files remain as `.json.tmp` — none have been successfully renamed:


local_10895729-1fff-48cb-ab54-b321029c6552.json.tmp
local_30278ee5-28b3-46ba-b56a-7118b888d568.json.tmp
local_37ad692e-d88d-40e3-9a1a-c9d4140dce3d.json.tmp
... (23 files total, all .tmp, none committed to .json)


Note: every path the app references is on `C:\`. There is no second drive involved — the EXDEV originates from inside the MSIX container, not from a physical drive boundary.

Steps to Reproduce

  1. Install Claude Desktop from the Microsoft Store on Windows 10/11 (results in MSIX package Claude_<version>_x64__pzs8sxrjxfjjc)
  2. Open the Code tab and start one or more Code sessions (local or SSH)
  3. Pin a session to the sidebar
  4. Fully quit Claude Desktop
  5. Re-launch Claude Desktop
  6. Observe: sidebar shows no previous sessions; pinned sessions are gone
  7. Inspect the real session storage at %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\<accountId>\<orgId>\ — all files are .json.tmp (no .json files exist)

This reproduces when all Claude-related paths (install, AppData, temp, project) reside on a single drive, and projects are kept under the user profile — no multi-drive or unusual filesystem setup is required to trigger the bug.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.109

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

Environment details

  • OS: Windows 11
  • Claude Desktop: Claude_1.2581.0.0_x64__pzs8sxrjxfjjc (Microsoft Store / MSIX install)
  • Install location: C:\Program Files\WindowsApps\Claude_1.2581.0.0_x64__pzs8sxrjxfjjc
  • Real (virtualized) userData path: C:\Users\<user>\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\
  • Drive layout: C: (system), D:, E:, and F: drives present, but all Claude-related paths — install location, virtualized userData, %APPDATA%\Claude\, %TEMP% (C:\Users\<user>\AppData\Local\Temp), and the project working directory — reside on C:. No Claude-related path crosses a physical drive boundary, which rules out the multi-drive scenario described in #32533.

Workaround / migration that resolved it

Migrating from the Store (MSIX) install to the standalone Win32 installer resolves the issue in this environment.

  1. Back up existing data (use robocopy, not Copy-Item, because UWP-managed data is encrypted and Copy-Item fails):

``powershell
$src = "$env:LOCALAPPDATA\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude"
$backup = "$env:USERPROFILE\Desktop\claude-backup"
robocopy "$src" "$backup" ssh_configs.json /COPY:DAT
robocopy "$src\claude-code-sessions" "$backup\claude-code-sessions" /E /COPY:DAT
``

  1. Uninstall the Store version:

``powershell
Get-AppxPackage -Name "Claude" | Remove-AppxPackage
``

  1. Install Claude Desktop from https://claude.ai/download (Win32 installer).
  1. Restore session files, renaming .json.tmp.json in the process:

``powershell
Get-ChildItem "$backup\claude-code-sessions" -Recurse -Filter "*.json.tmp" | ForEach-Object {
$newName = $_.Name -replace '\.tmp$', ''
# copy to %APPDATA%\Claude\claude-code-sessions\<accountId>\<orgId>\ with new name
}
``

After this, sessions and pinned state persist correctly across restarts.

Junction points / symbolic links from %APPDATA%\Claude\ to the real virtualized path were attempted as a workaround but did not work — the MSIX sandbox either blocks scandir traversal or still triggers EXDEV on rename, depending on the directory.

Why this may not be a duplicate

| Issue | Symptom | Trigger | Status |
|---|---|---|---|
| #32533 | Sessions stuck as .json.tmp | Projects on D: drive while AppData on C: | Closed as duplicate |
| #25579 | Config/MCP files invisible at documented path | MSIX virtualization | Closed as invalid |
| #36642 | Cowork VM rootfs.vhdx download fails | MSIX virtualization (rename across container) | Closed as not planned |
| #30584 | Cowork VM download fails | MSIX virtualization | Closed as duplicate |
| #38030 | Workspace fails to start | EXDEV Local\TempAppData\Roaming | Closed as duplicate |
| This issue | Code sessions stuck as .json.tmp | MSIX virtualization (rename inside same directory on C:) | New |

The closest match is #32533, which describes the same EXDEV-on-session-save symptom but attributes it to a multi-drive setup. This issue demonstrates the same symptom even when no Claude-related path crosses a drive boundary, whenever the Store/MSIX version is used. The MSIX EXDEV pattern is also present in #36642, #30584, and #38030 for Cowork/Workspace components, but session persistence has not been previously reported alongside MSIX as the trigger.

Related issues

  • #32533 — Same symptom, different trigger (multi-drive). Closed as duplicate.
  • #25579 — MSIX path virtualization affecting config files / MCP. Closed as invalid.
  • #36642 — Cowork VM download EXDEV (MSIX). Closed as not planned.
  • #30584 — Cowork VM download EXDEV (MSIX). Closed as duplicate.
  • #38030 — Workspace start EXDEV (Local\TempAppData\Roaming). Closed as duplicate.
  • #27463 — claude-code-sessions directory never created on Windows. Closed.
  • #29373 — Update loses Code session history (migration).
  • #31787 — Sessions repeatedly disappearing on Windows.
  • #27752 — Session history disappears from UI after restart.
  • #27007 — Desktop App not saving sessions.

View original on GitHub ↗

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