[Bug] Hookify plugin displays "hook error" messages for non-matching events despite successful exit

Resolved 💬 5 comments Opened Mar 18, 2026 by jordan-of Closed Apr 18, 2026

Bug Description
Bug: Hookify plugin hooks produce "hook error" messages on every event even when functioning correctly

Reporter: Jordan Dea-Mattson (GitHub: jordan-of, jordandm) — jordan-of@users.noreply.github.com
Version: Claude Code 2.1.77
Platform: macOS Darwin 25.2.0
Plugin: hookify@claude-plugins-official

Summary

When hookify is enabled and its hooks fire on events with no matching rules (UserPromptSubmit, PostToolUse), the user sees "hook error" messages on every interaction despite the hooks exiting 0 and
returning valid {} JSON.

Steps to Reproduce

  1. Enable hookify@claude-plugins-official in .claude/settings.json
  2. Create hookify rules for bash and file events only (no prompt-event rules)
  3. Use Claude Code normally — submit prompts, edit files

Observed Behavior

Every turn shows:
UserPromptSubmit hook error
PostToolUse:Write hook error
PostToolUse:Edit hook error

The hookify rules that DO match (e.g., warn-npx on PreToolUse:Bash) work correctly.

Investigation

Running hookify's hooks manually with separated stdout/stderr shows {} appearing on both stdout AND stderr, even though the Python code only writes to sys.stdout. This duplication doesn't occur when
running the same Python code directly — it appears to be an artifact of Claude Code's hook invocation environment. Claude Code likely treats any stderr output as an error condition and displays it.

Expected Behavior

When a hookify hook finds no matching rules and returns {} on exit 0, no error should be displayed to the user.

Workaround

None found. The errors are non-blocking (hookify exits 0), so functionality is unaffected, but the noise violates the "no unactionable warnings" principle.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.78
  • Feedback ID: c7d0787e-16a6-4638-898f-b108a95186c6

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at yX_ (/$bunfs/root/src/entrypoints/cli.js:2494:32895)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-18T01:08:49.346Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at yX_ (/$bunfs/root/src/entrypoints/cli.js:2494:32895)\n    at async M (/$bunfs/root/src/entrypoints/cli.js:4865:17741)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-18T01:08:50.492Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at yX_ (/$bunfs/root/src/entrypoints/cli.js:2494:32895)\n    at async k (/$bunfs/root/src/entrypoints/cli.js:4865:17025)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-18T01:08:50.497Z"}]

View original on GitHub ↗

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