Copilot Chat destroys edits to files done by other chats, and those reverts are not recorded in edit history (timeline)

Open
#321,306 5 comments 2 reactions 1 assignee View on GitHub

@hediet is already working on this.

Since Jun 14, 2026.

Assessment

This issue has not been assessed yet.

Description

  • Copilot Chat Extension Version:
    built-in

  • VS Code Version:
    Version: 1.124.2
    Commit: 6928394f91b684055b873eecb8bc281365131f1c
    Date: 2026-06-12T00:12:36Z
    Electron: 42.2.0
    ElectronBuildId: 14159160
    Chromium: 148.0.7778.97
    Node.js: 24.15.0
    V8: 14.8.178.14-electron.0
    OS: Darwin arm64 24.6.0

  • Feature (e.g. agent/edit/ask mode):
    Agent in Chat panel

  • Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet):
    any model

Steps to Reproduce:

  1. Open a new Copliot chat (1), make a prompt, attach context, and (optionally) run prompt to make an edit
  2. Open another chat (2), can be Copilot or Codex or Claude etc, make edit via this chat
  3. Return to chat (1) and either modify original prompt (which will trigger 'Revert edits' scenario) OR start a new prompt
  4. Observe all edits done by chat (2) disappear. Sometimes Copilot warns user before reverting, but sometimes it just silently reverts ALL edits it hasn't seen before. Insanity.

Expected behaviour:
Particular chat should revert ONLY its own edits, and not edits done by the user or other chats.

Moreover, sometimes such Copilot-induced reverts ARE NOT recorded in Timeline (VSCode file's edit history), and are EXTREMELY hard to track down and to re-revert back. I am facing this scenario right now: been trying to get back my codebase into a working state, after Copilot w/o any confirmations erased all edits done by Codex. Copilot did it on the first prompt, and w/o any warnings... What I had was:

  • a Copilot chat (with the prompt typed-in and context attached, but no edits applied yet) that had been open before Codex chat
  • Codex applied some edits
  • as soon as I submitted the typed-in prompt to Copilot, all Codex' edits to dozens of files that were not even part of the Copilot's prompt, were SILENTLY gone.

I learned this only after deploy to prod rendered previous version of my project (because Copilot wiped out all changes related to the current version).

Hopefully, the repro below makes the scenario above more obvious:

https://github.com/user-attachments/assets/013f50d1-23a2-46e0-aa77-7ae8e77ec790

Dominant language
TypeScript
Stars
193k
Forks
42.9k
PR merge metrics
PR metrics pending

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.