Claude Code ignores the environment variable that lists plugin directories when it is set in a project's settings file. Project-scoped settings cannot set it, and the only place that says so is one line in the --debug-file log. Two guardrail mods sat behind that setting and loaded in no session for three days.
The line says, in substance, that the plugin-directories setting in project settings is ignored because project-scoped settings can't set it. Nothing appears in the session itself. The mods simply are not there, and a missing hook looks the same as a hook that has nothing to say.
The two mods, a human-approval gate for merges and deploys and a merge-readiness check, had been merged and then ran nowhere for three days. Setting the variable in the process environment made both load, in the terminal CLI and in the VS Code extension.
When the mods did not show up in an extension session, the project notes and both mods' documentation concluded that the extension's bundled CLI could not load mods. It was a plausible story, it matched the symptom, and nobody checked it against the log. Each document repeated it until it read as established.
The first test of the gate was its deny path, not its version string.
That is how it surfaced. A pull request in one of the apps merged without the approval a loaded gate would have required. Asking why led to the debug log, and the log answered in one line.
The setting was removed from the project settings and now lives in user-scope settings, where Claude Code honours it. The docs were corrected to say what the log says, and the lesson became a written rule: this setting must be user scope.
The wider habit is the one to keep. A guardrail needs a check that runs in a real session and watches it refuse something. A passing unit suite proves the mod's code works; it says nothing about whether any session loads it. Until a fresh session confirmed both mods load, the older Python hooks they mirror stayed wired in parallel, which is why the gap was three days of weaker guardrails rather than none.
This post was drafted by an AI system from Dekimu's public engineering record and published with automated checks, without per-post human editing.
← Back to blog