Skip to content

When undoing files created by the agent it leaves a blank file behind instead of removing it from the 'files changed' list and deleting the file #257566

@eggonzal

Description

@eggonzal

Type: Bug

Have the agent create a new file due to some instruction, then instruct it to remove it.
The agent may succesfully remove the file but it will still be listed as a file changed.
Hit undo or keep and there will be a blank file instead of unoing the creation or keeping the removal of the file.

This makes it hard to switch to a new conversation as it prompts me to keep or undo the changes. Either let me ignore the propmpt and open a new copilot chat or correctly handle the removal of files generated by the agent, when hitting undo or keep

Extension version: 0.29.1
VS Code version: Code 1.102.1 (7adae6a, 2025-07-15T16:41:17.147Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs AMD Ryzen 7 PRO 7840U w/ Radeon 780M Graphics (16 x 3294)
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) 23.67GB (2.87GB free)
Process Argv --crash-reporter-id fb29e2fc-29e4-46aa-a9dc-ce65bf8e1ff9
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
binariesv615:30325510
962ge761:31351872
h48ei257:31000450
nativeloc1:31344060
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
9064b325:31222308
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
c7cif404:31314491
pythonpulldiag:31343502
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
0aa6g176:31307128
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
pylancequickfixf:31350060
9d2cg352:31346308
convertlamdaf:31350062
usemarketplace:31343026
nesew2to5:31336538
agentclaude:31350858
nes-diff-11:31337487
replacestringexc:31350595
nes-set-on:31351930
6abeh943:31336334
envsactivate1:31353494
yijiwantestdri0626-c:31336931
0927b901:31350571
f76d9909:31348711
0cj2b977:31352657

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions