VSCode extension: editing proposed content in the diff view before Accept is discarded (Accept applies Claude's original text)
What happened
In the VSCode extension, when Claude proposes a file change via the Edit tool (Manual permission mode), a red/green diff appears with an Accept/Reject control in the Claude side panel. I edit the proposed (green) text directly in the diff view to tweak Claude's change, then click Accept. My manual edits are discarded — Accept applies Claude's original proposed text (the tool's new_string), not my edited buffer.
What I expected
Per the official docs (https://code.claude.com/docs/en/vs-code.md):
If you edit the proposed content directly in the diff view before accepting, Claude is told that you modified it so it doesn't assume the file matches its original proposal.
So editing the green side and clicking Accept should save my edited version and inform Claude that I modified it. Instead my edits are lost and Claude's original proposal is written.
Steps to reproduce
- Be in Manual permission mode (Claude asks before editing; diff is shown).
- Have Claude propose an Edit — the red/green diff opens.
- Click into the green (proposed) side and hand-edit the text.
- Click Accept in the Claude panel.
- Observe the file on disk contains Claude's original
new_string, not the hand-edited version.
I also tried saving the diff buffer (Ctrl+S) before/instead of Accept — the manual edits still did not persist into the applied change.
Environment
- Claude Code CLI: 2.1.238
- VSCode extension: anthropic.claude-code 2.1.252 (2.1.251 also installed under
~/.vscode-server/extensions/) - VSCode Remote (vscode-server) over SSH
- OS: Ubuntu 20.04.4 LTS, Linux 5.4.0 x86_64
- Permission mode: Manual (diff shown before applying)
Impact
The documented "tweak Claude's edit before accepting" QA workflow is unusable — the only reliable ways to keep a manual tweak are to reject and re-describe the change, or accept Claude's version and then edit the saved file separately.