Worktree code review panel diffs against main instead of the worktree's upstream branch
Resolved 💬 2 comments Opened Apr 15, 2026 by tracyobrien Closed May 26, 2026
Bug
When a worktree is created from a feature branch that diverges from main, the code review panel shows the diff between the worktree branch and main — not between the worktree branch and its upstream/base branch.
Steps to reproduce
- Have a feature branch (e.g.
tracy/2026-infra-fixes-only) that is behindmainby N commits - Open a new task/worktree based on that feature branch
- Make no changes
- Open the code review panel
Expected behavior
The diff panel shows 0 changed lines (no work has been done).
Actual behavior
The diff panel shows +9514 lines — the entire delta between the feature branch and main.
Impact
The code review feature is completely unusable when working on worktrees based on feature branches. The panel is flooded with unrelated changes, making it impossible to review what Claude actually changed.
Environment
- The worktree's git upstream is correctly set to the feature branch (
branch.<name>.mergepoints to the feature branch, not main) branch.<name>.vscode-merge-baseis also set to the feature branch- Claude Code ignores both and diffs against main anyway
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗