/code-review ultra <branch> treats the argument as a base, but <PR#> as a target
Summary
/code-review ultra accepts a positional argument, but its meaning flips depending on what you pass:
| Argument | Meaning | What gets reviewed |
|---|---|---|
| 1 (a PR number) | target | the thing you named |
| my-branch (a branch name) | base | your current branch, compared against the thing you named |
Passing a branch name reads like "review this branch", but it actually means "review my branch against this one". The named branch is the one thing that is not reviewed.
Steps to reproduce
- On a feature branch with a large diff vs.
main, run/code-review ultra. - Get:
Diff is too large ... Pass a closer base branch (/code-review ultra <branch>) to narrow the scope. - Run
/code-review ultra some-branch. - The review covers
current-branch → some-branch, i.e. commits not insome-branch.
Why it is easy to misread
- The invocation
/code-review ultra <branch>carries no hint that<branch>is a base. The word "base" appears only inside the error text, and only once. - The same positional slot means "target" for a PR number in the very next line of the help. Two different roles, one slot.
/code-review ultrawith no argument reviews the current branch, so the natural reading of adding an argument is "review that one instead".
I only confirmed the actual behaviour by comparing the launch banner's Scope: 69 files changed, 3780 insertions(+), 922 deletions(-) against a local git diff <base>..HEAD and seeing the numbers match exactly.
Suggestions (any one would help)
- Name it in the syntax:
/code-review ultra --base <branch>, keeping the bare positional for PR numbers only. - Say it in the error: "Pass a closer base to compare against — everything already in that branch is skipped."
- Echo the direction in the banner in words, not just an arrow, e.g.
reviewing 29 commits on phase-x that are not in <base>.
Context: why users end up here at all
The size limit (8,000 lines) is easy to exceed on a repo with checked-in test fixtures. In my case a single regenerated golden JSON was 9,436 lines — one data file exceeded the whole budget before any source code was counted. That is what forced the base-branch workaround, and therefore the confusion. A path-exclude option (or ignoring lockfile/fixture-shaped files by default) would keep many users off this path entirely.
Environment: Claude Code desktop app (Code tab), Windows 11.