multica-ai/multica · error
--tail must be a non-negative integer (0 returns just the th
Error message
--tail must be a non-negative integer (0 returns just the thread root)
What it means
Error "--tail must be a non-negative integer (0 returns just the thread root)" thrown in multica-ai/multica.
Source
Thrown at server/cmd/multica/cmd_issue.go:1826
// "user explicitly passed --recent 0" (or a negative value). The
// GetInt zero-value collapses both cases, which would otherwise
// cause us to silently drop an invalid value and fall back to the
// default unparameterized list — exactly the drift Elon flagged in
// the PR #2787 second review. --tail follows the same pattern, and
// also keeps "--tail 0" (root-only) distinguishable from "no --tail".
recentSet := cmd.Flags().Changed("recent")
tailSet := cmd.Flags().Changed("tail")
before, _ := cmd.Flags().GetString("before")
beforeID, _ := cmd.Flags().GetString("before-id")
// Mirror the server-side combination rules client-side so the user gets
// a clear local error instead of a 400 round-trip. These match the
// validation in handler.ListComments (server/internal/handler/comment.go).
if recentSet && recent <= 0 {
return fmt.Errorf("--recent must be a positive integer")
}
if tailSet && tail < 0 {
return fmt.Errorf("--tail must be a non-negative integer (0 returns just the thread root)")
}
if thread != "" && recentSet {
return fmt.Errorf("--thread and --recent are mutually exclusive")
}
if rootsOnly && thread != "" {
return fmt.Errorf("--roots-only and --thread are mutually exclusive")
}
if rootsOnly && recentSet {
return fmt.Errorf("--roots-only and --recent are mutually exclusive")
}
if rootsOnly && tailSet {
return fmt.Errorf("--roots-only and --tail are mutually exclusive")
}
if rootsOnly && before != "" {
return fmt.Errorf("--roots-only does not support --before / --before-id")
}
if tailSet && thread == "" {
return fmt.Errorf("--tail requires --thread (it is a thread-scoped limit)")View on GitHub (pinned to 2c0912b6ec)
Solutions
- Pass a non-negative integer for --tail.
When it happens
Trigger: Thrown at server/cmd/multica/cmd_issue.go:1826 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/dbdfdcc979a3f1fe.
Report an issue: GitHub.