claude-code - 💡(How to fix) Fix [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 [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48362Fetched 2026-04-16 07:02:21
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

  1. 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.

Error Messages/Logs

[error] Failed to save session local_<uuid>: EXDEV: cross-device link not permitted, [error] Failed to load persisted sessions: UNKNOWN: unknown error, scandir [error] [LocalAgentModeSessionManager] loadSessions failed during account transition UNKNOWN: unknown error, scandir '...' [error] Failed to read sessions directory: UNKNOWN: unknown error, scandir

Root Cause

  • #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:\.

Fix Action

Fix / Workaround

Workaround / migration that resolved it

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.

Code Example

[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.

---

$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

---

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

---

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
   }
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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):

    $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
  2. Uninstall the Store version:

    Get-AppxPackage -Name "Claude" | Remove-AppxPackage
  3. Install Claude Desktop from https://claude.ai/download (Win32 installer).

  4. Restore session files, renaming .json.tmp.json in the process:

    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

IssueSymptomTriggerStatus
#32533Sessions stuck as .json.tmpProjects on D: drive while AppData on C:Closed as duplicate
#25579Config/MCP files invisible at documented pathMSIX virtualizationClosed as invalid
#36642Cowork VM rootfs.vhdx download failsMSIX virtualization (rename across container)Closed as not planned
#30584Cowork VM download failsMSIX virtualizationClosed as duplicate
#38030Workspace fails to startEXDEV Local\TempAppData\RoamingClosed as duplicate
This issueCode sessions stuck as .json.tmpMSIX 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.

extent analysis

TL;DR

The issue can be resolved by migrating from the Microsoft Store (MSIX) install to the standalone Win32 installer, as the MSIX virtualization causes issues with session persistence due to EXDEV: cross-device link not permitted errors.

Guidance

  • The root cause of the issue is the MSIX virtualization, which treats two paths as different "devices" inside the MSIX container, even though both physically resolve to C:\.
  • To verify the issue, inspect the real session storage at %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\<accountId>\<orgId>\ and check if all files are .json.tmp (no .json files exist).
  • To mitigate the issue, migrate to the Win32 installer by uninstalling the Store version and installing from https://claude.ai/download.
  • After migration, restore session files by renaming .json.tmp to .json in the process, using a script like the one provided in the workaround steps.

Example

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
}

Notes

  • The issue is specific to the Microsoft Store (MSIX) install and does not occur with the Win32 installer.
  • The EXDEV error is caused by the MSIX virtualization, which is a known issue in other components of the application.

Recommendation

Apply the workaround by migrating to the Win32 installer, as it resolves the issue and allows for proper session persistence. This is recommended because the MSIX virtualization is the root cause of the issue, and migrating to the Win32 installer bypasses this problem.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [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 [1 participants]