Branch shows 'Merged' badge when no PR exists for the branch
Description
The Claude Code UI branch indicator (the bar at the top of the prompt area, e.g. master ← my-branch +1072 -15 Merged) incorrectly displays the Merged label for a branch that has never been merged and has no associated pull request.
Repro
- Create a new local branch off
masterand make changes. - Commit the changes (so the branch is ahead of
masterby ≥1 commit). - Push the branch to
originand set tracking. Do not open a pull request. - Observe the branch indicator in the Claude Code UI.
Expected
The label should reflect actual state — e.g. "Open" / "No PR" / nothing — since the branch has no pull request and nothing has been merged.
Actual
Label reads Merged. The +/- line count also appears stale: it stays at the value it had before the commit was created (working-tree diff count), even after committing and pushing. Restarting the Claude Code app does not refresh it.
Verified state at the time of the bug
git log --oneline origin/master..HEAD→ 1 commit ahead (d9612e04cb)git ls-remote origin <branch>→ branch present on remotegh pr list --head <branch> --state all→[](no PR exists, open or closed)- UI still labels the branch Merged.
Hypothesis
When no PR is associated with the branch, the UI seems to fall back to a default/cached "Merged" badge instead of an empty/neutral state. The displayed +/- numbers also appear cached from before the commit was created rather than recomputed against the new HEAD.
Environment
- Claude Code (latest, restarted)
- macOS
- Repo: SpeechifyInc/Speechify-iOS (private)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗