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
master and make changes.
- Commit the changes (so the branch is ahead of
master by ≥1 commit).
- Push the branch to
origin and 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 remote
gh 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)
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
masterand make changes.masterby ≥1 commit).originand set tracking. Do not open a pull request.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)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