Skip to content

Make bubblewrap (bwrap) the default cowork isolation backend #326

@aaddrick

Description

@aaddrick

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    coworkRelated to Cowork modeenhancementNew feature or requesttriage: investigatedIssue has been triaged and investigated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions