Summary
claude-desktop --doctor reports Cowork isolation: unknown ('foo') when COWORK_VM_BACKEND is set to an invalid value, but the daemon at scripts/cowork-vm-service.js:2222-2236 logs Unknown backend override "foo", falling back to auto-detect and then runs whatever auto-detection yields (typically bwrap). The diagnostic output lies about what the daemon will actually do.
Reproduction
COWORK_VM_BACKEND=docker claude-desktop --doctor
# Doctor output: "Cowork isolation: unknown ('docker')"
# Daemon actually runs: bwrap (via auto-detect fallback)
Context
Surfaces with the invalid-backend *) fallthrough added in PR #324. The [WARN] + valid-values hint the PR emits is genuinely useful — this issue only covers the cowork_backend= string that follows.
Suggested fix
In the case ${COWORK_VM_BACKEND,,} block in scripts/launcher-common.sh, the *) arm should warn about the invalid value (as PR #324 does) and then fall through to the existing auto-detect cascade below, so the displayed cowork_backend matches what the daemon will actually select. Structurally this means lifting the override case into an early return for the three valid values and letting invalid values drop into the existing elif command -v bwrap / elif [[ -e /dev/kvm ]] ladder.
Keeping this scoped to a separate PR rather than expanding #324 to respect the original author's submission.
Written by Claude Opus 4.7 (1M context) via Claude Code
Summary
claude-desktop --doctorreportsCowork isolation: unknown ('foo')whenCOWORK_VM_BACKENDis set to an invalid value, but the daemon at scripts/cowork-vm-service.js:2222-2236 logsUnknown backend override "foo", falling back to auto-detectand then runs whatever auto-detection yields (typically bwrap). The diagnostic output lies about what the daemon will actually do.Reproduction
Context
Surfaces with the invalid-backend
*)fallthrough added in PR #324. The[WARN]+ valid-values hint the PR emits is genuinely useful — this issue only covers thecowork_backend=string that follows.Suggested fix
In the
case ${COWORK_VM_BACKEND,,}block in scripts/launcher-common.sh, the*)arm should warn about the invalid value (as PR #324 does) and then fall through to the existing auto-detect cascade below, so the displayedcowork_backendmatches what the daemon will actually select. Structurally this means lifting the overridecaseinto an early return for the three valid values and letting invalid values drop into the existingelif command -v bwrap/elif [[ -e /dev/kvm ]]ladder.Keeping this scoped to a separate PR rather than expanding #324 to respect the original author's submission.
Written by Claude Opus 4.7 (1M context) via Claude Code