How to load CLAUDE.md from folders added with --add-dir in Claude Code
When you start Claude Code from one package and need to edit a sibling, add it with --add-dir or /add-dir. Claude can then read and edit files there and loads its skills, but by default it doesn't load that folder's CLAUDE.md or .claude/rules/. To have Claude follow the sibling's conventions too, set an environment variable at launch:
CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1 claude --add-dir ../shared
For siblings you always need, you can list them under permissions.additionalDirectories in .claude/settings.json instead. Folders added this way get file access only: their CLAUDE.md, rules, and skills never load, even with the environment variable. Relative paths resolve against the directory you start claude from.
{
"permissions": {
"additionalDirectories": [
"../shared",
"../web"
]
}
}
In short: use --add-dir plus the variable when you want rules and skills, and additionalDirectories when you only need the files.
Sources
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.