This article provides a technical guide for debugging issues where Claude Code appears to ignore user-defined rules. It outlines a three-step process: first, verifying if the rule file is actually loaded into the context window using the `/context` command, second, understanding the two main lazy-loading behaviors for nested CLAUDE.md files and import chains, and third, implementing an `InstructionsLoaded` hook to log rule loading events in real-time. This hook, configured via `.claude/settings.json`, provides detailed information about which rules are loaded, when, and why, enabling faster identification of loading problems. AI
IMPACT Provides developers with methods to troubleshoot and ensure custom rules are correctly applied by AI coding assistants.
RANK_REASON The item describes a technical debugging process and configuration for a specific feature of a product.
Read on dev.to — Claude Code tag →
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →