Half of the "Claude Code is ignoring my rules" reports I see have the same root cause: the rule lives in a file Claude Code never loaded. The memory system reads a specific set of files, in a specific order, with a few loading rules that are easy to get backwards. Here is the full lookup order, verified against the official memory docs (code.claude.com/docs/en/memory) on 2026-07-31.

The four memory scopes

Claude Code merges memory from four locations, listed here from broadest to narrowest:

Scope

Path (macOS)