Telegram plugin: inbound messages not delivered (grammy polling inactive under MCP stdio)
Bug Description
The Telegram plugin (v0.0.1) can send messages to Telegram (reply tool works), but never receives inbound messages from Telegram users. Messages sent to the bot are silently lost.
Environment
- Claude Code: v2.1.80
- Platform: macOS (Darwin 24.6.0, arm64)
- Runtime: Bun v1.3.11
- MCP SDK: v1.27.1
- Plugin:
telegram@claude-plugins-officialv0.0.1
Steps to Reproduce
- Install the Telegram plugin, configure bot token and pair a user
- Send a message from Telegram to the bot
- The message never appears in the Claude Code conversation
Diagnosis
Extensive debugging revealed:
- Bot token is valid —
getMeandgetWebhookInforeturn correct results - No webhook conflict — webhook URL is empty
- Access config is correct — user ID is in
allowFromallowlist - Outbound works — calling the
replytool successfully sends messages to Telegram - Bot process is alive — the MCP server process (bun) is running
- But grammy is NOT actively polling — calling
getUpdatesfrom an external script returnsok: truewith no conflict error, which should not happen if grammy's long polling is active - Telegram API works fine — calling
getUpdatesdirectly from a separate script successfully receives messages from the user
Root Cause
When server.ts is spawned by Claude Code as an MCP server (stdin/stdout used for JSON-RPC), void bot.start() (grammy's long polling) appears to become inactive while the process stays alive (kept running by the MCP stdio transport). The polling either never starts properly or silently stops shortly after startup.
The void prefix on bot.start() (line 594 of server.ts) means any rejection is silently swallowed, making this failure invisible.
Evidence
getUpdatesfrom external script: returns successfully (no "Conflict" error) → proves grammy is not polling- Direct
getUpdateswith 30s timeout: successfully receives user messages → proves Telegram API works pending_update_countingetWebhookInfo: 0 (expected, no webhook set)- Debug logs: zero entries related to telegram/channel/MCP notifications
Expected Behavior
Messages sent to the Telegram bot should be delivered to the Claude Code conversation via notifications/claude/channel.
Workaround
None currently available.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗