[BUG] VS Code panel: sequential edits to one file diff each proposal against a stale snapshot (diff-editor tab only)

Status Open
Reported on v2.1.235
Maintainer reply None cached
Activity 0 comments · opened Aug 19, 2026

Preflight Checklist

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

What's Wrong?

Environment

  • Claude Code VS Code extension v2.1.218 (linux-x64), graphical chat panel (webview)
  • VS Code Remote-SSH: UI on macOS, workspace on remote Linux (Ubuntu 20.04)
  • Permission mode: Manual (edits require approval, so the diff opens in a native diff-editor tab)

Summary

When Claude proposes several edits to the SAME file within one turn, each subsequent
edit's diff-editor tab computes its diff against a stale snapshot of the file that does
NOT include the earlier edits. As a result, edit #2..#N visually appear to delete the
additions made by the previous edits.

Steps to reproduce

  1. Open a file in an editor tab.
  2. In the panel (Manual permission mode), ask Claude to make N sequential edits to that

same file in one turn.

  1. Watch the diff-editor tab that opens for each edit approval.

Expected

Each edit's diff-editor tab shows only that edit's change, diffed against the current
cumulative file state (i.e. including the already-applied earlier edits).

Actual

The diff-editor tab for edits #2..#N diffs the new proposal against a snapshot taken
before the earlier edits, so it looks like each step reverts the previous step's work.

Impact

Cosmetic / display only:

  • The compact inline preview (terminal-style) shows the correct per-line changes.
  • The final applied file is correct — nothing is actually reverted.

Confusing and alarming during review, but no data loss.

What Should Happen?

Each edit's diff-editor tab should diff the proposal against the CURRENT cumulative
file state (including edits already applied earlier in the same turn), showing only
that edit's own change. Sequential edits to one file must not appear to revert the
additions made by previous edits in the same turn.

Error Messages/Logs

Steps to Reproduce

  1. Use the VS Code extension chat panel (graphical/webview) in Manual permission mode.
  2. Open a file in an editor tab so edit approvals open a native diff-editor tab.
  3. Ask Claude to make several sequential edits to that SAME file within one turn.
  4. Approve them one by one and watch the diff-editor tab for edits #2..#N.

Claude Model

_No response_

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.235 (VS Code extension, linux-x64); bundled CLI reports 2.1.220 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗