How Claude Code Turns CLAUDE.md Files Into Model Context
A research note on Claude Code v2.1.220 explains how a project's CLAUDE.md instructions reach the model, using a simple 'use pnpm, not npm' example. Instructions are assembled from several sources, including managed, user, project, local, and auto-memory files, and the working directory determines which instruction files are discovered. Discovered instructions are combined rather than merged like configuration settings, so contradictory guidance is not resolved automatically. Files can also pull in others through @path imports, which are resolved relative to the importing file and limited to four recursive hops. The author notes the piece separates internal observations from what current public documentation states.
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