[BUG] Conditional file loading with @? syntax not working - language-specific guidelines not auto-loaded

Resolved 💬 3 comments Opened Aug 6, 2025 by kiriz Closed Aug 15, 2025

Environment:

  • Claude Code version: [current version from 1.0.69 (Claude Code)]
  • OS: macOS (Darwin 24.5.0)
  • Working directory: Go project with go.mod file present

Description:
The conditional loading feature for language-specific guidelines is not working as documented. According to the documentation, files should be automatically loaded based on
project type detection, but this is not happening.

Expected Behavior:
When working in a Go project (with go.mod present), the @?GO.md conditional loading should automatically include ~/.claude/GO.md in the context, as shown by /status command
output.

Actual Behavior:
The /status command shows that GO.md is not loaded despite:

  1. ~/.claude/GO.md file exists and is readable
  2. go.mod file exists in working directory
  3. Conditional loading syntax is properly configured in ~/.claude/CLAUDE.md

Steps to Reproduce:

  1. Create a ~/.claude/CLAUDE.md file with conditional loading syntax:
  @?GO.md # Load only if Go project detected (go.mod exists)
  1. Ensure ~/.claude/GO.md exists
  2. Navigate to a directory containing go.mod
  3. Start Claude Code session
  4. Run /status command
  5. Observe that GO.md is not listed in the Memory section

Current Configuration:
# ~/.claude/CLAUDE.md excerpt
@?GO.md # Load only if Go project detected (go.mod exists)
@?NODE.md # Load only if Node.js project detected (package.json exists)
@?PYTHON.md # Load only if Python project detected (requirements.txt/pyproject.toml exists)
@?RUST.md # Load only if Rust project detected (Cargo.toml exists)
@?JAVA.md # Load only if Java project detected (pom.xml/build.gradle exists)

Actual /status output:
Memory • /memory
L user: ~/.claude/CLAUDE.md

L project: CLAUDE.md

Impact:
Language-specific development guidelines are not automatically available, requiring manual workarounds and reducing the effectiveness of project-specific configuration.

Possible Causes:

  1. @? conditional syntax not implemented
  2. File detection logic not working from current working directory
  3. Case sensitivity issues in file detection
  4. Documentation ahead of implementation

Workaround:
Currently using direct file reads to access language-specific guidelines manually.

View original on GitHub ↗

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