Skip to main content
The Telegram channel connects a Telegram bot to your Codeg workspace. Once connected, you can start tasks, send follow-up messages, approve permissions, and receive real-time agent notifications — all from Telegram. Codeg communicates with Telegram using the Bot API with HTTP long-polling. No webhook server or public URL is required.

Prerequisites

  • A Telegram account
  • A Telegram bot token — create one via @BotFather on Telegram

Setup

1

Create a bot via @BotFather

Open Telegram and start a chat with @BotFather. Send /newbot and follow the prompts to name your bot and choose a username. Copy the bot token BotFather provides — it looks like 123456789:ABCdef....
2

Open Chat Channels settings

In Codeg, go to Settings → Chat Channels.
3

Add a Telegram channel

Click Add Channel and select Telegram.
4

Enter the bot token

Paste the bot token from BotFather. Codeg saves it directly to the OS keyring — it is never written to disk or logged.
5

Configure event filters

Choose which events this channel should receive: turn completions, tool calls, errors, or permission requests. Leave all enabled to receive everything.
6

Enable daily report (optional)

Toggle Daily Report on and set the delivery time if you want an automated daily coding summary.
7

Click Connect

Codeg verifies the bot token with the Telegram API (getMe) and starts the long-polling loop. Send your bot a message in Telegram to confirm it responds.
You can add multiple Telegram channels simultaneously — for example, one for personal use and one shared with a team group chat. Each channel has independent event filters and credentials.

Available commands

Send these commands to your bot in Telegram. The default prefix is /; you can change it in Settings → Chat Channels → Command Prefix.
CommandDescription
/folderPick a project directory
/agentChoose an AI agent
/task <description>Create a session and start a task
/resume [ID]Resume the most recent session, or a specific session by ID
/cancelAbort the current running task
/sessionsList active sessions in the current folder
/approveApprove a pending permission request
/approve alwaysApprove and auto-approve future requests of the same type
/denyDeny a pending permission request
/search <keyword>Search conversation history (returns up to 10 results)
/todayView today’s coding activity summary
/statusShow connection status for all configured channels
/helpDisplay available commands
When a session is active, send any plain text message to continue the conversation.

Group chats

You can add your bot to a Telegram group. In group chats, Codeg only processes messages that mention the bot by username — for example, /task@YourBotName fix the login bug. This prevents the bot from responding to unrelated conversation.

Message format

Codeg sends Telegram messages using MarkdownV2 formatting:
  • Bold titles with an emoji indicator (ℹ️ for info, ⚠️ for warnings, for errors)
  • Bold field labels for structured data (agent type, stop reason, error details)
  • Automatic fallback to plain text if Telegram rejects the formatted message
ℹ️ *Turn Complete*
claude\_code session completed

*Stop Reason*: Completed

Event filters

Control which events Telegram delivers to this channel. Available event types:
  • Turn complete — agent finishes a response turn
  • Tool calls — agent invokes a tool (file read, shell command, etc.)
  • Errors — agent or channel errors
  • Permission requests — agent pauses to request approval
Set filters per channel in Settings → Chat Channels → [channel name] → Event Filters. Setting no filter means all events are delivered.

Troubleshooting

Bot does not respond to commands Verify the bot token is correct by checking /status in another connected channel, or reconnect the channel from settings. “Invalid bot token” error on connect The token was entered incorrectly or the bot was deleted via BotFather. Create a new bot and enter the new token. Messages stop arriving after a network interruption Codeg automatically retries with a 5-second backoff after polling errors and recovers the connection without requiring manual action.