[BUG] stale branch tracker inside chat - shows diff between branches even if there is none

Resolved 💬 4 comments Opened Mar 19, 2026 by TheEssenceCommunity Closed May 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Title: Branch diff tracker shows stale line counts after branch is fully merged into main

Environment:

  • Claude Code on Windows 11
  • Git repo with multiple machine-specific branches

Steps to reproduce:

  1. Merge a feature/machine branch fully into main and push
  2. Verify branches are identical via git rev-list --left-right --count origin/main...origin/branch — shows 0 0
  3. Confirm git diff --stat origin/main origin/branch returns no output
  4. Restart Claude Code

Expected: The branch diff tracker shows +0 -0 or clears entirely.

Actual: The tracker continues to display a stale line count (e.g. +341 -46). Persists after restarting Claude Code.

Verification:

git rev-parse origin/main          # same commit hash
git rev-parse origin/branch        # same commit hash
git diff --stat origin/main origin/branch  # (no output)

What Should Happen?

The branch diff tracker should display +0 -0 or clear entirely when the current branch and main point to the same commit.

Error Messages/Logs

Steps to Reproduce

  1. Have a local branch (e.g. a machine-specific branch) that has been fully merged into main and pushed to remote
  2. Confirm branches are identical — git diff --stat origin/main origin/<your-branch> returns no output
  3. Observe the branch diff tracker in the Claude Code UI — it shows a stale line count (e.g. +341 -46)
  4. Restart Claude Code
  5. Stale count persists after restart

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Version 1.1.7714

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗