[BUG] Diff button shows incorrect file count and changes - not matching actual git diff

Status Closed — duplicate
Maintainer reply None cached
Activity 3 comments · opened Jan 23, 2026 · closed Jan 27, 2026

Description

The Diff button in Claude Code CLI shows significantly more changes than the actual git diff.

In my case, Claude Code Diff shows +1473 -944 changes across many files (stores/main.ts, types/ai.ts, multiple components, etc.), while the actual git diff --stat shows only 2 files with +27 -21 changes total.

Steps to reproduce

  1. Have a git repository with some uncommitted changes (in my case, just 2 files modified)
  2. Run Claude Code CLI and make an edit to a file
  3. Click the Diff button in the Claude Code interface
  4. Compare with git diff --stat or git status in terminal

Expected behavior

The Diff button should show the same changes as git diff - only the actual uncommitted changes in the repository.

Actual behavior

The Diff button shows a completely different set of files and a much larger number of changes that don't exist in the actual git diff. It appears to be comparing against something other than HEAD or showing some internal cached state.

Environment

  • OS: Windows 10 (CYGWIN_NT-10.0)
  • Claude Code CLI version: latest
  • Git branch: staging (up to date with origin/staging)

Evidence

Git status shows only 2 modified files:

$ git status
On branch staging
Changes not staged for commit:
  modified:   .claude/settings.local.json
  modified:   components/user/profile.vue

Git diff stat confirms only ~48 lines changed:

$ git diff --stat
 .claude/settings.local.json |  3 ++-
 components/user/profile.vue | 45 +++++++++++++++++++++++++-----------
 2 files changed, 27 insertions(+), 21 deletions(-)

But Claude Code Diff button shows +1473 -944 with many unrelated files like stores/main.ts, types/ai.ts, deep-learning components, dialogs, etc.

View original on GitHub ↗

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