SessionStart hooks fire for disabled plugins (settings.local.json override ignored)
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Jan 21, 2026 · closed Feb 28, 2026
Bug Description
When a plugin is disabled via settings.local.json, its SessionStart hooks still execute, causing startup errors.
Steps to Reproduce
- Have a plugin enabled in
~/.claude/settings.json:
``json``
"enabledPlugins": {
"superpowers@claude-plugins-official": true
}
- Disable it via
~/.claude/settings.local.json:
``json``
"enabledPlugins": {
"superpowers@claude-plugins-official": false
}
- Start Claude Code
Expected Behavior
- The
settings.local.jsonoverride should be respected - Hooks from disabled plugins should not execute
- No startup error should occur
Actual Behavior
- Error displayed:
SessionStart:startup hook error - The plugin's
SessionStarthook still fires despite being disabled in local settings - The hook file exists and is valid (
~/.claude/plugins/cache/claude-plugins-official/superpowers/4.0.3/hooks/session-start.sh)
Environment
- Platform: Windows 11
- Claude Code: Latest version
- Plugin: superpowers@claude-plugins-official
Analysis
It appears the hook registration/execution happens before settings.local.json overrides are merged with global settings, or the plugin cache doesn't check the enabled state before running hooks.
Workaround
Disabling the plugin in the global settings.json instead of settings.local.json prevents the error.
11 Comments
Important Update: Directory-Specific Behavior
After further investigation, this error only occurs in certain directories, not globally:
~/Projects/harrys-app(a non-git project directory)~(home directory where~/.claudefolder lives)Additional Context
The
harrys-appdirectory:.claudefolder or project-level settingsapp.py,CLAUDE.md,requirements.txt,.vscode/, and a few other filesRevised Theory
The hook loading behavior may differ based on:
~/.claudefolderThis suggests the issue isn't just about
settings.local.jsonbeing ignored, but rather a directory-context-dependent hook loading bug.Update: git init did NOT fix the issue
Initialized a git repository in the project directory, but the
SessionStart:startup hook errorstill occurs.This rules out the "not a git repo" theory. The issue persists even with:
.claudefolderWill continue investigating other potential causes.
Root Cause Analysis
The hook script runs correctly when invoked directly:
The Invocation Chain
Claude Code calls:
Which on Windows invokes:
The
-lflag creates a login shell, which sources profile files (.bash_profile,.bashrc, etc.).Likely Cause
The error appears to be in the startup invocation context, not the hook script itself. Possible issues:
CLAUDE_PLUGIN_ROOTenvironment variable not set correctly at startupEnvironment
C:\Program Files\Git\bin\bash.exeClarification: The Core Bug
I got sidetracked analyzing the hook script, but that's not the issue.
The actual bug: The superpowers plugin is disabled in
settings.local.json:Yet Claude Code still attempts to run its SessionStart hook.
A disabled plugin's hooks should never execute. The error occurs because Claude Code is trying to invoke a hook from a plugin that should be completely inactive.
Expected Behavior
settings.local.json→ hooks don't runActual Behavior
settings.local.json→ hooks still run (and error)The hook script working or not is irrelevant—it should never be called in the first place.
This is a Blocking Bug for Multi-Machine Setups
The
settings.local.jsonfile exists specifically to allow machine-specific overrides that don't get synced to other hosts.Use case: User syncs
~/.claude/settings.jsonacross machines via git, but needs to disable certain plugins on specific machines viasettings.local.json.Current behavior:
settings.local.jsonplugin overrides are ignored for hooks, forcing users to either:Neither workaround is acceptable. The
settings.local.jsonoverride mechanism needs to work for plugin hooks.Workaround Found
Project-level settings work, even though
settings.local.jsondoesn't.Creating
.claude/settings.jsonin the project directory successfully disables the plugin:Summary
| Settings Location | Plugin Override | Hooks Respected? |
|-------------------|-----------------|------------------|
|
~/.claude/settings.json| ✅ Works | ✅ Yes ||
~/.claude/settings.local.json| ❌ Ignored | ❌ No ||
<project>/.claude/settings.json| ✅ Works | ✅ Yes |The bug is specifically with
settings.local.json- it's not being applied to hook loading, while both global and project-level settings work correctly.Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I don't think it's a duplicate, but it is similar.
My issue was that the personal settings in
~/.claude/settings.local.jsonare not respected in other projects.For example, I had to create a
<project>/.claude/settings.jsonfile that also disables the same plugin that~/.claude/settings.local.jsondisables.Closing for now — inactive for too long. Please open a new issue if this is still relevant.
What is the point in the community reporting issues if you just IGNORE them?
Please make an effort to fix bugs and not just add new features otherwise you won't have a product users want to use!
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.