The InstructionsLoaded hook fires each time a CLAUDE.md or .claude/rules file enters context, at session start and again on lazy loads. It cannot block, so use it for observability. Log the file path and load reason, then alert when a session loads a file that is not in your approved set.
Read in this order
- OfficialHooks reference, InstructionsLoaded (Claude Code docs)Event timing, load_reason matchers, and the AGENTS.md case where it does not fire.
- OfficialHow Claude remembers your project (Claude Code docs)Which instruction files load, in what order, and how imports work.