Control from Telegram
With Telegram, you can follow an Explyt CLI session from your phone and continue it: write to the agent, stop it, answer permission requests and questions, and get notified when it finishes or hits an error.
Why it matters
The agent is working on a long task, and you need to step away from your computer. If it needs permission or clarification, the question comes to Telegram and you answer from your phone. The work doesn't stall until you're back.
How to set it up
Explyt has no shared bot, and our servers aren't involved: the CLI talks to the Telegram Bot API directly through your own bot created in BotFather.
-
Create a bot with
@BotFatherusing/newbotand copy the token. -
Open the BotFather mini app (the Open button in the chat with it), select your bot, and go to Threads Settings:
- turn on Threaded Mode. Setup fails without it, because each session gets its own topic;
- turn on Disallow users to create new threads.
These settings aren't in the classic
/mybotsmenu. -
In the CLI, type
/telegramand chooseSet up…. Paste the token. -
The CLI shows a one-time link and a QR code. Open the link on your phone within 5 minutes and tap Start.
The Telegram account that tapped Start becomes the only one that can control the agent. The bot ignores messages from other users, from groups, and forwarded or edited messages.
Setup stops and saves nothing if the token is wrong, Threaded Mode is off, or the bot already has a webhook. A webhook means another program uses the bot, so create a separate bot for the CLI.
The /telegram menu
| Item | What it does |
|---|---|
I'm away — ring the phone / I'm back | Marks that you've stepped away or come back. Applies to all terminal sessions |
Notifications | Notification mode: always, auto, or off |
Message during a run | What a message from your phone does while the agent works: steer or follow-up |
Re-pair the bot… | Pair the bot again |
Unpair… | Delete the bot's topics, the token, and all state |
Shortcuts: /telegram away and /telegram back. Typing in the terminal doesn't clear the "away" mark; only the command or the menu does.
Notifications
| Mode | What arrives |
|---|---|
auto (default) | While you're at the computer, silent notifications only for sessions open in Telegram. After /telegram away, with sound |
always | Permission requests, questions, and final answers always arrive with sound |
off | Nothing arrives. The bot still accepts commands and messages |
Permission requests and the agent's questions arrive as cards with buttons. A request is open in both the terminal and Telegram at once. The first answer counts, from either side.
Working in Telegram
Each session gets its own topic in the chat with the bot, but only on demand: when you open it through /sessions or when the session needs your answer while you're away. When the session ends, its topic is deleted.
Plain text in a session's topic goes to the agent. If the agent is working at the time, the message either adjusts the current task (steer) or waits for it to finish (follow-up), depending on the setting. For a single message, use /steer <text> or /later <text>.
Bot commands:
| Command | Where | What it does |
|---|---|---|
/sessions | Main chat | The list of running sessions; open selected ones as topics |
/notify | Main chat | Notification mode |
/delivery | Main chat | How messages behave while the agent works |
/unpair | Main chat | Unpair the bot |
/stop | Session topic | Stop the current task |
/history | Session topic | The latest dialog steps; the full history as a file |
/diff | Session topic | Files changed in the session and a .diff file |
/hide | Session topic | Hide the topic; the session keeps running |
While the agent works, the bot shows progress: elapsed time, step number, the latest tool calls, and a ⏹ Stop button. The final answer arrives in full, with tables and formatting, and with Diff and History buttons.
The agent won't run a message older than 10 minutes on its own (for example, one sent while the laptop was asleep): the bot asks whether to run it or discard it.
What leaves your computer
Telegram receives the agent's final answers, progress (tool names and their main argument, such as a command or a path), permission requests with the command, questions, and, on request, the history and changes.
Telegram bot chats are not end-to-end encrypted and are stored on Telegram's servers. If your project code must not go there, don't set up Telegram control, or turn off notifications.
The bot token is stored only in the credentials file in the agent's service folder and is never written to logs. Anyone with the token can read everything the bot receives.
Limitations
- Works only in the terminal. There is no Telegram control in the IDE or in subagents.
- You can't start a new session from Telegram: sessions are started in the terminal.
- While the computer sleeps or the terminal is closed, the bot doesn't respond.
- If several CLI processes are running, only one of them picks up new Telegram messages. When it exits, another one takes over.
- Deleting a topic in the Telegram app deletes it only for you. To hide a topic, use
/hide.