'Keep Chat edits in this file' button is frozen for Co-Pilot
Type: Bug
After applying a new code changes recommended by Co-Pilot in the code editor, there is a Keep/Undo popup which appears. You can't save and use the changes without clicking 'Keep' apparently (slightly confusing since really you only know if you want to Undo it until after you've saved the file and ran it). In any case the 'keep' button appears active, but clicking on it does nothing. It should save and disappear as it normally does. I have had this happen multiple times in the last few days and I have to restart VSC to clear it. Bug.
VS Code version: Code 1.100.0 (Universal) (19e0f9e681ecb8e5c09d8784acaa601316ca4571, 2025-05-07T12:48:53.763Z) OS version: Darwin arm64 24.3.0 Modes: Remote OS version: Linux x64 5.15.0-94-generic
System Info
| Item | Value |
|---|---|
| CPUs | Apple M4 Max (16 x 2400) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on 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 video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 1, 1, 1 |
| Memory (System) | 64.00GB (8.71GB free) |
| Process Argv | --crash-reporter-id 5cad0c4e-247c-4a20-810a-cecab405b0ff |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: vps57298.dreamhostps.com |
| OS | Linux x64 5.15.0-94-generic |
| CPUs | AMD EPYC 7702P 64-Core Processor (128 x 3243) |
| Memory (System) | 3.91GB (1.94GB free) |
| VM | 100% |
Extensions (9)
| Extension | Author (truncated) | Version |
|---|---|---|
| remote-ssh | ms- | 0.120.0 |
| remote-ssh-edit | ms- | 0.87.0 |
| remote-explorer | ms- | 0.4.3 |
| gitlens | eam | 17.0.3 |
| copilot | Git | 1.317.0 |
| copilot-chat | Git | 0.27.0 |
| debugpy | ms- | 2025.8.0 |
| python | ms- | 2025.6.0 |
| vscode-pylance | ms- | 2025.4.1 |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyonecf:30548226
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
31787653:31262186
3e8i5726:31271747
996jf627:31283433
pythonrdcb7:31303018
usemplatestapi:31297334
7bj51361:31289155
747dc170:31275177
g20af354:31278749
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004
The "freezing/unresponsiveness" of the Keep/Undo 'Apply in Editor' dialog seems to be in cases where no changes are actually made. There is no red or green highlighting in the code. For some reasons it suggests changes, but then can't make them. In these cases it should be generating an error message, or asking to redirect changes to a different file. Instead it freezes the popup and neither keep or undo works and I have to reset the IDE.
Can you please check the dev tools console for errors pointing towards this? Do F1 > Toggle Developer Tools > Console
This was several days ago and I'm not even sure if the errors are relevant to this topic. I can keep an eye on this and see if anything turns up after this happens next. here are some of the recent ones:
- console.ts:137 [Extension Host] TypeError: fetch failed at node:internal/deps/undici/undici:13502:13 at processTicksAndRejections (node:internal/process/task_queues:95:5) at qP._fetch (
- ERR [Extension Host] TypeError: fetch failed at node:internal/deps/undici/undici:13502:13 at processTicksAndRejections (node:internal/process/task_queues:95:5) at qP._fetch (
- Extension Host] Failed to fetch remote embeddings cache from https://embeddings.vscode-cdn.net/text-3-small/v1.100/settings/ms-python.vscode-pylance.json
This has happened a number of times now. This seems to be the scenario:
- Copilot (in chat mode) suggests a code change.
- I click the button to apply it to the file
- Behind the scenes it uses some kind of "implementation mapping" to know which file to put it in and where to make the change.
- Typically it makes the change, shows the new code in green, and I click the 'Keep' button and then the popup layer disappears.
- In this case, there is no green or red. So I think it was unable to understand the "implementation mapping" and did not make any code changes. In some cases it was the wrong file to apply it to, but in other cases it just can't find the location in the file to make the update.
- So instead of giving an error and saying "unsure of how to apply this change", it just freezes that popup.
I've seen this happen maybe 10 times now in various similar scenarios. I have discovered that if I just ignore it and go to another file, I can ask Copilot to review that change and again and give me the code to apply again. Sometime it works after it does it a second time, or after I direct it towards the correct file to modify.
So I would say that this is a both a UX problem and a technical problem of getting "implementation mapping" to be accurate, and also give proper errors and recovery paths.
OK here is the console logs in VSC: Some of the earlier errors may have been due to the server being down earlier, but I'm including them for context. Somehow Co-pilot is unable to process the recommended changes and does not implement them in the target file. It then doesn't know how to proceed and freezes the dialog.
INFO Extension host (Remote) is unresponsive. log.ts:440 INFO Extension host (Remote) is responsive. log.ts:440 INFO Extension host (Remote) is unresponsive. log.ts:440 INFO Extension host (Remote) is responsive. abstractTaskService.ts:2099 Timed out getting tasks from npm (anonymous) @ abstractTaskService.ts:2099 log.ts:440 INFO Extension host (Remote) is unresponsive. log.ts:440 INFO Extension host (Remote) is responsive. log.ts:460 ERR [Extension Host] [default] Error sending telemetry FetchError: The operation was aborted at fetch (/home/username/.vscode-server/extensions/github.copilot-1.323.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at processTimers (node:internal/timers:519:7) at cachingFetch (/home/username/.vscode-server/extensions/github.copilot-1.323.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16) at UB.fetch (/home/username/.vscode-server/extensions/github.copilot-1.323.0/lib/src/network/helix.ts:94:22) { type: 'system', _name: 'FetchError', code: 'ABORT_ERR', errno: undefined, erroredSysCall: undefined } error @ log.ts:460 console.ts:137 [Extension Host] [default] Error sending telemetry FetchError: The operation was aborted at fetch (/home/username/.vscode-server/extensions/github.copilot-1.323.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at runNextTicks (node:internal/process/task_queues:64:3) at listOnTimeout (node:internal/timers:545:9) at processTimers (node:internal/timers:519:7) at cachingFetch (/home/username/.vscode-server/extensions/github.copilot-1.323.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16) at UB.fetch (/home/username/.vscode-server/extensions/github.copilot-1.323.0/lib/src/network/helix.ts:94:22) { type: 'system', _name: 'FetchError', code: 'ABORT_ERR', errno: undefined, erroredSysCall: undefined } dws @ console.ts:137 log.ts:460 ERR CodeExpectedError: No default agent registered at SCe.activateDefaultAgent (chatServiceImpl.ts:508:10) error @ log.ts:460 sparseMultilineTokens.ts:582 Invalid Semantic Tokens Data From Extension: end character > model.getLineLength(lineNumber) (anonymous) @ sparseMultilineTokens.ts:582 log.ts:460 ERR Illegal value for lineNumber: Error: Illegal value for lineNumber at Jd.getLineLength (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:266:4354) at gne.reportIfInvalid (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:485:13488) at PLe.reportIfInvalid (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:485:10836) at vki.set (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:263:6852) at uae.setSemanticTokens (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:263:11190) at LFe.u (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:485:26529) at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:485:24992 error @ log.ts:460 log.ts:460 ERR BugIndicatingErrorRecovery: Transaction already finished!: Error: BugIndicatingErrorRecovery: Transaction already finished! at gSt (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:31:18051) at wW.updateObserver (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:31:17637) at yW.set (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:31:18810) at Ott.accept (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2000:22215) error @ log.ts:460 6base.ts:450 recovered from an error that indicates a bug Error: BugIndicatingErrorRecovery: Transaction already finished! at gSt (base.ts:448:14) at wW.updateObserver (base.ts:410:4) at yW.set (base.ts:515:8) at Ott.accept (chatEditingModifiedFileEntry.ts:213:18) gSt @ base.ts:450 log.ts:460 ERR Cannot access a disposed editing session: Error: Cannot access a disposed editing session at Kee.bb (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2002:6541) at get entries (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2002:1335) at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2002:15029 error @ log.ts:460
This actually happens quite often. Currently I'm using 'Ask' mode with GTP-4o.
I ask it to check the code and suggest changes, and then when I go to apply the changes it makes no modifications to the file.
Then it freezes the Keep dialog.
Here are more recent errors: (due to the lack of timestamps I can never tell which of these happened recently.)
log.ts:460 ERR CodeExpectedError: No default agent registered at SCe.activateDefaultAgent (chatServiceImpl.ts:508:10) error @ log.ts:460 log.ts:460 ERR BugIndicatingErrorRecovery: Transaction already finished!: Error: BugIndicatingErrorRecovery: Transaction already finished! at gSt (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:31:18051) at wW.updateObserver (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:31:17637) at yW.set (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:31:18810) at Ott.accept (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2000:22215) error @ log.ts:460 7base.ts:450 recovered from an error that indicates a bug Error: BugIndicatingErrorRecovery: Transaction already finished! at gSt (base.ts:448:14) at wW.updateObserver (base.ts:410:4) at yW.set (base.ts:515:8) at Ott.accept (chatEditingModifiedFileEntry.ts:213:18) console.ts:137 [Extension Host] [relatedFiles] unknown language python
Problems are paused because: "Chat Edits", using Python.
After trying to implement ASCII art using the co-pilot tool as well.
The entire IDE hangs and it's difficult to exit the AI integration cycle or whatever it's doing.
Sometimes the operation is interrupted with the following popup error:
➕ 1. I started encountering more of these issues after upgrading VS Code.
Version: 1.101.0 (Universal) Commit: dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1 Date: 2025-06-11T15:00:50.123Z Electron: 35.5.1 ElectronBuildId: 11727614 Chromium: 134.0.6998.205 Node.js: 22.15.1 V8: 13.4.114.21-electron.0 OS: Darwin x64 24.5.0
We closed this issue because we are unable to reproduce the problem with the steps you describe. Chances are we've already fixed your problem in a recent version of VS Code. If not, please ask us to reopen the issue and provide us with more detail. Our issue reporting guidelines might help you with that.
Happy Coding!