Telegram channel notifications silently dropped when CLI is idle after agent task completion

Status Fixed / completed
Maintainer reply None cached
Activity 3 comments · opened Mar 28, 2026 · closed Apr 1, 2026

Summary

Telegram MCP channel plugin delivers messages successfully (confirmed via ackReaction — bot reacts with 👀), but Claude Code does not process the MCP notifications/claude/channel events when the CLI is in an idle/input-waiting state after an agent completes a task.

Environment

  • macOS (Darwin 25.3.0)
  • Claude Code CLI (latest)
  • Telegram plugin v0.0.4 (claude-plugins-official)
  • grammy-based long-polling, MCP stdio transport

Steps to Reproduce

  1. Start Claude Code with the Telegram channel plugin connected
  2. Send a message via Telegram — agent responds normally
  3. Have the agent complete a multi-step task (e.g., code implementation, document generation)
  4. Agent says something like "I'll organize the docs and wait for your next message"
  5. Send a new message via Telegram

Expected: Claude Code processes the notification and responds
Actual: No response. The message is silently dropped.

Observed Behavior

| Action | Result |
|--------|--------|
| Telegram message while CLI idle | No response (👀 ack reaction confirms plugin received it) |
| Send 2–3 repeated messages | Eventually gets a response |
| Type anything in CLI to "wake" session | Telegram messages work again |
| Agent completes another task | Back to unresponsive state |

Diagnosis

  • ackReaction: "👀" was added to access.json to verify plugin-side message receipt — plugin receives all messages correctly
  • mcp.notification({ method: 'notifications/claude/channel', ... }) is called without errors (the .catch() on line 945 of server.ts does not fire)
  • The issue is Claude Code's MCP notification event loop not processing incoming channel notifications when the CLI is waiting for user input after an agent task completes
  • This is not a plugin bug — the notification is sent over stdio but Claude Code doesn't act on it

Workaround

Currently the only workaround is to type something in the CLI to "activate" the session, after which Telegram messages are processed again — until the next agent task completion cycle.

Additional Context

The pattern suggests that after an agent finishes work and Claude Code returns to its input prompt, the MCP notification listener may be suspended or deprioritized. The fact that repeated messages (2–3x) sometimes break through suggests a race condition or buffering issue rather than a complete listener shutdown.

View original on GitHub ↗

3 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/37139
  2. https://github.com/anthropics/claude-code/issues/38259
  3. https://github.com/anthropics/claude-code/issues/36477

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

marlvinvu · 6 months ago

My Claude says your issue shares the same pattern as #38932 — the CLI's notification listener is suspended when idle after task completion, and only a manual keystroke wakes it. In #38932 the same behavior was found in Agent Teams where the lead session stops processing teammate responses until a key is pressed. The root cause identified there: the InboxPoller is a React hook tied to the Ink render loop, which throttles when idle.

github-actions[bot] · 6 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.