{"record":{"id":"f24a7979f594393c","repo":"multica-ai/multica","slug":"resolve-hermes-profile-w","errorCode":null,"errorMessage":"resolve hermes profile: %w","messagePattern":"resolve hermes profile: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/daemon.go","lineNumber":6329,"sourceCode":"\t// the agent's custom_env HERMES_HOME feed execenv.ResolveHermesProfile, which\n\t// reproduces Hermes' own profile semantics (root derivation, explicit vs.\n\t// sticky selection, reserved/invalid failure). A reserved/invalid selection\n\t// fails the task closed, matching Hermes' sys.exit(1). The selected source\n\t// home is exported to hermesEnv[\"HERMES_HOME\"] so ${HERMES_HOME} in a\n\t// profile's skills.external_dirs expands against the selected profile home,\n\t// as native Hermes does before loading config.yaml. The parsed occurrence is\n\t// stripped from the acp argv at launch (only when the overlay is built) so\n\t// the flag can't re-point HERMES_HOME past the overlay.\n\tvar hermesSourceHome string\n\tvar hermesSourceMustExist bool\n\tvar hermesEnv map[string]string\n\tvar hermesMemoryStore string\n\tvar hermesSessionStore string\n\tif provider == \"hermes\" {\n\t\tsel := agent.ParseHermesProfileArgs(agentCustomArgs)\n\t\tres := execenv.ResolveHermesProfile(agentEnvOverrides[\"HERMES_HOME\"], sel.Name, sel.Found, sel.Inline)\n\t\tif res.Err != nil {\n\t\t\treturn TaskResult{}, fmt.Errorf(\"resolve hermes profile: %w\", res.Err)\n\t\t}\n\t\thermesSourceHome = res.SourceHome\n\t\thermesSourceMustExist = res.MustExist\n\t\t// Which home the overlay is seeded from decides whether the task sees\n\t\t// the user's provider config at all, and it is derived from the daemon\n\t\t// PROCESS environment — invisible from the shell the user tests\n\t\t// `hermes acp` in, which is why a mismatch reads as \"works by hand,\n\t\t// fails under Multica\" (GH #6872). One line, at Info, so the answer is\n\t\t// in the daemon log before anything fails rather than reconstructed\n\t\t// afterwards.\n\t\ttaskLog.Info(\"hermes home resolved\",\n\t\t\t\"source_home\", hermesSourceHome,\n\t\t\t\"from_custom_env\", strings.TrimSpace(agentEnvOverrides[\"HERMES_HOME\"]) != \"\",\n\t\t\t\"must_exist\", hermesSourceMustExist,\n\t\t)\n\t\thermesEnv = sanitizeAgentEnv(agentEnvOverrides)\n\t\tif hermesEnv == nil {\n\t\t\thermesEnv = map[string]string{}","sourceCodeStart":6311,"sourceCodeEnd":6347,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/daemon.go#L6311-L6347","documentation":"Error \"resolve hermes profile: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/daemon.go:6329 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the hermes profile configuration and retry."],"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-15T17:31:12.345Z"}