⌨️CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD
Also known as CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1
Set to 1, it loads CLAUDE.md from folders added with --add-dir.
Think of it like
It is like you read the rules on the wall next door too.
Example
Lucy works in an app but edits a shared library beside it. The library has its own CLAUDE.md, and with this set Claude follows it too.
Why it matters
An added folder often has its own rules. Without this, Claude edits it blind to them.
Definition
Example code
bash
export CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1
claude --add-dir ../shared-libCommon mistake
Key takeaways
- 1Added folders. From --add-dir.
- 2Their memory files. CLAUDE.md and rules.
- 3Off by default. Set 1.