multica-ai/multica · warning
--on-conflict must be one of: fail, overwrite, rename, skip
Error message
--on-conflict must be one of: fail, overwrite, rename, skip
What it means
Client-side validation in `multica skill import`: the `--on-conflict` flag (strategy for when an imported skill name already exists) must be one of the enumerated values `fail`, `overwrite`, `rename`, `skip`, and the provided string matched none. The check is a simple Go switch over the literal values, so any typo, casing change, or abbreviation fails.
Source
Thrown at server/cmd/multica/cmd_skill.go:466
}
func runSkillImport(cmd *cobra.Command, _ []string) error {
client, err := newAPIClient(cmd)
if err != nil {
return err
}
importURL, _ := cmd.Flags().GetString("url")
importFile, _ := cmd.Flags().GetString("file")
switch {
case importURL == "" && importFile == "":
return fmt.Errorf("either --url or --file is required")
case importURL != "" && importFile != "":
return fmt.Errorf("--url and --file are mutually exclusive")
}
onConflict, _ := cmd.Flags().GetString("on-conflict")
if !validSkillImportConflictStrategy(onConflict) {
return fmt.Errorf("--on-conflict must be one of: fail, overwrite, rename, skip")
}
ctx, cancel := context.WithTimeout(context.Background(), cli.AtLeastAPITimeout(60*time.Second))
defer cancel()
var result map[string]any
if importFile != "" {
fileData, readErr := os.ReadFile(importFile)
if readErr != nil {
return fmt.Errorf("read skill archive: %w", readErr)
}
if err := client.ImportSkillFile(ctx, fileData, filepath.Base(importFile), onConflict, &result); err != nil {
if handledErr := handleSkillImportError(cmd, err); handledErr != nil {
return handledErr
}
return fmt.Errorf("import skill: %w", err)
}
return printSkillImportResult(cmd, result)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Use one of the four literal values exactly: fail, overwrite, rename, or skip.
- If the value comes from a variable, default it in the script: `ON_CONFLICT=${ON_CONFLICT:-fail}`.
- Note values are case-sensitive lowercase — `FAIL` is rejected.
Example fix
# before multica skill import --file s.zip --on-conflict replace # after multica skill import --file s.zip --on-conflict overwrite
Defensive patterns
Strategy: validation
Validate before calling
case "${ON_CONFLICT:-fail}" in fail|overwrite|rename|skip) ;; *) echo "invalid ON_CONFLICT: $ON_CONFLICT"; exit 1 ;; esac
multica skill import --file s.zip --on-conflict "${ON_CONFLICT:-fail}" Prevention
- Default the variable in scripts; never pass it through unset.
- Remember the exact vocabulary: fail, overwrite, rename, skip — lowercase only.
- When upgrading the CLI, re-check the accepted set in --help.
When it happens
Trigger: Passing `--on-conflict error`, `--on-conflict FAIL`, `--on-conflict replace`, or an empty value from an unset script variable; assuming a strategy name from a different tool's vocabulary.
Common situations: Unset env var in CI expanding to empty string; using a synonym like `replace`/`ignore` instead of `overwrite`/`skip`; upgrading from an older CLI whose accepted set differed.
Related errors
- --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
- --runtime-id must not be empty
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/a047dcfed7401d6d.
Report an issue: GitHub.