# InstructionsLoaded Hook

> The event when a rule file is loaded for Claude.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** InstructionsLoaded, load_reason

## Think of it like

It is like a library card. It logs each book you take out.

## Definition

InstructionsLoaded is the hook event that fires when a CLAUDE.md or rule file loads for Claude to read. Rule files are the ones in .claude/rules. It fires at the start. It fires again when a file loads later, such as a CLAUDE.md in a subfolder Claude opens. The matcher picks the reason. It cannot block, so it is for logs.

## Example

Lucy wonders why Claude follows a rule she forgot about. Her hook logs each file, and she finds an old CLAUDE.md in a subfolder.

## Example code

```json
{
  "hooks": {
    "InstructionsLoaded": [
      { "matcher": "path_glob_match|nested_traversal", "hooks": [{ "type": "command", "command": "./log-instructions.sh" }] }
    ]
  }
}
```

Log only the files that load later.

## Why it matters

It shows which notes Claude is truly reading.

## Common mistake

Using it to stop a file from loading. It cannot block or change anything.

## Three principles

- **When a file loads.** CLAUDE.md, rules.
- **Now or later.** Five reasons.
- **Log only.** No block.

## Related terms

- [CLAUDE.md](https://learn.benibix.com/term/ai/claude-md)
- [CLAUDE.md Import](https://learn.benibix.com/term/ai/claude-md-import)
- [SessionStart Hook](https://learn.benibix.com/term/ai/sessionstart-hook)

---

Source: https://learn.benibix.com/term/ai/instructionsloaded-hook
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
