[BUG] Windows desktop app (MSIX) uninstalls itself and wipes all local data during silent auto-update when background sessions are running
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?
The Claude Desktop app on Windows (MSIX package Claude_pzs8sxrjxfjjc, v1.26832.0.0) force-closes and completely uninstalls itself while I'm working, whenever its silent auto-update/self-repair runs with background sessions active. On next launch Windows shows: "There's a problem with Claude. Reinstall the application from its original install location or contact the administrator." This happened ~6 times in one night (Aug 8-9, 2026 at 00:05, 00:18, 00:50, 01:31, 01:49, 02:15 local), and every cycle wipes all local data (chats, sessions, config, login).
Root cause visible in the Microsoft-Windows-AppXDeploymentServer/Operational event log:
- The updater starts a deployment with
ForceApplicationShutdownOption,ForceUpdateFromAnyVersion— this is what kills the app mid-work. - It tries
RemovewithPreserveApplicationData→ Windows rejects it with 0x80073CFA ("PreserveApplicationData flag can only be used on a package deployed in development mode"), so app data is never preserved. - It falls back to a full
RemovewithRemoveForAllUsers→ all container data (LocalCache) is destroyed. - The
Addof the new .msix intermittently fails with 0x80070020 (file in use) and repair registration fails with 0x80073D02 (package in use) — backgroundclaude.exeprocesses from running sessions keep package files locked. - The package stays removed → app uninstalled, all local data lost.
Side effects: a WER AppHang for Claude.exe, repeated RegisterByPackageFullName ... RepairAppRegistrationOption failure loops, and orphaned chats that reappear in the session list but can't be resumed ("Remote control disconnected — the bridged Claude Code process stopped responding").
Note: updates on Jul 19 – Aug 6 (1.22209 → 1.24012 → 1.25927 → 1.26832) used a non-destructive flow (DeferRegistrationWhenPackageInUse) and succeeded without data loss. The destructive remove+add loop started Aug 8.
What Should Happen?
- The auto-updater should never fall back to a data-destroying full
RemovewhenPreserveApplicationDatais rejected by Windows. - If the package is in use (running sessions/background agents), the update should be deferred or retried later — not force-close active work and leave the app uninstalled.
- User data (chats, sessions, config) should survive app updates/reinstalls instead of living only inside the MSIX container that the update path wipes.
Error Messages/Logs
From `Microsoft-Windows-AppXDeploymentServer/Operational`:
- [717] Windows cannot remove Claude_1.26832.0.0_x64__pzs8sxrjxfjjc because the PreserveApplicationData flag can only be used on a package that was deployed in development mode.
- [404] AppX Deployment operation failed for package with error 0x80073CFA.
- [603] Started deployment Remove operation ... Options PreserveApplicationData,RemoveForAllUsers
- [401] Deployment Add operation ... from: (Claude-623836466.msix) failed with error 0x80070020.
- [401] Deployment Register operation ... from: (AppxManifest.xml) failed with error 0x80073D02.
Windows error shown to the user on launch:
"There's a problem with Claude. Reinstall the application from its original install location or contact the administrator."
WER report: AppHang_Claude_1.26832.0 (Aug 9, 02:00 local).
Steps to Reproduce
- Install Claude Desktop on Windows 10 Pro 22H2 (build 19045) — MSIX sideloaded package, Developer signature.
- Start one or more long-running tasks/background agents so
claude.exeprocesses stay alive (I had ~12 running). - Leave the app working and wait for the silent auto-update/self-repair to trigger (no user action, no visible "update pending" notice).
- The app force-closes, the package is fully removed, and the re-install intermittently fails with 0x80070020 / 0x80073D02 because the running processes keep files locked.
- Result: app uninstalled, all local data wiped. Reproduced ~6 times in one night.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Desktop app 1.25927.0.0 (updated Aug 4 without data loss); destructive loop started Aug 8 on 1.26832.0.0
Claude Code Version
2.1.226 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
- Package:
Claude_pzs8sxrjxfjjc, SignatureKind: Developer, installed underC:\Program Files\WindowsApps\. - Disk and Windows package database are healthy (no NTFS/StateRepository errors) — ruled out as causes.
- Antivirus ruled out: Malwarebytes service stopped since Jul 25; Windows Defender has no detections for any Claude file.
- The updater downloads each .msix to
%LOCALAPPDATA%\Temp\Claude-*.msix(~254 MB) before the remove+add cycle.