{"record":{"id":"5fc13bff3aa3ba72","repo":"multica-ai/multica","slug":"create-hermes-home-dir-w","errorCode":null,"errorMessage":"create hermes-home dir: %w","messagePattern":"create hermes-home dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/hermes_home.go","lineNumber":394,"sourceCode":"// memories/ task-local for this task. sessionStore is the conversation's\n// persistent session store (execenv.HermesSessionStorePath) that state.db is\n// linked to; empty — or a host that cannot create the link — keeps the session\n// database task-local. The returned hermesSessionMount reports both what got\n// mounted and whether the store actually holds a transcript, so the caller never\n// tells a task it can resume history that is not there.\nfunc prepareHermesHome(hermesHome, sourceHome string, sourceMustExist bool, workspaceSkills []SkillContextForEnv, env map[string]string, memoryStore, sessionStore string, logger *slog.Logger) (sessions hermesSessionMount, err error) {\n\tsharedHome := strings.TrimSpace(sourceHome)\n\tif sharedHome == \"\" {\n\t\tsharedHome = platformDefaultHermesHome()\n\t}\n\tif sourceMustExist {\n\t\tif fi, err := os.Stat(sharedHome); err != nil || !fi.IsDir() {\n\t\t\treturn hermesSessionMount{}, fmt.Errorf(\"hermes profile home %q not found (create it with `hermes profile create`)\", sharedHome)\n\t\t}\n\t}\n\n\tif err := os.MkdirAll(hermesHome, 0o700); err != nil {\n\t\treturn hermesSessionMount{}, fmt.Errorf(\"create hermes-home dir: %w\", err)\n\t}\n\t// Tighten perms on reuse too — MkdirAll leaves an existing dir's mode alone,\n\t// and the derived config below can hold inline api_key secrets.\n\tif err := os.Chmod(hermesHome, 0o700); err != nil {\n\t\treturn hermesSessionMount{}, fmt.Errorf(\"chmod hermes-home dir: %w\", err)\n\t}\n\tif err := prepareHermesTaskLocalState(hermesHome); err != nil {\n\t\treturn hermesSessionMount{}, fmt.Errorf(\"prepare task-local state: %w\", err)\n\t}\n\t// Sessions: link state.db at the conversation's persistent store so the\n\t// transcript survives the task. A store that cannot be mounted leaves the\n\t// database task-local — the pre-existing behaviour — rather than failing the\n\t// task. See hermes_sessions.go.\n\tif sessionStore != \"\" {\n\t\tmounted, err := mountHermesSessionDB(hermesHome, sessionStore, logger)\n\t\tif err != nil {\n\t\t\treturn hermesSessionMount{}, fmt.Errorf(\"mount conversation sessions: %w\", err)\n\t\t}","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/hermes_home.go#L376-L412","documentation":"Error \"create hermes-home dir: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/hermes_home.go:394 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and permissions for the hermes-home 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"}