docs: clarify whether UserPromptSubmit hook fires for MCP channel messages

Resolved 💬 1 comment Opened Apr 28, 2026 by ghost Closed May 30, 2026

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:

  1. Only interactive CLI input (user typing at the terminal)
  2. 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-keys injected 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.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗