Channels: messages not delivered to session during idle REPL
Problem
When a Claude Code session is idle (waiting for user input at the REPL prompt), incoming Telegram channel messages are queued but not delivered to the model until the next terminal interaction. This means:
- User sends a Telegram message → Claude doesn't see it
- User has to type something in the terminal to "wake up" the session
- Only then does Claude receive and respond to the TG message
This makes the Telegram channel unreliable for remote/async workflows — e.g., a founder traveling who wants to send instructions via Telegram while their machine runs Claude Code at home.
Expected behavior
Channel messages should interrupt the idle REPL and be delivered to the model in real-time, similar to how a user typing in the terminal triggers a response.
Reproduction
- Start Claude Code with
--channels plugin:telegram@claude-plugins-official - Pair a Telegram user
- Wait for the REPL to go idle (no active tool calls, just waiting for input)
- Send a message from Telegram
- Observe: message is not processed until something happens in the terminal
Suggested implementation approaches
- REPL interrupt on MCP notification: When the channel plugin sends
notifications/claude/channel, the REPL could treat it like user input and wake the model to process it.
- Background polling loop: A lightweight periodic check (e.g., every 30-60s) that processes any queued channel notifications during idle.
- Event-driven wake: Register a callback on the MCP notification channel that signals the REPL's input loop to yield to the model.
Impact
This is a significant limitation for the Telegram channel's usefulness. The channel plugin itself works correctly (Grammy polling receives messages, MCP notification is sent), but the session layer doesn't process notifications during idle.
Users who rely on Telegram as their primary interface (e.g., mobile-only, traveling, managing servers remotely) experience this as "Claude randomly ignoring messages."
Environment
- Claude Code on Windows 10, Bash shell
- Telegram channel plugin v0.0.4
- Channel messages arrive correctly when session is actively processing (tool calls running, etc.)
🤖 Generated with Claude Code
4 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Update — additional finding:
The issue is worse than initially described. Channel notifications during idle appear to be dropped entirely, not queued.
Evidence:
CronCreatejob (every 5 min) to check for TG messagesThis suggests MCP channel notifications sent while the REPL is idle are silently discarded rather than buffered. The cron workaround doesn't help because there's nothing in the queue to process when it fires.
This makes Telegram channels essentially unusable for async/remote workflows.
Closing as duplicate of #44380 — added our findings there. The core issue is the same: REPL doesn't process MCP channel notifications during idle.
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.