asyncRewake hook output renders as visible <system-reminder> in terminal

Resolved 💬 3 comments Opened Apr 7, 2026 by nedlern Closed Apr 11, 2026

Bug

When a SessionStart hook with type asyncRewake returns output, it renders as a raw <system-reminder> block in the user's terminal prompt instead of being silently injected into the model's context.

Reproduction

  1. Add a SessionStart hook in .claude/settings.json:
{
  "hooks": {
    "SessionStart": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "asyncRewake",
            "command": "echo 'background check result'"
          }
        ]
      }
    ]
  }
}
  1. Start or resume a session (claude or claude --continue)
  1. Observe the terminal displays:
❯ <system-reminder>
Stop hook blocking error from command "SessionStart:resume":
{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":"background check result"}}
</system-reminder>

Expected behavior

The hook's output should be injected as invisible context to the model, not rendered as raw XML/JSON in the terminal. The user should not see <system-reminder> tags or hookSpecificOutput JSON.

Environment

  • Claude Code CLI
  • macOS
  • The hook itself works correctly (returns valid output) — the bug is in how Claude Code renders asyncRewake output to the terminal

Notes

The "Stop hook blocking error" message suggests the asyncRewake type may be falling through to an error handling path that dumps raw output instead of the intended silent injection path.

View original on GitHub ↗

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