Study reveals which CLAUDE.md files load at launch versus on demand in Claude Code

Researchers tested six CLAUDE.md files placed at different directory levels in Claude Code v2.1.273 to determine exactly when each file is loaded into the model's context. Files in the parent directory, working directory, and CLAUDE.local.md were all present in the very first request, each costing around 1,600 tokens. Subdirectory files were not loaded at launch but appeared later when Claude read files within those directories, at zero initial token cost. Files from directories passed via the --add-dir flag never reached the model at all unless a specific environment variable was set. The findings confirm and quantify the documented loading behavior: hierarchy-above files load at launch, subdirectory files load on demand, and --add-dir files are excluded by default.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in