Answer: Claude Code looks in three places and merges what it finds, from broad to specific: ~/.claude/CLAUDE.md (every project on your machine), /CLAUDE.md (this project, the main one), and /CLAUDE.md (that subdirectory, loaded on demand). The order runs from broad to specific, so the project-root file is the main one and subdirectory files are loaded on demand rather than at session start. Status: Confirmed Entry: tool/claude-apps/memory-and-context/claude-md-file-locations Revision: 1 Digest: sha256:a362c02fa1659693 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:59:33Z Last changed: 2026-11-13T02:59:33Z Last verified: 2026-11-20T12:06:42Z Next check: 2026-11-21T12:06:42Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Broadest location | ~/.claude/CLAUDE.md | [1] | 2026-11-20 Project-root location | /CLAUDE.md | [1] | 2026-11-20 Subdirectory location | /CLAUDE.md | [1] | 2026-11-20 Precedence order | from broad to specific | [1] | 2026-11-20 Sources: [1] Anthropic. "Give Claude context: CLAUDE.md and better prompts | Claude Help Center". https://support.claude.com/en/articles/14553240-give-claude-context-claude-md-and-better-prompts Role: primary. Accessed: 2026-11-20T12:06:42Z Quote: "~/.claude/CLAUDE.md Every project on your machine" (Supports: Broadest location) Quote: "/CLAUDE.md This project Architecture, conventions, and commands. This is the main one." (Supports: Project-root location) Quote: "/CLAUDE.md That subdirectory (loaded on demand when Claude reads files in that directory, not at session start)" (Supports: Subdirectory location) Quote: "Claude looks in a few places and merges what it finds, from broad to specific" (Supports: Precedence order) Snapshot SHA-256: 4ec3a0367514f796ce185c88841ff00cd0febd3266196da4b8284eabe19c8c13 (captured 2026-11-13T02:59:33Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T02:59:33Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:06:42Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:06:42Z Last attempt: 2026-11-20T12:06:42Z Notes and limitations: Extracted automatically from a single official source (section "Where it lives"). Related: https://latestn.com/tool/claude-apps/memory-and-context/context-window-chat-paid-plans How large is the context window on paid Claude plans when chatting with Claude? https://latestn.com/tool/claude-apps/memory-and-context/context-window-claude-code How large is the context window in Claude Code on paid Claude plans? https://latestn.com/tool/claude-apps/memory-and-context/context-window-claude-cowork How large is the context window in Claude Cowork on paid Claude plans? https://latestn.com/tool/claude-apps/integrations/when-claude-suggests-apps When does Claude suggest a connected app during a conversation? https://latestn.com/tool/claude-apps/integrations/which-connectors-are-interactive Which connectors in Claude are interactive? https://latestn.com/tool/claude-apps/memory-and-context/automatic-context-management How does automatic context management work in Claude and how can I maximize my context window? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T02:59:33Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-apps/memory-and-context/claude-md-file-locations/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-apps/memory-and-context/claude-md-file-locations POST: https://latestn.com/dispute/tool/claude-apps/memory-and-context/claude-md-file-locations with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-apps/memory-and-context/claude-md-file-locations?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). Where does Claude Code look for CLAUDE.md files and which locations take precedence? Revision 1, last verified 2026-11-20T12:06:42Z. https://latestn.com/tool/claude-apps/memory-and-context/claude-md-file-locations (accessed 2026-11-21T10:07:31Z). @misc{LatestN_tool_claude_apps_memory_and_context_claude_md_file_locations_r1, title = {Where does Claude Code look for CLAUDE.md files and which locations take precedence?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-apps/memory-and-context/claude-md-file-locations}}, note = {Revision 1; digest sha256:a362c02fa1659693; last verified 2026-11-20T12:06:42Z; accessed 2026-11-21T10:07:31Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-apps/memory-and-context/claude-md-file-locations