multica-ai/multica · error

execenv: create task-local Multica config directory: %w

Error message

execenv: create task-local Multica config directory: %w

What it means

Error "execenv: create task-local Multica config directory: %w" thrown in multica-ai/multica.

Source

Thrown at server/internal/daemon/execenv/execenv.go:375

	// Create directory tree. For the standard flow the agent's workdir is
	// envRoot/workdir; for local_directory tasks the user's path takes its
	// place and we only need to create the scratch directories under
	// envRoot.
	workDir := filepath.Join(envRoot, "workdir")
	scratchDirs := []string{filepath.Join(envRoot, "output"), filepath.Join(envRoot, "logs")}
	if params.LocalWorkDir == "" && params.LocalWorktree == nil {
		scratchDirs = append(scratchDirs, workDir)
	} else if params.LocalWorkDir != "" {
		workDir = params.LocalWorkDir
	}
	for _, dir := range scratchDirs {
		if err := os.MkdirAll(dir, 0o755); err != nil {
			return nil, fmt.Errorf("execenv: create directory %s: %w", dir, err)
		}
	}
	multicaConfigRoot := filepath.Join(envRoot, "multica-config")
	if err := os.MkdirAll(multicaConfigRoot, 0o700); err != nil {
		return nil, fmt.Errorf("execenv: create task-local Multica config directory: %w", err)
	}
	if err := os.Chmod(multicaConfigRoot, 0o700); err != nil {
		return nil, fmt.Errorf("execenv: restrict task-local Multica config directory: %w", err)
	}

	// Worktree mode: build the task's own checkout of the user's repo inside
	// envRoot and use it as the workdir. Done before any context file is
	// written so the sidecars land inside the disposable worktree instead of
	// the user's directory.
	var localWorktree *LocalWorktree
	// Tracks whether Prepare reached its successful return. Everything after
	// worktree creation can still fail — context files, provider homes, MCP
	// config — and on those paths the caller never receives an Environment, so
	// nothing downstream knows a worktree exists to clean up. Without the
	// rollback below, each such failure would leave a registration in the
	// user's repo and a branch that no task ever ran in.
	prepareSucceeded := false
	if params.LocalWorktree != nil {

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Check permissions to create the task-local Multica config directory.

When it happens

Trigger: Thrown at server/internal/daemon/execenv/execenv.go:375 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/3c315d0a6db8c2dc. Report an issue: GitHub.