[FEATURE] Improve diff view to show session changes only (exclude read files)

Open 💬 6 comments Opened Jan 16, 2026 by safa-souli

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

The diff button in Claude Code CLI (e.g., Diff +7490 -6880) currently displays misleading statistics that include all files touched during a session, not just files that were actually modified. This makes it nearly impossible to understand what Claude actually changed.

Current Behavior
When using Claude Code CLI:

A new session starts and creates a worktree with a new branch
Claude reads/analyzes multiple files to understand the codebase and build context
The diff view shows ALL files that were read OR modified during the session
Result: Diff shows thousands of lines changed (+7490 -6880) even when only a single small file was actually edited
Example:

Claude creates one test.txt file with 11 lines
Actual git diff: +11 lines, 1 file changed
Diff button shows: +7490 -6880 (entire project included)
Why This Is Problematic
Misleading numbers: Users can't trust the diff statistics to understand what changed
Poor change review: Impossible to quickly see what was actually modified
Confusing workflow: Users expect git-like behavior (changes since last commit), not session activity tracking
Safety concerns: Users can't confidently review changes before committing
Every session creates confusion: The worktree + branch approach means every new session shows massive diffs

Proposed Solution

Option 1: Track write operations only

Monitor only Write and Edit tool calls, not Read tool calls
Show diff stats based on actual file modifications
Label: "Session Changes: +11 -0 (1 file)"
Option 2: Rename and clarify

Rename "Diff" to "Session Activity"
Add tooltip: "Shows all files touched (read + written) during this session"
Add a separate "Changes Only" view
Option 3: Add filtering

Keep current behavior as default
Add toggle: "Show modified files only" vs "Show all touched files"
Let users choose their preference
Option 4: Align with git behavior

Show git diff statistics relative to the last commit
Match what users see in VS Code Source Control panel
Make it consistent with standard git workflows

i'd recommend option 1

Alternative Solutions

_No response_

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

Example:

Claude creates one test.txt file with 11 lines
Actual git diff: +11 lines, 1 file changed
Diff button shows: +7490 -6880 (entire project included)

Additional Context

_No response_

View original on GitHub ↗

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