Plugin SessionStart hooks execute but additionalContext stdout is silently discarded
Resolved 💬 6 comments Opened Apr 8, 2026 by ssilvius Closed Apr 8, 2026
Problem
Plugin SessionStart hooks execute successfully (side effects work) but their stdout JSON containing hookSpecificOutput.additionalContext is silently discarded. The injected context never appears in the agent conversation.
Stop hooks in the same plugin work correctly (blocking error prompts appear). Only SessionStart additionalContext is affected.
Reproduction
- Install a plugin with this hooks.json:
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh",
"timeout": 10
}
]
}
]
}
}
- session-start.sh outputs valid JSON:
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "This text should appear in conversation context"
}
}
- Start a new interactive terminal session
Expected: additionalContext text appears as a system-reminder in conversation context
Actual: Hook executes (file side effects work), stdout is discarded, no context injected
Evidence
- Hook execution confirmed via file markers (touch commands in the script create files)
- Plugin loading confirmed via channel MCP tools appearing in deferred tools list
- Manual execution of the script produces valid JSON
- Stop hooks in the same plugin/hooks.json work correctly
- Tested across 4 agents in different project directories, all consistent
- Same hooks.json format that works for settings.json hooks
Environment
- Claude Code latest (2026-04-08)
- Plugin installed at user scope
- macOS Darwin 25.3.0
- Interactive terminal sessions (not --print mode)
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗