Answer: The Claude Code SDK loads CLAUDE.md files from project locations such as `/CLAUDE.md` or `/.claude/CLAUDE.md`, from parent and child directories, from local files like `/CLAUDE.local.md`, and from the user location `~/.claude/CLAUDE.md`, depending on which `settingSources` are included. Status: Confirmed Entry: tool/claude-code/memory-and-context/claude-md-load-locations-sdk Revision: 1 Digest: sha256:6abc732c96b058b2 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:02:38Z Last changed: 2026-11-13T03:02:38Z Last verified: 2026-11-20T12:16:20Z Next check: 2026-11-21T12:16:20Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Project (root) | /CLAUDE.md` or `/.claude/CLAUDE.md | [1] | 2026-11-20 Project rules | /.claude/rules/*.md` and `.claude/rules/*.md | [1] | 2026-11-20 Project (parent dirs) | CLAUDE.md` files in directories above `cwd | [1] | 2026-11-20 Project (child dirs) | CLAUDE.md` files in subdirectories of `cwd | [1] | 2026-11-20 Local | /CLAUDE.local.md` and `CLAUDE.local.md | [1] | 2026-11-20 User | ~/.claude/CLAUDE.md | [1] | 2026-11-20 User rules | ~/.claude/rules/*.md | [1] | 2026-11-20 Sources: [1] Anthropic. "Use Claude Code features in the SDK". https://code.claude.com/docs/en/agent-sdk/claude-code-features.md Role: primary. Accessed: 2026-11-20T12:16:20Z Quote: "| Project (root) | `/CLAUDE.md` or `/.claude/CLAUDE.md` | `settingSources` includes `"project"` |" (Supports: Project (root)) Quote: "| Project rules | `/.claude/rules/*.md` and `.claude/rules/*.md` in every parent directory |" (Supports: Project rules) Quote: "| Project (parent dirs) | `CLAUDE.md` files in directories above `cwd` |" (Supports: Project (parent dirs)) Quote: "| Project (child dirs) | `CLAUDE.md` files in subdirectories of `cwd` |" (Supports: Project (child dirs)) Quote: "| Local | `/CLAUDE.local.md` and `CLAUDE.local.md` in every parent directory |" (Supports: Local) Quote: "| User | `~/.claude/CLAUDE.md` | `settingSources` includes `"user"` |" (Supports: User) Quote: "| User rules | `~/.claude/rules/*.md` | `settingSources` includes `"user"` |" (Supports: User rules) Published: 2026-11-20T02:57:11Z Snapshot SHA-256: 8a7292acc99a8ea9e7c03ef0e2e6819e91ba9a5a62f23bb905d41282e51deacc (captured 2026-11-20T12:16:16Z) 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]. Cross-check: not-available at 2026-11-20T12:16:20Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:16:20Z Last attempt: 2026-11-20T12:16:20Z Notes and limitations: Extracted automatically from a single official source (section "CLAUDE.md load locations"). Related: https://latestn.com/tool/claude-code/memory-and-context/context-window-and-compaction What consumes context in the Claude Code agent loop and how does automatic compaction work? https://latestn.com/tool/claude-code/memory-and-context/context-window-full What happens when the Claude Code context window fills up? https://latestn.com/tool/claude-code/memory-and-context/disable-added-context-reminders How do I turn off the extra context reminders Claude Code adds outside the system prompt? https://latestn.com/tool/claude-code/memory-and-context/auto-memory-storage-location Where does Claude Code store auto memory files? https://latestn.com/tool/claude-code/memory-and-context/check-session-context-usage How can I check my own Claude Code session's context usage? https://latestn.com/tool/claude-code/memory-and-context/choose-instruction-files How do I choose which CLAUDE.md or AGENTS.md instruction files Claude Code loads? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:02:38Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/memory-and-context/claude-md-load-locations-sdk/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-code/memory-and-context/claude-md-load-locations-sdk POST: https://latestn.com/dispute/tool/claude-code/memory-and-context/claude-md-load-locations-sdk with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/memory-and-context/claude-md-load-locations-sdk?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). Where does the Claude Code SDK load CLAUDE.md files from? Revision 1, last verified 2026-11-20T12:16:20Z. https://latestn.com/tool/claude-code/memory-and-context/claude-md-load-locations-sdk (accessed 2026-11-21T10:01:36Z). @misc{LatestN_tool_claude_code_memory_and_context_claude_md_load_locations_sdk_r1, title = {Where does the Claude Code SDK load CLAUDE.md files from?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/memory-and-context/claude-md-load-locations-sdk}}, note = {Revision 1; digest sha256:6abc732c96b058b2; last verified 2026-11-20T12:16:20Z; accessed 2026-11-21T10:01:36Z} } 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-code/memory-and-context/claude-md-load-locations-sdk