settings.json gets "UserPromptSubmit": null written when a plugin contributes that hook
Resolved 💬 1 comment Opened Apr 26, 2026 by Smiie-2 Closed May 30, 2026
Environment
- Claude Code: 2.1.119
- OS: Linux (PikaOS)
- Plugin:
hookify@claude-plugins-official(Anthropic-published)
Repro
- Enable
hookifyplugin (itshooks.jsondeclaresPreToolUse,PostToolUse,Stop, andUserPromptSubmithooks). - In
~/.claude/settings.json, have your own entries forPreToolUse/PostToolUse/Stopbut no entry forUserPromptSubmit. - Run
/plugin→ disablehookify→ enablehookify→/reload-plugins. - Inspect
~/.claude/settings.json.
Expected
Either no UserPromptSubmit key at the user level, or an empty array.
Actual
Claude Code writes:
"hooks": {
...
"Stop": [ ... ],
"UserPromptSubmit": null
}
/doctor then flags it:
Settings (~/.claude/settings.json › hooks.UserPromptSubmit):
Expected array, but received null
Notes
- Reproducible: each
/reload-pluginsafter togglinghookifyrewrites the file withnullforUserPromptSubmit. - The same rewrite also reorders keys alphabetically and swaps inner key order (
type/command→command/type,matchermoved afterhooks), suggesting it's the harness's own JSON serializer that's emitting thenullplaceholder. - Looks like the merge between user settings and plugin-contributed hooks materializes a slot for every plugin-declared event but writes
nullwhen the user has no entries for that event.
Workaround
Manually delete the "UserPromptSubmit": null line. It comes back on the next plugin toggle/reload.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗