{"record":{"id":"a54f6177c7f7eb6f","repo":"multica-ai/multica","slug":"chmod-hermes-home-dir-w","errorCode":null,"errorMessage":"chmod hermes-home dir: %w","messagePattern":"chmod hermes-home dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/hermes_home.go","lineNumber":399,"sourceCode":"// 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}\n\t\tsessions = mounted\n\t}\n\t// Memory: link memories/ at the agent's persistent store so it survives the\n\t// task, or fall back to a fresh task-local dir when there is no store (no\n\t// agent to key on, or an unresolvable profile dir). See hermes_memory.go.","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/hermes_home.go#L381-L417","documentation":"Error \"chmod hermes-home dir: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/hermes_home.go:399 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions to chmod 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"}