multica-ai/multica · error

start daemon (no breakaway): %w

Error message

start daemon (no breakaway): %w

What it means

Error "start daemon (no breakaway): %w" thrown in multica-ai/multica.

Source

Thrown at server/cmd/multica/cmd_daemon.go:641

	child.Stderr = logFile
	// On Windows we want to break the child out of the parent shell's Job
	// Object so the daemon survives parent-shell exit. If the parent's Job
	// has not granted BREAKAWAY_OK, CreateProcess returns
	// ERROR_ACCESS_DENIED — fall back to spawning without breakaway, which
	// matches the pre-fix behaviour. On Unix the bool is a no-op.
	child.SysProcAttr = daemonSysProcAttr(true)

	if err := child.Start(); err != nil {
		if isAccessDeniedSpawnErr(err) {
			// Retry without breakaway. Reset the cmd state — exec.Cmd is
			// not safe to Start() twice, so build a fresh one.
			child = exec.Command(exePath, args...)
			child.Stdout = logFile
			child.Stderr = logFile
			child.SysProcAttr = daemonSysProcAttr(false)
			if err := child.Start(); err != nil {
				logFile.Close()
				return fmt.Errorf("start daemon (no breakaway): %w", err)
			}
		} else {
			logFile.Close()
			return fmt.Errorf("start daemon: %w", err)
		}
	}
	logFile.Close()
	pid := child.Process.Pid

	// Watch for early death instead of Release()ing right away: a child that
	// fails preflight (unreachable server, token rejected with 401, ...) exits
	// within seconds, and without this signal the readiness poll below would
	// blindly run out its full window before printing a vague warning. The
	// goroutine leaks Wait() for the (short) remainder of this process when
	// the daemon starts fine — the child is never killed by it and keeps
	// running independently, same as with Release().
	waitCh := make(chan error, 1)
	go func() { waitCh <- child.Wait() }()

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Inspect the wrapped error and system permissions for spawning the daemon process.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:641 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/20c22723affe9196. Report an issue: GitHub.