/context does not list path-scoped .claude/rules/*.md files after they load mid-session
Title
/context does not list path-scoped .claude/rules/*.md files after they load mid-session
Body
Setup
A project has rule files under .claude/rules/*.md, each with YAML frontmatter declaring
a glob list, e.g.:
---
paths:
- "src/equipment/**/*.py"
---
# Unit operations
...
Observed behavior
- Session starts.
/contextshows only the rootCLAUDE.mdunder Memory files. - Claude reads a file matching one of the globs (e.g.
src/equipment/exchanger.py). - Immediately after, the matching rule file's full content is correctly injected into
context as a <system-reminder> block attached to that tool result — formatted the
same way the root CLAUDE.md is presented at session start ("Contents of
<path>: ..."). The model can see and quote this content without issue.
- Running
/contextin the same session, after step 3, does not list the loaded
rule file anywhere (not under Memory files, not counted in the token total).
This was reproduced twice in one session with two different rule files
(.claude/rules/equipment.md after reading a src/equipment/** file, and.claude/rules/thermo.md after reading a src/thermo/** file) — both injected into
context correctly, neither shown by a same-session /context afterward.
Expected behavior
Once a path-scoped rule file has been loaded into the active session's context,/context should list it (e.g. under Memory files, or a distinct "Rules" grouping) and
include its size in the token total — the same way it accounts for the root/nestedCLAUDE.md files it discovers at session start.
Impact
/context is the tool users rely on to audit what's actually consuming context budget.
If dynamically-loaded rule files are invisible to it, the reported token total
undercounts actual context usage, and there's no way to verify from /context alone
that a path-scoped rule is (or isn't) currently loaded.
Environment
- Claude Code running as a VSCode native extension.
- No hooks configured in any settings scope (
~/.claude/settings.json,
project .claude/settings.json, .claude/settings.local.json) — the rule-loading
behavior appears to be a built-in feature, not a user-configured hook.