multica-ai/multica · warning
daemon has %d active %s; setup saved the new configuration b
Error message
daemon has %d active %s; setup saved the new configuration but left the running daemon unchanged to avoid cancelling work. Wait for the active work to finish, then run '%s' to apply the new configuration
What it means
Deliberate safety refusal from the post-setup daemon restart logic: the daemon is alive, reports more than zero active tasks, and setup therefore refuses to restart it, because a restart would cancel in-flight work. The new configuration IS saved; only the running daemon still uses the old deployment. The message includes the exact restart command, profile-aware.
Source
Thrown at server/cmd/multica/cmd_setup.go:305
func dispatchDaemonAfterSetup(
cmd *cobra.Command,
args []string,
health map[string]any,
start setupDaemonRunner,
restart setupDaemonRunner,
) error {
if daemonAlive(health) {
if activeTasks := daemonActiveTaskCount(health); activeTasks > 0 {
taskLabel := "tasks"
if activeTasks == 1 {
taskLabel = "task"
}
restartCmd := "multica daemon restart"
if profile := resolveProfile(cmd); profile != "" {
restartCmd += " --profile " + profile
}
return fmt.Errorf(
"daemon has %d active %s; setup saved the new configuration but left the running daemon unchanged to avoid cancelling work. Wait for the active work to finish, then run '%s' to apply the new configuration",
activeTasks,
taskLabel,
restartCmd,
)
}
fmt.Fprintln(os.Stderr, "\nRestarting daemon to apply the new configuration...")
return restart(cmd, args)
}
fmt.Fprintln(os.Stderr, "\nStarting daemon...")
return start(cmd, args)
}
func daemonActiveTaskCount(health map[string]any) int64 {
switch count := health["active_task_count"].(type) {
case float64:
return int64(count)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Wait for the reported active tasks to finish (check `multica daemon status`).
- Run the exact command from the error message, e.g. `multica daemon restart --profile <P>`.
- If the work must be abandoned, explicitly run `multica daemon restart` accepting the cancellation.
- For unattended automation, schedule setup at idle times or drain tasks first.
Example fix
# before multica setup self-host --server-url https://api.co --app-url https://app.co # error: daemon has 3 active tasks ... # after (once tasks drain) multica daemon restart --profile default
Defensive patterns
Strategy: retry
Validate before calling
# Poll task count (single check, no busy loop) before restarting multica daemon status --profile "$P" --output json | jq -e '.active_tasks == 0' >/dev/null || echo "tasks still active; not restarting"
Try / catch
Parse the count and restart command out of the message; treat as a soft-failure: pause the pipeline until tasks drain, then execute the suggested `multica daemon restart --profile <P>` and verify status.
Prevention
- Don't force-restart daemons with active tasks unless cancellation is intended.
- Automate setup at scheduled idle times.
- Remember config IS saved at this point — only the restart is pending.
When it happens
Trigger: Running `multica setup` or `multica setup self-host` while the daemon has 1+ active tasks (per daemonActiveTaskCount from its health endpoint). Any deployment switch (cloud→self-host, server URL change) under active work triggers it.
Common situations: Re-pointing a busy workstation to a new server during work hours; CI agents with queued tasks; switching profiles while background sync/agents run.
Related errors
- start or restart daemon: %w
- ErrRepoBusy
- agent execution context requires MULTICA_TOKEN to be a task-
- daemon-managed task requires a task-local Multica config roo
- %s is not available inside a daemon-managed task%s
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/efc931017da431e7.
Report an issue: GitHub.