multica-ai/multica · warning

--before and --before-id must be set together (composite cur

Error message

--before and --before-id must be set together (composite cursor for stable pagination)

What it means

The comment-list pagination cursor is composite: --before is a timestamp and --before-id is a tie-breaking comment ID. The CLI requires both to be set together so the server can order stably; passing only one is rejected before the request is sent.

Source

Thrown at server/cmd/multica/cmd_issue.go:1847

		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")
	}
	// Resolve-aware folding is the default on the complete-thread reads (default
	// list, --recent, --thread without --tail): a resolved thread collapses to
	// root + conclusion so an agent does not pay tokens for settled discussion.

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Copy BOTH values from the 'Next thread cursor' / 'Next reply cursor' line the CLI prints on stderr.
  2. If scripting, always read the header pair (X-Multica-Next-Before and X-Multica-Next-Before-Id) together and pass both or neither.

Example fix

# before
multica issue comment list ISS-1 --recent --before 2026-01-01T00:00:00Z
# after
multica issue comment list ISS-1 --recent --before 2026-01-01T00:00:00Z --before-id 42
Defensive patterns

Strategy: validation

Validate before calling

# bash: pass cursors as an atomic pair
if [[ -n "$BEFORE" || -n "$BEFORE_ID" ]] && [[ -z "$BEFORE" || -z "$BEFORE_ID" ]]; then
  echo "refusing: --before and --before-id must be set together" >&2
  exit 2
fi

Prevention

When it happens

Trigger: Passing --before without --before-id, or --before-id without --before. The check is (before == "") != (beforeID == "").

Common situations: Manually typing only the timestamp half of a cursor; scripts that forward the X-Multica-Next-Before header but drop X-Multica-Next-Before-Id.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/7b469cbabd461f90. Report an issue: GitHub.