[BUG] Cowork VM crashes ~3-4 minutes after successful startup — HCS invalid JSON query kills VM
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?
<html>
<body>
<!--StartFragment--><html><head></head><body><h1>[BUG] Cowork VM crashes ~3-4 minutes after successful startup — HCS invalid JSON query kills VM</h1>
<h2>Preflight Checklist</h2>
<ul>
<li>[x] I have searched existing issues and this hasn't been reported yet</li>
<li>[x] This is a single bug report</li>
<li>[x] I am using the latest version of Claude Code</li>
</ul>
<h2>What's Wrong?</h2>
<p>The Cowork VM starts successfully but consistently crashes approximately 3-4 minutes into each session. The root cause is a malformed HCS (Host Compute Service) property query containing an invalid JSON document (<code>$</code>), which causes the Hyper-V Compute Service to terminate the VM.</p>
<p>This is reproducible across multiple sessions in the same evening.</p>
<h2>Environment</h2>
<ul>
<li><strong>App version:</strong> 1.1.5368.0</li>
<li><strong>Platform:</strong> Windows 11 25H2 (Build 26200)</li>
<li><strong>CPU:</strong> AMD Ryzen 9 9950X3D 16-Core Processor</li>
<li><strong>RAM:</strong> 64 GB (66094223360 bytes)</li>
<li><strong>Install type:</strong> MSIX (Store path: <code>Claude_pzs8sxrjxfjjc</code>)</li>
</ul>
<h2>Timeline from Logs</h2>
<h3>Session 1</h3>
Time | Event | Source
-- | -- | --
21:19:03 | HCS started | Hyper-V-Compute-Admin
21:33:29 | Invalid JSON document $ (0xC037010D) | Hyper-V-Compute-Admin
21:33:28 | App quit, stopping VM | cowork_vm_node.log
21:33:58 | VM shutdown failed: Request timed out | cowork_vm_node.log
<h2>Key Log Entries</h2>
<h3>Hyper-V Compute Admin (the root cause)</h3>
<pre><code>TimeCreated : 6/03/2026 9:49:46 PM
Message : The specified property query is invalid: The virtual machine or container
JSON document is invalid. (0xC037010D, 'Invalid JSON document '$'').
</code></pre>
<p>This same error appears at 21:33:29 in the prior session — identical pattern.</p>
<h3>cowork_vm_node.log (keepalive failure cascade)</h3>
<pre><code>2026-03-06 21:49:51 [warn] [Keepalive] Ping failed: VM service not running. The service failed to start.
2026-03-06 21:49:53 [warn] [Keepalive] Ping failed: VM service not running. The service failed to start.
... (repeats every 2 seconds until shutdown)
2026-03-06 21:50:34 [error] [VM:shutdown] Failed: Error: VM service not running. The service failed to start.
</code></pre>
<h3>main.log (marketplace errors after VM death)</h3>
<pre><code>operation: 'add_marketplace',
implementation: 'cowork_vm_cli',
status: 'error',
error_message: 'Failed to find newly added marketplace'
</code></pre>
<p>Followed by repeated <code>VM service not running. The service failed to start.</code> errors.</p>
<h2>What I've Ruled Out</h2>
<ul>
<li><strong>NTFS compression:</strong> Disabled (<code>fsutil behavior query disablecompression</code> returns enabled/on). Verified all files in the Claude package directory are uncompressed via <code>compact</code>.</li>
<li><strong>Windows features:</strong> Containers and HypervisorPlatform are enabled.</li>
<li><strong>Service registration:</strong> CoworkVMService exists and starts as Automatic, though it has no failure recovery actions configured.</li>
<li><strong>Orphaned processes:</strong> Checked — no stale <code>cowork-svc</code> processes between sessions.</li>
<li><strong>Event Viewer:</strong> No errors or warnings in the System log during the crash window. No CoworkVMService provider registered in Application log.</li>
</ul>
<h2>Expected Behaviour</h2>
<p>Cowork VM should remain stable after successful startup. The HCS property query should send valid JSON.</p>
<h2>Additional Notes</h2>
<ul>
<li>The CoworkVMService has no recovery actions configured (<code>sc.exe qfailure</code> shows empty). If the service crashes, it stays stopped until Claude Desktop explicitly restarts it.</li>
<li>The <code>Invalid JSON document '$'</code> suggests an empty or uninitialised variable is being passed as an HCS property query payload — the literal string <code>$</code> looks like a shell/template variable that wasn't resolved.</li>
<li>The marketplace plugin operation (<code>add_marketplace</code>) fails consistently with <code>Failed to find newly added marketplace</code> even before the VM crash, which may be related.</li>
</ul></body></html><!--EndFragment-->
</body>
</html>
What Should Happen?
The Cowork VM should remain running after successful startup. The HCS property query should send valid JSON — currently it sends a literal $ string, which causes Hyper-V to terminate the VM approximately 3-4 minutes into every session.
Error Messages/Logs
Steps to Reproduce
1. Install Claude Desktop v1.1.5368.0 via MSIX on Windows 11 25H2 (Build 26200)
2. Ensure Containers and HypervisorPlatform Windows features are enabled
3. Launch Claude Desktop and switch to Cowork mode
4. Wait 3-4 minutes after VM reports "Startup complete"
5. Observe VM crash — keepalive pings begin failing in cowork_vm_node.log
6. Confirm root cause in admin PowerShell:
Get-WinEvent -LogName "Microsoft-Windows-Hyper-V-Compute-Admin" -MaxEvents 5
— will show: 0xC037010D, 'Invalid JSON document '$''
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.1.5368.0
Claude Code Version
1.1.5368.0
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗