multica-ai/multica · error

resolved to missing file

Error message

%s %q resolved to missing file %s: %w

What it means

Fires when a path-valued config.toml key resolves to a source file that confidently does not exist. Reported distinctly from stat errors so operators are not sent looking for the wrong problem; the dangling reference fails Codex home preparation.

Solutions

  1. Fix the reference so it points at an existing file.
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

// symlink out of ~/.codex grants no access the task did not already have.
//
// The copy is refreshed on every prepare, so reusing a task home picks up an
// edited source instead of keeping a stale instruction file. A copy whose key
// was later removed or repointed stays behind unreferenced; Codex never reads it
// because the config no longer names it.
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)
	}

View on GitHub (pinned to 2c0912b6ec)