[BUG] Claude Desktop Freeze: Cowork VM Kernel Panic Deadlocks Main Thread
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><head></head><body><h1>Claude Desktop Freeze: Cowork VM Kernel Panic Deadlocks Main Thread</h1>
<h2>Version</h2>
<ul>
<li>Claude Desktop 1.1.3189 (Electron 40.4.1)</li>
<li>macOS 15.7.3 (24G419), Apple Silicon (ARM64)</li>
</ul>
<h2>Summary</h2>
<p>Claude Desktop becomes completely unresponsive (spinning wheel, cannot type or interact). The Cowork VM suffers a <strong>kernel panic</strong> (<code>corrupted stack end detected inside scheduler</code>), after which <code>CoworkVMRPCClient.writeMessage()</code> on the main browser thread deadlocks trying to write to the dead VM, spinning in <code>usleep</code> forever. The entire UI freezes because the main event loop can never return.</p>
<p>This is a recurring issue — the Cowork VM has kernel-panicked <strong>7 times</strong> across the log history, with multiple panic types. I have also observed that quitting Claude Desktop takes ~2 minutes with a "Waiting for Cowork to finish" dialog for the past several days.</p>
<h2>Root Cause</h2>
<h3>1. Cowork VM Kernel Panic</h3>
<p>From <code>coworkd.log</code> (line 55720):</p>
<pre><code>Kernel panic - not syncing: corrupted stack end detected inside scheduler
CPU: 2 PID: 234 Comm: jbd2/nvme0n1p1- Not tainted 6.8.0-94-generic #96~22.04.1-Ubuntu
</code></pre>
<p>The jbd2 filesystem journal thread crashed with a corrupted stack. The VM is running Ubuntu 22.04.5 under Apple Virtualization Framework.</p>
<h3>2. Keepalive Failure Cascade</h3>
<p>From <code>cowork_vm_node.log</code> — immediately after the panic, keepalive pings fail every 2 seconds:</p>
<pre><code>2026-02-15 22:19:52 [warn] [Keepalive] Ping failed: Keep-alive ping timed out
2026-02-15 22:19:54 [warn] [Keepalive] Ping failed: Keep-alive ping timed out
... (1752 total failures in the log, never recovers)
</code></pre>
<h3>3. Main Thread Deadlock</h3>
<p>From thread sample of PID 95945 — the main browser thread is stuck:</p>
<pre><code>CoworkVMRPCClient.writeMessage(_:) + 1488
→ usleep → nanosleep → __semwait_signal
</code></pre>
<p>3203 of 3208 samples (99.8%) show this stack. The main thread tries to write an RPC message to the dead VM, the write fails, it calls <code>usleep</code> to retry, and loops forever. The UI is frozen because the main thread never returns to the event loop.</p>
<h3>Two bugs here:</h3>
<ol>
<li>
<p><strong>The Cowork VM is unstable</strong> — 7 kernel panics across log history:</p>
<ul>
<li><code>corrupted stack end detected inside scheduler</code> (4 occurrences)</li>
<li><code>Attempted to kill init! exitcode=0x0000000b</code> (3 occurrences)</li>
<li><code>Fatal exception in interrupt</code> (1 occurrence)</li>
</ul>
</li>
<li>
<p><strong>Claude Desktop doesn't handle a dead Cowork VM gracefully</strong> — when the VM dies, <code>writeMessage()</code> should timeout and fail, not spin-wait forever blocking the main thread. The RPC retry loop has no maximum retry count or timeout ceiling.</p>
</li>
</ol>
<h2>Timeline (all times CST / UTC-6)</h2>
Time | Event | Source
-- | -- | --
22:01:35 | Cowork VM boots, coworkd starts | coworkd.log
22:01:37 | VM RPC connected, network configured | coworkd.log
22:02–22:05 | MCP tool calls (normal conversation activity) | mcp.log
~22:11:37 | VM KERNEL PANIC (602s after boot) | coworkd.log
22:14:42 | MCP tool call succeeds (app still functional) | mcp.log
22:19:52 | Keepalive pings start failing every 2s | cowork_vm_node.log
22:20:35 | Last MCP response — last client activity ever | mcp.log
22:21:29 | main.log stops (SkillsPlugin was ticking every 60s — just stops) | main.log
~08:00+1 | I find UI frozen, spinning wheel, cannot interact | —
<h2>Attached Files</h2>
<ul>
<li><code>claude-desktop-sample.txt</code> — 5-second thread sample of main process (PID 95945), showing <code>writeMessage</code> deadlock</li>
<li><code>claude-desktop-renderer-sample.txt</code> — 5-second thread sample of renderer (PID 96086)</li>
<li><code>coworkd.log</code> — Cowork VM daemon log (shows 7 kernel panics across history)</li>
<li><code>cowork_vm_node.log</code> — Cowork VM Node.js log (shows 1752 keepalive ping failures)</li>
<li><code>cowork_vm_swift.log</code> — Cowork VM Swift log (VM lifecycle events)</li>
<li><code>main.log</code> — Claude Desktop main log (shows SkillsPlugin ticking, then stopping at 22:21)</li>
</ul>
<p>Note: Log files have been scrubbed of local paths and MCP server details. The MCP server-side log has been excluded as it contains only application-specific data unrelated to the Cowork VM issue.</p></body></html>
What Should Happen?
it shouldn't hang
Error Messages/Logs
I come back after a bit and it is hung with the spinning rainbow wheel that means "jammed and non-responsive" on MacOS.
Steps to Reproduce
In my case, I left it interacting with an MCP. The MCP turned out not to be the issue, though, as shown in the attached log. It was sitting at the prompt, waiting for input when I left and I came back to it being unresponsive.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
Claude Desktop 1.1.3189 (Electron 40.4.1)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
claude-desktop-renderer-sample.txt
claude-desktop-sample.txt
cowork_vm_node.log
cowork_vm_swift.log
coworkd.log
main.log
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗