explanatory-output-style plugin SessionStart hook causes startup error

Resolved 💬 3 comments Opened Mar 25, 2026 by fabiofranco85 Closed Mar 27, 2026

Description

The explanatory-output-style official plugin's SessionStart hook causes a SessionStart:startup hook error message to appear in the CLI startup banner every time a new session starts.

Root Cause

The hook at hooks-handlers/session-start.sh outputs structured JSON using the hookSpecificOutput format:

{
  "hookSpecificOutput": {
    "hookEventName": "SessionStart",
    "additionalContext": "You are in 'explanatory' output style mode..."
  }
}

Claude Code appears to not support the hookSpecificOutput JSON format for SessionStart hooks — it likely expects plain text stdout. The hook itself runs successfully (exits 0, produces valid JSON), but Claude Code reports it as an error.

Reproduction

  1. Enable the explanatory-output-style plugin ("explanatory-output-style@claude-plugins-official": true in settings.json)
  2. Start a new Claude Code session
  3. Observe SessionStart:startup hook error in the startup banner

Verification

  • Disabling the plugin eliminates the error
  • Running the hook manually produces valid output and exits with code 0:

``bash
echo '{}' | bash ~/.claude/plugins/cache/claude-plugins-official/explanatory-output-style/*/hooks-handlers/session-start.sh
# Outputs valid hookSpecificOutput JSON, exits 0
``

  • Other plugins (e.g., Vercel) use plain text stdout for SessionStart hooks and work fine

Expected Behavior

Either:

  • Claude Code should accept hookSpecificOutput JSON from SessionStart hooks (as it does for PreToolUse/PostToolUse hooks), or
  • The explanatory-output-style plugin should output plain text instead of structured JSON for its SessionStart hook

Environment

  • Claude Code v2.1.83
  • macOS (Darwin 25.3.0)
  • Model: Opus 4.6 (1M context)

🤖 Generated with Claude Code

View original on GitHub ↗

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