[BUG] Claude Code CLI `paths` handling in `.claude/rules/*.md`

Resolved 💬 6 comments Opened Feb 19, 2026 by TrueNine Closed Apr 9, 2026

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?

When I configure a rule file under .claude/rules/*.md with multiple entries in the paths array, Claude Code CLI does not handle them correctly.
It appears that only one path is honored; adding a second (or more) path entries causes the rule to not be applied as expected to all files.

Concretely, I have a rule like:

paths:
  - "applet/src/manifest.json"
  - "applet/src/pages.json"

In practice, only one of these files behaves as if the rule is applied; the other one is effectively ignored (no rule behavior is triggered there).

What Should Happen?

Claude Code should support multiple entries in the paths array for .claude/rules/*.md rule files.
With the configuration above, the same rule should be applied consistently to both:

  • applet/src/manifest.json
  • applet/src/pages.json

without needing any workaround like splitting into multiple rule files.

Error Messages/Logs

There is no explicit CLI error or stack trace in this case.  
The CLI runs normally; the bug is in the behavior: only one of the configured `paths` is actually affected by the rule, while the other path behaves as if the rule were not present.

Steps to Reproduce

  1. Create or edit a rule file under .claude/rules/, for example:
  • .claude/rules/rule-uniapp3-config.md
  1. Configure the paths field with at least two entries, for example:

```yaml
paths:

  • "applet/src/manifest.json"
  • "applet/src/pages.json"

```

  1. Run Claude Code CLI in this repository and trigger behavior that should apply this rule (for example, commands that read/apply rules for these files).
  2. Observe that only one of the files behaves as if the rule is applied; the other file does not appear to be affected by the rule at all.
  3. If you reduce paths to a single entry (e.g. just applet/src/manifest.json), the rule behaves as expected for that one file.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.47

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

  • I have read the official documentation, and I did not find any statement that paths should only contain a single entry.
  • The configuration works as expected when paths contains only one entry.
  • I also considered whether using a glob pattern (such as applet/src/*.json or applet/src/{manifest,pages}.json) would be the intended way to support multiple files, but the documentation suggests that paths as an array should be valid and therefore this appears to be a bug in how multiple entries are handled.

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗