multica-ai/multica · error

read config.toml: %w

Error message

read config.toml: %w

What it means

Error "read config.toml: %w" thrown in multica-ai/multica.

Source

Thrown at server/internal/daemon/execenv/codex_shell_env.go:264

	}

	var out bytes.Buffer
	previous := 0
	for _, r := range merged {
		out.Write(content[previous:r.start])
		previous = r.end
	}
	out.Write(content[previous:])
	return out.Bytes(), nil
}

// EnsureCodexShellEnvPolicyConfig replaces every user/profile shell policy in
// the task-local config with one validated daemon-managed policy. The source
// config in the user's shared Codex home is never modified.
func EnsureCodexShellEnvPolicyConfig(configPath string, includeOnly []string, logger *slog.Logger) error {
	data, err := os.ReadFile(configPath)
	if err != nil && !os.IsNotExist(err) {
		return fmt.Errorf("read config.toml: %w", err)
	}

	withoutManaged := []byte(shellEnvBlockRe.ReplaceAllString(string(data), ""))
	stripped, err := stripUserShellEnvPolicy(withoutManaged)
	if err != nil {
		return err
	}
	block, err := renderMulticaShellEnvBlock(includeOnly)
	if err != nil {
		return err
	}

	base := strings.TrimRight(string(stripped), " \t\r\n")
	updated := block
	if base != "" {
		updated = base + "\n\n" + block
	}
	var validated map[string]any

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Check that config.toml is readable.

When it happens

Trigger: Thrown at server/internal/daemon/execenv/codex_shell_env.go:264 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/fd417acf074ae269. Report an issue: GitHub.