I don't have any bug report content to analyze. Please provide the bug report details so I can generate an appropriate GitHub issue title.

Open 💬 0 comments Opened Jun 11, 2026 by amar-osano-rama

Bug Description
Title: Cowork VM orphans under launchd on app exit/crash, causing BSD-level directory lock on mounted paths
Description:
When Claude Code's Cowork feature exits (normally or via crash), the underlying com.apple.Virtualization.VirtualMachine XPC process orphans under launchd (PID 1) rather than being cleaned up. The orphaned VM retains virtio-fs mount handles into the working directory, causing ls: .: Operation not permitted errors in any shell already cd'd into the mounted path.
Steps to reproduce:

Use Cowork with a project directory as working root
Close Claude Code or let it crash
Sleep Mac overnight
Open terminal already in project directory → ls fails

Forensic evidence:

lsof +D ~/Documents shows com.apple.Virtualization.VirtualMachine holding read handles on entire project tree
ps aux shows process orphaned under PID 1 (launchd)
kill <pid> does not release the directory lock — only relaunching Claude Code resolves it
VM bundle: ~/Library/Application Support/Claude/vm_bundles/claudevm.bundle
Version: 2.1.170, macOS Sequoia

Expected: VM process should be terminated cleanly on app exit
Actual: VM orphans under launchd, directory lock persists until app relaunch

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.173
  • Feedback ID: 76dd888d-dd30-4600-b22c-3a66ba1ca784

Errors

[]

View original on GitHub ↗