Skip to content

[FEATURE]: Dynamic AGENTS.md resolution has no low-cost trigger for intentional loading #13550

Closed

Description

@wblazer

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

The AGENTS.md autoloading (added in #10678) is only triggered by the read tool. This means the only way to trigger autoloading of a subdirectory's AGENTS.md is to read an actual file from that directory.

There's no low-cost way for an agent to load folder-level agent documentation without pulling in potentially unwanted file content. Tools like glob and grep that operate on directories don't trigger autoloading, and explicitly reading the AGENTS.md itself doesn't prevent re-injection on subsequent reads (since explicit reads don't populate metadata.loaded the same way).

The root problem for me is that I want a system where an agent can explore the codebase through its localized agent documentation before reading any code, but also have any unloaded documentation loaded passively as a side effect of the read tool (current approach).

A potential solution is to deduplicate explicit AGENTS.md reads against subsequent autoloads.

This functionality can be recreated with plugins, and I had Claude recreate it as a plugin with deduplication of explicit reads here. The main constraint of this approach is that the built-in dynamic AGENTS.md resolution can't be disabled currently, so I'm forced to use a different filename. However, I think I like my output format better for my needs because auto-loaded localized documentation feels semantically different than a "system-reminder," so I may continue using it even if my suggestion here goes through. An option to disable the built-in auto-loading would let me use AGENTS.md as the filenames still with my plugin, so that might be a nice addition as well.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Feb 14, 2026
  2. github-actions commented on Feb 14, 2026

    @github-actions
    Contributor

    This issue appears to be a duplicate of #13540, which was closed just moments before this was created. Both discuss the exact same feature request: adding a low-cost trigger mechanism for intentional AGENTS.md loading and deduplicating explicit reads against subsequent autoloads.

    Please check #13540 to see if your discussion can continue there or if this issue should be closed as a duplicate.


    There are also several related issues you may want to review for context on AGENTS.md loading:

    These issues together paint a picture of ongoing work around improving AGENTS.md loading behavior and scope management.

  3. github-actions commented on Apr 16, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions