/code-review ultra (ultrareview) always reports "no commits yet" regardless of actual git state
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Running /code-review ultra (also tried the deprecated /ultrareview alias) always returns:
Your current branch has no commits yet, so there is nothing to review. Commit your changes first, then rerun /code-review ultra.
...regardless of the actual git state. I tried three different states in the same repo, all pushed to a real GitHub remote (origin), and got the exact same error every time:
- Uncommitted local changes on
master, no new commits yet. - After committing directly to
master(1 new commit ahead of what was previously onorigin/master) and pushing. - After creating a separate feature branch from that commit, adding a second commit, and pushing the branch to
origin(so the branch has 2 commits total, both present on GitHub,git statusshows a clean working tree,git logshows the commits).
In all three cases /code-review ultra gave the identical error text. The built-in (non-ultra) /code-review worked fine and reviewed the actual diff correctly in the same session/repo state, so the repo/commits are definitely visible to other tooling.
Environment: Windows 11, Claude Code CLI, working directory is a local clone with origin pointing to a private GitHub repo (https://github.com/<owner>/<repo>.git), invoked via the Bash tool wrapping Git Bash (not PowerShell).
Expected: /code-review ultra should detect the commits on the current branch and launch the review, the same way the plain /code-review command does.
What Should Happen?
/code-review ultra should detect the commits on the current branch (which are present locally and on the pushed GitHub remote) and launch the multi-agent review, the same way /code-review correctly does today in the identical repo/branch state.
Error Messages/Logs
Steps to Reproduce
- In a local git repo with an
originremote pointing to a real (private) GitHub repository, make some code changes and commit them (git commit). - Run
/code-review ultra(or the deprecated/ultrareviewalias). - Observe: "Your current branch has no commits yet, so there is nothing to review. Commit your changes first, then rerun /code-review ultra." - even though
git logclearly shows the commit andgit statusshows a clean working tree. - Push the commit to
origin(git push) and run/code-review ultraagain - same error. - Create a new branch from that commit (
git checkout -b feature-x), add a second commit, push the branch (git push -u origin feature-x), and run/code-review ultraagain while checked out onfeature-x- same error, even though the branch now has 2 commits, both visible on GitHub. - For comparison, run the plain
/code-review(non-ultra) command in the same repo/branch state - it works correctly and reviews the actual diff.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.220 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Terminal/Shell: Git Bash (the "Bash" tool in Claude Code on Windows wraps Git Bash / POSIX sh, not cmd.exe or PowerShell) - not in the dropdown list above, hence "Other".
I reproduced this from within a Claude Code session while working in the repo - happy to provide more detail (exact commands/output) if useful.