Model is unaware of manual editing of diff viewer in IDE
When using Claude Code in an IDE (i.e., inside a VSCode terminal with the IDE integration), Claude Code will propose changes via a diff viewer tab in vscode.
While this is a nice integration, the developer experience is janky when trying to manually tweak changes before accepting them.
---
Currently, there is no way to make a change to the proposed changes by Claude Code in the diff viewer without Claude Code missing the change.
Specifically, Claude Code will open a diff tab and the user can press "accept proposed changes", which will trigger the same thing as typing 1 in the terminal window ("Yes" to "Do you want to make this edit to <file>?").
If, however, the user edited the proposed change (e.g., removed a comment proposed by claude code, but wants to accept all the other changes), and then presses "accept proposed changes", they will be left with _only_ the changes that claude code proposed -- and will have to save the file _again_, and then tell claude code that they made changes (to get the model to read the file _again_) before proceeding.
Effectively, the developer must choose "No, and tell Claude what to do differently", and tell claude to make the same change that they otherwise wanted to (to get the diff viewer to work nicely).
---
If the developer could edit the proposed changes in the diff viewer, then press the "Accept proposed changes" button in the IDE, and _both_ the claude changes _and_ the developer manual edits to the claude changes were accepted at once, this experience would be more pleasant.
15 Comments
hey @OverHash, this should already be possible. If you edit the proposed content within the diff viewer, your edits should be applied when it saves. Please give it a try and see if that's the case for you!
Hey @hackyon-anthropic, I'll attach some videos to better explain.
https://github.com/user-attachments/assets/07f8cafd-c80d-4b96-b3af-cd7dae81fa94
Video 1 here shows us using Claude Code to add some items to a file, but we make a manual edit (adding strawberry).
First UX problem arises when we accept the proposed changes -- we are also asked by vscode to save the file. I just tested and it seems that no matter what you do, the changes will be saved (which is good, but clunky UI -- would be ideal if vscode didn't prompt to save the file here at all after we accept the changes).
https://github.com/user-attachments/assets/184e6606-8679-46d6-b09c-88f0acf5b2d9
Video 2 here shows proof of rejecting the change doesn't do anything.
However, the core problem remains in either case: vscode applies the manual edits made in the diff viewer, _but the model has no idea about those changes_. this can cause issues because the context the model uses is essentially poisoned.
Here's the full transcript of the conversation:
Clearly the model had no idea about strawberries.
This causes problems because as a developer I must then instruct the model to read the file again and look for manual changes I made:
so although the output of Claude Code _shows_ that during the file write operations we apply the manual edits from vscode git diff, this is not integrated into the model conversation context, and so the model does not understand manual edits made.
Accordingly perhaps this issue should be renamed after my triaging just now. Maybe "Integrate manual edits in diff viewer into model conversation" is more appropriate.
I'm experiencing the same issue, repeatedly, on Windsurf.
Clicking the "approve changes" in the IDE does reflect my changes in the terminal though Windsurf asks me if I want to save my changes (odd).
However, if I modify the suggestion and press one (1) in the terminal, my changes are not saved nor show in the terminal diff. If Claude suggest a change and I edit the file and instead do Cmd+S, it behaves like typing one (1) it proceeds but ignores my changes.
So in conclusion, the only way to have Claude keep my changes in context is by clicking "approve changes" and confirming the save operation on Windsurf (even if the terminal already moved forward).
Enhanced Diff View Integration: Make Claude aware of user edits
I opened a related issue that was closed as duplicate, but I believe this overlaps with the core problem described here.
Current Problem
Claude proposes changes via diff view, but when developers manually edit those changes before accepting, Claude is unaware of the modifications. This leads to Claude saying things like "Wait, it seems like I made a mistake in my last edit" and attempting to undo user improvements.
Proposed Solution
Change Claude Code's assumption from "see if the user agrees to the change" to "incorporate any additional changes or corrections the user makes."
Workflow
Why This Matters
Use Case Example
Suggested thread title: Feature Request: Enable Claude awareness of user edits in VS Code Diff View
Even in 1.0.126, Claude always writes its originally suggested code changes despite me making changes within the VS Code diff editor.
1) Claude suggestion within VS Code diff:
"Foo"
2) User edit to Claude suggestion within VS Code diff:
"Foo Bar"
3) User manually accepts change
4) Claude still writes "Foo"
In my case, it seems to assume that it had made a mistake, which means it is not made aware of this diff view as an opportunity to give feedback, which is the issue.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still an issue in VS Code with Claude Extension. Also "Accept Changes" button in VS Code sometimes breaks. Seems more likely when I have edited the diff code, but does happen occasionally when I have not edited the diff.
Worse, not only will the chat not notice the changes I made upon acceptance (simpler) or while making them (harder), if I make changes and then say "Accept changes" in the GUI Claude chat by clicking the button or reactivating the chat window and pressing Enter, Claude overwrites my changes I just made in the diff view. (I'm sure it's just kicking out the changes to the GUI for us to view on the front end and isn't "seeing my edits and choosing to overwrite anyway" but that's what it "feels" like as a user. Frustrating UX, but still very grateful for the tool!
Thanks Anthropic team.
Can confirm this is still an issue and is EXTREMELY frustrating costing me hours of time. thanks for your attention to this guys
Can confirm. Is something that Cline (with Claude or any of the other models) _does_ support.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
You are wrong. @github-actions @github. #reopen /reopen
--reopen #open /open --open :)
Check the dates of the humans posting comments (ie. activity) more thoroughly.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.