Problem
In multi-folder workspaces with many library dependencies (e.g., 27+ folders), all AGENTS.md files from workspace roots are automatically loaded into every thread context. This consumes tokens unnecessarily when only working in a subset of the codebase.
Current Behavior
- AGENTS.md files in workspace roots and parent directories are always included
- Subtree AGENTS.md files load when reading files in that subtree (this is good)
- No way to opt-out specific AGENTS.md files from auto-loading
Proposed Solution
Support a frontmatter directive that prevents auto-loading:
---
autoload: false
---
# Library-specific guidance
This file is only included when explicitly @-mentioned
Use Case
- Large workspaces with main project + multiple dependency libraries
- Each library has its own AGENTS.md but most threads only touch the main project
- Current workarounds (renaming files, reducing workspace folders) are cumbersome
Alternatives Considered
- Renaming AGENTS.md files to prevent auto-inclusion (breaks intended functionality)
- Reducing workspace folders (loses multi-project benefits)
- Using glob frontmatter in a single AGENTS.md (doesn't address root-level auto-loading)
Problem
In multi-folder workspaces with many library dependencies (e.g., 27+ folders), all AGENTS.md files from workspace roots are automatically loaded into every thread context. This consumes tokens unnecessarily when only working in a subset of the codebase.
Current Behavior
Proposed Solution
Support a frontmatter directive that prevents auto-loading:
Use Case
Alternatives Considered