docs: clarify whether UserPromptSubmit hook fires for MCP channel messages
Summary
The hooks documentation states that UserPromptSubmit "runs when the user submits a prompt, before Claude processes it." It is unclear whether MCP channel messages (e.g. from the official Telegram plugin) count as "user submitting a prompt" for the purpose of this hook.
Context
I run a persistent Claude Code session that receives most of its input via MCP channel messages (Telegram plugin), not interactive CLI input. I want to add a UserPromptSubmit hook for identity reinforcement — injecting a short context block before each response.
The docs don't specify whether UserPromptSubmit fires for:
- Only interactive CLI input (user typing at the terminal)
- All user turns, including messages injected by MCP channel plugins (e.g.
<channel source="plugin:telegram:telegram" ...>)
What I'd like
A clarification in the hooks documentation specifying which input sources trigger UserPromptSubmit. Specifically:
- Does it fire for MCP channel messages (e.g. Telegram plugin)?
- Does it fire for
tmux send-keysinjected input? - Does it fire only for interactive CLI input?
This matters for anyone building hooks that need to run on every turn regardless of input source.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗