Prerequisites
- A Telegram account
- A Telegram bot token — create one via @BotFather on Telegram
Setup
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....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.
Configure event filters
Choose which events this channel should receive: turn completions, tool calls, errors, or permission requests. Leave all enabled to receive everything.
Enable daily report (optional)
Toggle Daily Report on and set the delivery time if you want an automated daily coding summary.
Available commands
Send these commands to your bot in Telegram. The default prefix is/; you can change it in Settings → Chat Channels → Command Prefix.
| Command | Description |
|---|---|
/folder | Pick a project directory |
/agent | Choose 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 |
/cancel | Abort the current running task |
/sessions | List active sessions in the current folder |
/approve | Approve a pending permission request |
/approve always | Approve and auto-approve future requests of the same type |
/deny | Deny a pending permission request |
/search <keyword> | Search conversation history (returns up to 10 results) |
/today | View today’s coding activity summary |
/status | Show connection status for all configured channels |
/help | Display available commands |
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
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
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.