[BUG] Path-scoped rules with multiple paths in frontmatter silently fail to load
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Rules in .claude/rules/ with a paths: frontmatter containing multiple entries silently fail to load. The rule never appears in context, even when Claude reads a file matching one of the patterns. The same rule with a single path works correctly.
What Should Happen?
Rules with multiple paths should load when Claude reads a file matching any of the listed patterns, as documented at https://code.claude.com/docs/en/memory#modular-rules-with-clauderules
Error Messages/Logs
No error messages. The failure is silent — the rule simply never loads. /memory shows only global rules (no paths: frontmatter). The "Loaded .claude/rules/..." message never appears for multi-path rules.
Steps to Reproduce
- Create
.claude/rules/test-multi-path.md:
---
paths:
- "src/controllers/**"
- "src/requests/**"
---
Test rule
- This is a test convention
- Create matching files:
mkdir -p src/controllers src/requests
echo "test" > src/controllers/TestController.php
echo "test" > src/requests/TestRequest.php
- Start Claude Code:
claude - Ask: "Read src/controllers/TestController.php"
- Run
/memory - Observe: test-multi-path.md is NOT listed
- Now edit the rule to use a single path:
---
paths:
- "src/controllers/**"
---
- Restart Claude Code, repeat step 4-5
- Observe: test-multi-path.md IS listed
Single path = works. Multiple paths = silently ignored.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.74 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Tested YAML variants that all fail with multiple paths:
- Double quotes:
"path/**" - Single quotes:
'path/**' - No quotes:
path/** - Inline array:
["path1/**", "path2/**"] - Using
globs:instead ofpaths:
Single path works at any depth:
apps/api/**✅apps/api/app/**✅apps/api/app/Http/**✅apps/api/app/Http/Controllers/**✅
Related issues: #17204, #16299, #23478
Documentation showing multiple paths as supported:
https://code.claude.com/docs/en/memory#modular-rules-with-clauderules
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗