{"record":{"id":"4243cf7d75755e7a","repo":"multica-ai/multica","slug":"execenv-create-directory-s-w","errorCode":null,"errorMessage":"execenv: create directory %s: %w","messagePattern":"execenv: create directory (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/internal/daemon/execenv/execenv.go","lineNumber":370,"sourceCode":"\t\tif err := os.RemoveAll(envRoot); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"execenv: remove existing env: %w\", err)\n\t\t}\n\t}\n\n\t// Create directory tree. For the standard flow the agent's workdir is\n\t// envRoot/workdir; for local_directory tasks the user's path takes its\n\t// place and we only need to create the scratch directories under\n\t// envRoot.\n\tworkDir := filepath.Join(envRoot, \"workdir\")\n\tscratchDirs := []string{filepath.Join(envRoot, \"output\"), filepath.Join(envRoot, \"logs\")}\n\tif params.LocalWorkDir == \"\" && params.LocalWorktree == nil {\n\t\tscratchDirs = append(scratchDirs, workDir)\n\t} else if params.LocalWorkDir != \"\" {\n\t\tworkDir = params.LocalWorkDir\n\t}\n\tfor _, dir := range scratchDirs {\n\t\tif err := os.MkdirAll(dir, 0o755); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"execenv: create directory %s: %w\", dir, err)\n\t\t}\n\t}\n\tmulticaConfigRoot := filepath.Join(envRoot, \"multica-config\")\n\tif err := os.MkdirAll(multicaConfigRoot, 0o700); err != nil {\n\t\treturn nil, fmt.Errorf(\"execenv: create task-local Multica config directory: %w\", err)\n\t}\n\tif err := os.Chmod(multicaConfigRoot, 0o700); err != nil {\n\t\treturn nil, fmt.Errorf(\"execenv: restrict task-local Multica config directory: %w\", err)\n\t}\n\n\t// Worktree mode: build the task's own checkout of the user's repo inside\n\t// envRoot and use it as the workdir. Done before any context file is\n\t// written so the sidecars land inside the disposable worktree instead of\n\t// the user's directory.\n\tvar localWorktree *LocalWorktree\n\t// Tracks whether Prepare reached its successful return. Everything after\n\t// worktree creation can still fail — context files, provider homes, MCP\n\t// config — and on those paths the caller never receives an Environment, so","sourceCodeStart":352,"sourceCodeEnd":388,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/daemon/execenv/execenv.go#L352-L388","documentation":"Error \"execenv: create directory %s: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/daemon/execenv/execenv.go:370 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check disk space and permissions for the environment 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"}