multica-ai/multica · error

invalid MULTICA_DAEMON_PORT %q inside a daemon-managed task

Error message

invalid MULTICA_DAEMON_PORT %q inside a daemon-managed task

What it means

Error "invalid MULTICA_DAEMON_PORT %q inside a daemon-managed task" thrown in multica-ai/multica.

Source

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

// whatever profile name the caller passes, so deriving the port there would let
// a task report on a daemon that is not the one hosting it — and for a task
// hosted by a named-profile daemon it would silently probe the default daemon
// instead. A missing port fails closed rather than guessing.
func daemonStatusHealthPort(cmd *cobra.Command) (int, error) {
	profile := resolveProfile(cmd)
	if !inDaemonTaskIdentityContext() {
		return healthPortForProfile(profile), nil
	}
	if profile != "" {
		return 0, fmt.Errorf("daemon status --profile is not available inside a daemon-managed task")
	}
	raw := strings.TrimSpace(os.Getenv("MULTICA_DAEMON_PORT"))
	if raw == "" {
		return 0, fmt.Errorf("daemon status inside a daemon-managed task requires the daemon-injected MULTICA_DAEMON_PORT")
	}
	port, err := strconv.Atoi(raw)
	if err != nil || port <= 0 {
		return 0, fmt.Errorf("invalid MULTICA_DAEMON_PORT %q inside a daemon-managed task", raw)
	}
	return port, nil
}

// describeDaemonManager turns the daemon's launched_by tag into something a
// user can act on. Unknown values are passed through rather than dropped: a
// newer daemon naming a manager this CLI predates is still worth showing.
func describeDaemonManager(launchedBy string) string {
	if launchedBy == "desktop" {
		return "Multica Desktop app (start and stop it from the app)"
	}
	return launchedBy
}

// printDaemonStatusReport renders a key/value summary of the daemon health
// response. The value column is aligned to the widest label so the dynamic
// "Daemon [profile]" row stays in step with the static rows below it.
func printDaemonStatusReport(w io.Writer, label string, health map[string]any) {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Fix the MULTICA_DAEMON_PORT value to a valid port number.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:1447 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/927ce32d40034bbf. Report an issue: GitHub.