Windows: taskkill leaves orphan subprocesses that block Claude Desktop relaunch (0x80070020)
Bug Report
Environment
- OS: Windows 11 Pro 10.0.26200
- Claude Desktop version: 1.8089.1.0 (MSIX/Store package)
- Package:
Claude_1.8089.1.0_x64__pzs8sxrjxfjjc
Description
After force-killing Claude Desktop with taskkill /F /IM "Claude.exe", the app refuses to relaunch. Windows throws error 0x80070020 (ERROR_SHARING_VIOLATION) when trying to create a new AppX container.
Root Cause
When the main claude.exe process is killed via taskkill /F, child processes survive:
cowork-svc.exe(fromapp/resources/cowork-svc.exe)chrome-native-host.exe(Chrome extension bridge)
These orphan processes hold file locks on the MSIX package directory, preventing Windows from creating a new Desktop AppX container for a fresh launch.
Steps to Reproduce
- Open Claude Desktop (Windows Store/MSIX version)
- Run
taskkill /F /IM "Claude.exe"in an elevated terminal - Try to relaunch Claude Desktop from Start menu or taskbar
- App fails to open — no window appears, no error shown to user
Windows Event Log Evidence
Microsoft-Windows-AppModel-Runtime/Admin:
0x80070020: Cannot create the process for package Claude_1.8089.1.0_x64__pzs8sxrjxfjjc
because an error was encountered while configuring runtime. [FinishPackageActivation]
0x80070020: Cannot create the Desktop AppX container for package Claude_1.8089.1.0_x64__pzs8sxrjxfjjc
because an error was encountered converting the job.
Workaround
Manually kill the orphan processes before relaunching:
Get-Process cowork-svc, chrome-native-host -ErrorAction SilentlyContinue | Stop-Process -Force
# Then relaunch Claude Desktop
Expected Behavior
- Child processes (
cowork-svc.exe,chrome-native-host.exe) should terminate when the parentclaude.exeexits - OR Claude Desktop should detect and clean up stale subprocesses on launch
- OR the installer should use a Windows Job Object to ensure all child processes are killed when the parent dies
Suggested Fix
Use a Windows Job Object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag to group the main process and all children. This ensures automatic cleanup when the parent process terminates (gracefully or forcefully). This is the standard pattern for Electron/Chromium apps on Windows.
Alternatively, on startup, detect and kill any pre-existing cowork-svc.exe instances from a previous session before initializing the AppX container.
---
Reported via Claude Code CLI
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗