mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
The Liberation reporter (Zarkk1zz) diagnosed this cleanly. On Windows + Node 25, \`npx claude-flow daemon start\` reported success then the spawned daemon died ~1s later. PR #1719 (v3.6.13) fixed the previous \`spawn(..., {shell:true})\` bug, but the new \`fork(..., { stdio: [..., 'ipc'] })\` path left the IPC channel open. \`child.unref()\` releases the libuv handle but does NOT close the IPC pipe — and on Windows, that pipe is what tied the daemon's lifetime to the parent npx wrapper. When npx exited, the pipe tore down and the daemon went with it. Fix in v3/@claude-flow/cli/src/commands/daemon.ts: - detached: !isWin → detached: true (every platform) - After child.unref(), call child.disconnect() (wrapped in try) to explicitly break the IPC pipe. POSIX-tested locally: macOS daemon start/stop roundtrip works, daemon survives parent exit (PID stays RUNNING after the parent shell exits). Windows path is what changes meaningfully — detached:true gives the child its own session/pgid, disconnect() severs the IPC pipe, daemon genuinely stands on its own. Bumps all three packages to 3.7.0-alpha.3: @claude-flow/cli 3.7.0-alpha.1 → 3.7.0-alpha.3 claude-flow 3.7.0-alpha.1 → 3.7.0-alpha.3 ruflo 3.7.0-alpha.2 → 3.7.0-alpha.3 (Skipped alpha.2 on cli/claude-flow because ruflo already used that slot for the dep-range fix — keeping all three aligned at .3.) Closes #1766 Co-Authored-By: RuFlo <ruv@ruv.net>