multica-ai/multica · error

%s %q: cannot stat source %s: %w

Error message

%s %q: cannot stat source %s: %w

What it means

Error "%s %q: cannot stat source %s: %w" thrown in multica-ai/multica.

Source

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

func syncCodexReferencedFile(codexHome, sharedHome, key, configValue string) error {
	referencedPath := strings.TrimSpace(configValue)
	if referencedPath == "" {
		return nil
	}

	src, err := resolveCodexConfigPath(referencedPath, sharedHome, key)
	if err != nil {
		return err
	}
	info, err := os.Stat(src)
	if os.IsNotExist(err) {
		return fmt.Errorf("%s %q resolved to missing file %s: %w", key, referencedPath, src, err)
	}
	if err != nil {
		// Not a confident absence — a permission or IO failure must not be
		// reported as "the file isn't there", which sends operators looking for
		// the wrong problem.
		return fmt.Errorf("%s %q: cannot stat source %s: %w", key, referencedPath, src, err)
	}

	if filepath.IsAbs(referencedPath) || strings.HasPrefix(referencedPath, "~") {
		return nil
	}
	if !info.Mode().IsRegular() {
		return fmt.Errorf("%s %q resolved to %s, which is not a regular file", key, referencedPath, src)
	}
	cleanReferencedPath := filepath.Clean(referencedPath)
	if !filepath.IsLocal(cleanReferencedPath) {
		return fmt.Errorf("%s %q must be a local relative path or an absolute path", key, referencedPath)
	}
	return materialiseInCodexHome(codexHome, cleanReferencedPath, src, key)
}

// openVerifiedCodexHomeRoot opens codexHome as a confinement root and only
// returns it once the opened directory is proven to still BE codexHome.
//

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Check that the source file exists and is accessible.

When it happens

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