{"record":{"id":"52170a1314f12a4b","repo":"multica-ai/multica","slug":"execenv-prepare-codex-home-w","errorCode":null,"errorMessage":"execenv: prepare codex-home: %w","messagePattern":"execenv: prepare codex-home: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/execenv.go","lineNumber":494,"sourceCode":"\t// managed (non-local_directory) issue envs get this marker; that is exactly\n\t// the set squad-leader reuse targets (MUL-4886). Non-fatal: a write failure\n\t// only costs the next follow-up its session reuse (it falls back to a fresh\n\t// session), which must never block dispatching this task.\n\tif params.LocalWorkDir == \"\" && params.Task.IssueID != \"\" {\n\t\tif err := WriteManagedEnvProvenance(envRoot, ManagedEnvProvenance{\n\t\t\tWorkspaceID: params.WorkspaceID,\n\t\t\tIssueID:     params.Task.IssueID,\n\t\t\tAgentID:     params.Task.AgentID,\n\t\t}); err != nil && logger != nil {\n\t\t\tlogger.Warn(\"execenv: write managed env provenance failed (non-fatal); a follow-up may start a fresh session\", \"error\", err)\n\t\t}\n\t}\n\n\t// For Codex, set up a per-task CODEX_HOME seeded from ~/.codex/ with skills.\n\tif params.Provider == \"codex\" {\n\t\tcodexHome := filepath.Join(envRoot, codexHomeDirName)\n\t\tif err := prepareCodexHomeWithOpts(codexHome, CodexHomeOptions{CodexVersion: params.CodexVersion, IsLocalDirectory: params.LocalWorkDir != \"\" || params.LocalWorktree != nil, SessionStoreKey: codexSessionStoreKey(params.Profile, params.Task), CodexCustomArgs: params.CodexCustomArgs}, logger); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"execenv: prepare codex-home: %w\", err)\n\t\t}\n\t\tif err := hydrateCodexSkills(codexHome, params.Task.AgentSkills, params.Task.DisabledRuntimeSkills, logger); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"execenv: hydrate codex skills: %w\", err)\n\t\t}\n\t\tenv.CodexHome = codexHome\n\t}\n\n\tif params.Provider == \"claude\" {\n\t\tsettingsPath, err := prepareClaudeSkillSettings(envRoot, params.Task.DisabledRuntimeSkills, params.Task.AgentSkills)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"execenv: prepare claude skill settings: %w\", err)\n\t\t}\n\t\tenv.ClaudeSettingsPath = settingsPath\n\t}\n\n\t// For Hermes, redirect HERMES_HOME to a per-task compatibility overlay ONLY\n\t// when the agent has skills bound. A skill-less Hermes task keeps the user's\n\t// real home and its original behavior untouched. The overlay makes the bound","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/execenv.go#L476-L512","documentation":"Error \"execenv: prepare codex-home: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/execenv.go:494 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error from codex-home preparation."],"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"}