multica-ai/multica · warning
--roots-only does not support --before / --before-id
Error message
--roots-only does not support --before / --before-id
What it means
multica's issue comment list command rejects the combination of --roots-only with --before/--before-id. --roots-only fetches only top-level issue comments, a mode that has no cursor pagination, so a before-cursor is meaningless there. The check fires before any HTTP request is made.
Source
Thrown at server/cmd/multica/cmd_issue.go:1841
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)")
}
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")
}View on GitHub (pinned to 2c0912b6ec)
Solutions
- Drop --before/--before-id from the command when using --roots-only.
- If you intended cursor pagination, remove --roots-only and use --recent with the printed cursor pair.
- If you intended only top-level comments, page with --since instead of a before-cursor.
Example fix
# before multica issue comment list ISS-1 --roots-only --before 2026-01-01T00:00:00Z --before-id 42 # after multica issue comment list ISS-1 --roots-only
Defensive patterns
Strategy: validation
Validate before calling
# bash: reject the bad combo before invoking the CLI
if [[ -n "$BEFORE" && "$ROOTS_ONLY" == "true" ]]; then
echo "refusing: --roots-only has no cursor pagination" >&2
exit 2
fi
multica issue comment list "$ISSUE" ${ROOTS_ONLY:+--roots-only} ${BEFORE:+--before "$BEFORE" --before-id "$BEFORE_ID"} Prevention
- Treat every 'Next cursor' line as mode-bound: never forward a cursor into a differently-scoped invocation.
- Wrap the CLI in a script that encodes the valid flag matrices (roots-only / recent / thread+tail) as separate functions.
When it happens
Trigger: Running `multica issue comment list <issue> --roots-only --before <ts>` (or with --before-id). Any invocation where rootsOnly is true and the before string is non-empty fails immediately.
Common situations: Copy-pasting a 'next thread cursor' printed by a previous --recent run into a --roots-only invocation; scripts that mechanically forward every pagination cursor regardless of the listing mode.
Related errors
- --before and --before-id must be set together (composite cur
- --before / --before-id require --recent (thread cursor) or -
- list runs: %w
- --kind must be schedule or webhook
- --cron is required for --kind schedule
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/ba063e35d9e2a4ae.
Report an issue: GitHub.