{"record":{"id":"b9640954767d3682","repo":"multica-ai/multica","slug":"create-daemon-directory-w","errorCode":null,"errorMessage":"create daemon directory: %w","messagePattern":"create daemon directory: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_daemon.go","lineNumber":593,"sourceCode":"\t}\n\n\tif err := requireDaemonAuth(profile); err != nil {\n\t\treturn err\n\t}\n\n\t// Resolve current executable so the foreground child reuses this binary.\n\texePath, err := daemonExecutable()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve executable path: %w\", err)\n\t}\n\n\t// Build child args: daemon start --foreground + forwarded flags.\n\targs := buildDaemonStartArgs(cmd)\n\n\t// Ensure daemon directory exists.\n\tdir := daemonDirForProfile(profile)\n\tif err := os.MkdirAll(dir, 0o755); err != nil {\n\t\treturn fmt.Errorf(\"create daemon directory: %w\", err)\n\t}\n\n\t// The child (foreground daemon) writes daemon.log itself through a\n\t// rotating writer; its inherited stdout/stderr only need to catch raw\n\t// crash output, which goes to a separate, non-rotated sink so it never\n\t// holds daemon.log open (see daemonStderrLogPathForProfile).\n\terrLogPath := daemonStderrLogPathForProfile(profile)\n\tlogFile, err := openBoundedErrLog(errLogPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"open log file %s: %w\", errLogPath, err)\n\t}\n\t// Where the daemon's structured logs actually land (rotated), for the\n\t// user-facing hints below.\n\tlogPath := daemonLogPathForProfile(profile)\n\n\t// Remember where both logs end now so an early-death report below can show\n\t// only what THIS startup attempt wrote, not stale history. The err-log\n\t// offset is taken after openBoundedErrLog, which may have rolled the file.","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_daemon.go#L575-L611","documentation":"Error \"create daemon directory: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_daemon.go:593 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check filesystem permissions for the daemon directory."],"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"}