multica-ai/multica · error
read --custom-env-file: %w
Error message
read --custom-env-file: %w
What it means
Error "read --custom-env-file: %w" thrown in multica-ai/multica.
Source
Thrown at server/cmd/multica/cmd_agent.go:1286
raw, _ = cmd.Flags().GetString("custom-env")
case fromStdin:
buf, err := io.ReadAll(cmd.InOrStdin())
if err != nil {
return nil, false, fmt.Errorf("read --custom-env-stdin: %w", err)
}
raw = string(buf)
if strings.TrimSpace(raw) == "" {
return nil, false, fmt.Errorf("--custom-env-stdin: empty input; pass '{}' to clear")
}
case fromFile:
if filePath == "" {
return nil, false, fmt.Errorf("--custom-env-file: path must not be empty")
}
buf, err := os.ReadFile(filePath)
if err != nil {
// Filesystem errors may include the path but not the contents —
// safe to surface via %w.
return nil, false, fmt.Errorf("read --custom-env-file: %w", err)
}
raw = string(buf)
if strings.TrimSpace(raw) == "" {
return nil, false, fmt.Errorf("--custom-env-file %q: empty contents; pass '{}' to clear", filePath)
}
}
ce, err := parseCustomEnv(raw)
if err != nil {
return nil, false, err
}
return ce, true, nil
}
// parseMcpConfig validates the --mcp-config value and returns the raw JSON to
// send. It accepts a JSON object (the MCP config, e.g. {"mcpServers": {…}}) or
// the literal `null` to clear the agent's config.
func parseMcpConfig(raw string) (json.RawMessage, error) {View on GitHub (pinned to 2c0912b6ec)
Solutions
- Check that the file exists and is readable.
When it happens
Trigger: Thrown at server/cmd/multica/cmd_agent.go:1286 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/e2cdaacd6e5d8344.
Report an issue: GitHub.