[BUG] Claude Code does not honor directory-level memory file

Resolved 💬 3 comments Opened Jul 7, 2025 by kuroneko0441 Closed Jul 16, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.43 (Claude Code)
  • Operating System: macOS 15.4.1
  • Terminal: Terminal App

Bug Description

In Claude Code document, it says "Claude will also discover CLAUDE.md nested in subtrees under your current working directory. Instead of loading them at launch, they are only included when Claude reads files in those subtrees.". However it does not read CLAUDE.md in subdirectory even I ordered claude code to read a file in it.

Steps to Reproduce

  1. Run this simple shell script to reproduce in temporary directory
TMP_DIR="$(mktemp -d)" # Create a temporary directory
cd "$TMP_DIR"

mkdir test
echo "echo" > ./test/run.sh

echo "My Name is AA" >CLAUDE.md # Project-wide
echo "My Name is BB" > ./test/CLAUDE.md # Directory-specific

claude -p "Print @./test/run.sh. What is my name?" # Should answer "BB", however the result is:
# Here's the content of `./test/run.sh`:
# 
# ```bash
# echo
# ```
# 
# Your name is AA (as specified in the CLAUDE.md file).

claude -p "What is my name?" # Should return "AA"
# Based on the CLAUDE.md file in your project, your name is **AA**.

Expected Behavior

  • When I ask my name referencing ./test/run.sh, It should answer "BB" because there's a directory level CLAUDE.md file with content My Name is BB. Or at least claude code should mention it.

Actual Behavior

  • It did not honor the content of ./test/CLAUDE.md file.

Additional Context

The result is same when I run claude code in the interactive mode.

View original on GitHub ↗

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