Plugin hooks returning systemMessage: content not injected into model context

Resolved 💬 3 comments Opened Feb 15, 2026 by prodan-s Closed Feb 15, 2026

Summary

Plugin hooks (from installed Claude Code plugins) that return {"systemMessage": "..."} in their JSON output do not get the message injected into the model's context. Native hooks (configured directly in settings.json) DO get systemMessage injected correctly.

This is a Claude Code runtime issue, distinct from the plugin-side issue of which output fields to use (see anthropics/claude-plugins-official#292).

Reproduction Steps

  1. Install a plugin that uses systemMessage in hook responses (e.g., hookify from claude-plugins-official)
  2. Configure a rule that triggers on a specific event (e.g., UserPromptSubmit with a pattern match)
  3. Trigger the rule
  4. Observe: Claude Code shows hook success: Success in debug output, the hook process exits 0, and the JSON output includes {"systemMessage": "warning text here"}
  5. The model never sees the message content — it is silently dropped

Expected Behavior

systemMessage returned from plugin hooks should behave identically to systemMessage returned from native hooks — the content should be displayed to the user (and ideally injected into the model's context if that's the documented behavior for native hooks).

Actual Behavior

  • Native hooks (in settings.json): systemMessage content is processed and visible
  • Plugin hooks (from installed plugins): systemMessage content is silently dropped despite the hook executing successfully

Debug Evidence

With debug logging enabled on the hookify plugin:

[hookify] Hook executed successfully, exit code 0
[hookify] Output: {"systemMessage": "⚠️ [rule-name] Warning message here"}

Claude Code logs: hook success: Success — but the message content is never surfaced to the model or user.

Impact

This affects all plugins that rely on systemMessage for warn/remind behavior. Specifically:

  • hookify's action: warn is broken for all event types
  • Any plugin using the documented systemMessage field in hook responses gets silently ignored

The workaround (using hookSpecificOutput.additionalContext instead) works for PreToolUse/PostToolUse events but is not applicable to UserPromptSubmit or Stop events, which don't support hookSpecificOutput.

Environment

  • Claude Code: latest (as of 2026-02-15)
  • Plugin: hookify@claude-plugins-official
  • OS: macOS

Related Issues

  • anthropics/claude-plugins-official#292 — hookify-side: UserPromptSubmit warnings not visible (field name issue)
  • anthropics/claude-plugins-official#309 — hookify-side: CWD-dependent rule loading
  • #20747 — hookify-side: warns use systemMessage instead of additionalContext (different root cause — that's the plugin not using the right field; this issue is about Claude Code not processing the field at all for plugin hooks)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗