[BUG] @-includes in CLAUDE.md fail to resolve when project root is inside a hidden (dot-prefixed) directory

Resolved 💬 1 comment Opened May 7, 2026 by aolshevskiy Closed Jun 5, 2026

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

  1. Place a project inside a hidden directory, e.g. ~/.archive/usr/myproject/
  2. Add @-includes to CLAUDE.md, e.g.:

``
@~/org/CLAUDE.md
@~/.claude/micro-caveman.md
``

  1. Open Claude Code in that project
  2. Run /context and 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 — @.hidden file 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗