VS Code Copilot Chat “Keep” button drops intended code changes
@justschen is already working on this.
Since Jul 2, 2026.
Assessment
This issue has not been assessed yet.
Description
Type: Bug
When I use the Keep button in the Copilot Chat window to accept generated edits, intended code changes are sometimes dropped/reverted instead of being applied correctly.
Environment
VS Code version: 1.127.0
OS: Windows 11
Git version: 2.54.0.windows.1
Copilot extension version: 0.41 (2026-03-25)
Workspace type: multi-folder
Steps to reproduce
Ask Copilot Chat to propose edits to an existing file.
Review the suggested changes in the chat response.
Click Keep in the chat UI to apply/accept the changes.
Inspect the resulting file and git diff.
Expected
Keep applies the full intended edit exactly as shown in chat/diff.
Actual
Some intended code changes are dropped or reverted after clicking Keep.
Frequency
Consistent (regularly reproducible in my workflow).
Impact
Risk of accidental code loss.
Extra time spent reapplying lost changes.
Reduced trust in accepting chat-applied edits.
VS Code version: Code 1.127.0 (4fe60c8b1cdac1c4c174f2fb180d0d758272d713, 2026-06-30T10:52:33+02:00)
OS version: Windows_NT x64 10.0.26200
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) Ultra 7 255H (16 x 3686) |
| GPU Status | 2d_canvas: enabled GPU0: VENDOR= 0x8086, DEVICE=0x7d51 [Intel(R) Arc(TM) Pro 140T GPU (16GB)], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.8724 ACTIVE GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8521 Machine model name: Machine model version: direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 31.46GB (12.79GB free) |
| Process Argv | --crash-reporter-id bbd8bcb2-6b2b-4ce6-8950-8c47247b9f89 |
| Screen Reader | no |
| VM | 0% |
Extensions (11)
| Name | Identifier | Author | Version |
|---|---|---|---|
| Tailwind CSS IntelliSense | bradlc.vscode-tailwindcss | bradlc | 0.14.29 |
| ESLint | dbaeumer.vscode-eslint | dbaeumer | 3.0.24 |
| EditorConfig | editorconfig.editorconfig | EditorConfig | 0.18.2 |
| Prettier - Code formatter | esbenp.prettier-vscode | esbenp | 12.4.0 |
| GitHub Actions | github.vscode-github-actions | github | 0.32.1 |
| CODEOWNERS | jasonnutter.vscode-codeowners | jasonnutter | 1.1.1 |
| DotENV | mikestead.dotenv | mikestead | 1.0.1 |
| .NET Install Tool | ms-dotnettools.vscode-dotnet-runtime | ms-dotnettools | 3.1.0 |
| Microsoft Edge Tools for VS Code | ms-edgedevtools.vscode-edge-devtools | ms-edgedevtools | 2.1.10 |
| Nx Console | nrwl.angular-console | nrwl | 18.101.1 |
| Vitest | vitest.explorer | vitest | 1.50.7 |
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
63221493:31336333
envsactivate1:31538736
478i5457:31521843
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490510
38bie571_auto:31478677
cp_cls_c_1081:31454833
conptydll_true:31498968
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
46204921:31447328
control_6dc23131:31543336
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
23c7c724:31520045
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
2cfga817_c:31522397
jh5f2457_c:31540921
api_cot_off:31513532
g4a0e106:31529594
41836166:31537719
prpt_srch:31518468
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31533504
gf14b233:31526830
nes-curr-leftover-1500:31538366
h561g132:31533256
sessions_3:31532893
h7dd7680:31543284
ihg5j128:31534457
9gg7f176:31542112
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·