-
-
Notifications
You must be signed in to change notification settings - Fork 315
Description
Hi there,
First off, thanks for this project — really appreciate the work that makes Claude Desktop possible on Linux.
Description
Cowork mode (both "Code" and "Tasks" sidebar tabs) fails on launch with repeated errors:
Error: VM is not running. Start a conversation first.
The cowork-vm-service.js daemon is not being auto-launched by the Electron app, so the Unix domain socket at $XDG_RUNTIME_DIR/cowork-vm-service.sock never gets created. The Cowork UI loads but cannot communicate with the backend.
Analysis
The auto-launch code in the patched index.js (from PR #234) uses child_process.fork() inside the Ma() retry loop:
process.platform==="linux"&&!Ma._svcLaunched&&(Ma._svcLaunched=true,(()=>{
try{
const _d=require("path").join(process.resourcesPath,"app.asar.unpacked","cowork-vm-service.js");
if(require("fs").existsSync(_d)){
const _c=require("child_process").fork(_d,[],{detached:true,stdio:"ignore",
env:{...process.env,ELECTRON_RUN_AS_NODE:"1"}});
_c.unref()
}
} catch(e){}
})())This fork only triggers when Ma() gets an ENOENT on socket connect. However, the CustomPlugins_listAvailablePlugins handler calls b_t() which checks VM status via a different path — it throws "VM is not running" before Ma() ever gets a chance to auto-launch the daemon. The catch(e){} also silently swallows any fork errors.
Starting the daemon manually works perfectly:
node /usr/lib/claude-desktop/node_modules/electron/dist/resources/app.asar.unpacked/cowork-vm-service.js
# [cowork-vm-service] Service started on /run/user/1000/cowork-vm-service.sockOnce the socket exists, both "Code" and "Tasks" tabs function correctly.
Workaround
A systemd user service reliably solves the problem:
# ~/.config/systemd/user/cowork-vm-service.service
[Unit]
Description=Claude Desktop Cowork VM Service Daemon
Documentation=https://github.com/aaddrick/claude-desktop-debian
[Service]
Type=simple
ExecStart=/usr/bin/node /usr/lib/claude-desktop/node_modules/electron/dist/resources/app.asar.unpacked/cowork-vm-service.js
Restart=on-failure
RestartSec=3
Environment=COWORK_VM_DEBUG=1
[Install]
WantedBy=default.targetsystemctl --user daemon-reload
systemctl --user enable --now cowork-vm-service.serviceEnvironment
- Claude Desktop: 1.1.3189-1.3.11 (
.deb, amd64) - Linux: Ubuntu x86_64, kernel 6.17.0
- Claude Code CLI: 2.1.45
- Node.js: system
/usr/bin/node
Steps to Reproduce
- Install latest
claude-desktop.debfrom this repo - Open Claude Desktop
- Click "Code" or "Tasks" in the sidebar
- Observe: UI loads but sessions fail with "VM is not running"
Verification
# Confirm the daemon is NOT running
ss -lx | grep cowork
# -> (empty)
# Check logs for the error
grep "VM is not running" ~/.cache/claude-desktop-debian/launcher.log
# -> Error occurred in handler for '..._CustomPlugins_$_listAvailablePlugins': Error: VM is not running. Start a conversation first.
# Start daemon manually — Cowork immediately works
node /usr/lib/claude-desktop/node_modules/electron/dist/resources/app.asar.unpacked/cowork-vm-service.js &
ls $XDG_RUNTIME_DIR/cowork-vm-service.sock
# -> /run/user/1000/cowork-vm-service.sockSuggested Fix
Ship a systemd user service with the .deb package. This is more reliable than the in-app fork approach because:
- The daemon starts before Claude Desktop, so the socket is ready immediately
- Survives app restarts without race conditions
- Auto-restarts on failure
- Standard Linux service management (
systemctl --user status/restart/stop)