Register the SessionStart hook in the plugin manifest - #82
Open
ZackCS1997 wants to merge 1 commit into
Open
Conversation
hooks/hooks.json defines the SessionStart hook that injects the ruleset when ~/.claude/.i-have-adhd-always exists, but Claude Code only loads a plugin hooks file that the manifest points at. Without the "hooks" key, the file is never read and always-on mode silently never fires: the flag is set, the script is correct, and nothing happens. Verified by running hooks/always-on.sh directly (exits 0, emits the full ruleset) while no ADHD ruleset appeared at session start. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Always-on mode never activates.
hooks/hooks.jsoncorrectly defines theSessionStarthook that runshooks/always-on.sh, but Claude Code only loads a plugin's hooks file when the manifest points at it..claude-plugin/plugin.jsonhas nohookskey, so the file is never read.The failure is silent: the opt-in flag is set, the script is correct, and nothing happens.
Fix
One line in
.claude-plugin/plugin.json:Verification
On Windows 11 / Claude Code, with
~/.claude/.i-have-adhd-alwayspresent:sh hooks/always-on.shrun directly: exit 0, emits the full ruleset (~6.6 KB) — so the script and the flag were both fine.hookskey to the installed plugin's manifest: the ruleset is injected at session start as intended.🤖 Generated with Claude Code