AGENTS.md discovery still runs `rg --no-ignore --follow` over the whole tree (regression sibling of #304676)
@aeschli is already working on this.
Since Jun 26, 2026.
Assessment
This issue has not been assessed yet.
Description
Environment
| Component | Value |
| VS Code | 1.126.0 |
| OS | macOS (Darwin arm64, Apple Silicon) |
| Workspace | pnpm monorepo, large node_modules with 200+ top-level symlinks + .pnpm store |
| Related (fixed) issue | #304676 (shipped 1.116.0) |
Summary
#304676 fixed the .github/agents/*.md scan (scoped it to the .github/agents/ folder, shipped in 1.116). But the AGENTS.md instruction-file discovery is a separate scan that still uses the same --no-ignore --follow flags and still walks the entire workspace, including all of node_modules. On a large pnpm monorepo this pins CPU (490-871%), respawns every few seconds, and heats the machine while VS Code is idle.
The command being run
.../@vscode/ripgrep-universal/bin/darwin-arm64/rg --files --hidden --case-sensitive --no-require-git -g /AGENTS.md -g !/.git -g !/.svn -g !/.hg -g !/.DS_Store -g !/Thumbs.db --no-ignore --follow --no-config --no-ignore-global
Note the glob is **/AGENTS.md, not /.github/agents/*.md - this is the instruction-file path, not the agent-definitions path that #304676 patched.
Parent process is Code Helper (Plugin) (the extension host).
Workspace
pnpm monorepo, large node_modules with 200+ top-level symlinks + a .pnpm store.
Same --follow + pnpm symlink-forest pathology described in #304676 (file system loop errors, repeated traversal).
Expected
Apply the same fix #304676 used: scope the AGENTS.md lookup, drop --follow, and/or
respect .gitignore so node_modules is skipped. Debounce instead of respawning.
Actual
**/AGENTS.md scan runs with --no-ignore --follow across the full tree, repeatedly.
Workaround
"chat.useAgentsMdFile": false,
"chat.useNestedAgentsMdFiles": false,
"search.followSymlinks": false
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·