pylance-release
pylance-release copied to clipboard
[critical] Copilot Chat Agent mode scans entire disk instead of project folder
Type: Bug
Copilot Chat (Agent mode) scanned over 3,000 files when only 1 file was opened in the editor. Message: 3321 files and 0 cells to analyze
Expected behavior: Agent mode should only scan relevant project files. Observed behavior: It appears to be scanning far beyond the project folder — possibly even the entire disk. There are nowhere near that many files in the working folder, even with .venv included. This behavior is not acceptable and looks like a serious bug in how the agent determines scope.
Bug can be reproduced only with Gemini 2.5 Pro.
Extension version: 0.27.2025050603 VS Code version: Code - Insiders 1.100.0-insider (47ea00afe6b2b1cb01492d7e7d466989f5727894, 2025-05-02T05:04:33.911Z) OS version: Windows_NT x64 10.0.26100 Modes: Agent
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 7 5700X3D 8-Core Processor (16 x 2994) |
| 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) | 31.92GB (6.39GB free) |
| Process Argv | D:\SteamLibrary\steamapps\common\DayZServer\tgbot\bot.py --crash-reporter-id e3c738c3-b5cc-4562-a6fd-0a47bf4a174d |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyt551cf:31249598
vscod805cf:30301675
c4g48928:30535728
a9j8j154:30646983
962ge761:30841072
dsvsc014:30777825
dsvsc015:30821418
h48ei257:31000450
pythontbext0:30879054
cppperfnew:30980852
dwnewjupyter:31046869
pythonrstrctxt:31093868
nativeloc1:31118317
e80f6927:31120813
dwcopilot:31158714
5b1c1929:31184661
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
g012b348:31231168
pythoneinst12:31251391
bgtreat:31252123
9gig6300:31294348
31787653:31262186
3e8i5726:31271747
pythonpulldiag:31287486
6gi0g917:31259950
editoredits36407:31282444
996jf627:31264550
pythonrdcb7:31268811
usemplatestapi:31297334
i53e4855:31297587
747dc170:31275146
pythonfullctx:31296836
aj496949:31278748
6518g693:31302842
pylancecolor:31288664
generatesymbolt:31280541
convertfstringf:31280702
gendocf:31280703
pylancequickfixt:31296868
18994427:31304446
Most likely it's searching other files to help with your request, try a simple question, like can you see this message.
(I am not a Microsoft employee, or github, just a member wanting to help =)
Only 1 file was opened. And which directories were scanned? The whole disc? The bot folder doesn't contain any files other than bot.py.
Most likely, that's it's pycache, but yeah, it's looking at the whole disk. I thought you meant in the chat section when you're in ask mode.
It's agent mode
It's agent mode
Agent mode will look at your whole dir.
it is not acceptable behavior to scan entire .venv :) what is it for? It's just a bug. and i can say more, it's not just scan .venv, it has become like a whole disk scan...
it is not acceptable behavior to scan entire .venv :) what is it for? It's just a bug. and i can say more, it's not just scan .venv, it has become like a whole disk scan...
It has to do either a local index, or an online index depending on project size. It's prob also including its own (smaller) training files, and caching you can't see.
I think it is a UI bug, we are probably mis-calculating number to report. if you believe it actually causing perf issue (not just UI), can you provide us some logs as described in the troubleshooting guide? that will help us to see what is going on.