[BUG] Desktop app Code sessions fail to finalize — .tmp files persist, never rename to .json (Windows MSIX)

Resolved 💬 3 comments Opened Apr 20, 2026 by Tommt21 Closed Apr 24, 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?

Summary
On Windows, Claude Desktop Code sessions write to local_<UUID>.json.tmp but the atomic rename to local_<UUID>.json never succeeds. Sessions work fully during use (prompt → response → sidebar entry), but nothing persists. The sidebar is permanently empty across app restarts because no finalized session file is ever produced. Orphan .tmp files accumulate.
Environment

OS: Windows 11, personal machine (not corporate-managed)
Claude Desktop: MSIX install from claude.ai/download (fresh install, preceded by full uninstall of prior Microsoft Store build)
Claude Code CLI: 2.1.114, native install at C:\Users\<user>\.local\bin\claude.exe
Git: 2.42.0.windows.1
Session storage path: C:\Users\<user>\AppData\Local\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude-code-sessions\<accountId>\<orgId>\

Ruled out

EFS encryption (folder decrypted, .tmp files still not renamed)
Windows Defender Controlled Folder Access (confirmed off)
Corporate endpoint security / EDR (personal machine)
OneDrive interference (AppData is not OneDrive-synced)
Missing Git (installed and on PATH)
File permissions (writes succeed; only rename fails)
Stale Store install (clean uninstall + fresh MSIX from claude.ai/download)
Unclean app exit (reproduces with clean File → Quit)

Additional context
A second machine (Surface Pro) with nominally similar setup — same account, OneDrive-synced project folders, same Claude Desktop install method — produces proper local_<UUID>.json files and populates the sidebar normally. This points to a machine-specific condition on the affected machine that interferes with the .tmp → .json rename step specifically, but I've been unable to identify what it is through folder/file attribute inspection

What Should Happen?

Expected
A local_<UUID>.json file exists after close; session reappears in sidebar on next launch.
Actual
Only local_<UUID>.json.tmp exists. Session does not appear in sidebar on relaunch. Repeated sessions produce additional orphan .tmp files.
Diagnostic evidence
Confirmed with Get-ChildItem ... -Recurse -Force:

.tmp files are created successfully (writes work)
.tmp files have only Archive attribute — no Encrypted, no ReadOnly, no unusual flags
Folder attribute is U (unencrypted) per cipher after running cipher /d
New .tmp files are written as unencrypted, confirming EFS is not the cause

Error Messages/Logs

Steps to Reproduce

Steps to reproduce

Launch Claude Desktop, open Code tab
Start new local session against any folder (with or without Git repo)
Send a prompt, receive a response
Session name appears in sidebar, no errors shown
Quit the app cleanly (File → Quit, not force-close)
Inspect session storage folder

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

Latest

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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