Session diff stats in sidebar show branch diff, not session diff
Resolved 💬 3 comments Opened Apr 10, 2026 by dr-ilex Closed Apr 13, 2026
Description
The diff stats (+N -M) shown next to each session in the left sidebar are misleading. They display the cumulative git diff --stat of the active branch vs. the base branch (e.g., master...HEAD), not the actual changes made during that specific session.
Steps to Reproduce
- Open Claude Code on a branch that already has a large diff from
master(e.g.,+5599 -3) - Start a new session and do something that makes zero code changes (e.g., ask Claude to summarize a URL via web fetch)
- Observe the sidebar — the session shows
+5599 -3despite no code being written
Expected Behavior
The diff stats should reflect the changes made within that session (i.e., what Claude actually wrote/deleted during the conversation), not the total branch diff.
Actual Behavior
All sessions opened on the same branch show identical diff numbers (the full branch diff), making it impossible to tell which sessions actually produced code changes and which didn't.
Impact
- Users can't quickly identify which sessions were productive vs. exploratory
- The numbers suggest Claude "wrote" thousands of lines in a session where it only answered a question
- Sessions with different amounts of work appear identical if they share a branch
Environment
- Claude Code Desktop App (macOS)
- Model: Claude Opus 4.6 (1M context)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗