multica-ai/multica · error

--custom-env, --custom-env-stdin, and --custom-env-file are

Error message

--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one

What it means

Error "--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one" thrown in multica-ai/multica.

Source

Thrown at server/cmd/multica/cmd_agent.go:1262

	// for this channel with an empty path" and surfaces a real error below,
	// rather than being silently swallowed.
	fromFile := cmd.Flags().Changed("custom-env-file")

	count := 0
	if inline {
		count++
	}
	if fromStdin {
		count++
	}
	if fromFile {
		count++
	}
	switch {
	case count == 0:
		return nil, false, nil
	case count > 1:
		return nil, false, fmt.Errorf("--custom-env, --custom-env-stdin, and --custom-env-file are mutually exclusive; pick one")
	}

	var raw string
	switch {
	case inline:
		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")

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Use only one of --custom-env, --custom-env-stdin, or --custom-env-file.

When it happens

Trigger: Thrown at server/cmd/multica/cmd_agent.go:1262 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/0aeea2c8b5761033. Report an issue: GitHub.