[FEATURE] Support diff comparison against branches other than main
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When using the Claude Code desktop app, the diff view only shows changes compared to the main branch. There is no option to compare against other branches (e.g., a parent feature branch).
In many development workflows, developers create sub-branches from feature branches, not from main. In this case, the diff against main includes all changes from the parent feature branch as well, making it difficult to review only the incremental changes made on the current branch.
Proposed Solution
Allow users to select the base branch for diff comparison, rather than always defaulting to main. For example, a dropdown or configuration option to choose which branch to diff against would be very helpful.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Other
Use Case Example
_No response_
Additional Context
_No response_
43 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I would almost classify this as a bug rather than an enhancement @okurashoichi . When clicking the main branch (base branch), it drops down a menu as if you are supposed to be able to select other branches, I just get an "unable to load branches" error every single time (nothing is wrong with my network connection either).
<img width="428" height="246" alt="Image" src="https://github.com/user-attachments/assets/4e98c830-041e-4c58-9298-6d99c477c8df" />
I too am trying to compare against a different branch besides the main branch, and can't. This is pretty frustrating, since the UI is showing 541,973 lines changed instead of zero.
<img width="701" height="207" alt="Image" src="https://github.com/user-attachments/assets/a71da133-33b9-4acf-96a6-866db94ada34" />
I thought I was the only one with this issue or that I was using the feature incorrectly. Exactly what @shawwn captured.
Needed! +1
More than that, I'd prefer the diff to simply be against HEAD. I want to review just the uncommitted changes I'm working on with the AI. Not everything possible that's been going on in the branch.
This would be amazing. +1 here
Also my Claude Desktop app is totally unusable with the current behavior. The diff to the main branch in big enough codebases is often huge and for me opening the diff panel simply crashes the Claude Desktop app.
This is needed feature. This is why I still use Codex instead of Claude code.
We're paying quite big subscriptions for a product which problems are being ignored by a company that, in theory, has access to god level models. This is a serious issue that makes this useless for any serious work
I'm genuinely confused about the current state of diff in Claude Code Desktop.
You've been heavily promoting parallel agent workflows with git worktrees — it's practically a flagship use case. But the diff view still only works against the main/master branch, which means it assumes your working branch IS your production branch. That's not how any real-world dev team operates.
The overwhelming majority of developers work on feature branches cut from a non-production base (develop, staging, trunk, whatever you call it). Worktree-based parallel agent workflows make this even more pronounced — each worktree is on its own branch by definition.
So I genuinely don't understand: if the diff can't resolve the correct base branch contextually, what's it actually showing? Diffs against main when you're three branches deep in a worktree are close to meaningless.
In the agentic coding era, being able to review what the agent actually changed — cleanly and accurately — is arguably THE most critical human-in-the-loop touchpoint. A diff view that doesn't work in the workflows you're actively encouraging feels like a pretty fundamental gap.
Not trying to be harsh, just actually confused about what I'm missing here. Is there a workaround, or is this a known limitation on the roadmap?
The feature in its current state isn't usable for my workflow or for the rest of my company. Everyone has their own fork, and the diff appears to compare against
originrather thanupstream/main.Our team uses release branches as the integration target, and the base shifts with the release cadence:
Whenever the version rolls forward, the base for new feature branches moves with it. main/master is essentially never the right comparison target for us.
Strong +1 on a UI control. Even a simple "click the branch name in the diff header to pick a different one" per session would be enough.
Not being able to customize the diff comparison branch is pretty frustrating. We work with branches as enviroments and
mainis VERY different fromdevelop(which we work on)<img width="273" height="121" alt="Image" src="https://github.com/user-attachments/assets/f14b326b-d8c8-41f0-a49b-fde2399a35b0" />
+1 for this feature. Would love to be able to choose the base branch for diff comparison instead of always defaulting to
main.Use case: Teams with a feature → dev → staging → main flow. I start a web/mobile session from dev and my PR targets dev, but the session Diff view compares against main, so it shows ~15k lines (all of dev‘s already-merged history) instead of my ~600-line change. This makes the in-app diff unusable for review on any repo where the default branch isn’t the integration branch.
Request: Either (a) a control to pick the diff base branch, or (b) — better as a default — diff against the branch the session was started from / the PR’s base branch, rather than the repo’s default branch.
This is also related to the following bug reports that were ignored during automated processing.
There are many other related issues as well.
I hope you can address this soon.
Thank you for your attention.
#51496
#48200
#45784
#27134
#61025
#48200
#61025
#48200
In Codex, I was used to being able to see a diff against main, (my local main, of course, because it's insane to compare against origin/main), but also to be able to see a diff of just what was changed in the last turn, which as you're doing a review on a fairly big change, is really useful. Boggles the mind that the default in Claude Code is both illogical and that this issue is wanted by so many people, but ignored.
It's also frustrating to see all the other auto-closed issues. The ones that are closed as duplicates is understandable. The ones that are closed as "not planned" just gives the wrong (extremely frustrating) impression.
+1 for this feature. Choosing another base branch will significantly clean up the diff UI
Waiting for this features because I'm working in multiple feature branches
I really need this feature. Not being able to customize the branches for comparison is too strange and has caused confusion. If the selection feature isn't going to be developed, it would be better not to show the diff at all.
Voted for the feature 👍
+1 on this feature, would be a huge quality of life improvement to use the built-in diff
+1 for this feature
+1 Please add this including comparing to HEAD.
I want to be able to see the changes the AI did just in this session without all the other stuff on this branch.
Реально, очень нужно!
Exactly. This "feature" is so asinine that it's clear it has been designed by someone who either doesn't know how GIT is used or hasn't used it enough to know what the relevant information would be.
👍🏻 for this feature. It breaks my user flow and I have to actively switch back between my IDE and Claude Code just to review the relevant diff of the code generated from the current session.
To put it differently:
Steal the implementation of this feature from the Codex app if you can't come up with it yourself - this feature is much more conveniently implemented there.
Very annoying issue
Adding a concrete case for this. Our repo branches all feature work off
release/1.0.0, notmain— main is essentially stale (613 commits behind release/1.0.0, 0 ahead). Every feature branch's diff panel in the app compares against main regardless, which means it shows the entire divergence between the two branches as "my changes":The actual diff for the branch is 4 files / ~130 lines. The panel reports something closer to 65,000 changed lines, which makes the diff view completely unusable for reviewing what a session actually did.
git remote show originreportsHEAD branch: main, and the app appears to hardcode that as the comparison base rather than reading anything branch-specific (e.g. the upstream tracking branch, or VS Code's own branch.<name>.vscode-merge-base config, which in our case is already correctly set to release/1.0.0). A per-branch override — or just respecting the existing merge-base config — would fix this without needing new UI.<img width="152" height="41" alt="Image" src="https://github.com/user-attachments/assets/1a6fb83d-033d-4a76-b50d-04c7949f9a23" />
I can't even believe this isn't supported, it feels like the most basic feature, Codex has it, but with Claude I can't even see the changes Claude is making to add comments where I need fixes. I can see the changes in VS Code, but I can't annotate the changes there.
Unbelivable that VS Code Agents now also have this very same issue....
<img width="347" height="90" alt="Image" src="https://github.com/user-attachments/assets/bbae6b47-e363-4e8d-ba4e-e91f4e7c9b99" />
Please fix this
Please fix this!
Please fix this!
Please fix this
If you can't fix this, give me way to hide it, since this is completely broken.
No I am not working on main. Why the hell would I want to see diff between commited feature branch and main and not uncommited changes? Considering the button next to it litteraly says commited changes.
Up ! I never work to main directly :D
Up, very inconvenient now
+1, hitting this too. Common workflow: I branch a sub-feature off an in-progress feature branch (e.g. \
mbiz-3245/screen-state-refactor\off \mbiz-3245/partially-authorized-disable\, not off \main\). The macOS desktop app's diff view always compares against \main\, so it shows the entire parent branch's changes mixed in with mine, making it hard to review just my incremental work.Would be great to have the diff base auto-inferred from the branch's upstream/merge-base, with a manual override (dropdown or setting) as a fallback for cases where that inference is wrong.
This basically makes the web and mobile app unusable. Every time I start work I have to tell Claude out checkout the dev branch and then I get massive diffs. This is meaning my weekend/coffee break productivity on hobby projects goes out the window and I have to be glued to my laptop 24/7, nightmare in 2026! I swear this feature used to exist and looks like it was "unshipped" perhaps there was underreporting how frequently this feature was being used.
so I found a workaround for this -- Claude is using the remote upstream branch. Typicall that would be main -- which is dumb as I don't think any sane dev team directly sends everything to main.
What you can do though is set it to whatever upstream branch you want at the git level, and restarting Claude will have it diff against that instead.
git branch -u origin/<remote-branch-name>
I set this to my staging branch, since that's the start of our CI/CD workflow and now al l my diffs are against staging instead of main, and I can at will change it by resetting the upstream branch.
If you tell this to claude, it'll fix itself for you ;-p
Another data point from the macOS desktop app, plus a correction to the workaround above.
Setup: a worktree branch cut from
frontend-base, itself a long running feature branch offmaster. The panel diffs againstmaster, so a 16 file PR renders as 365 files, +3623/−3860. Git also warns about multiple merge bases, so the base it picks is arbitrary.git remote set-head origin frontend-basedoes not work. Repointingrefs/remotes/origin/HEADhas no effect on the panel; it resolves a local branch. Worth noting because it is the first thing you reach for.git branch -u origin/frontend-basedoes look like the right lever, per the comment above.One case neither workaround covers: worktrees. Both
masterandfrontend-baseare checked out in sibling worktrees here, so moving the local default branch is not an option, and the upstream override changes what push and pull mean for the branch as a side effect. A base branch selector in the panel would avoid loading git plumbing with UI state.