{"record":{"id":"20c22723affe9196","repo":"multica-ai/multica","slug":"start-daemon-no-breakaway-w","errorCode":null,"errorMessage":"start daemon (no breakaway): %w","messagePattern":"start daemon \\(no breakaway\\): %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":641,"sourceCode":"\tchild.Stderr = logFile\n\t// On Windows we want to break the child out of the parent shell's Job\n\t// Object so the daemon survives parent-shell exit. If the parent's Job\n\t// has not granted BREAKAWAY_OK, CreateProcess returns\n\t// ERROR_ACCESS_DENIED — fall back to spawning without breakaway, which\n\t// matches the pre-fix behaviour. On Unix the bool is a no-op.\n\tchild.SysProcAttr = daemonSysProcAttr(true)\n\n\tif err := child.Start(); err != nil {\n\t\tif isAccessDeniedSpawnErr(err) {\n\t\t\t// Retry without breakaway. Reset the cmd state — exec.Cmd is\n\t\t\t// not safe to Start() twice, so build a fresh one.\n\t\t\tchild = exec.Command(exePath, args...)\n\t\t\tchild.Stdout = logFile\n\t\t\tchild.Stderr = logFile\n\t\t\tchild.SysProcAttr = daemonSysProcAttr(false)\n\t\t\tif err := child.Start(); err != nil {\n\t\t\t\tlogFile.Close()\n\t\t\t\treturn fmt.Errorf(\"start daemon (no breakaway): %w\", err)\n\t\t\t}\n\t\t} else {\n\t\t\tlogFile.Close()\n\t\t\treturn fmt.Errorf(\"start daemon: %w\", err)\n\t\t}\n\t}\n\tlogFile.Close()\n\tpid := child.Process.Pid\n\n\t// Watch for early death instead of Release()ing right away: a child that\n\t// fails preflight (unreachable server, token rejected with 401, ...) exits\n\t// within seconds, and without this signal the readiness poll below would\n\t// blindly run out its full window before printing a vague warning. The\n\t// goroutine leaks Wait() for the (short) remainder of this process when\n\t// the daemon starts fine — the child is never killed by it and keeps\n\t// running independently, same as with Release().\n\twaitCh := make(chan error, 1)\n\tgo func() { waitCh <- child.Wait() }()","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L623-L659","documentation":"Error \"start daemon (no breakaway): %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:641 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error and system permissions for spawning the daemon process."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}