Repository navigation
Description
Problem
Since 1.42.0 (PR #1663, src/features/views/workspacePythonContext.ts) the extension watches **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig.json} across the whole workspace and calls findFiles(MARKER_GLOB, EXCLUDE, 1) on every create/delete event. VS Code implements each findFiles call by spawning a fresh rg.exe --files over the workspace from the extension host. A git checkout / git worktree add / git worktree remove that touches ~1–2k Python files therefore spawns ~1–2k ripgrep processes (plus one conhost.exe each) within seconds. On my machine this froze Windows three times in one day and ended in a DPC_WATCHDOG_VIOLATION (0x133) bugcheck each time.
The "ticket" counter in registerWorkspacePythonContext only discards stale results; it does not prevent the spawns.
Environment data
- Python Environments extension version: 1.42.0 (code unchanged on
main@ 1.43.0) - Python extension (
ms-python.python) version: 2026.10.0 (python.useEnvironmentsExtensionat defaultfalse) - VS Code version (Help → About): 1.145.0 (commit a717861c07586a53d83b80d742cd3f59b20a6273), x64
- OS and version: Windows 11 Home 25H2, build 26200.9711
- Python version: not relevant — the scan runs before any interpreter is used
- Environment manager in use: venv
- Shell: pwsh / Git Bash
- Remote / container scenario: none
- Workspace type: single folder, mono-repo (Vue frontend + FastAPI backend, ~5k tracked files; several
git worktrees live under<repo>/.worktrees/, ~125k files on disk in total) - Is this a regression? Yes. 1.40.0 does not contain
workspacePythonContext.ts; the behaviour arrived with 1.42.0.
Repro Steps
- Open a repo that contains ≥1000
*.pyfiles in VS Code with the extension installed (any Python project of that size; a Django/FastAPI backend is enough). - Make the files appear or disappear in bulk from outside the editor, e.g. in a terminal:
git worktree add --detach --no-checkout .wt/probe HEAD && git -C .wt/probe checkout HEAD -- backend/
(or simplygit checkout <branch-that-differs-by-1000-py-files>). - Watch the process list (
Get-Process rg | Measure-Object).
Expected behavior
At most one (debounced) findFiles scan after the burst settles; a handful of rg.exe processes at most.
Actual behavior
One rg.exe + one conhost.exe per file event. Measured on the repo above (callcenter-backend/, 1939 files of which 1264 match MARKER_GLOB):
16:11:43 baseline procs=378
16:11:45 procs=464 (+86) new: rg=49 conhost=42 <- git still running
16:11:49 git exited after 5.8 s
16:11:50 procs=585 (+207) new: conhost=107 rg=101
16:11:58 procs=679 (+301) new: conhost=153 rg=152
16:12:04 procs=765 (+387) new: conhost=195 rg=194 <- still climbing ~20/s after git is gone
16:15:35 VS Code main.log: "CodeWindow: detected unresponsive" (repeats every 16 s)
16:17:10 Windows bugcheck 0x133 DPC_WATCHDOG_VIOLATION
Parent of every rg.exe is the extension host (Code.exe --type=utility --utility-sub-type=node.mojom.NodeService; confirmed via --clientProcessId of the ESLint server it also hosts). Command line of each one:
"...\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig.json} -g !**/.git -g !**/.svn -g !**/.hg -g !**/.jj ...
A control run that checked out 511 non-Python files (frontend/src) spawned zero rg.exe, so the trigger is specifically the MARKER_GLOB watcher. Two earlier freezes the same day (a 5536-file git checkout with 1945 marker files, and a 5125-file git worktree add with 1329 marker files) show the same signature.
Logs
The "Python Environments" output channel is empty for this path — refresh() only logs on failure. Process-level timeline and the captured rg.exe command lines are inlined below.
probe timeline (1 s sampling around the checkout, Windows username redacted)
16:11:43.261 stage=s2 paths=callcenter-backend kill: procs+250 or avail<6000MB
16:11:43.297 baseline procs=378 avail=13630MB code_ws=2917MB
16:11:43.313 checkout started pid=78852
16:11:44.361 t+ 1s procs=381 (+3) new=2 avail=13451MB code_ws=2991MB git_alive=True top_new=git=1;conhost=1
16:11:45.615 t+ 2s procs=464 (+86) new=94 avail=13545MB code_ws=2985MB git_alive=False top_new=rg=49;conhost=42;bash=2;node=1
16:11:48.436 CAPTURED 90 new processes via CIM in 2.7s -> s2-20261105-161142-spawned.csv
16:11:48.540 49 x rg.exe, Code
16:11:48.600 41 x conhost.exe, rg
16:11:48.741 sample: rg.exe ppid=33720 (Code) 16MB "C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\w
16:11:48.820 sample: rg.exe ppid=33720 (Code) 16MB "C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\w
16:11:48.887 sample: rg.exe ppid=33720 (Code) 15MB "C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\w
16:11:48.960 sample: rg.exe ppid=33720 (Code) 15MB "C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\w
16:11:49.039 sample: rg.exe ppid=33720 (Code) 14MB "C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\w
16:11:49.132 git exited code= after 5.8s
16:11:50.280 t+ 7s procs=585 (+207) new=217 avail=12941MB code_ws=3021MB git_alive=False top_new=conhost=107;rg=101;bash=6;docker=2;node=1
16:11:51.503 t+ 8s procs=608 (+230) new=240 avail=12874MB code_ws=3026MB git_alive=False top_new=conhost=116;rg=112;bash=9;node=2;lark-cli=1
16:11:52.703 t+ 9s procs=628 (+250) new=260 avail=12891MB code_ws=3034MB git_alive=False top_new=conhost=126;rg=122;bash=10;lark-cli=1;node=1
16:11:54.088 t+ 11s procs=649 (+271) new=281 avail=12868MB code_ws=2955MB git_alive=False top_new=conhost=135;rg=131;bash=11;taskkill=1;node=1
16:11:55.629 t+ 12s procs=665 (+287) new=297 avail=12782MB code_ws=2959MB git_alive=False top_new=conhost=143;rg=137;bash=11;taskkill=2;docker=1
16:11:56.917 t+ 14s procs=666 (+288) new=298 avail=12782MB code_ws=2958MB git_alive=False top_new=conhost=147;rg=145;bash=5;taskkill=1
16:11:58.060 t+ 15s procs=679 (+301) new=311 avail=12697MB code_ws=2964MB git_alive=False top_new=conhost=153;rg=152;bash=5;docker=1
16:11:59.262 t+ 16s procs=696 (+318) new=328 avail=12601MB code_ws=2957MB git_alive=False top_new=conhost=162;rg=159;bash=5;docker=2
16:12:00.500 t+ 17s procs=712 (+334) new=344 avail=12487MB code_ws=2960MB git_alive=False top_new=conhost=170;rg=167;bash=5;docker=2
16:12:01.856 t+ 19s procs=728 (+350) new=360 avail=12390MB code_ws=2965MB git_alive=False top_new=conhost=177;rg=176;bash=5;docker=2
16:12:03.068 t+ 20s procs=746 (+368) new=378 avail=12316MB code_ws=2972MB git_alive=False top_new=conhost=187;rg=185;bash=5;docker=1
16:12:04.308 t+ 21s procs=765 (+387) new=397 avail=12209MB code_ws=2974MB git_alive=False top_new=conhost=195;rg=194;bash=5;svchost=2;docker=1
16:12:19.457 SUMMARY stage=s2 files_in_worktree=1939 killed=False peak_new=397 (conhost=195;rg=194;bash=5;svchost=2;docker=1) code_ws 2917MB -> peak 3034MB -> now 2967MB avail 13630MB -> 12203MB procs 378 -> 768
16:12:19.907 worktree kept for the next stage
16:12:20.062 log: C:\code\botim-insight-desk\.local\memwatch\probe\s2-20261105-161142.txt
90 processes captured via CIM 5 s into the burst: pid, ppid, name, parent, private MB, start time, command line
"pid","name","ppid","parent","priv_mb","started","cmdline"
"42692","rg.exe","33720","Code","16","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"80012","conhost.exe","42692","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"36824","rg.exe","33720","Code","15","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"45580","rg.exe","33720","Code","14","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"39548","conhost.exe","36824","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"27792","rg.exe","33720","Code","14","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"4768","conhost.exe","45580","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"68588","rg.exe","33720","Code","16","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"42984","conhost.exe","27792","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"56764","rg.exe","33720","Code","13","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"34808","conhost.exe","68588","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"28168","rg.exe","33720","Code","14","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"61548","conhost.exe","56764","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"77860","rg.exe","33720","Code","14","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"35572","rg.exe","33720","Code","15","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"74164","conhost.exe","28168","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"86208","rg.exe","33720","Code","12","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"45316","rg.exe","33720","Code","6","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"79480","rg.exe","33720","Code","13","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"75120","rg.exe","33720","Code","12","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"59296","conhost.exe","77860","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"31476","conhost.exe","86208","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"78300","rg.exe","33720","Code","8","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"36148","conhost.exe","35572","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"9128","conhost.exe","75120","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"39720","conhost.exe","79480","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"48736","rg.exe","33720","Code","7","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"63604","conhost.exe","78300","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"37852","rg.exe","33720","Code","8","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"41708","rg.exe","33720","Code","14","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"38224","rg.exe","33720","Code","8","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"51612","conhost.exe","41708","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"65780","rg.exe","33720","Code","7","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"66220","conhost.exe","45316","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"3032","rg.exe","33720","Code","6","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"13308","conhost.exe","38224","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"42868","conhost.exe","65780","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"84404","conhost.exe","37852","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"68280","conhost.exe","3032","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"28956","conhost.exe","48736","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"876","rg.exe","33720","Code","7","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"29492","rg.exe","33720","Code","4","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"54380","rg.exe","33720","Code","8","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"30356","conhost.exe","876","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"19528","rg.exe","33720","Code","7","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"57112","rg.exe","33720","Code","5","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"36984","conhost.exe","54380","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"74064","rg.exe","33720","Code","5","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"34312","rg.exe","33720","Code","7","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"35796","conhost.exe","19528","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"66156","rg.exe","33720","Code","6","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"44132","rg.exe","33720","Code","6","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"6148","conhost.exe","34312","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"72140","conhost.exe","66156","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"49032","rg.exe","33720","Code","8","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"38596","rg.exe","33720","Code","3","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"46668","rg.exe","33720","Code","8","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"72056","conhost.exe","49032","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"72652","conhost.exe","57112","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"53548","rg.exe","33720","Code","4","2026/11/5 16:11:44","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"62984","conhost.exe","46668","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"85824","conhost.exe","29492","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"84364","conhost.exe","74064","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"81800","conhost.exe","53548","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"54792","conhost.exe","44132","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"72084","conhost.exe","38596","rg","1","2026/11/5 16:11:44","\??\C:\Windows\system32\conhost.exe 0x4"
"30640","rg.exe","33720","Code","7","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"82740","rg.exe","33720","Code","4","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"72816","conhost.exe","30640","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"38404","rg.exe","33720","Code","4","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"83656","rg.exe","33720","Code","7","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"9076","rg.exe","33720","Code","4","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"86292","conhost.exe","83656","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"57076","rg.exe","33720","Code","4","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"80328","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"19724","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"75428","rg.exe","33720","Code","5","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"60232","conhost.exe","80328","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"41144","conhost.exe","75428","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"54912","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"47160","rg.exe","33720","Code","4","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"62376","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"29664","conhost.exe","47160","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"39652","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"36588","conhost.exe","82740","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"67156","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"31820","conhost.exe","38404","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"39164","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."
"37692","conhost.exe","9076","rg","1","2026/11/5 16:11:45","\??\C:\Windows\system32\conhost.exe 0x4"
"81592","rg.exe","33720","Code","3","2026/11/5 16:11:45","""C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\a717861c07\resources\app\node_modules.asar.unpacked\@vscode\ripgrep-universal\bin\win32-x64\rg.exe"" --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,requirements.txt,Pipfile,pyvenv.cfg,mspythonconfig."Suggested fix
In registerWorkspacePythonContext:
- A create event can only make the answer
true. OnonDidCreate, if the context is alreadytrue, do nothing; if it isfalse, set it totruedirectly — nofindFilesneeded at all. - Only delete events can make it
false, and only when it is currentlytrue. Debounce those (the repo already hascreateSimpleDebounce, used by the venv watchers with 500 ms) and run a single scan after the burst. - Pass a
CancellationTokentofindFilesand cancel the in-flight scan when a new one is queued, so a slow scan cannot pile up behind the next. - Optionally skip scanning when
workspace.workspaceFoldersis empty / ononDidChangeWorkspaceFoldersonly.
Additional context
- Root cause pointer:
src/features/views/workspacePythonContext.tslines 60–70 (onMarkerChanged→void refresh()per event). files.exclude/search.excludedo not reduce the cost because an explicitexcludeis passed tofindFiles, which disables the default excludes;files.watcherExcludeonly helps for paths you can afford to exclude.- Workaround that worked for me: uninstall the extension (
ms-python.pythondoes not depend on it whenpython.useEnvironmentsExtensionisfalse).
Activity
ttachon commentedon Nov 5, 2026
Same issue, independently diagnosed on a second machine: 5 ×
DPC_WATCHDOG_VIOLATION(0x133) in one day.Environment: Python Environments 1.42.0 · Python 2026.10.0 · VS Code 1.145.0 (a717861c07) · Windows 11 Pro 25H2 26200.9711 · Memory Integrity (HVCI) on · i7-11850H, 16 threads.
Trigger: several coding-agent sessions working in the workspace (they create/delete files and git worktrees inside it), so it's the same bulk create/delete pattern as above. The first
rg.exeappeared one second after the extension activated, and 67 were alive within a minute.Measured: in ~5 minutes the extension host launched 939 identical
rg.exe --files … -g **/{*.py,*.pyi,…,mspythonconfig.json} … --no-ignore --follow, with up to 124 alive at once, 16 threads each (no--threadsby default). The PC froze until they were killed.Kernel side (4 minidumps): the stuck CPU is always in
KiRetireDpcList → KiTimer2Expiration → KiProcessThreadWaitList → KiDeferredReadySingleThread → … → HvlSendSyntheticClusterIpi(Arg1 = 1), with VS Code's bundledrg.exeas the current process. That ripgrep (15.0.0) importsCreateWaitableTimerExW, and its idle walker threads sleep in 1 ms high-resolution waits. So 100+ concurrent scans × 16 threads means thousands of high-res timers, and their expiry storm trips the DPC watchdog. This is the same signature as anthropics/claude-code#76654 and microsoft/vscode#313167.Nuance on the workaround notes: on 1.145.0 the spawned
rgdoes pick upfiles.exclude(adding"**/<big-ignored-dir>": trueshowed up as-g !**/<big-ignored-dir>). Likewise,"search.ripgrep.maxThreads": 1added--threads 1and"search.followSymlinks": falseremoved--follow. That makes each scan much cheaper, but it doesn't stop the per-event spawning. Uninstalling the extension was the only full fix; Python and Pylance keep working without it.+1 to the proposed fix: a create event sets
truewithout scanning, deletes are debounced, and the in-flight scan is cancelled.Starland9 commentedon Nov 5, 2026
Confirming on Linux (the report above is Windows-only), with a root-cause trace and a trigger other than
git checkout: AI coding agents creating git worktrees inside the workspace.Environment
.pyfiles. Claude Code agents create worktrees under<repo>/.claude/worktrees/(9 at the time, ~1,800.pyeach, 1.6 GB in total).Reproduction (VS Code started with
--log trace, inside a cgroup capped at 8 GB RAM / 4000 tasks, with a watchdog stopping it above 150 livergprocesses)extHostWorkspace#findFiles…: fileSearch, extension: ms-python.vscode-python-envsentries (vs. 3 forvscode.npmand 2 forGitHub.copilot-chat) and 600ExtHostSearch … rg --files -g **/{*.py,*.pyi,*.ipynb,pyproject.toml,…}spawns.rgprocesses, load average 11.7 on 16 cores. Everyrgis a child of the extension host.Impact on Linux
atoprecorded ~36,000 short-livedrgchildren of a single extension host in 30 minutes.Reading the code (1.42.0)
findFiles(MARKER_GLOB, EXCLUDE, 1):maxResults = 1does not help, each call still spawns a fullrg --files. The ticket counter only discards stale results, as noted in the description.onDidOpenTextDocument(for Python documents) andonDidChangeWorkspaceFolderscall the same function without throttling.node_modules|.git|site-packages, so.venv,.worktrees,.claude/worktrees, etc. still trigger a scan per event.Suggested fix
findFilesin flight, passing aCancellationTokenso a newer scan cancels the older one.onDidCreatewhen the context key is alreadytrue(a creation cannot change it); only re-check after a delete.Workaround: roll back to 1.40.0 (no
workspacePythonContext.ts) or disable the extension.ryijin commentedon Nov 5, 2026
Same bug in a Remote-SSH setup. There it was not a short spike: the host stayed overloaded for about four hours, and new SSH connections mostly failed.
Environment
Likely trigger
A background script creates and removes a full git worktree inside the workspace folder, once per pull request. Both stalls began right after that script started. We have not reduced this to a minimal repro.
Measured while it was stuck
rg --files --hidden --case-sensitive --no-require-git -g **/{*.py,*.pyi,...} ... --no-ignore --followprocesses, all but one children of a single extension host, using about 26 GiB (summed RSS)some) at 98 %, load average around 700rgprocesses in 41 secondsWhat may add to the reports above
The fix suggested above would cover this case as well.
JeanFrancoisGagne commentedon Nov 8, 2026
Same bug on a third Windows machine, with two things this thread doesn't have yet: the failure mode is the commit limit, which takes the whole editor down, and a workspace that is the user's home folder makes activity outside any repo set it off.
Environment: Python Environments 1.42.0 · VS Code (bundled
@vscode/ripgrep-universal) · Windows 11 Pro 10.0.26200 · 64 GB RAM. One window had the home folder (C:\Users\<user>) open as its workspace; other windows had project folders.Trigger: with the home folder as the workspace, the marker watcher covers
AppDatatoo, so every.pythat pytest temp folders, uv's cache or coding agents create or delete under the profile starts anotherrg --files --hidden … --no-ignore --followover the whole profile, junctions included. No git operation was involved.Measured (a 10 s process sampler):
rg.exeunder one extension hostEnding 258 of them freed 33 GB at once, about 130 MB each. New ones then started at about four a second until the window closed. No new scan started in the 60 s after it closed.
Failure mode: earlier the same day the machine reached its commit limit twice. VS Code's
main.logshows the ptyHost, every utility worker, the agent host and three extension hosts terminating within 30 s (exit4294930433), and in the second wave a utility process exiting3221225773(0xC000012D,STATUS_COMMITMENT_LIMIT), then renderer crashes. Every terminal and extension-host child died with them, including all coding-agent sessions in every window, not only the window that ran the scans.Workaround in use: no window with the home folder as its workspace. We also set
"search.followSymlinks": falseand afiles.watcherExcludeover**/AppData/**and the cache folders, but have not yet verified whether either reaches this watcher or itsfindFilescall.Om-singhaI commentedon Nov 8, 2026
Eduardo Villalpando Mello (@edvilme) in case it saves you time, #1999 has a fix with tests. A created marker file or an opened Python document sets the context without a search, deletes and folder changes share one debounced rescan, and only one cancellable search runs at a time. In a unit harness, a branch switch with 1000 creates and 1000 deletes now starts one search instead of 2000.