feat(agent): AGENTS.md priority over CLAUDE.md per directory - #10503
Closed
iRonin wants to merge 1 commit into
Closed
feat(agent): AGENTS.md priority over CLAUDE.md per directory#10503iRonin wants to merge 1 commit into
iRonin wants to merge 1 commit into
Conversation
When compose=True and agents_priority=True (default), AGENTS.md takes priority over CLAUDE.md at each directory level. If both exist in the same directory, only AGENTS.md is loaded from that directory. CLAUDE.md is loaded from directories that don't have AGENTS.md. .hermes.md is always loaded as complementary Hermes-specific instructions. Config: context.agents_priority (default: true) Also fixes case-sensitivity bug in _resolve_walk_limit where .lower() broke path matching on macOS (/T/ vs /t/).
This was referenced Apr 15, 2026
Contributor
|
Thanks for the detailed PR, @iRonin! This is an automated hermes-sweeper review. After inspecting current Evidence:
If the intent is to extend this priority logic to multi-directory recursive walks once #10299/#10482 land, please rebase onto those branches and re-open against them. The single-directory case is already handled on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When both AGENTS.md and CLAUDE.md exist in the same directory, compose mode loads both. But users typically want AGENTS.md to be the authoritative agent instructions, with CLAUDE.md as a fallback for directories that don't have AGENTS.md.
Solution
New config option
context.agents_priority(default:true):When enabled, at each directory level during the walk:
This means users get:
Config
Testing
_resolve_walk_limitwhere.lower()broke path matching on macOS (/T/vs/t/)