multica-ai/multica · error
resolve executable path
Error message
resolve executable path: %w
What it means
CLI error in runDaemonBackground: resolving the current executable via daemonExecutable (selfexec.Resolve, overridable in tests) failed, so the background parent can't spawn the foreground daemon child that reuses this binary. Wrapped with 'resolve executable path: %w'; an environment problem, not a user-input one.
Solutions
- Reinstall the CLI; the executable path could not be resolved.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at server/cmd/multica/cmd_daemon.go:584 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/6c679d08c4075091.
Report an issue: GitHub.
Appendix: source
Thrown at server/cmd/multica/cmd_daemon.go:584
if err := daemonIdentityMismatch(health, profile, healthPort); err != nil {
return err
}
label := "daemon"
if profile != "" {
label = fmt.Sprintf("daemon [%s]", profile)
}
pid, _ := health["pid"].(float64)
return fmt.Errorf("%s is already running (pid %v). Use 'daemon restart' to restart it", label, int(pid))
}
if err := requireDaemonAuth(profile); err != nil {
return err
}
// Resolve current executable so the foreground child reuses this binary.
exePath, err := daemonExecutable()
if err != nil {
return fmt.Errorf("resolve executable path: %w", err)
}
// Build child args: daemon start --foreground + forwarded flags.
args := buildDaemonStartArgs(cmd)
// Ensure daemon directory exists.
dir := daemonDirForProfile(profile)
if err := os.MkdirAll(dir, 0o755); err != nil {
return fmt.Errorf("create daemon directory: %w", err)
}
// The child (foreground daemon) writes daemon.log itself through a
// rotating writer; its inherited stdout/stderr only need to catch raw
// crash output, which goes to a separate, non-rotated sink so it never
// holds daemon.log open (see daemonStderrLogPathForProfile).
errLogPath := daemonStderrLogPathForProfile(profile)
logFile, err := openBoundedErrLog(errLogPath)
if err != nil {View on GitHub (pinned to 2c0912b6ec)