multica-ai/multica · warning
--tail requires --thread (it is a thread-scoped limit)
Error message
--tail requires --thread (it is a thread-scoped limit)
What it means
The --tail flag limits how many replies are returned inside a single thread, so it is only valid when a thread is selected via --thread. Using --tail without --thread is rejected up front by the comment-list flag validation.
Source
Thrown at server/cmd/multica/cmd_issue.go:1844
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)")
}
if (before == "") != (beforeID == "") {
return fmt.Errorf("--before and --before-id must be set together (composite cursor for stable pagination)")
}
if before != "" && !recentSet && !(thread != "" && tailSet) {
return fmt.Errorf("--before / --before-id require --recent (thread cursor) or --thread + --tail (reply cursor)")
}
params := url.Values{}
if since != "" {
params.Set("since", since)
}
if rootsOnly {
params.Set("roots_only", "true")
}
if summary {
params.Set("summary", "true")
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Add --thread <comment-id> to scope the tail to that thread.
- If you wanted the newest comments overall, use --recent N instead of --tail N.
Example fix
# before multica issue comment list ISS-1 --tail 20 # after multica issue comment list ISS-1 --thread cmt_abc123 --tail 20
Defensive patterns
Strategy: validation
Validate before calling
# bash: enforce thread scope before calling the CLI
if [[ -n "$TAIL" && -z "$THREAD" ]]; then
echo "refusing: --tail requires --thread" >&2
exit 2
fi
multica issue comment list "$ISSUE" ${THREAD:+--thread "$THREAD"} ${TAIL:+--tail "$TAIL"} Prevention
- Model the three paging modes as distinct script functions so --tail is never typed outside thread mode.
- Read the command's --help output after CLI upgrades; flag semantics change.
When it happens
Trigger: Running `multica issue comment list <issue> --tail 20` without also passing --thread <comment-id>. The check is tailSet && thread == "".
Common situations: Assuming --tail is a global 'last N comments' limit; adapting a --recent command to --tail without adding the thread scope.
Related errors
- --kind must be schedule or webhook
- --cron is required for --kind schedule
- --timezone is only valid with --kind schedule
- --cron is only valid with --kind schedule
- no fields to update; use --enabled, --cron, --timezone, or -
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/144b05262e730374.
Report an issue: GitHub.