Telegram channel MCP drops mid-session; no way to check/manage context from channel
Summary
Two related issues with the Telegram channel plugin (research preview):
1. MCP transport drops mid-session
The Telegram channel MCP server (bun server.ts) stays alive (confirmed via ps aux) but Claude Code loses the MCP connection during normal usage. The channel becomes unresponsive — no messages arrive, reply/react tools disappear.
Repro:
- Start session:
claude --channels plugin:telegram@claude-plugins-official - Pair account, exchange several messages via Telegram
- Send a longer response (e.g. a digest with ~2KB of text via
replytool) - After some time, MCP tools (
reply,react,edit_message) disappear with "MCP server disconnected" - The
bun server.tsprocess is still running — only the MCP transport broke
Expected: MCP connection remains stable for the session lifetime, or auto-reconnects.
Environment:
- Claude Code v2.1.80
- macOS 14 (Darwin 24.6.0)
- Bun 1.3.11
- telegram plugin v0.0.1 from claude-plugins-official
2. Feature request: session context management from channel
When using Claude Code via Telegram (away from terminal), there's no way to:
- Check context window usage (
/costequivalent) - Trigger context compaction (
/compactequivalent) - Get session health status
These are built-in CLI commands with no programmatic API. When the primary interaction is via a channel (the whole point of channels — working while away from terminal), losing visibility into session health is a gap.
Proposed:
- Expose
/costand/compactas MCP tools or allow channels to invoke them - Or add a channel-aware auto-compact that notifies via the channel when context is getting high (e.g. >70%)
- At minimum, let channel users query context usage percentage
This would make channels viable for longer unattended sessions.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗