[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_
30 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" />