{"record":{"id":"4b0249ea8fe2154f","repo":"multica-ai/multica","slug":"you-are-not-logged-in-run-s-first-then-start","errorCode":null,"errorMessage":"you are not logged in. Run '%s' first, then start the daemon","messagePattern":"you are not logged in\\. Run '(.+?)' first, then start the daemon","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":537,"sourceCode":"\n// requireDaemonAuth fails fast when the user never ran `multica login`. The\n// daemon child performs the same check (resolveAuth) and dies immediately,\n// but the background parent can't see that exit — it would poll the health\n// port for the full 45s readiness window and then print a vague \"check logs\"\n// warning. Checking before spawning turns that silent stall into an\n// immediate, actionable error. Mirrors daemon.resolveAuth: the daemon only\n// authenticates via the stored config token, never MULTICA_TOKEN.\nfunc requireDaemonAuth(profile string) error {\n\tcfg, err := cli.LoadCLIConfigForProfile(profile)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"load CLI config: %w\", err)\n\t}\n\tif cfg.Token == \"\" {\n\t\tloginHint := \"multica login\"\n\t\tif profile != \"\" {\n\t\t\tloginHint = fmt.Sprintf(\"multica login --profile %s\", profile)\n\t\t}\n\t\treturn fmt.Errorf(\"you are not logged in. Run '%s' first, then start the daemon\", loginHint)\n\t}\n\treturn nil\n}\n\nfunc runDaemonStart(cmd *cobra.Command, _ []string) error {\n\tif err := requireHumanLocalCommand(\"daemon start\"); err != nil {\n\t\treturn err\n\t}\n\tforeground, _ := cmd.Flags().GetBool(\"foreground\")\n\tif foreground {\n\t\treturn runDaemonForeground(cmd)\n\t}\n\treturn runDaemonBackground(cmd)\n}\n\nfunc runDaemonBackground(cmd *cobra.Command) error {\n\tprofile := resolveProfile(cmd)\n\thealthPort := healthPortForProfile(profile)","sourceCodeStart":519,"sourceCodeEnd":555,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L519-L555","documentation":"Error \"you are not logged in. Run '%s' first, then start the daemon\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:537 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run 'multica login' first, then start the daemon."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}