Mobile UI: 'Diff' counter accumulates per-tool-call instead of reflecting git state
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
- Edit a small file via
Edit(e.g. add 1 line) - Programmatically rewrite a large file via
Write(1000 changed lines), thenBash: git restore <file>to revert - Final
git diff --statshows only the small file changed (+1/-0) - 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 (
/clearor app restart) - Run
git diff --statin the conversation manually
Environment
Claude Code mobile (iPhone), session in a git worktree.
Cross-reference
Reported via Claude Code session 2026-04-28.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗