multica-ai/multica · error

create codex-home dir: %w

Error message

create codex-home dir: %w

What it means

Error "create codex-home dir: %w" thrown in multica-ai/multica.

Source

Thrown at server/internal/daemon/execenv/codex_home.go:206

	default:
		// A read error (permission/IO) on a file the daemon just wrote.
		return windowsSandboxUndecidable
	}
}

// prepareCodexHomeWithOpts creates a per-task CODEX_HOME directory and seeds
// it with config from the shared ~/.codex/ home. Auth is symlinked (shared),
// config files are copied (isolated). The per-task config.toml gets a
// daemon-managed sandbox block picked by codexSandboxPolicyFor.
func prepareCodexHomeWithOpts(codexHome string, opts CodexHomeOptions, logger *slog.Logger) error {
	sharedHome := resolveSharedCodexHome()
	freshHome := false
	if _, err := os.Lstat(codexHome); os.IsNotExist(err) {
		freshHome = true
	}

	if err := os.MkdirAll(codexHome, 0o755); err != nil {
		return fmt.Errorf("create codex-home dir: %w", err)
	}

	// Give the task its own local sessions/ directory instead of symlinking the
	// shared ~/.codex/sessions in — a huge shared history would otherwise stall
	// Codex's `initialize` state backfill (MUL-4424). See prepareCodexSessionsDir.
	if err := prepareCodexSessionsDir(codexHome, sharedHome, opts, logger); err != nil {
		logger.Warn("execenv: codex-home sessions dir prepare failed", "error", err)
	}

	// Symlink shared files (auth).
	for _, name := range codexSymlinkedFiles {
		src := filepath.Join(sharedHome, name)
		dst := filepath.Join(codexHome, name)
		if err := ensureSymlink(src, dst); err != nil {
			logger.Warn("execenv: codex-home symlink failed", "file", name, "error", err)
		}
	}

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Check disk space and permissions for the codex-home directory.

When it happens

Trigger: Thrown at server/internal/daemon/execenv/codex_home.go:206 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/e3ea7c2754a7f0a0. Report an issue: GitHub.