InstructionsLoaded
Fires when a CLAUDE.md or .claude/rules/*.md file is loaded into context. This event fires at session start for eagerly-loaded files and again later when files are lazily loaded, for example when Claude accesses a subdirectory that contains a nested CLAUDE.md or when conditional rules with paths: frontmatter match. The hook doesn't support blocking or decision control. It runs asynchronously for observability purposes.
The matcher runs against load_reason. For example, use "matcher": "session_start" to fire only for files loaded at session start, or "matcher": "path_glob_match|nested_traversal" to fire only for lazy loads.
InstructionsLoaded input
In addition to the common input fields, InstructionsLoaded hooks receive these fields:
| Field | Description |
|---|---|
file_path | Absolute path to the instruction file that was loaded |
memory_type | Scope of the file: "User", "Project", "Local", or "Managed" |
load_reason | Why the file was loaded: "session_start", "nested_traversal", "path_glob_match", "include", or "compact". The "compact" value fires when instruction files are re-loaded after a compaction event |
globs | Path glob patterns from the file's paths: frontmatter, if any. Present only for path_glob_match loads |
trigger_file_path | Path to the file whose access triggered this load, for lazy loads |
parent_file_path | Path to the parent instruction file that included this one, for include loads |
{
"session_id": "abc123",
"transcript_path": "/Users/.../.claude/projects/.../transcript.jsonl",
"cwd": "/Users/my-project",
"hook_event_name": "InstructionsLoaded",
"file_path": "/Users/my-project/CLAUDE.md",
"memory_type": "Project",
"load_reason": "session_start"
}InstructionsLoaded decision control
InstructionsLoaded hooks have no decision control. They can't block or modify instruction loading. Claude Code discards their JSON output fields, such as systemMessage and continue. Use this event for audit logging, compliance tracking, or observability.