sdk/apps/cli/src/connectors/adapters/telegram.md
The Telegram connector bridges a Telegram Bot API bot into Cline CLI sessions. It is a polling connector, so it does not need a public webhook URL. The connector process must stay running while Telegram access is active.
Create a bot with @BotFather:
@BotFather./newbot and follow the prompts.@.Start the connector:
cline connect telegram -m my_bot -k "$TELEGRAM_BOT_TOKEN"
Useful variants:
# Keep logs in the active terminal while debugging.
cline connect telegram -i -m my_bot -k "$TELEGRAM_BOT_TOKEN"
# Read credentials from env vars.
TELEGRAM_BOT_USERNAME=my_bot TELEGRAM_BOT_TOKEN=123456:ABCDEF... cline connect telegram
# Override the workspace and model used for Telegram sessions.
cline connect telegram -m my_bot -k "$TELEGRAM_BOT_TOKEN" --cwd /path/to/repo --provider cline --model openai/gpt-5.3-codex
# Disable tools for untrusted Telegram surfaces.
cline connect telegram -m my_bot -k "$TELEGRAM_BOT_TOKEN" --no-tools
# Stop Telegram connector processes and sessions.
cline connect --stop telegram
After the connector starts, send /help or /start to the bot in Telegram.
Y and N replies.The Telegram connector uses the shared connector command parser:
/help or /start - show connector help/new or /clear - start a fresh session for the current thread/whereami - show thread, cwd, tools, and yolo state/tools [on|off|toggle] - allow or block repo/file/shell tools/yolo [on|off|toggle] - auto-approve tool use/cwd <path> - change working directory/schedule create/list/trigger/delete - manage scheduled workflows/abort - stop the current task/exit - stop the connectorIn Telegram groups, bot-addressed commands such as /help@my_bot are normalized only when the suffix matches the configured bot username. Commands addressed to another bot are left unmatched.
Tools are enabled by default for Telegram sessions. That means anyone who can successfully message the bot may be able to ask it to inspect or change the configured workspace.
Use --no-tools when the Telegram surface is not trusted:
cline connect telegram -m my_bot -k "$TELEGRAM_BOT_TOKEN" --no-tools
When the connector starts with --no-tools, chat commands such as /tools on and /yolo on cannot re-enable tools for that connector run.
For participant restrictions, run the interactive connector wizard with cline connect or pass a --hook-command that returns {"action":"deny"} for unauthorized session.authorize events. If no hook is configured, messages are allowed.
Telegram final assistant replies are sent directly through Telegram sendMessage payloads with message entities. This avoids Telegram markdown parse failures for raw model text. If entity sending fails, the connector falls back to raw text.
Long final assistant replies are split across Telegram messages. Tool/status updates and scheduled delivery messages use the adapter's raw thread posting path.
Telegram final assistant replies are sent after the runtime turn completes. Google Chat and WhatsApp use the shared connector runtime streaming path for incremental assistant text.
To deliver a scheduled run result back to Telegram, create the schedule from the Telegram chat when possible:
/schedule create "Daily summary" --cron "0 9 * * *" --prompt "Summarize yesterday's activity in this workspace."
Schedules created this way automatically target the current Telegram thread for delivery. You can also use /schedule list, /schedule trigger <schedule-id>, and /schedule delete <schedule-id> from Telegram.
If you are creating the schedule outside Telegram, first send /whereami in Telegram to get the thread id, then pass the delivery metadata to the CLI:
cline schedule create "Daily summary" \
--cron "0 9 * * *" \
--prompt "Summarize yesterday's activity in this workspace." \
--workspace /path/to/repo \
--delivery-adapter telegram \
--delivery-bot my_bot \
--delivery-thread telegram:123456789
The connector must be running when the scheduled result is delivered, and the target thread must have an existing thread binding.