multica-ai/multica · warning
--name is required
Error message
--name is required
What it means
Client-side flag validation in `multica squads create`: the squad's display `--name` is mandatory and was empty. Validation happens before the API client is constructed, so nothing is sent and no side effects occur.
Source
Thrown at server/cmd/multica/cmd_squad.go:124
if inst := strVal(squad, "instructions"); inst != "" {
fmt.Printf("Instructions: %s\n", inst)
}
return nil
}
// ── Create ──────────────────────────────────────────────────────────────────
var squadCreateCmd = &cobra.Command{
Use: "create",
Short: "Create a new squad",
Args: cobra.NoArgs,
RunE: runSquadCreate,
}
func runSquadCreate(cmd *cobra.Command, _ []string) error {
name, _ := cmd.Flags().GetString("name")
if name == "" {
return fmt.Errorf("--name is required")
}
leader, _ := cmd.Flags().GetString("leader")
if leader == "" {
return fmt.Errorf("--leader is required (agent name or ID)")
}
client, err := newAPIClient(cmd)
if err != nil {
return err
}
ctx, cancel := cli.APIContext(context.Background())
defer cancel()
leaderID, err := resolveAgent(ctx, client, leader)
if err != nil {
return fmt.Errorf("resolve leader: %w", err)
}
View on GitHub (pinned to 2c0912b6ec)
Solutions
- Supply a non-empty name: `multica squads create --name "alpha" --leader alice`.
- In scripts, default or fail fast: `: "${NAME:?NAME required}".
- Run `multica squads create --help` to see all required flags before composing the command.
Example fix
# before multica squads create --leader agent-1 # after multica squads create --name "research squad" --leader agent-1
Defensive patterns
Strategy: validation
Validate before calling
: "${SQUAD_NAME:?set SQUAD_NAME}"
multica squads create --name "$SQUAD_NAME" --leader "$LEADER" Prevention
- Fail fast on empty variables (: ${VAR:?}) in provisioning scripts.
- Validate required flags for the whole command group once (name + leader) before running.
- Run `squads create --help` when adding the command to automation.
When it happens
Trigger: Running `multica squads create --leader alice` without --name; script passes an unset NAME variable; passing `--name ""` explicitly.
Common situations: CI pipeline creating squads from a matrix where one entry lacks a name field; interactive use where the user assumed a prompt; whitespace-trimmed variable silently empty.
Related errors
- --leader is required (agent name or ID)
- --cutoff is required; use the hosted deployment time of the
- --batch-size must be positive
- --%s, --%s-stdin, and --%s-file are mutually exclusive; pick
- --%s-file: path must not be empty
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/00929f6bb9231fcc.
Report an issue: GitHub.