multica-ai/multica · warning

--before / --before-id require --recent (thread cursor) or -

Error message

--before / --before-id require --recent (thread cursor) or --thread + --tail (reply cursor)

What it means

A before-cursor is only meaningful in one of two paging modes: the --recent mode (thread cursor over recently-active threads) or --thread + --tail mode (reply cursor inside one thread). Passing --before/--before-id in any other mode is rejected because the server would have no stable ordering to resume.

Source

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

		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.
	// --full opts out. The partial-thread reads (--since / --tail) and
	// --roots-only cannot be folded safely (server rejects fold there), so we
	// never send fold for them and --full is a harmless no-op. Sending fold only

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Add --recent to page through recent threads with a thread cursor.
  2. Or add both --thread <id> and --tail N to page through one thread's replies.
  3. Otherwise remove the --before/--before-id pair entirely.

Example fix

# before
multica issue comment list ISS-1 --before 2026-01-01T00:00:00Z --before-id 42
# 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: cursor is only valid in --recent or --thread+--tail mode
if [[ -n "$BEFORE" ]]; then
  if [[ "$RECENT" != "true" && ( -z "$THREAD" || -z "$TAIL" ) ]]; then
    echo "refusing: --before needs --recent or --thread+--tail" >&2
    exit 2
  fi
fi

Prevention

When it happens

Trigger: Passing --before/--before-id without --recent and without the combination of --thread and --tail (e.g. plain listing, or --thread without --tail).

Common situations: Replaying a cursor captured in one mode against a differently-scoped invocation; upgrading scripts after the cursor scheme changed from a single value to a mode-aware composite.

Related errors


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