multica-ai/multica · error

daemon status inside a daemon-managed task requires the daem

Error message

daemon status inside a daemon-managed task requires the daemon-injected MULTICA_DAEMON_PORT

What it means

Error "daemon status inside a daemon-managed task requires the daemon-injected MULTICA_DAEMON_PORT" thrown in multica-ai/multica.

Source

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

// daemonStatusHealthPort resolves which daemon `status` should probe. Outside a
// task that is the --profile-derived port, even when a stale
// MULTICA_DAEMON_PORT remains in the host environment. Inside a managed task it
// is the daemon-injected port and nothing else: healthPortForProfile hashes
// 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
}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. The MULTICA_DAEMON_PORT variable is missing; run status from outside the task or let the daemon inject it.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:1443 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/88231ba842fbbbe8. Report an issue: GitHub.