claude-code - 💡(How to fix) Fix --channels flag never matches plugin server identifier — channel notifications always skipped [1 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#51845Fetched 2026-04-23 07:43:24
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

The Telegram plugin's inbound message delivery is completely broken. Channel push notifications are silently dropped by the harness due to an identifier-matching bug in the --channels flag implementation. The check_messages polling tool (the only workaround) was removed in plugin v0.0.6, leaving zero working paths for inbound messages.

This affects every --channels value — including the harness's own internal identifier for the server. The comparison itself is broken.

Error Message

The identifier in the error message (plugin:telegram:telegram) is the harness's own internal name for this server. Passing that exact string back via --channels still fails. The comparison itself is broken. 9. Verified plugin sends notifications (no error in plugin's catch handler)

Root Cause

Possible root causes:

  • The --channels argument may not be parsed at all (the list is always empty)
  • The CLI argument parser may be splitting on : and mangling the value
  • The comparison may use a different normalization than the identifier resolution
  • The --channels feature may be gated behind a flag that silently disables it

Fix Action

Workaround

Patched check_messages back into the local plugin source (server.ts). The plugin bot queues inbound messages in memory, and a CronCreate job calls check_messages every 3 minutes. This restores inbound messaging with a 0-3 minute delay. Fragile — any plugin auto-update overwrites the patch.

Code Example

{"debug":"Channel notifications skipped: server plugin:telegram:telegram not in --channels list for this session"}

---

March 27 (WORKING):
  Line 2: "Successfully connected to undefined server in 227ms"
  Line 4: "Channel notifications registered"

April 8+ (BROKEN):
  Line 2: "Successfully connected (transport: stdio) in 300ms"
  Line 4: "Channel notifications skipped: server plugin:telegram:telegram not in --channels list"

---

April 8 MCP log:
  Line 4: "Channel notifications skipped" (push broken)
  Line 5: "Calling MCP tool: check_messages" (poll workaround working)
  Line 6: "Tool 'check_messages' completed successfully in 19ms"
RAW_BUFFERClick to expand / collapse

Summary

The Telegram plugin's inbound message delivery is completely broken. Channel push notifications are silently dropped by the harness due to an identifier-matching bug in the --channels flag implementation. The check_messages polling tool (the only workaround) was removed in plugin v0.0.6, leaving zero working paths for inbound messages.

This affects every --channels value — including the harness's own internal identifier for the server. The comparison itself is broken.

Environment

  • OS: Windows 11 Home 10.0.26200
  • Claude Code: Tested on 2.1.104 and 2.1.117
  • Plugin: telegram@claude-plugins-official v0.0.6
  • Plugin runtime: Bun 1.3.11

The Bug

The harness resolves the Telegram MCP server's internal identifier as plugin:telegram:telegram. When the plugin sends a notifications/claude/channel MCP notification, the harness checks whether this identifier is in the --channels list. This check always fails, even when the exact string plugin:telegram:telegram is passed via --channels.

MCP log proof

Every session since ~April 8 logs this at startup (4ms after connection):

{"debug":"Channel notifications skipped: server plugin:telegram:telegram not in --channels list for this session"}

This appears regardless of what --channels value is passed:

InvocationResult
claude (no flag)"not in --channels list"
claude --channels plugin:telegram@claude-plugins-official"not in --channels list"
claude --channels plugin:telegram:telegram"not in --channels list"
claude --channels telegram"not in --channels list"

The identifier in the error message (plugin:telegram:telegram) is the harness's own internal name for this server. Passing that exact string back via --channels still fails. The comparison itself is broken.

Contrast with working session

The last working session (March 27, 2026) used an older harness version that auto-registered channels:

March 27 (WORKING):
  Line 2: "Successfully connected to undefined server in 227ms"
  Line 4: "Channel notifications registered"

April 8+ (BROKEN):
  Line 2: "Successfully connected (transport: stdio) in 300ms"
  Line 4: "Channel notifications skipped: server plugin:telegram:telegram not in --channels list"

The old harness didn't resolve a server identifier ("undefined server"). It auto-registered channel notifications for any MCP server declaring the experimental: { 'claude/channel': {} } capability. A harness update between March 27 and April 8 introduced the --channels opt-in requirement, but the identifier matching was implemented incorrectly.

Where the Bug Lives

The bug is in the Claude Code harness (compiled binary), in the code path that:

  1. Receives a notifications/claude/channel MCP notification from a connected server
  2. Looks up the server's identifier (resolves to plugin:telegram:telegram)
  3. Checks whether that identifier appears in the parsed --channels CLI argument
  4. This check returns false even when the strings are identical

Possible root causes:

  • The --channels argument may not be parsed at all (the list is always empty)
  • The CLI argument parser may be splitting on : and mangling the value
  • The comparison may use a different normalization than the identifier resolution
  • The --channels feature may be gated behind a flag that silently disables it

The log message "Channel notifications skipped: server {id} not in --channels list for this session" should be searchable in the harness source.

Secondary Issue: check_messages Tool Removed

On April 8, even though push notifications were already broken, inbound messages still worked because the plugin had a check_messages tool that Claude could call via cron to poll for queued messages:

April 8 MCP log:
  Line 4: "Channel notifications skipped" (push broken)
  Line 5: "Calling MCP tool: check_messages" (poll workaround working)
  Line 6: "Tool 'check_messages' completed successfully in 19ms"

Plugin v0.0.6 removed check_messages, leaving only: reply, react, download_attachment, edit_message. With push broken AND poll removed, there is no path for inbound messages.

Recommendation: Re-add check_messages to the official plugin as a fallback for environments where channel notifications don't work.

Timeline

DateHarnessPluginPushPollInbound
March 27Old (auto-register)Pre-0.0.6WorkingWorkingWorking
April 8New (--channels required)Pre-0.0.6BrokenWorkingWorking (via poll)
April 11+Newv0.0.6BrokenRemovedDead
April 21New (2.1.104 + 2.1.117)v0.0.6Broken (all values tried)RemovedDead

What Was Tried (exhaustive)

  1. Plugin reinstall (x2)
  2. Nuclear reset of channel state directory
  3. Claude Code downgrade 2.1.117 to 2.1.104
  4. --channels plugin:telegram@claude-plugins-official
  5. --channels plugin:telegram:telegram (exact match to harness identifier)
  6. --channels plugin:telegram
  7. --channels telegram
  8. Verified plugin connects fine (tools work, outbound replies work)
  9. Verified plugin sends notifications (no error in plugin's catch handler)
  10. Read plugin source — notification code is correct
  11. Compared working vs broken MCP logs — confirmed harness-side regression

Workaround

Patched check_messages back into the local plugin source (server.ts). The plugin bot queues inbound messages in memory, and a CronCreate job calls check_messages every 3 minutes. This restores inbound messaging with a 0-3 minute delay. Fragile — any plugin auto-update overwrites the patch.

Steps to Reproduce

  1. Install: claude plugins install telegram@claude-plugins-official
  2. Configure bot token in ~/.claude/channels/telegram/.env
  3. Pair a Telegram user via /telegram:access
  4. Start: claude --channels plugin:telegram:telegram
  5. Check MCP log — will show "Channel notifications skipped"
  6. Send a message from Telegram — bot receives it (typing indicator shows), but nothing appears in Claude Code

Key Files

  • MCP logs: %LOCALAPPDATA%\claude-cli-nodejs\Cache\C--Users-timeb\mcp-logs-plugin-telegram-telegram\
  • Plugin source: %USERPROFILE%\.claude\plugins\cache\claude-plugins-official\telegram\0.0.6\server.ts
  • Channel state: %USERPROFILE%\.claude\channels\telegram\

extent analysis

TL;DR

The most likely fix is to re-add the check_messages tool to the official Telegram plugin as a fallback for environments where channel notifications don't work, or to fix the identifier-matching bug in the --channels flag implementation.

Guidance

  1. Verify the --channels flag parsing: Check if the --channels argument is being parsed correctly and if the list is being populated as expected.
  2. Investigate the comparison logic: Look into the code that checks if the server identifier is in the --channels list to see if there's a normalization or comparison issue.
  3. Re-add the check_messages tool: Temporarily re-add the check_messages tool to the plugin as a workaround to restore inbound messaging functionality.
  4. Test with different --channels values: Try using different --channels values, such as plugin:telegram or telegram, to see if the issue is specific to the plugin:telegram:telegram identifier.

Example

No code example is provided as the issue is more related to the logic and parsing of the --channels flag rather than a specific code snippet.

Notes

The issue seems to be related to a regression introduced in the harness update between March 27 and April 8, and the removal of the check_messages tool in plugin v0.0.6 has left no working path for inbound messages.

Recommendation

Apply the workaround by re-adding the check_messages tool to the official Telegram plugin, as this will restore inbound messaging functionality until the identifier-matching bug in the --channels flag implementation is fixed.

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