[BUG] InstructionsLoaded hook does not fire on /clear despite instructions being reloaded from disk

Resolved 💬 2 comments Opened Mar 5, 2026 by shanraisshan Closed Apr 2, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The InstructionsLoaded hook does not fire when the user runs /clear (or its aliases /reset, /new).

According to the docs, /clear reloads CLAUDE.md and .claude/rules/*.md files from disk — meaning if those files were modified mid-session, the changes are picked up after /clear. However, the InstructionsLoaded hook is not triggered during this reload.

This creates an observability gap: the hook's purpose is to fire "when a CLAUDE.md or .claude/rules/*.md file is loaded into context," but it silently skips the /clear reload path.

Environment:

  • macOS 15.5 (Darwin 25.3.0)
  • - Claude Code latest version

What Should Happen?

The InstructionsLoaded hook should fire for each instruction file that gets reloaded when /clear is executed, with a new load_reason value such as "clear" or "context_reset" to distinguish it from the initial "session_start" load.

This would provide complete observability for instruction loading and allow hook consumers (logging, auditing, sound notifications, etc.) to track all instruction load events consistently.

Error Messages/Logs

Steps to Reproduce

  1. Add an InstructionsLoaded hook to .claude/settings.json that logs to a file:

``json
"InstructionsLoaded": [{ "type": "command", "command": "echo 'InstructionsLoaded fired' >> /tmp/hook-log.txt" }]
``

  1. Start a new Claude Code session
  2. Check /tmp/hook-log.txt — the hook fires at session start (confirmed working)
  3. Run /clear in the session
  4. Check /tmp/hook-log.txt again — no new entry was added
  5. The hook did NOT fire despite instructions being reloaded into the new context

Expected: The hook should fire after /clear, since instructions are being re-read from disk and re-injected into context.

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.69 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

The InstructionsLoaded hook was added in v2.1.69. It correctly fires at session start with load_reason "session_start" and during lazy loading (nested traversal, path glob match, includes). The gap is specifically that /clear (and its aliases /reset, /new) re-reads instruction files from disk but does not trigger the hook.

This was discovered while building a voice notification system for all 19 Claude Code hooks (https://github.com/shanraisshan/claude-code-voice-hooks). The InstructionsLoaded sound plays on session start but goes silent after /clear, even though instructions are confirmed to be reloaded.

A new load_reason value (e.g. "clear" or "context_reset") would also help hook consumers distinguish between initial loads and reloads after context clearing.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗