multica-ai/multica · error

refusing to restart: the server rejected your login token (i

Error message

refusing to restart: the server rejected your login token (it may have expired or been revoked); the running daemon was left untouched.
Run '%s' to sign in again, then rerun 'multica daemon restart'

What it means

Error "refusing to restart: the server rejected your login token (it may have expired or been revoked); the running daemon was left untouched. Run '%s' to sign in again, then rerun 'multica daemon restart'" thrown in multica-ai/multica.

Source

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

		rawURL = daemon.DefaultServerURL
	}
	baseURL, err := daemon.NormalizeServerBaseURL(rawURL)
	if err != nil {
		return fmt.Errorf("refusing to restart: invalid server URL %q: %w", rawURL, err)
	}

	loginHint := "multica login"
	if profile != "" {
		loginHint += " --profile " + profile
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()
	if err := cli.NewAPIClient(baseURL, "", cfg.Token).GetJSON(ctx, "/api/me", nil); err != nil {
		var httpErr *cli.HTTPError
		if errors.As(err, &httpErr) {
			if httpErr.StatusCode == http.StatusUnauthorized {
				return fmt.Errorf("refusing to restart: the server rejected your login token (it may have expired or been revoked); the running daemon was left untouched.\nRun '%s' to sign in again, then rerun 'multica daemon restart'", loginHint)
			}
			return fmt.Errorf("refusing to restart: preflight check against %s failed (%w); the running daemon was left untouched", baseURL, err)
		}
		return fmt.Errorf("refusing to restart: cannot reach the Multica server at %s (%w); the running daemon was left untouched.\nMake sure the server is running and reachable, then rerun 'multica daemon restart'", baseURL, err)
	}
	return nil
}

func runDaemonRestart(cmd *cobra.Command, args []string) error {
	if err := requireHumanLocalCommand("daemon restart"); err != nil {
		return err
	}
	profile := resolveProfile(cmd)
	if err := requireKnownProfile(profile); err != nil {
		return err
	}
	healthPort := healthPortForProfile(profile)

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Run 'multica login' to sign in again, then rerun 'multica daemon restart'.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_daemon.go:1189 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/32ca624f090f6cf9. Report an issue: GitHub.