larksuite/cli · error
Args field %s (--%s) conflicts with host %s flag
Error message
Args field %s (--%s) conflicts with host %s flag
What it means
validateExternalFlagNamespace: a shortcut Args field mounts a flag whose name is in the host-reserved set (as, dry-run, format, help, jq, json, page-*, print-schema, profile, yes, ...); the reason names which host facility owns the name.
Source
Thrown at shortcuts/common/typed_external.go:138
func validateExternalFlagNamespace(command *compiledCommand) error {
reserved := map[string]string{
"as": "identity selection",
"dry-run": "dry-run execution",
"flag-name": "schema inspection",
"format": "output formatting",
"help": "Cobra help",
"jq": "output filtering",
"json": "JSON output shorthand",
"page-all": "pagination",
"page-delay": "pagination",
"page-limit": "pagination",
"print-schema": "schema inspection",
"profile": "profile selection",
"yes": "high-risk confirmation",
}
for _, field := range command.fields {
if role, exists := reserved[field.name]; exists {
return fmt.Errorf("Args field %s (--%s) conflicts with host %s flag", field.goName, field.name, role)
}
for _, alias := range field.cli.Aliases {
if role, exists := reserved[alias.Name]; exists {
return fmt.Errorf("Args field %s (--%s) alias --%s conflicts with host %s flag", field.goName, field.name, alias.Name, role)
}
}
}
return nil
}
View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Rename the business flag to a non-reserved name
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at shortcuts/common/typed_external.go:138 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/bd30149de749531a.
Report an issue: GitHub.