{"record":{"id":"c0e67ad056fff30b","repo":"multica-ai/multica","slug":"create-agent-context-dir-w","errorCode":null,"errorMessage":"create .agent_context dir: %w","messagePattern":"create \\.agent_context dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/context.go","lineNumber":155,"sourceCode":"// Qwen Code:    skills → {workDir}/.qwen/skills/{name}/SKILL.md  (native project-level discovery)\n// QwenPaw:      skills → {workDir}/.qwenpaw/skills/{name}/SKILL.md  (native project-level discovery)\n// Antigravity: skills → {workDir}/.agents/skills/{name}/SKILL.md  (native discovery — see https://antigravity.google/docs/gcli-migration \"Workspace skills\")\n// Default:     skills → {workDir}/.agent_context/skills/{name}/SKILL.md\n//\n// manifest, when non-nil, is populated with every file we created and every\n// intermediate directory we had to MkdirAll (skipping any that pre-existed).\n// CleanupSidecars uses it to roll the workdir back to its pre-Prepare\n// state for local_directory tasks. Callers that don't need cleanup —\n// cloud-mode tasks whose envRoot is wiped wholesale by the GC loop — may\n// pass nil to skip the bookkeeping entirely.\nfunc writeContextFiles(workDir, provider string, ctx TaskContextForEnv, manifest *sidecarManifest) error {\n\tif err := writeTaskContextMarker(workDir, ctx, manifest); err != nil {\n\t\treturn err\n\t}\n\n\tcontextDir := filepath.Join(workDir, \".agent_context\")\n\tif err := recordMkdirAll(contextDir, 0o755, manifest); err != nil {\n\t\treturn fmt.Errorf(\"create .agent_context dir: %w\", err)\n\t}\n\n\tcontent := renderIssueContext(provider, ctx)\n\tpath := filepath.Join(contextDir, \"issue_context.md\")\n\tif err := recordWriteFile(path, []byte(content), 0o644, manifest); err != nil {\n\t\t// A pre-existing path means the user already owns\n\t\t// .agent_context/issue_context.md — either they created it\n\t\t// themselves or it survived from a crashed prior run we can't\n\t\t// safely distinguish from intentional content. Refusing the\n\t\t// write is the correct call: the runtime brief (CLAUDE.md /\n\t\t// AGENTS.md) already carries every fact this file\n\t\t// would, so the agent runs fine without the sidecar copy.\n\t\t// Anything else is a real failure.\n\t\tif !errors.Is(err, errPathPreExists) {\n\t\t\treturn fmt.Errorf(\"write issue_context.md: %w\", err)\n\t\t}\n\t}\n","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/context.go#L137-L173","documentation":"Error \"create .agent_context dir: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/context.go:155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions to create the .agent_context 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"}