hookSpecificOutput.additionalContext not injected into system prompt (Windows)
Resolved 💬 2 comments Opened Jun 21, 2026 by hhhhhhh520 Closed Jun 21, 2026
Bug Description
Plugin hooks that return hookSpecificOutput.additionalContext are executed successfully, but the content is NOT injected into the system prompt sent to the model.
Environment
- Claude Code version:
2.1.177 - Platform: Windows 11 (Git Bash)
- Shell:
/bin/bash.exe
Steps to Reproduce
- Install the
superpowersplugin (which has a SessionStart hook) - Start Claude Code with
claude --debug hooks - The hook executes successfully and returns
additionalContext(5632 chars) - Test injection: Modify the hook to add a unique marker (e.g.,
TESTMARKER_12345_67890) to theadditionalContextcontent - Start a new Claude Code session
- Ask the model: "Does your system prompt contain TESTMARKER_12345_67890?"
- Model responds: "No, I don't see that marker"
Expected Behavior
The additionalContext from the hook should be injected into the system prompt, and the model should be able to see it.
Actual Behavior
- Debug log shows:
Hook SessionStart provided additionalContext (5632 chars) - But the model cannot see the injected content
- No log entry confirms injection into the system prompt
Evidence
Debug log (b37dc0c7-d6fa-4fe6-8475-e956666f41f8.txt):
2026-06-21T08:58:16.347Z [DEBUG] Hook SessionStart:startup (SessionStart) success:
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers..."
}
}
2026-06-21T08:58:16.348Z [DEBUG] Hook SessionStart provided additionalContext (5632 chars)
But when asked, the model reports no knowledge of the injected content.
Additional Context
This is a bug in the injection mechanism itself, not related to the model. The TESTMARKER test proves that additionalContext is not being added to the system prompt at all, regardless of which model is being used.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗