{"record":{"id":"7bd6f48172a455de","repo":"multica-ai/multica","slug":"create-multica-dir-w","errorCode":null,"errorMessage":"create .multica dir: %w","messagePattern":"create \\.multica dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/context.go","lineNumber":208,"sourceCode":"\t\t}\n\t}\n\n\t// Project resources are best-effort: a write failure logs but does not\n\t// block task startup. Missing resources surface as the agent simply not\n\t// seeing the file, which matches the \"scoped, not dumped\" design (the\n\t// meta skill content always lists what the agent should expect).\n\tif err := writeProjectResources(workDir, ctx, manifest); err != nil {\n\t\t// Caller logs warnings; avoid noisy returns for non-fatal context.\n\t\treturn fmt.Errorf(\"write project resources: %w\", err)\n\t}\n\n\treturn nil\n}\n\nfunc writeTaskContextMarker(workDir string, ctx TaskContextForEnv, manifest *sidecarManifest) error {\n\tdir := filepath.Dir(filepath.Join(workDir, TaskContextMarkerRelPath))\n\tif err := recordMkdirAll(dir, 0o755, manifest); err != nil {\n\t\treturn fmt.Errorf(\"create .multica dir: %w\", err)\n\t}\n\t// The sidecar manifest removes this marker on normal local_directory\n\t// cleanup. If a crash leaves it behind, the CLI intentionally treats it\n\t// as daemon context and fails closed instead of using a user PAT.\n\tpayload := taskContextMarkerFile{\n\t\tManagedBy: TaskContextMarkerManagedBy,\n\t\tAgentID:   ctx.AgentID,\n\t\tIssueID:   ctx.IssueID,\n\t}\n\tdata, err := json.MarshalIndent(payload, \"\", \"  \")\n\tif err != nil {\n\t\treturn fmt.Errorf(\"marshal task context marker: %w\", err)\n\t}\n\tif err := recordWriteFile(filepath.Join(workDir, TaskContextMarkerRelPath), data, 0o644, manifest); err != nil {\n\t\tif errors.Is(err, errPathPreExists) {\n\t\t\tpath := filepath.Join(workDir, TaskContextMarkerRelPath)\n\t\t\texisting, readErr := os.ReadFile(path)\n\t\t\tif readErr != nil {","sourceCodeStart":190,"sourceCodeEnd":226,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/context.go#L190-L226","documentation":"Error \"create .multica dir: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/context.go:208 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions to create the .multica 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"}