[BUG] @-includes in CLAUDE.md fail to resolve when project root is inside a hidden (dot-prefixed) directory
Description
When a project root is located inside a hidden (dot-prefixed) directory (e.g. ~/.archive/usr/myproject/), @-include directives in CLAUDE.md silently fail to load the referenced files. The included files do not appear as separate entries in /context, and their token counts are not reflected — only the project CLAUDE.md itself is loaded.
Moving the project to a non-hidden path (e.g. ~/usr/myproject/) immediately fixes the issue: all @-includes resolve correctly and appear as separate entries in /context.
Steps to reproduce
- Place a project inside a hidden directory, e.g.
~/.archive/usr/myproject/ - Add
@-includes toCLAUDE.md, e.g.:
````
@~/org/CLAUDE.md
@~/.claude/micro-caveman.md
- Open Claude Code in that project
- Run
/contextand check the Memory files section
Expected behavior
Each @-included file appears as a separate entry in /context with its own token count, matching the behavior seen in projects at non-hidden paths.
Actual behavior
Only the project CLAUDE.md appears in /context. The @-included files are absent — their content is neither merged into the CLAUDE.md token count nor shown separately. The @-includes are silently ignored.
Before (project in ~/.archive/usr/myproject/):
Memory files · /memory
├ CLAUDE.md: 658 tokens ← only the project file; @-includes not resolved
└ MEMORY.md: 166 tokens
After moving the project to ~/usr/myproject/:
Memory files · /memory
├ CLAUDE.md: 658 tokens
├ ~/org/CLAUDE.md: 595 tokens ← now resolves
├ ~/.claude/micro-caveman.md: 109 tokens ← now resolves
└ MEMORY.md: 166 tokens
Environment
- Claude Code CLI
- Linux (Debian-based)
- The dot-prefixed component (
.archive) is in the middle of the path, not just the leaf directory
Related issues
- #2336 —
@.hiddenfile references don't work in autocompletion - #1818 —
.claude/directory excluded from@autocompletion
The pattern is consistent with Claude Code systematically skipping dot-prefixed path components, but this case is distinct: it affects the entire @-include resolution for a project, not just autocompletion.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗