vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Issue with Copilot "Edit" Mode Not Modifying Files

Open An5675 opened this issue 8 months ago • 1 comments

Type: Bug

Hi, I've noticed an issue when using Copilot in "Edit" mode. Occasionally, instead of actually editing the file, Copilot outputs the suggested code directly in the chat window without applying any changes to the file itself.

When I point this out, Copilot insists that it has modified the file—even though no changes are reflected. At that point, the conversation tends to become unproductive, and the only viable solution is to start a new chat session, as it's impossible to continue a coherent interaction.

Extension version: 0.26.6 VS Code version: Code 1.99.3 (17baf841131aa23349f217ca7c570c76ee87b957, 2025-04-15T23:18:46.076Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz (8 x 4200)
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
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.96GB (5.63GB free)
Process Argv --crash-reporter-id 303ba444-7a44-46a5-92c7-567d09382a99
Screen Reader no
VM 67%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
31787653:31262186
3e8i5726:31271747
996jf627:31283433
usemplatestapi:31292913
7bj51361:31289155
jjjhb125:31275178
g20af354:31278749
aj953862:31281341
generatesymbolc:31292703
convertfstringc:31292702
gendocc:31292706

An5675 avatar Apr 23 '25 18:04 An5675

🐈‍⬛ bump

p3nGu1nZz avatar Apr 28 '25 12:04 p3nGu1nZz

Seeing the same thing. Are there any tracing we can enable to help debug and troubleshoot this issue?

More input on the issue: The chat context will list the file with status "Generating edits", but the editor doesnt show the typical "editing progress" status, and file remains unchanged. Sometimes it helps to respond "do it" in the chat and the changes will be applied, but often the file remains unchanged.

Image

I dont know if the chat context has lost association with the actual editor and changes are applied in "void", or if LLM doesnt respond with any feedback that vscode can use for updating the code in editor.

Model: Gemini 2.5 Pro Preview

bardkalbakk avatar Apr 29 '25 09:04 bardkalbakk

Same issue. It keeps going in a loop to try and edit but it fails.

Image

yas-re avatar May 08 '25 17:05 yas-re

Following... Same.

CHDAFNI-MSFT avatar May 14 '25 16:05 CHDAFNI-MSFT

Having all three mentioned issues here. What I found was that sometimes it sticks on like 98% of applying edits while there are no changes to the file itself. If I click on the action it shows a diff of stuff that is seemingly done already so its like its waiting for some sort of lock to release on the file before applying the changes.

Image

Whats also weird is that the file in the tab view is marked as if it has unsaved changes while no actual changes are done to the file yet and the spinner also goes on and on on the tab.

Image

I've also seen similar behavior when running terminal commands, where even though the command is done executing it will wait for it to exit. I can clear this by doing ctrl + c in the same terminal and then it comes to its senses.

C0untZero avatar May 18 '25 13:05 C0untZero

This is happening again and again now. I'm using the latest updates:

Version: 1.100.3
Commit: 258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3
Date: 2025-06-02T13:30:54.273Z
Electron: 34.5.1
ElectronBuildId: 11369351
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.6.90-1-MANJARO

copilot 0.27.3

matrs avatar Jun 03 '25 23:06 matrs

Ditto

mrjd19811 avatar Jul 23 '25 17:07 mrjd19811

I am having the same problem today.

Mark-Pinto avatar Aug 14 '25 09:08 Mark-Pinto

Same problem for me

mattkruskamp avatar Aug 29 '25 22:08 mattkruskamp

If it's any help - I've found that if I close VSCode, rename the folder, and re-open in VSCode, I can edit again. Seems to reset the agent context.

mattkruskamp avatar Aug 29 '25 22:08 mattkruskamp

I experienced this during the day, I was frustrated by it, so, left work to go home. After dinner, I came back online, launched VS code, started a new chat window, and everything started to work as expected. So, it appears like when the chat his is oversized, it lead to this issue, so, it will better to started a new chat window or restarted or restart the computer. I hope this helps.

dddonkuro avatar Sep 16 '25 01:09 dddonkuro