Problem
Opening the repo in VSCode and accepting the recommended extensions installs ms-vscode.extension-test-runner (listed in .vscode/extensions.json). On a workspace that contains agent-farm builder worktrees (.builders/*/), that extension's test discovery runs:
rg --files --hidden --no-require-git --no-ignore --follow -g <wt>/node_modules/.pnpm/node_modules/codev-vscode/out/test/**/*.test.js
Because --no-ignore skips .gitignore (so node_modules/.builders aren't excluded) and --follow chases symlinks, it walks every builder worktree's pnpm symlink farm. With ~15 worktrees this spawns a flood of rg processes and pegs CPU for ~30s at a time, recurring on file changes.
The cost is entirely in the rg walks — an extension-host CPU profile captured during the storm was ~99% idle, so no extension code is the consumer.
Root cause (both pieces are repo-provided)
.vscode/extensions.json recommends the test-runner extension.
.vscode/settings.json has no files.watcherExclude / search.exclude for .builders/ or node_modules, so VSCode (and any tool it drives) traverses the worktree farm.
The repo both creates the .builders/* worktree farm and recommends an extension that walks it — they collide.
Proposed fix
- Add to
.vscode/settings.json:
- Remove
ms-vscode.extension-test-runner from .vscode/extensions.json recommendations (keep dbaeumer.vscode-eslint and connor4312.esbuild-problem-matchers, which remain useful for the vscode package). Do not delete the file.
- Optionally update
packages/vscode/vsc-extension-quickstart.md, which also references the test-runner extension.
Notes
Problem
Opening the repo in VSCode and accepting the recommended extensions installs
ms-vscode.extension-test-runner(listed in.vscode/extensions.json). On a workspace that contains agent-farm builder worktrees (.builders/*/), that extension's test discovery runs:Because
--no-ignoreskips.gitignore(sonode_modules/.buildersaren't excluded) and--followchases symlinks, it walks every builder worktree's pnpm symlink farm. With ~15 worktrees this spawns a flood ofrgprocesses and pegs CPU for ~30s at a time, recurring on file changes.The cost is entirely in the
rgwalks — an extension-host CPU profile captured during the storm was ~99% idle, so no extension code is the consumer.Root cause (both pieces are repo-provided)
.vscode/extensions.jsonrecommends the test-runner extension..vscode/settings.jsonhas nofiles.watcherExclude/search.excludefor.builders/ornode_modules, so VSCode (and any tool it drives) traverses the worktree farm.The repo both creates the
.builders/*worktree farm and recommends an extension that walks it — they collide.Proposed fix
.vscode/settings.json:ms-vscode.extension-test-runnerfrom.vscode/extensions.jsonrecommendations(keepdbaeumer.vscode-eslintandconnor4312.esbuild-problem-matchers, which remain useful for the vscode package). Do not delete the file.packages/vscode/vsc-extension-quickstart.md, which also references the test-runner extension.Notes