claude desktop: detect and load every nested .claude / CLAUDE.md across subfolders

Open 💬 0 comments Opened Jul 9, 2026 by Kizuno18

opening this fresh since #44884 got auto-closed by the stale bot (which literally says "open a new issue if this is still relevant")

what

when i open a project in claude desktop code mode that has nested subfolders — each with its own .claude/ dir or CLAUDE.md — claude should detect and load all of them across the whole tree, not just the cwd + direct parent chain

the setup that breaks today

a meta-repo / monorepo where the root has a CLAUDE.md and each subfolder (or git submodule) carries its own scoped .claude/

  • launch from the root, the per-subfolder .claude never loads
  • launch from inside a subfolder, the root CLAUDE.md never loads
  • so wherever i launch, half my config is invisible

why it matters

  • per-folder .claude is pointless if only one anchor folder is ever read — it falls apart on anything bigger than a single-package repo
  • my file explorer shows all these folders but claude only sees a slice, which is the confusing part
  • submodules make it worse since a submodule is a plain folder with a .git file, so the walk stops there today (this is exactly #44884)

rough behavior i'd want

  • walk the full ancestor chain up to the project root (or a user marker like .claude/root) and load every CLAUDE.md on the way up
  • also discover nested .claude dirs in subfolders of the opened project and load them when work touches those folders
  • precedence: nearest folder wins, root is the base
  • opt-out: any level can set a boundary

related: #44884

View original on GitHub ↗