explanatory-output-style plugin SessionStart hook causes startup error
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
- Enable the
explanatory-output-styleplugin ("explanatory-output-style@claude-plugins-official": truein settings.json) - Start a new Claude Code session
- Observe
SessionStart:startup hook errorin 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
hookSpecificOutputJSON from SessionStart hooks (as it does for PreToolUse/PostToolUse hooks), or - The
explanatory-output-styleplugin 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗