Feature request: Auto-load CLAUDE.md from subdirectories when working on files
Problem
When running Claude Code from a parent directory (e.g., ~/projects/), project-specific CLAUDE.md files in subdirectories are not loaded, even when actively working on files within those subdirectories.
Current behavior
When Claude Code is started from a parent directory, only the CLAUDE.md in that directory is loaded. CLAUDE.md files in subdirectories are ignored even when editing files in those subdirectories.
Example:
- Start Claude Code in
~/projects/ - Edit files in
~/projects/book/ ~/projects/book/CLAUDE.mdis NOT loaded
Expected behavior
When I read/edit files in book/, the book/CLAUDE.md should be automatically recognized and loaded as additional context.
Why this matters
- Cognitive overhead: Requiring users to cd into each project directory before starting Claude wastes attention and breaks workflow
- Multi-project workflows: Many developers work across multiple repositories in a single session
- Context relevance: Project-specific instructions should apply when working on that project, regardless of where Claude was launched
Proposed solution
When Claude reads or edits a file, check if there is a CLAUDE.md in that file's directory (or ancestor directories up to the working directory). If found, load it as additional context for that file's operations.
Environment
- OS: Windows 11 / macOS (cross-platform user)
- Claude Code version: Latest
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗