gastownhall/beads · error
cannot use multiple conflict resolution flags
Error message
cannot use multiple conflict resolution flags
What it means
ADO sync conflict resolution accepts at most one strategy flag (--prefer-local, --prefer-ado, --prefer-newer, etc.). getADOConflictStrategy counts how many were set and refuses with this error when more than one is supplied, because a single unambiguous strategy must be chosen.
Source
Thrown at cmd/bd/ado.go:127
// ADOConflictPreferADO always uses the Azure DevOps version.
ADOConflictPreferADO ADOConflictStrategy = "prefer-ado"
)
// getADOConflictStrategy determines the conflict strategy from flag values.
// Returns error if multiple conflicting flags are set.
func getADOConflictStrategy(preferLocal, preferADO, preferNewer bool) (ADOConflictStrategy, error) {
flagsSet := 0
if preferLocal {
flagsSet++
}
if preferADO {
flagsSet++
}
if preferNewer {
flagsSet++
}
if flagsSet > 1 {
return "", fmt.Errorf("cannot use multiple conflict resolution flags")
}
if preferLocal {
return ADOConflictPreferLocal, nil
}
if preferADO {
return ADOConflictPreferADO, nil
}
return ADOConflictPreferNewer, nil
}
func init() {
// Add subcommands to ado
adoCmd.AddCommand(adoSyncCmd)
adoCmd.AddCommand(adoStatusCmd)
adoCmd.AddCommand(adoProjectsCmd)
// Add flags to sync commandView on GitHub (pinned to 71377f2769)
Solutions
- Pass exactly one conflict-resolution flag and rerun the command
- Remove the redundant flag from your alias/script wrapper
- Omit all strategy flags to use the default conflict behavior
Example fix
// before bd ado sync --prefer-local --prefer-newer // after bd ado sync --prefer-newer
Defensive patterns
Strategy: validation
Validate before calling
flags := 0
for _, f := range []bool{preferLocal, preferADO, preferNewer} {
if f { flags++ }
}
if flags > 1 { return errors.New("pass at most one conflict resolution flag") } Try / catch
if err := runADOSync(cmd, args); err != nil && strings.Contains(err.Error(), "multiple conflict resolution flags") {
cmd.Usage()
return err
} Prevention
- Pass exactly one --prefer-* flag
- Audit shell aliases that append default strategy flags
- Omit flags to accept the default strategy
When it happens
Trigger: Invoking an `bd ado sync`-family command with two or more mutually exclusive conflict-resolution flags set simultaneously (e.g. --prefer-local --prefer-newer).
Common situations: Copy-pasting command examples that each use a different flag; scripted wrappers accumulating flags across versions; aliases appending a default strategy on top of a user-supplied one.
Related errors
- cannot use both --pull-only and --push-only
- %w (--prefer-local, --prefer-ado, --prefer-newer)
- --strategy %s contradicts --%s
- a resolution strategy is required: --ours or --theirs
- --proxied-server-root-path requires --proxied-server
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/c0bcd791d22011e9.
Report an issue: GitHub.