Summary
Change the default cowork isolation backend from KVM to bubblewrap (bwrap). KVM remains available as an opt-in via COWORK_VM_BACKEND=kvm.
Motivation
Community experience over the past few weeks has consistently favored bwrap over KVM for cowork isolation:
Changes Required
1. Flip detection order in detectBackend()
scripts/cowork-vm-service.js:1809 — Currently: KVM → bwrap → host. Change to: bwrap → KVM → host. Swap the two try blocks.
2. Mirror detection order in --doctor
scripts/launcher-common.sh:527-538 — The --doctor backend display mirrors detectBackend(). Flip the if/elif so bwrap is checked first.
3. De-emphasize KVM dependency warnings in --doctor
scripts/launcher-common.sh:495-513 — Currently warns about missing QEMU, socat, virtiofsd, vsock even when bwrap is available and will be used. These become noise for bwrap-default users. Options:
- Only show KVM dep warnings when
COWORK_VM_BACKEND=kvm is set
- Group under a "KVM (optional)" section
- Lower severity (info instead of warn)
4. Update README backend table
README.md:13-16 — Swap labels: bwrap becomes "(recommended)", KVM becomes "(opt-in)".
5. Update handover docs
docs/cowork-linux-handover.md — Multiple references to detection order and backend priority need updating.
Related Issues & PRs
Notes
- KVM is not being removed — it stays as a fully functional opt-in backend via
COWORK_VM_BACKEND=kvm
- No new code needed for bwrap itself — it's already implemented and hardened
- No changes to
build.sh — both backends are already built and packaged
- Total scope: ~4 files, mostly reordering existing logic and updating docs
Written by Claude Opus 4.6 via Claude Code
Summary
Change the default cowork isolation backend from KVM to bubblewrap (bwrap). KVM remains available as an opt-in via
COWORK_VM_BACKEND=kvm.Motivation
Community experience over the past few weeks has consistently favored bwrap over KVM for cowork isolation:
$HOME), virtiofsd not found even though it is installed #293 (virtiofsd not found), Cowork fails to start the VM due to missing qcow2 files #288 (missing qcow2 files), Title: Cowork VM download fails with EXDEV on Fedora (tmpfs /tmp) #289 (tmpfs EXDEV on Fedora).Changes Required
1. Flip detection order in
detectBackend()scripts/cowork-vm-service.js:1809— Currently: KVM → bwrap → host. Change to: bwrap → KVM → host. Swap the twotryblocks.2. Mirror detection order in
--doctorscripts/launcher-common.sh:527-538— The--doctorbackend display mirrorsdetectBackend(). Flip the if/elif so bwrap is checked first.3. De-emphasize KVM dependency warnings in
--doctorscripts/launcher-common.sh:495-513— Currently warns about missing QEMU, socat, virtiofsd, vsock even when bwrap is available and will be used. These become noise for bwrap-default users. Options:COWORK_VM_BACKEND=kvmis set4. Update README backend table
README.md:13-16— Swap labels: bwrap becomes "(recommended)", KVM becomes "(opt-in)".5. Update handover docs
docs/cowork-linux-handover.md— Multiple references to detection order and backend priority need updating.Related Issues & PRs
$HOMEin KVM mode (open, less urgent if KVM is opt-in)COWORK_VM_BACKENDenv var (open PR, good to land alongside)Notes
COWORK_VM_BACKEND=kvmbuild.sh— both backends are already built and packagedWritten by Claude Opus 4.6 via Claude Code