Mobile UI: 'Diff' counter accumulates per-tool-call instead of reflecting git state

Resolved 💬 3 comments Opened Apr 28, 2026 by tstoegi Closed Apr 28, 2026

Summary

The 'Diff +X -Y' badge shown above the response/PR-create area in Claude Code on iPhone counts the cumulative insertions/deletions of every Edit / Write tool call in the session, not the actual current git diff state.

Repro

  1. Edit a small file via Edit (e.g. add 1 line)
  2. Programmatically rewrite a large file via Write (1000 changed lines), then Bash: git restore <file> to revert
  3. Final git diff --stat shows only the small file changed (+1/-0)
  4. Mobile 'Diff' badge still shows +1001/-1000

Why it bites

In session, when Claude reverts an over-eager edit (common pattern: rewrite a JSON file, realize the formatter clobbered everything, restore + rewrite minimally), the counter still claims thousands of changes. Misleads the user into thinking the PR will be huge.

Expected

Counter should reflect the current working-tree diff against HEAD (git diff totals), not session-cumulative tool-call edits. That's what the user actually wants to know before committing/creating a PR.

Workarounds

  • Start a fresh session (/clear or app restart)
  • Run git diff --stat in the conversation manually

Environment

Claude Code mobile (iPhone), session in a git worktree.

Cross-reference

Reported via Claude Code session 2026-04-28.

View original on GitHub ↗

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