multica-ai/multica · error
invalid status %q; valid values: %s
Error message
invalid status %q; valid values: %s
What it means
Client-side validator validateProjectStatus (cmd_project.go:107): the status string passed to `project create`, `project update`, or `project status` is not one of validProjectStatuses (planned, in_progress, paused, completed, cancelled — plus the first entry of the slice visible above 'planned'). The check exists so typos fail immediately with the valid list instead of costing a server round-trip and a 400.
Source
Thrown at server/cmd/multica/cmd_project.go:107
Short: "Detach a resource from a project",
Args: exactArgs(2),
RunE: runProjectResourceRemove,
}
var validProjectStatuses = []string{
"planned", "in_progress", "paused", "completed", "cancelled",
}
// validateProjectStatus rejects unknown statuses client-side so a typo fails
// fast with the valid list instead of a server round-trip and a 400. Shared by
// `project create`, `project update`, and `project status`.
func validateProjectStatus(status string) error {
for _, s := range validProjectStatuses {
if s == status {
return nil
}
}
return fmt.Errorf("invalid status %q; valid values: %s", status, strings.Join(validProjectStatuses, ", "))
}
func init() {
projectCmd.AddCommand(projectListCmd)
projectCmd.AddCommand(projectGetCmd)
projectCmd.AddCommand(projectCreateCmd)
projectCmd.AddCommand(projectUpdateCmd)
projectCmd.AddCommand(projectDeleteCmd)
projectCmd.AddCommand(projectStatusCmd)
projectCmd.AddCommand(projectResourceCmd)
projectResourceCmd.AddCommand(projectResourceListCmd)
projectResourceCmd.AddCommand(projectResourceAddCmd)
projectResourceCmd.AddCommand(projectResourceUpdateCmd)
projectResourceCmd.AddCommand(projectResourceRemoveCmd)
// project list
projectListCmd.Flags().String("output", "table", "Output format: table or json")View on GitHub (pinned to 2c0912b6ec)
Solutions
- Use one of the exact values the error prints: planned, in_progress, paused, completed, cancelled.
- In scripts, source the list from one place (env var or a shared constants file) so renames cannot desync.
- Tab-complete the flag or check `multica project create --help` for the accepted enum.
Example fix
# before multica project update p1 --status in-progress # invalid status "in-progress"; valid values: ... # after multica project update p1 --status in_progress
Defensive patterns
Strategy: validation
Validate before calling
valid := map[string]bool{"planned": true, "in_progress": true, "paused": true, "completed": true, "cancelled": true}
if !valid[status] { return fmt.Errorf("invalid status %q", status) } Type guard
func isValidProjectStatus(s string) bool {
for _, v := range validProjectStatuses { if v == s { return true } }
return false
} Prevention
- Define statuses once in a shared constants file and import it in every script.
- Use underscores, never hyphens, in multica status values.
- Add a shell completion or CI lint that checks --status against the enum.
When it happens
Trigger: Passing --status in-progress (hyphen instead of underscore), 'done', 'active', or any casing/spacing variant; passing an empty string where a status flag is required.
Common situations: Muscle memory from other tools (Jira uses different status vocabularies); scripts hardcoding statuses that were renamed; locale/case differences ('Active' vs 'active').
Related errors
- invalid direction %q (want \"up\" or \"down\")
- --name is required
- --runtime-id is required
- --runtime-config must be valid JSON: %w
- %s must be a JSON object, or 'null' to clear
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/b799feded20c5869.
Report an issue: GitHub.