Channels: messages not delivered to session during idle REPL

Resolved 💬 4 comments Opened Apr 15, 2026 by ppcvote Closed Apr 15, 2026

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:

  1. User sends a Telegram message → Claude doesn't see it
  2. User has to type something in the terminal to "wake up" the session
  3. 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

  1. Start Claude Code with --channels plugin:telegram@claude-plugins-official
  2. Pair a Telegram user
  3. Wait for the REPL to go idle (no active tool calls, just waiting for input)
  4. Send a message from Telegram
  5. Observe: message is not processed until something happens in the terminal

Suggested implementation approaches

  1. 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.
  1. Background polling loop: A lightweight periodic check (e.g., every 30-60s) that processes any queued channel notifications during idle.
  1. 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

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗