{"record":{"id":"b9e275bc6d5b4828","repo":"multica-ai/multica","slug":"allocate-skill-dir-for-q-w","errorCode":null,"errorMessage":"allocate skill dir for %q: %w","messagePattern":"allocate skill dir for %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/context.go","lineNumber":954,"sourceCode":"// skill entirely (which would silently drop a Multica skill the agent\n// expects to see).\nfunc writeSkillFiles(skillsDir string, skills []SkillContextForEnv, manifest *sidecarManifest) error {\n\tif err := recordMkdirAll(skillsDir, 0o755, manifest); err != nil {\n\t\treturn fmt.Errorf(\"create skills dir: %w\", err)\n\t}\n\n\t// resolveSkillSlugs deduplicates within the batch first, so two skills whose\n\t// names sanitize alike (\"A B\" / \"A-B\") get distinct bases here instead of\n\t// racing for the same directory. The listings derive from the same function,\n\t// which is what keeps them naming the directories this loop creates.\n\t// allocateCollisionFreeSkillDir still runs on top, for collisions against\n\t// directories we did not write (user-installed skills).\n\tbatchSlugs := resolveSkillSlugs(skills)\n\n\tfor i, skill := range skills {\n\t\tslug, dir, err := allocateCollisionFreeSkillDir(skillsDir, batchSlugs[i])\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"allocate skill dir for %q: %w\", skill.Name, err)\n\t\t}\n\t\tif err := recordMkdirAll(dir, 0o755, manifest); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// ensureSkillFrontmatter synthesises a `name:` value when the\n\t\t// upstream skill is missing one. Use the chosen slug (which\n\t\t// may differ from baseSlug on collision) so the YAML name\n\t\t// matches the directory name; runtimes that key on either\n\t\t// stay consistent.\n\t\tbody := ensureSkillFrontmatter(skill.Content, slug, skill.Description)\n\t\tif err := recordWriteFile(filepath.Join(dir, \"SKILL.md\"), []byte(body), 0o644, manifest); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\t// Write supporting files. The skill directory is collision-\n\t\t// free by construction, so a recordWriteFile collision under\n\t\t// it would mean the skill's bundled files list two entries","sourceCodeStart":936,"sourceCodeEnd":972,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/context.go#L936-L972","documentation":"Error \"allocate skill dir for %q: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/context.go:954 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and permissions for allocating the skill 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"}