[BUG] Windows: main process survives beforeQuitForUpdate; relaunch blocked by single-instance lock (update deadlock, reproduced on two versions)
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?
On Windows, the Claude Desktop app's stealth auto-update deadlocks. After an idle timeout, the app tears down its window and any running Claude Code sessions and logs beforeQuitForUpdate handler fired, going down for update, but the main process never exits. All child processes (11 claude.exe in tasklist /apps) stay alive under the old package version.
Because the old package is still in use, the staged update can't be applied. Every relaunch attempt exits immediately with Not main instance, returning early from app ready, so the app is dead until the user finds and kills the orphaned processes or reboots. Since the update never lands, the cycle repeats every few hours.
This is reproducible: it happened on 2.2553.13 (2.7032.0 staged), and again after a clean install of 2.7032.0 (2.9939.2 staged). Long-running Claude Code sessions were killed each time, three times in one day.
Environment: Windows 10 Pro 22H2 (10.0.19045) x64, Claude Desktop MSIX Claude_pzs8sxrjxfjjc.
What Should Happen?
- The process should actually exit after
beforeQuitForUpdate. If it doesn't, the updater should detect that and abort or retry, not leave the app dead with no window. - A relaunch that finds a hung previous instance should recover (terminate it or hand off), not silently exit on the single-instance lock.
- Updates should never be applied unattended over running Claude Code sessions. Prompt the user, or stage the update and apply it on the next clean start. There is currently no supported way for unmanaged installs to defer or disable this.
Error Messages/Logs
**main.log (2.7032.0, with 2.9939.2 staged):**
2026-09-24 21:43:54 [info] [stealth-update] Triggering stealth update after idle timeout
2026-09-24 21:43:55 [info] beforeQuitForUpdate handler fired, going down for update
2026-09-24 21:53:54 [info] [stealth-update] Triggering stealth update after idle timeout
2026-09-24 22:13:29 [info] Starting app {
2026-09-24 22:13:29 [info] Not main instance, returning early from app ready
2026-09-24 22:13:36 [info] Starting app {
2026-09-24 22:13:36 [info] Not main instance, returning early from app ready
2026-09-24 22:13:39 [info] Starting app {
2026-09-24 22:13:39 [info] Not main instance, returning early from app ready
Afterward, `tasklist /apps` shows 11 `claude.exe` processes still attributed to `Claude_2.7032.0.0_x64__pzs8sxrjxfjjc`.
**Earlier occurrence (2.2553.13, with 2.7032.0 staged):** after `beforeQuitForUpdate` at 15:59:46, `[process-memory]` lines kept logging from the same PIDs (electron_main, renderer, gpu, utility) for 8+ minutes:
2026-09-23 15:59:46 [info] beforeQuitForUpdate handler fired, going down for update
2026-09-23 16:00:25 [info] [process-memory] ... electron_main:37824:204MB ...
2026-09-23 16:04:09 [info] [updater] Staged version 2.7032.0 is still current
2026-09-23 16:05:24 [info] Starting app { appVersion: '2.2553.13', ... }
2026-09-23 16:05:24 [info] Not main instance, returning early from app ready
2026-09-23 16:07:43 [info] [process-memory] ... electron_main:37824:203MB ...
**Recovery with the standalone installer failed (ClaudeSetup.log):**
WARNING: failed to remove conflicting service: could not open CoworkVMService: Access is denied.
MSIX installation failed: AddPackage failed: AddPackage failed with HRESULT 0x80073CF9
AppXDeploymentServer/Operational event 404:
error 0x800700E9: Unable to install because the following apps need to be closed Claude_pzs8sxrjxfjjc!Claude.
This persisted even when `tasklist /apps` showed no package processes. A reboot was required.
**CoworkVMService DACL** (`sc.exe sdshow CoworkVMService`):
D:(A;;CCLCSWRPWPDTLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;S-1-5-80-1949724575-2387902436-65106593-1201171665-3967308604)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)
There's no ACE for SYSTEM or Administrators, so the app's own elevated installer can't remove it. I had to use `psexec -s sc.exe sdset` to restore access before deleting it.
Steps to Reproduce
- Install Claude Desktop (MSIX) on Windows 10 Pro 22H2.
- Start a long-running Claude Code session in the desktop app.
- Leave the machine idle while a newer version is staged by the updater (
[updater] Staged version X is still currentin main.log). - After the idle timeout,
[stealth-update] Triggering stealth update after idle timeoutfires, followed bybeforeQuitForUpdate handler fired, going down for update. - The window disappears and the Code session is stopped, but the main process and its children remain running (
tasklist /apps | findstr /i claude). - The staged update is never applied (
Get-AppxPackage Claudestill reports the old version), and every relaunch logsNot main instance, returning early from app readyand exits. - Recovery requires killing all package processes by PID or rebooting.
Reproduced on two consecutive versions (2.2553.13 → 2.7032.0 and 2.7032.0 → 2.9939.2), including after a clean reinstall.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.9939.2
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Impact: The app is unusable for unattended or long-running work. Each deadlock kills any in-progress Claude Code session, and the user has no indication beyond a vanished window. Recovery requires knowing to use tasklist /apps, since the orphaned processes aren't obviously tied to the app, or rebooting.
No supported opt-out: The only way to disable auto-update I could find is the disableAutoUpdates policy value under HKLM\SOFTWARE\Policies\Claude, which is documented for enterprise/MDM deployments. It isn't clear whether unmanaged installs honor it.
Workaround:
tasklist /apps | findstr /i claude
Stop-Process -Id <each PID> -Force
Then relaunch. If the staged update still fails to apply, a reboot followed by the standalone installer.
Related issues: #92246 (Windows forced restarts over running sessions, no opt-out), #95364 and #92207 (stealth update relaunch on idle). This report is specifically about the quit-for-update path hanging, which turns a disruptive restart into a dead app.
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Same deadlock on a newer build: Desktop 2.16120.0 (MSIX) → staged 2.19675.0, Windows 10 Pro 22H2 (19045) x64, Claude Code 2.1.284.
The AppX deployment log shows why the update fails: the app requests registration while its own main process is still alive, Windows refuses, and the process never exits afterwards.
main.log
Microsoft-Windows-AppXDeploymentServer/Operational (same second, translated from RU locale)
So
ForceApplicationShutdownOptiondoesn't help here, and the updater doesn't handle the failed deployment: it neither exits nor retries. The app stays on the old version, and every relaunch hits the single-instance lock. Same pattern in my logs on 2026-09-25 (several cycles) and 2026-09-28/29.Manual recovery attempts (from a separate PowerShell, outside the app):
Stop-Process -Forceon allclaude.exe, wait 3 s, thenAdd-AppxPackage -RegisterByFamilyName -MainPackage Claude_pzs8sxrjxfjjc→0x80073D02(Claude_2.16120.0.0 in use).tasklist /appsshowed 0 processes with the package identity, wait 5 more seconds, then the same command with-ForceApplicationShutdown→0x80073CF9/0x800700E9 ... Claude_pzs8sxrjxfjjc!Claude. The AppX log shows CoworkVMService terminated successfully (9648/9650), immediately followed by "affected apps are still running" (638).install::Claude_pzs8sxrjxfjjc, 0.53 s). This was the only thing that worked.So once the deadlock happens, killing processes isn't enough: Windows keeps treating the package as in use until a reboot.
Same here on 2.16120.0 → 2.19675.0 (MSIX, Windows 10 22H2 19045 x64). Two details that may help narrow it down:
Claude_pzs8sxrjxfjjcpackage identity and no process with any file from the package folder loaded.Add-AppxPackage -RegisterByFamilyName ... -ForceApplicationShutdownstill failed with 0x800700E9 / 638 "affected apps are still running" in the same second. So nothing visible is holding the package; the "running" state seems to be stale in the logon session.CoworkVMServiceset to Disabled (System log 7040 "auto start → disabled" right after the 603). After a reboot, the deferred registration ran at logon, 2.19675.0 installed, and the service went back to Automatic.Still reproduces on the next build: Desktop 2.19675.0 (MSIX) → staged 2.19675.1, Windows 10 Pro 22H2 (19045) x64, Claude Code 2.1.286. Triggered via the manual "restart to update" button (not only the idle stealth path).
main.log
AppXDeploymentServer/Operational
Same sequence on an earlier attempt the same evening (22:03 Add → 22:14 Register → 0x80073CF9), so it's deterministic here. Killing all processes via Task Manager and relaunching still starts 2.19675.0.