Open
Description
Does this issue occur when all extensions are disabled?: No
Version: 1.100.3 (user setup)
Commit: 258e40f
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: Windows_NT x64 10.0.26100
Summary
When switching back to a GitHub Copilot chat thread that previously referenced files, VS Code automatically recreates those files as empty files if they were deleted.
Steps to Reproduce
- Open VS Code workspace with multiple files in a directory
- Start GitHub Copilot chat and add several files in the chat context
- Delete some of the referenced files using PowerShell command:
Remove-Item -Force "file1.md", "file2.md", "file3.md"
- Switch to a new chat send at least one message
- Return to original chat thread that referenced the deleted files
Expected: Deleted files stay deleted
Actual: Empty files are recreated with the same names
System Details
- Windows 11
- PowerShell (pwsh.exe) as default shell
- Files deleted using
Remove-Item -Force
command - Recreated files are empty (no original content)
Example
- Command used:
Remove-Item -Force "docs/README.md", "docs/GUIDE.md", "docs/STATUS.md"
- Result: Empty files
README.md
,GUIDE.md
,STATUS.md
recreated when returning to chat thread