claude-code - 💡(How to fix) Fix [Bug] Telegram channel plugin: --channels dispatch fails with "--print" input error [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#47153Fetched 2026-04-13 05:40:03
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

The Telegram channel plugin (telegram@claude-plugins-official v0.0.5) MCP server starts and polls Telegram successfully, but claude --channels fails to dispatch incoming messages. The error log fills with:

Error: Input must be provided either through stdin or as a prompt argument when using --print

This line repeats for every incoming Telegram message (124K+ lines accumulated over ~3 days before I noticed).

Error Message

Error: Input must be provided either through stdin or as a prompt argument when using --print

Root Cause

The Telegram channel plugin (telegram@claude-plugins-official v0.0.5) MCP server starts and polls Telegram successfully, but claude --channels fails to dispatch incoming messages. The error log fills with:

Error: Input must be provided either through stdin or as a prompt argument when using --print

This line repeats for every incoming Telegram message (124K+ lines accumulated over ~3 days before I noticed).

Fix Action

Workaround

None found. The channel feature is non-functional. Killing the claude --channels process stops the error log growth but obviously disables the channel entirely.

Code Example

Error: Input must be provided either through stdin or as a prompt argument when using --print

---

cd ~/.claude/plugins/cache/claude-plugins-official/telegram/0.0.5
echo '{"jsonrpc":"2.0","method":"initialize","id":1,...}' | bun server.ts
RAW_BUFFERClick to expand / collapse

Summary

The Telegram channel plugin (telegram@claude-plugins-official v0.0.5) MCP server starts and polls Telegram successfully, but claude --channels fails to dispatch incoming messages. The error log fills with:

Error: Input must be provided either through stdin or as a prompt argument when using --print

This line repeats for every incoming Telegram message (124K+ lines accumulated over ~3 days before I noticed).

Steps to Reproduce

  1. Install the Telegram plugin via /install telegram
  2. Configure bot token in ~/.claude/channels/telegram/.env
  3. Pair a Telegram user (allowlist in access.json)
  4. Run claude --channels plugin:telegram@claude-plugins-official
  5. Send a message to the bot from Telegram

Expected Behavior

The message should be delivered to the active Claude Code session or queued for the next one.

Actual Behavior

  • The claude --channels process (PID visible in ps) stays alive but spawns no child processes (no bun server.ts running under it).
  • claude-channels-error.log accumulates the --print error for every incoming message.
  • claude-channels.log stays empty.
  • No bot.pid file is created, confirming the MCP server never starts under the channels runner.

Diagnosis

The MCP server itself is not the problem. Running it manually proves it works:

cd ~/.claude/plugins/cache/claude-plugins-official/telegram/0.0.5
echo '{"jsonrpc":"2.0","method":"initialize","id":1,...}' | bun server.ts

Output:

  • Returns valid MCP initialize response with claude/channel capability
  • Polls Telegram successfully (telegram channel: polling as @bot_name)
  • Emits proper notifications/claude/channel JSON-RPC for incoming messages

The failure is in the channels dispatch layer inside Claude Code — when it receives an MCP channel notification, it tries to spawn claude --print to handle it, but the message content is not passed correctly (either via stdin or as a prompt argument), causing the --print invocation to reject with the input error.

Environment

ComponentVersion
Claude Code2.1.104
Telegram plugin0.0.5
macOS26.2 (arm64)
Bun1.3.12
NodeN/A (plugin uses bun)

Workaround

None found. The channel feature is non-functional. Killing the claude --channels process stops the error log growth but obviously disables the channel entirely.

extent analysis

TL;DR

The most likely fix involves modifying the channels dispatch layer in Claude Code to correctly pass the message content to the claude --print invocation.

Guidance

  • Investigate the Claude Code source to identify where the claude --print command is being executed and ensure it is receiving the message content as either stdin or a prompt argument.
  • Verify that the MCP channel notification is being properly emitted and received by the channels dispatch layer.
  • Consider adding logging statements to the channels dispatch layer to better understand the data flow and identify where the message content is being lost.
  • Review the claude --channels command documentation to ensure it is being used correctly and that there are no additional configuration options or flags that need to be set.

Example

No code snippet can be provided without more information about the Claude Code source, but an example of how the claude --print command might be modified to accept input from stdin could be:

echo "message content" | claude --print

Alternatively, the message content could be passed as a prompt argument:

claude --print "message content"

Notes

The exact fix will depend on the specifics of the Claude Code source and how the channels dispatch layer is implemented. Without more information, it is difficult to provide a more detailed solution.

Recommendation

Apply a workaround by modifying the channels dispatch layer to correctly pass the message content to the claude --print invocation, as this will allow the channel feature to function correctly until a more permanent fix can be implemented.

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 [Bug] Telegram channel plugin: --channels dispatch fails with "--print" input error [1 comments, 2 participants]