[BUG] Cowork Windows: Triple-parallel VM startup race condition causes "VM is already running" failure loop
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 11 Pro, Cowork fires three parallel VM startup attempts simultaneously, causing a race condition. The first attempt succeeds, but the second and third fail with "VM is already running." This triggers an auto-reinstall that deletes bundle files while the running VM still has them locked, leading to EBUSY errors. The workspace eventually comes up (because the first attempt did succeed), but the user sees error messages and the startup takes ~12 seconds with multiple visible failure/retry cycles.
Root Cause
The log shows three [VM:start] Beginning startup entries at the exact same timestamp (see logs below). Each attempt independently:
Copies smol-bin.x64.vhdx
Configures the Windows VM service
Tries to boot the VM
The first succeeds. The second and third collide with it, triggering:
VM is already running errors
Auto-reinstall (deleting bundle files while VM holds locks)
EBUSY: resource busy or locked on smol-bin.vhdx
Despite all this, the originally-started VM is fine — network connects, API is reachable, SDK installs. The errors are cosmetic but alarming, and the auto-reinstall wastes time and risks corrupting the bundle.
Additional issue: Previous VM not cleaned up on shutdown
The shutdown sequence also shows problems — on quit, the VM shutdown times out after 30 seconds:
[VM:shutdown] App quit, stopping VM...
[error] [VM:shutdown] Failed: Error: Request timed out
This leaves a stale VM running, so the next launch immediately hits the "already running" state.
Steps to Reproduce
Close Claude Desktop
Relaunch Claude Desktop
Switch to Cowork tab
Observe error banner: "Failed to start Claude's workspace — VM is already running"
Wait ~12 seconds — workspace eventually comes up despite the errors
What Should Happen?
Single startup attempt, or proper mutex/lock preventing parallel attempts
Clean VM shutdown on app quit (no 30-second timeout)
Stale VM detection and cleanup before attempting new boot
Error Messages/Logs
Triple-parallel startup (all at 21:00:29):
2026-03-10 21:00:29 [info] [VM:start] Beginning startup...
2026-03-10 21:00:29 [info] [VM:start] Beginning startup...
2026-03-10 21:00:29 [info] [VM:start] Beginning startup...
2026-03-10 21:00:29 [info] [VM:start] Copying smol-bin.x64.vhdx to bundle...
2026-03-10 21:00:29 [info] [VM:start] Copying smol-bin.x64.vhdx to bundle...
2026-03-10 21:00:29 [info] [VM:start] Copying smol-bin.x64.vhdx to bundle...
2026-03-10 21:00:30 [info] [VM:start] Windows VM service configured
2026-03-10 21:00:30 [info] [VM:start] Windows VM service configured
2026-03-10 21:00:30 [info] [VM:start] Windows VM service configured
2026-03-10 21:00:31 [error] [VM:start] VM boot failed: VM is already running
2026-03-10 21:00:31 [error] [VM:start] VM boot failed: VM is already running
Auto-reinstall deletes files while VM is running:
2026-03-10 21:00:31 [info] [VM:start] Auto-reinstalling workspace after startup failure
2026-03-10 21:00:31 [info] [deleteVMBundle] Deleting reinstall files...
Third attempt hits file lock:
2026-03-10 21:00:41 [error] [VM:start] Startup failed: [Error: EBUSY: resource busy or locked,
open 'C:\Users\marti\AppData\Roaming\Claude\vm_bundles\claudevm.bundle\smol-bin.vhdx']
Meanwhile, the first VM is actually fine:
2026-03-10 21:00:45 [info] [VM] Network status: CONNECTED
2026-03-10 21:00:45 [info] [VM] API reachability: REACHABLE
2026-03-10 21:00:48 [info] [VM:start] Startup complete, total time: 11259ms
Shutdown timeout (previous session):
2026-03-10 20:59:08 [info] [VM:shutdown] App quit, stopping VM...
2026-03-10 20:59:38 [error] [VM:shutdown] Failed: Error: Request timed out
Steps to Reproduce
Close Claude Desktop
Relaunch Claude Desktop
Switch to Cowork tab
Observe error banner: "Failed to start Claude's workspace — VM is already running"
Wait ~12 seconds — workspace eventually comes up despite the errors
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude 1.1.5749 (x64)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Environment
Claude Desktop: v1.1.5749
OS: Windows 11 Pro
Hyper-V: Fully enabled (all features)
Services: hns, vmcompute, vmms all Running
RAM: 16 GB
VM bundle: Complete (rootfs.vhdx, vmlinuz, initrd, smol-bin.vhdx, sessiondata.vhdx all present)
Workaround
Force-stopping the stale VM before launching Claude Desktop reduces (but doesn't eliminate) the issue:
powershellGet-Process claude -ErrorAction SilentlyContinue | Stop-Process -Force
Stop-VM "cowork-vm" -Force -ErrorAction SilentlyContinue
Start-Sleep 3
Suggested Fix
Add a mutex/lock around VM startup to prevent parallel attempts
Check for and clean up stale VMs before attempting boot
Don't auto-reinstall when the error is "VM is already running" — that means a previous attempt succeeded
Fix the 30-second shutdown timeout so VMs are properly stopped on app quit
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗