multica-ai/multica · error

--issue-prefix cannot be empty; omit it to use the server-ge

Error message

--issue-prefix cannot be empty; omit it to use the server-generated prefix

What it means

In `multica workspace create`, --issue-prefix was explicitly changed but its value trims to empty. An empty prefix is not a 'clear' operation — the server generates one — so the CLI tells you to omit the flag instead of silently reinterpreting it.

Source

Thrown at server/cmd/multica/cmd_workspace.go:323

	body := map[string]any{"name": name, "slug": slug}
	if cmd.Flags().Changed("description") || cmd.Flags().Changed("description-stdin") {
		desc, _, err := resolveTextFlag(cmd, "description")
		if err != nil {
			return nil, err
		}
		body["description"] = desc
	}
	if cmd.Flags().Changed("context") || cmd.Flags().Changed("context-stdin") {
		ctxText, _, err := resolveTextFlag(cmd, "context")
		if err != nil {
			return nil, err
		}
		body["context"] = ctxText
	}
	if cmd.Flags().Changed("issue-prefix") {
		v, _ := cmd.Flags().GetString("issue-prefix")
		if strings.TrimSpace(v) == "" {
			return nil, fmt.Errorf("--issue-prefix cannot be empty; omit it to use the server-generated prefix")
		}
		body["issue_prefix"] = v
	}
	return body, nil
}

func runWorkspaceCreate(cmd *cobra.Command, _ []string) error {
	body, err := buildWorkspaceCreateBody(cmd)
	if err != nil {
		return err
	}

	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}
	client.WorkspaceID = ""

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Omit --issue-prefix entirely to get the server-generated prefix.
  2. Or pass a real prefix, e.g. --issue-prefix ENG.
  3. In scripts, only append the flag when the variable is non-empty: use an args array built conditionally.

Example fix

# before
multica workspace create --name n --slug s --issue-prefix ""

# after
multica workspace create --name n --slug s
Defensive patterns

Strategy: validation

Validate before calling

ARGS=(--name "$NAME" --slug "$SLUG")
[ -n "$PREFIX" ] && ARGS+=(--issue-prefix "$PREFIX")   # append only when non-empty
multica workspace create "${ARGS[@]}"

Prevention

When it happens

Trigger: Running `multica workspace create ... --issue-prefix ""` or `--issue-prefix " "`; only fires when cmd.Flags().Changed("issue-prefix") is true.

Common situations: Scripts templating the flag from an optional variable that expands to an empty string.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/036dea87d2c58d50. Report an issue: GitHub.