What Claude Code loads
CLAUDE.md, .claude/CLAUDE.md and CLAUDE.local.md from the working directory up, subdirectory files on demand, @imports (4 hops), .claude/rules with `paths`, and AGENTS.md when no CLAUDE.md exists.
Modelled from https://code.claude.com/docs/en/memory, checked 2026-10-03; checked against Claude Code 2.1.144. Status: GA.
Known gaps
- Assumes Claude Code is started at the repository root with the default `claude-md-or-agents-md` project-instructions setting.
- Reading AGENTS.md directly requires Claude Code v2.1.277 or later; earlier versions read CLAUDE.md only. The AGENTS.md fallback is modelled from the docs and not yet oracle-verified.
- User (~/.claude) and managed-policy files are outside the repository and are not shown unless --machine is used.
See it for your repository
Which files Claude Code loads for a given file, in precedence order, with token estimates:
npx threadctx explain src/index.ts --tool claude-code
Where Claude Code and the other agents disagree about the same directory:
npx threadctx diff