diff --git a/v3/@claude-flow/cli/src/commands/daemon.ts b/v3/@claude-flow/cli/src/commands/daemon.ts index acbaefb5bc..cfedd91cdb 100644 --- a/v3/@claude-flow/cli/src/commands/daemon.ts +++ b/v3/@claude-flow/cli/src/commands/daemon.ts @@ -166,8 +166,8 @@ async function startBackgroundDaemon(projectRoot: string, quiet: boolean): Promi // Save PID fs.writeFileSync(pidFile, String(child.pid)); - // Close log file descriptor in parent - fs.closeSync(logFd); + // Note: Do NOT close logFd here - it would kill the child's stdout/stderr + // The fd will be automatically closed when this process exits if (!quiet) { output.printSuccess(`Daemon started in background (PID: ${child.pid})`);