Telegram plugin (and all stdio MCP plugins) disconnect after minutes of inactivity - makes messaging channels unusable
Resolved 💬 5 comments Opened Apr 11, 2026 by loganratix Closed Jun 13, 2026
The Telegram channel plugin disconnects after roughly 5-10 minutes of conversation inactivity because Claude Code closes stdio MCP child processes when a session goes idle.
This makes the plugin completely unusable for its intended purpose - being reachable via Telegram when away from the computer. The connection only stays alive while actively using the conversation, which defeats the point of a messaging bridge.
Key findings from investigating the code:
- Claude Code's StdioClientTransport closes the pipe when the session ends
- server.ts detects EOF/orphan state and shuts down (lines 635-664)
- Stdio transports are explicitly excluded from automatic reconnection in cli.js - only SSE/HTTP transports get retry logic
- There is no exposed config (settings.json, .mcp.json) to control session lifetime or enable persistence for stdio servers
Requested fix (any of these would solve it):
- Add a
persistent: trueflag in .mcp.json that keeps stdio servers alive across conversations - Enable auto-reconnect for stdio transports (already works for SSE/HTTP)
- Add a configurable idle timeout so channel plugins aren't killed after minutes of inactivity
- Allow stdio plugins to opt into the LSP-style restartOnCrash / maxRestarts behaviour that already exists in the LSP server schema
Environment: macOS, Claude Code desktop app, Telegram plugin v0.0.5
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗