{"record":{"id":"200ad4d1e94b26ec","repo":"multica-ai/multica","slug":"clear-codex-skills-dir-w","errorCode":null,"errorMessage":"clear codex skills dir: %w","messagePattern":"clear codex skills dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/execenv.go","lineNumber":905,"sourceCode":"// The skills directory is wiped first so two stale-state classes that the\n// Reuse path would otherwise leak are gone:\n//\n//   - A name now claimed by a workspace skill that previously held only a\n//     user-seeded copy — support files from the user version would otherwise\n//     linger under the workspace skill's directory.\n//   - A user skill removed from the shared ~/.codex/skills/ since the last\n//     run — its old contents would otherwise remain visible to the codex\n//     CLI.\n//\n// Codex is the only runtime that needs this two-stage hydration because the\n// daemon sets CODEX_HOME to a per-task directory, isolating the CLI from the\n// user's real ~/.codex/. Other runtimes leave HOME untouched and discover\n// user-level skills natively (see context.go for the workdir-local paths\n// they use for workspace skills).\nfunc hydrateCodexSkills(codexHome string, workspaceSkills []SkillContextForEnv, disabledRuntimeSkills []RuntimeSkillRefForEnv, logger *slog.Logger) error {\n\tskillsDir := filepath.Join(codexHome, \"skills\")\n\tif err := os.RemoveAll(skillsDir); err != nil {\n\t\treturn fmt.Errorf(\"clear codex skills dir: %w\", err)\n\t}\n\tif err := seedUserCodexSkills(codexHome, workspaceSkills, logger); err != nil {\n\t\tlogger.Warn(\"execenv: seed user codex skills failed\", \"error\", err)\n\t}\n\tif len(workspaceSkills) > 0 {\n\t\tif err := writeSkillFiles(skillsDir, workspaceSkills, nil); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn ensureCodexDisabledSkillsConfig(filepath.Join(codexHome, \"config.toml\"), codexHome, disabledRuntimeSkills, workspaceSkills)\n}\n\n// GCMetaKind identifies which kind of parent record a task workdir belongs to.\n// The GC loop dispatches its decision tree on this value so chat / autopilot /\n// quick-create tasks are no longer forced through the issue-centric path.\ntype GCMetaKind string\n\nconst (","sourceCodeStart":887,"sourceCodeEnd":923,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/execenv.go#L887-L923","documentation":"Error \"clear codex skills dir: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/execenv.go:905 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions to clear the codex skills 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-15T17:31:12.345Z"}