claude-code - 💡(How to fix) Fix [BUG] Claude Code on the web: file diff panel misses deletes and renames [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52830Fetched 2026-04-25 06:19:46
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×5closed ×1commented ×1

Error Message

Error Messages/Logs

Code Example

No errors. Silent divergence between the UI panel and actual filesystem/git state.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The "Changes" / diff panel in Claude Code on the web does not reflect file deletions or renames in the working tree. It also does not clear entries for files removed by git reset --hard + force-push. Only file creates and in-place edits propagate.

What Should Happen?

The diff panel should reflect the current working tree exactly. Deletes should disappear. Renames should show the old path gone and the new path added. Commits removed by a force-push should clear from the panel.

Error Messages/Logs

No errors. Silent divergence between the UI panel and actual filesystem/git state.

Steps to Reproduce

  1. Start a cloud session on a feature branch.
  2. Use the Write tool to create [docs/test.md] → appears in diff panel (✅).
  3. git add + git commit + git push, then git reset --hard HEAD~1 + git push --force-with-lease.
  4. Hard-refresh the UI, try a second browser. Diff panel still shows docs/test.md as added, though the file does not exist locally, on the tracking branch, or on github.com. (❌)
  5. Create [docs/test2.md] via Write tool → appears (✅).
  6. rm docs/test2.md → panel still shows it (❌).
  7. Rewrite [docs/test2.md] via Write tool → panel updates content (✅).
  8. mv docs/test2.md docs/test3.md → panel still shows test2.md; test3.md never appears (❌).

Verified clean git state during the bug: git status clean, git ls-remote matches origin/main, mcp__github__get_file_contents returns 404 for the "still-shown" path.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

Reproduced across two different browsers → server-side, not client cache. Reproduced in Claude Code in Web and in Cloud Desktop (Code) (Windows) The real GitHub repo agrees with the clean local state; only the web UI panel is stale. Related commit in this repo's history acknowledging a similar UI/diff mismatch: 36f5cfd process(ops): fast-forward local main after push to fix cloud UI diff — suggests the cloud UI has had prior trouble with what it compares against (possibly local main rather than origin/main).

extent analysis

TL;DR

The "Changes" panel in Claude Code may need an update to its file tracking logic to reflect deletions, renames, and force-pushes correctly.

Guidance

  • Verify that the issue persists after ensuring a clean git state and checking for any pending changes or conflicts.
  • Investigate the mcp__github__get_file_contents API to see if it returns the correct file contents or a 404 for deleted files, which might indicate a server-side issue.
  • Check the related commit 36f5cfd to understand how the cloud UI diff was previously fixed and if a similar approach can be applied here.
  • Test the behavior with different file operations (e.g., multiple deletions, renames, and edits) to identify any patterns or specific scenarios where the issue occurs.

Example

No specific code snippet can be provided without more information about the internal workings of Claude Code or the Anthropic API.

Notes

The issue seems to be related to how Claude Code updates its internal state after git operations, particularly when files are deleted or renamed. The fact that the issue is reproducible across different browsers and platforms suggests a server-side issue.

Recommendation

Apply a workaround by manually refreshing the UI or checking the git status after each operation to ensure the panel reflects the correct state, until a proper fix can be implemented.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Claude Code on the web: file diff panel misses deletes and renames [1 comments, 2 participants]