"Commit changes" cards are duplicated and report branch-vs-main instead of the uncommitted diff

Status Open
Reported on v2.1.119
Maintainer reply None cached
Activity 1 comment · opened Aug 3, 2026

Bug: "Commit changes" cards are duplicated and report branch-vs-main instead of the uncommitted diff

Environment

  • Claude Code 2.1.119, desktop app
  • macOS (Darwin 25.5.0)
  • Repo is a git repository with an active git worktree under .claude/worktrees/
  • Session cwd is the worktree; the files being edited are in the main checkout

Summary

The stacked "Commit changes" cards shown above the composer are wrong in two
independent ways: the diff stats they display are the whole-branch diff rather
than the uncommitted changes, and the same stats are repeated across several
cards that carry different scope labels.

Observed

Six cards rendered in a vertical stack, in this order, each with a scope label,
a branch name, a diff stat, and a "Commit changes" button:

| # | Card label | Branch shown | Stats shown |
|---|---|---|---|
| 1 | models | <feature-branch> | +27,670 −3,399 |
| 2 | services | <feature-branch> | +27,670 −3,399 |
| 3 | models | <feature-branch> | +27,670 −3,399 |
| 4 | lib | <feature-branch> | +27,670 −3,399 |
| 5 | services | <feature-branch> | +27,670 −3,399 |
| 6 | <repo> | <feature-branch> | +27,670 −3,399 |

Note models and services each appear twice, with identical stats.

Expected

One card scoped to the actual uncommitted work, showing the working-tree diff.

Evidence that the stats are branch-vs-main, not the working tree

Measured at the moment of an earlier screenshot, when the cards read
+27,683 −3,397:

$ git diff --shortstat
4 files changed, 308 insertions(+), 55 deletions(-)

$ git diff --shortstat main
224 files changed, 27683 insertions(+), 3397 deletions(-)

The cards showed +27,683 −3,397 — an exact match for git diff main, not for
the uncommitted diff.

Confirmed again later in the same session, after a commit and further edits, at
which point every card had moved to +27,670 −3,399:

$ git diff --shortstat
3 files changed, 11 insertions(+), 26 deletions(-)

$ git diff --shortstat main
224 files changed, 27670 insertions(+), 3399 deletions(-)

So the displayed number tracks the branch-vs-main diff across two different
values, while the uncommitted diff it purports to represent is three orders of
magnitude smaller. The per-card scope labels (models, services, lib) appear
to be cosmetic — none of them produces the displayed figure for its own subtree.

Possibly relevant

The session runs in a git worktree whose path is inside the repo it belongs to
(<repo>/.claude/worktrees/<name>), while the files being edited are in the main
checkout. Two branches are therefore live at once:

<repo>                            [<feature-branch>]
<repo>/.claude/worktrees/<name>   [claude/<name>]

A comparison anchored to the wrong checkout, or to the worktree's merge base
rather than the main checkout's HEAD, would produce roughly this symptom. That is
a guess, not a diagnosis.

The cards update live — against the wrong quantity — and never clear

The stats are not stale. They re-query as the repo changes; they just track
branch-vs-main instead of the uncommitted diff.

Observed live: every card's figure moved from +27,683 −3,397 to
+27,670 −3,399 over the course of the session, matching branch-vs-main at
both points.

The second reading was taken on a genuinely clean tree:

$ git status --short
(no output)

$ git status -sb
## <feature-branch>...origin/<feature-branch>

$ git diff --shortstat main
224 files changed, 27670 insertions(+), 3399 deletions(-)

Nothing uncommitted, nothing unpushed, branch in sync with origin — and all six
cards were still stacked above the composer, each reading +27,670 −3,399, an
exact match for branch-vs-main. They survived two commits and a push.

So there are two distinct defects:

  1. Wrong quantity. The stat is git diff main, not the uncommitted diff.

This one is live and self-consistent — it is querying correctly, just the
wrong thing.

  1. Never cleared. The cards do not disappear when there is nothing to

commit. On a clean tree they offer to commit 27k lines that do not exist as
pending changes.

Impact

Low severity, high friction. Six cards are shown where at most one is warranted.
They occupy a large amount of vertical space above the composer and cannot be
dismissed. There is no user action that clears them: committing does not, and
committing plus pushing to a clean, in-sync tree does not either.

They also invite a commit action whose advertised scope (27k lines) bears no
relation to anything that could actually be committed — and on a clean tree,
to nothing at all.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗