claude-code - 💡(How to fix) Fix Telegram plugin: channel notifications not delivered to conversation [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47116Fetched 2026-04-13 05:41:01
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

Telegram plugin (telegram@claude-plugins-official v0.0.5) receives messages, passes access gate, writes valid JSON-RPC notifications/claude/channel to stdout — but the message never appears in the Claude Code conversation. The bot shows "typing" briefly on the Telegram side and then nothing happens.

Error Message

  • mcp.notification() promise resolves without error

Root Cause

Root cause evidence

Fix Action

Fix / Workaround

Added instrumentation to server.ts including a monkey-patch on process.stdout.write to capture exactly what the MCP server sends. Full debug log from a test session:

Code Example

[2026-04-12T19:01:44.225Z] === server.ts starting ===
[2026-04-12T19:01:44.226Z] stdin writable=false stdout writable=true
[2026-04-12T19:01:44.417Z] bot.start onStart: polling as @rubencito3_bot
[2026-04-12T19:01:55.369Z] bot.on(message:text) from=8090174645 text="test"
[2026-04-12T19:01:55.373Z] handleInbound: about to send MCP notification — chat_id=8090174645 user=woloskim text="test" stdout.destroyed=false stdout.writable=true
[2026-04-12T19:01:55.374Z] stdout.write called: {"method":"notifications/claude/channel","params":{"content":"test","meta":{"chat_id":"8090174645","message_id":"39","user":"woloskim","user_id":"8090174645","ts":"2026-04-12T19:01:55.000Z"}},"jsonrpc":"2.0"}
[2026-04-12T19:01:55.375Z] handleInbound: MCP notification resolved OK
[2026-04-12T19:02:53.637Z] bot.on(message:text) from=8090174645 text="hola"
[2026-04-12T19:02:53.638Z] handleInbound: about to send MCP notification — chat_id=8090174645 user=woloskim text="hola" stdout.destroyed=false stdout.writable=true
[2026-04-12T19:02:53.639Z] stdout.write called: {"method":"notifications/claude/channel","params":{"content":"hola","meta":{"chat_id":"8090174645","message_id":"40","user":"woloskim","user_id":"8090174645","ts":"2026-04-12T19:02:53.000Z"}},"jsonrpc":"2.0"}
[2026-04-12T19:02:53.639Z] handleInbound: MCP notification resolved OK
RAW_BUFFERClick to expand / collapse

Telegram plugin: channel notifications not delivered to conversation

Description

Telegram plugin (telegram@claude-plugins-official v0.0.5) receives messages, passes access gate, writes valid JSON-RPC notifications/claude/channel to stdout — but the message never appears in the Claude Code conversation. The bot shows "typing" briefly on the Telegram side and then nothing happens.

Root cause evidence

Added instrumentation to server.ts including a monkey-patch on process.stdout.write to capture exactly what the MCP server sends. Full debug log from a test session:

[2026-04-12T19:01:44.225Z] === server.ts starting ===
[2026-04-12T19:01:44.226Z] stdin writable=false stdout writable=true
[2026-04-12T19:01:44.417Z] bot.start onStart: polling as @rubencito3_bot
[2026-04-12T19:01:55.369Z] bot.on(message:text) from=8090174645 text="test"
[2026-04-12T19:01:55.373Z] handleInbound: about to send MCP notification — chat_id=8090174645 user=woloskim text="test" stdout.destroyed=false stdout.writable=true
[2026-04-12T19:01:55.374Z] stdout.write called: {"method":"notifications/claude/channel","params":{"content":"test","meta":{"chat_id":"8090174645","message_id":"39","user":"woloskim","user_id":"8090174645","ts":"2026-04-12T19:01:55.000Z"}},"jsonrpc":"2.0"}
[2026-04-12T19:01:55.375Z] handleInbound: MCP notification resolved OK
[2026-04-12T19:02:53.637Z] bot.on(message:text) from=8090174645 text="hola"
[2026-04-12T19:02:53.638Z] handleInbound: about to send MCP notification — chat_id=8090174645 user=woloskim text="hola" stdout.destroyed=false stdout.writable=true
[2026-04-12T19:02:53.639Z] stdout.write called: {"method":"notifications/claude/channel","params":{"content":"hola","meta":{"chat_id":"8090174645","message_id":"40","user":"woloskim","user_id":"8090174645","ts":"2026-04-12T19:02:53.000Z"}},"jsonrpc":"2.0"}
[2026-04-12T19:02:53.639Z] handleInbound: MCP notification resolved OK

Key findings:

  • stdout.destroyed=false, stdout.writable=true — stdio pipe is alive
  • stdout.write is called with valid JSON-RPC
  • mcp.notification() promise resolves without error
  • The notification never appears in the Claude Code conversation

What works

  • Bot connects and polls successfully (grammy long-polling)
  • Access control gate works correctly (sender in allowFrom)
  • mcp.notification() does not throw or reject
  • MCP tools (reply, react, edit_message, download_attachment) are listed and available in the session
  • sendChatAction('typing') fires (user sees "typing" indicator in Telegram)

What doesn't work

  • notifications/claude/channel JSON-RPC messages written to stdout are not surfaced to the conversation by Claude Code

Steps to reproduce

  1. claude plugins install telegram@claude-plugins-official
  2. Configure bot token and pair a user via /telegram:configure and /telegram:access
  3. Start a Claude Code session (plugin loads, bot starts polling)
  4. Send a DM to the bot from the paired Telegram account
  5. User sees "typing" indicator, but message never appears in the conversation

Tested with the session idle (no user input at prompt) and while actively chatting — same result. Tested across multiple sessions and plugin reinstalls.

Environment

  • Claude Code: 2.1.101
  • Telegram plugin: 0.0.5 (claude-plugins-official)
  • grammy: 1.41.1
  • MCP SDK: 1.27.1
  • Bun: 1.3.12
  • Node: v25.8.1
  • macOS: Darwin 24.3.0 (arm64, Mac mini M2)

extent analysis

TL;DR

The issue may be resolved by verifying the JSON-RPC message format and ensuring it matches the expected format for notifications/claude/channel in Claude Code.

Guidance

  • Review the JSON-RPC message written to stdout to ensure it conforms to the expected format for notifications/claude/channel.
  • Verify that the method and params fields in the JSON-RPC message are correctly set.
  • Check the Claude Code documentation for any specific requirements or restrictions on the JSON-RPC message format.
  • Test the plugin with a minimal JSON-RPC message to isolate the issue.

Example

No code example is provided as the issue does not imply a specific code change, but rather a verification of the existing JSON-RPC message format.

Notes

The root cause of the issue is unclear, but it may be related to the JSON-RPC message format or the handling of the message by Claude Code. Further investigation is needed to determine the exact cause.

Recommendation

Apply a workaround by verifying and potentially modifying the JSON-RPC message format to match the expected format for notifications/claude/channel in Claude Code. This may involve checking the documentation for specific requirements or restrictions on the message format.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Telegram plugin: channel notifications not delivered to conversation [1 comments, 2 participants]