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

  1. Enable hookify plugin (its hooks.json declares PreToolUse, PostToolUse, Stop, and UserPromptSubmit hooks).
  2. In ~/.claude/settings.json, have your own entries for PreToolUse/PostToolUse/Stop but no entry for UserPromptSubmit.
  3. Run /plugin → disable hookify → enable hookify/reload-plugins.
  4. 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-plugins after toggling hookify rewrites the file with null for UserPromptSubmit.
  • The same rewrite also reorders keys alphabetically and swaps inner key order (type/commandcommand/type, matcher moved after hooks), suggesting it's the harness's own JSON serializer that's emitting the null placeholder.
  • Looks like the merge between user settings and plugin-contributed hooks materializes a slot for every plugin-declared event but writes null when the user has no entries for that event.

Workaround

Manually delete the "UserPromptSubmit": null line. It comes back on the next plugin toggle/reload.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗