Telegram plugin: MCP notifications not delivered to session despite successful mcp.notification()

Resolved 💬 3 comments Opened Apr 1, 2026 by 842414314-sudo Closed Apr 4, 2026

Bug Description

Telegram plugin's notifications/claude/channel messages are successfully sent via mcp.notification() but never appear in the Claude Code session. The plugin was working correctly until ~March 30, 2026 and then stopped receiving inbound messages.

Environment

  • Claude Code: v2.1.88
  • Plugin: telegram@0.0.4 (claude-plugins-official)
  • MCP SDK: @modelcontextprotocol/sdk 1.27.1
  • OS: macOS (Apple Silicon)
  • Runtime: Bun 1.3.11

What works

  • MCP handshake ✅ (tools appear in session)
  • Tool calls ✅ (reply, react, edit_message, download_attachment all work)
  • Bot polling ✅ (Telegram messages are consumed by bot)
  • gate() filter ✅ (allowlisted user passes)
  • mcp.notification() ✅ (.then() callback fires, no errors)

What doesn't work

  • ❌ Inbound Telegram messages never appear in the Claude Code conversation

Reproduction steps

  1. Install the official Telegram plugin, configure bot token and access
  2. Start a Claude Code session (plugin loads, tools are available)
  3. Send a message from Telegram to the bot
  4. Message never appears in the session

Debug evidence

1. Notification is correctly written to stdout

Ran the bot manually with MCP handshake, captured stdout. After sending a Telegram message, this appeared on stdout:

{"method":"notifications/claude/channel","params":{"content":"👀","meta":{"chat_id":"8210439955","message_id":"2826","user":"8210439955","user_id":"8210439955","ts":"2026-04-01T00:33:31.000Z"}},"jsonrpc":"2.0"}

2. Full pipeline confirmed via file logging

Added require("fs").appendFileSync("/tmp/telegram_debug.log", ...) at each stage:

2026-04-01T00:28:16.118Z bot.start OK, polling as @JS_Snake_Remote_Bot
2026-04-01T00:33:39.829Z gate passed, from 8210439955 chat=8210439955: "👀"
2026-04-01T00:33:39.830Z notification OK: "👀"

3. Server capabilities are correctly declared

{
  "capabilities": {
    "tools": {},
    "experimental": {
      "claude/channel": {},
      "claude/channel/permission": {}
    }
  }
}

4. When bot runs as Claude Code subprocess

  • lsof -p <pid> shows stdin/stdout/stderr connected via unix sockets back to Claude Code
  • Tool calls work through this same stdout pipe
  • But notifications/claude/channel messages are never surfaced in the conversation

Hypothesis

Claude Code's MCP client successfully reads tool call responses from the server's stdout but does not process or surface unsolicited server notifications (notifications/claude/channel). Since tool responses and notifications share the same stdout pipe, the transport layer works — it appears to be the notification handler/dispatcher that drops them.

Additional context

  • The plugin was working correctly from March 24–30 with the same configuration
  • Problem persists across multiple Claude Code restarts and a computer reboot
  • No 409 Conflict issues (bot.start() succeeds on first attempt)
  • curl getUpdates confirms Telegram API delivers messages correctly when no bot is polling

View original on GitHub ↗

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