Telegram plugin: bot polling not running — inbound messages never delivered
Bug Description
The Telegram channel plugin's bot polling (bot.start() via grammy) does not appear to run when the server is spawned by Claude Code's plugin runtime. As a result, inbound messages from Telegram are never delivered to the Claude conversation, while outbound reply tool calls work fine.
Environment
- OS: Windows 11 Pro 10.0.26100
- Claude Code: Latest (VSCode extension)
- Runtime: bun 1.3.11
- Plugin:
claude-plugins-official/telegram/0.0.1
Steps to Reproduce
- Configure Telegram bot token via
/telegram:configure <token> - Approve a user via
/telegram:access pair <code> - Set policy to
allowlist - Restart Claude Code
- Send a DM to the bot from Telegram
Expected Behavior
Message should appear in the Claude conversation as a <channel source="telegram" ...> notification.
Actual Behavior
- No message is delivered to the conversation
- The
replytool (outbound) works — messages are sent to Telegram successfully getUpdatesAPI shows messages are not consumed by the server's polling, meaningbot.start()is either not running or not polling
Diagnostic Evidence
- Manual server execution works perfectly:
```
$ cd ~/.claude/plugins/cache/claude-plugins-official/telegram/0.0.1
$ bun server.ts
telegram channel: polling as @claude_cafe24_pumpcenter_bot
{"method":"notifications/claude/channel","params":{"content":"1",...}}
{"method":"notifications/claude/channel","params":{"content":"1234",...}}
bot.start()` polls correctly and messages are received.
When run manually,
- Plugin-spawned server does not poll:
- After Claude Code restart,
curl getUpdatesreturns the user's messages (not consumed) - This confirms the grammy polling loop is not active in the plugin-spawned process
- Outbound works:
mcp__plugin_telegram_telegram__replysuccessfully sends messages, confirming the MCP stdio transport and bot API token are functional.
Hypothesis
The plugin runtime may not be awaiting or allowing the grammy bot.start() long-polling loop to run. The server code has void bot.start(...) at the bottom (fire-and-forget), which works in a standalone bun process but may be getting killed or blocked in the plugin sandbox.
Workaround
None found. Manual bun server.ts works but cannot integrate with Claude Code's MCP notification channel.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗