multica-ai/multica · error
--name is required
Error message
--name is required
What it means
`multica workspace create` requires an explicit --name; buildWorkspaceCreateBody rejects a missing or whitespace-only value before any network call. The server mandates the field, so the CLI validates locally to fail fast.
Source
Thrown at server/cmd/multica/cmd_workspace.go:285
}
fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", marker, displayID(ws.ID, fullID), ws.Name, ws.Slug)
}
if err := w.Flush(); err != nil {
return err
}
if currentID != "" {
fmt.Fprintln(os.Stderr, "\n* = current default workspace (use 'multica workspace switch <id|slug|prefix>' to change)")
} else {
fmt.Fprintln(os.Stderr, "\nNo default workspace set. Use 'multica workspace switch <id|slug|prefix>' to pick one.")
}
fmt.Fprintln(os.Stderr, "Tip: pass the ID column, SLUG, or full UUID (--full-id) to 'workspace get/update/switch'.")
return nil
}
func buildWorkspaceCreateBody(cmd *cobra.Command) (map[string]any, error) {
name, _ := cmd.Flags().GetString("name")
if strings.TrimSpace(name) == "" {
return nil, fmt.Errorf("--name is required")
}
// The server requires both name and slug (POST /api/workspaces returns 400
// without them) and the slug is immutable after creation, so it must be
// chosen explicitly here rather than silently omitted.
slug, _ := cmd.Flags().GetString("slug")
if strings.TrimSpace(slug) == "" {
return nil, fmt.Errorf("--slug is required")
}
// A single stdin stream cannot feed two fields: whichever field reads first
// drains it and the other gets EOF. Reject the ambiguous combination up
// front instead of surfacing a misleading "content is empty" error.
descStdin, _ := cmd.Flags().GetBool("description-stdin")
ctxStdin, _ := cmd.Flags().GetBool("context-stdin")
if descStdin && ctxStdin {
return nil, fmt.Errorf("--description-stdin and --context-stdin cannot be combined; a single stdin cannot feed both fields — pass one of them inline")
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass a non-empty name: `multica workspace create --name "My Team" --slug my-team`.
- In scripts, check the variable is non-empty before invoking (e.g. `: "${NAME:?name required}"`).
Example fix
# before multica workspace create --slug my-team # after multica workspace create --name "My Team" --slug my-team
Defensive patterns
Strategy: validation
Validate before calling
: "${NAME:?--name is required}"
multica workspace create --name "$NAME" --slug "$SLUG" Prevention
- Use shell parameter expansion guards (`:?`) for required script inputs.
- Trim and check name/slug before composing the command line.
When it happens
Trigger: Running `multica workspace create --slug my-team` without --name, or with `--name " "` (trimmed to empty).
Common situations: Scripts where the name variable is empty due to a skipped prompt or a typo'd variable name.
Related errors
- --slug is required
- --issue-prefix cannot be empty; omit it to use the server-ge
- download timeout must be greater than zero
- --clear cannot be combined with --description / --descriptio
- nothing to update; pass --description, --description-stdin,
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/d803e57d059be7ee.
Report an issue: GitHub.