Sometimes Claude Code asks a question directly in the terminal, for example:
1. Yes
2. Yes, and don't ask again
3. No
Right now, this question cannot be answered from Telegram.
The reason is that this prompt is not sent through MCP. It is part of Claude Code’s own terminal UI and waits for input from stdin. Since hdcd-telegram runs as an MCP server inside Claude Code, it cannot control that terminal input.
So Telegram can send messages to Claude Code, but it cannot answer Claude Code’s own terminal prompts.
Idea 1: Add a runner mode
One possible solution is to add a new mode where hdcd starts and manages Claude Code itself.
Current architecture:
Claude Code → starts hdcd-telegram as MCP server
Possible new architecture:
hdcd-runner → starts Claude Code → connects it to Telegram
In this mode, hdcd would control the Claude Code process from the outside.
When Claude Code asks a question, hdcd-runner could send that question to Telegram with buttons. The user selects an answer in Telegram, and hdcd-runner sends the answer back to Claude Code.
This would make Telegram a real remote control interface for Claude Code.
This approach is probably the cleanest long-term solution, especially for router mode, because router mode already maps Telegram topics to different Claude Code sessions.
Idea 2: Use hooks for approval prompts
A smaller solution would be to use Claude Code hooks.
When Claude Code asks for permission, a hook could send the request to Telegram. Telegram would show buttons like:
Allow
Deny
Allow always
Then the hook would wait for the user’s answer and return the decision to Claude Code.
This would be easier to add than a full runner mode.
The downside is that it may be less reliable. For example, if the user does not answer in Telegram, the hook may block or time out. It would also need careful handling of pending requests, cancellations, and session routing.
Summary
The problem is not router mode itself. Router mode solves Telegram routing between multiple sessions.
The missing part is answering Claude Code’s own terminal prompts from Telegram.
There are two possible directions:
- Runner mode —
hdcd starts and manages Claude Code, so it can handle interactive prompts properly.
- Hook-based approval bridge — use hooks to forward permission prompts to Telegram and return the user’s choice.
Runner mode is cleaner long-term. Hooks are probably easier as a first step.
Sometimes Claude Code asks a question directly in the terminal, for example:
1. Yes2. Yes, and don't ask again3. NoRight now, this question cannot be answered from Telegram.
The reason is that this prompt is not sent through MCP. It is part of Claude Code’s own terminal UI and waits for input from stdin. Since
hdcd-telegramruns as an MCP server inside Claude Code, it cannot control that terminal input.So Telegram can send messages to Claude Code, but it cannot answer Claude Code’s own terminal prompts.
Idea 1: Add a runner mode
One possible solution is to add a new mode where
hdcdstarts and manages Claude Code itself.Current architecture:
Claude Code → starts hdcd-telegram as MCP serverPossible new architecture:
hdcd-runner → starts Claude Code → connects it to TelegramIn this mode,
hdcdwould control the Claude Code process from the outside.When Claude Code asks a question,
hdcd-runnercould send that question to Telegram with buttons. The user selects an answer in Telegram, andhdcd-runnersends the answer back to Claude Code.This would make Telegram a real remote control interface for Claude Code.
This approach is probably the cleanest long-term solution, especially for router mode, because router mode already maps Telegram topics to different Claude Code sessions.
Idea 2: Use hooks for approval prompts
A smaller solution would be to use Claude Code hooks.
When Claude Code asks for permission, a hook could send the request to Telegram. Telegram would show buttons like:
AllowDenyAllow alwaysThen the hook would wait for the user’s answer and return the decision to Claude Code.
This would be easier to add than a full runner mode.
The downside is that it may be less reliable. For example, if the user does not answer in Telegram, the hook may block or time out. It would also need careful handling of pending requests, cancellations, and session routing.
Summary
The problem is not router mode itself. Router mode solves Telegram routing between multiple sessions.
The missing part is answering Claude Code’s own terminal prompts from Telegram.
There are two possible directions:
hdcdstarts and manages Claude Code, so it can handle interactive prompts properly.Runner mode is cleaner long-term. Hooks are probably easier as a first step.