Channels โ Messenger Integration
Even when you're away from the terminal, you can send tasks to Claude Code from Telegram, Discord, or iMessage and receive the results in the same chat.
[Telegram app] โโDMโโโบ [Telegram bot] โโMCPโโโบ [Claude Code session] โโโบ [File/terminal work]
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ [Result reply]
Channels is a research preview feature available from v2.1.80. The --channels flag syntax and protocol may change.
How It Differs from Remote Controlโ
| Feature | Remote Control | Channels |
|---|---|---|
| Direction | Continue controlling an existing session from mobile | Push external messages into a session |
| Interface | claude.ai/code or mobile app | Telegram, Discord, iMessage |
| Use case | Monitor/direct work in progress | Request tasks from chat, receive webhooks |
Prerequisitesโ
| Requirement | Description |
|---|---|
| Claude Code v2.1.80+ | Check with claude --version |
| claude.ai login | API key/Console auth not supported |
| Bun runtime | Required to run the plugin server |
| Messenger app | Telegram, Discord, or iMessage |
# Install Bun (macOS/Linux)
curl -fsSL https://bun.sh/install | bash
# Windows (PowerShell as Administrator)
powershell -c "irm bun.sh/install.ps1 | iex"
# Verify
bun --version
Supported Channelsโ
Telegramโ
-
Create a bot: In Telegram, open @BotFather โ
/newbotโ set a name/username (must end in "bot") โ copy the API token -
Install the plugin:
/plugin install telegram@claude-plugins-official
Run /plugin marketplace update claude-plugins-official and try again. If you're adding the marketplace for the first time, run /plugin marketplace add anthropics/claude-plugins-official.
- Activate the plugin:
/reload-plugins
If the /telegram:configure command isn't recognized right after installation, this step was skipped.
- Register the token:
/telegram:configure <your_token>
- Restart in Channels mode:
claude --channels plugin:telegram@claude-plugins-official
- Pair your device: DM the bot โ receive a 6-digit code โ approve it in the terminal:
/telegram:access pair <code>
/telegram:access policy allowlist
Discordโ
- Create a bot: Discord Developer Portal โ New Application โ Bot โ Reset Token
- Enable Message Content Intent: Bot settings โ Privileged Gateway Intents
- Invite to a server: OAuth2 โ URL Generator โ
botscope + permissions (View Channels, Send Messages, Read Message History, Attach Files, Add Reactions) - Install and configure the plugin:
/plugin install discord@claude-plugins-official
/reload-plugins
/discord:configure <token>
claude --channels plugin:discord@claude-plugins-official
iMessage (macOS only)โ
No separate bot token needed โ it reads the Messages database directly and replies via AppleScript.
/plugin install imessage@claude-plugins-official
claude --channels plugin:imessage@claude-plugins-official
You must grant your terminal Full Disk Access in macOS settings.
Security Configurationโ
Access Controlโ
Every channel is protected by a sender allowlist. Only allowed IDs can send messages; everything else is ignored.
# Check current status
/telegram:access
# Change the policy
/telegram:access policy allowlist # Allowlist only (recommended default)
/telegram:access policy pairing # Temporary, for adding new users
/telegram:access policy disabled # Disable the bot
# Add/remove users directly
/telegram:access allow <userID>
/telegram:access remove <userID>
If a channel plugin declares the permission relay capability, users on the allowlist can approve/deny permission prompts through the channel. The official Telegram, Discord, and iMessage plugins support this capability. Only add users you trust.
Unattended Runs โ Bypassing Permission Promptsโ
If you need to run a remote session in an environment where permission relay isn't supported, you can skip the prompts entirely with --dangerously-skip-permissions.
claude --channels plugin:telegram@claude-plugins-official --dangerously-skip-permissions
This flag bypasses all tool approvals. Use it only in trusted environments โ your own local machine, an isolated server, etc.
Group Chatsโ
DMs and groups are managed independently:
# Register a group (responds only when mentioned)
/telegram:access group add <groupID>
# Respond to all messages
/telegram:access group add <groupID> --no-mention
# Allow only specific members
/telegram:access group add <groupID> --allow 111111,222222
Enterprise Environmentsโ
On Team/Enterprise plans, Channels is disabled by default.
- An admin must set
channelsEnabled: truein claude.ai Admin Settings - The allowed plugin list can be restricted with
allowedChannelPlugins - Pro/Max users can use it right away without an organization
Core Behaviorโ
The Session Is the Bot's Lifelineโ
Session open โ Bot connected โ Messages can be processed
Session closed โ Bot doesn't respond
New session โ Bot moves to the new session (previous session disconnects)
- You must keep the session running when launched with the
--channelsflag - For always-on operation, use a background process or a persistent terminal
- The session pauses when a permission prompt appears
Using Multiple Channels at Onceโ
claude --channels plugin:telegram@claude-plugins-official plugin:discord@claude-plugins-official
You can pass multiple plugins separated by spaces.
Limitationsโ
| Limitation | Description |
|---|---|
| Session required | If the session shuts down, messages can't be received |
| Authentication | claude.ai login required (API keys not supported) |
| Preview | Only plugins on Anthropic's allowlist can be used |
| Idle disconnects | Responses may become unstable after long periods without messages (fixed by restarting the session) |
Real usage insights, delivered free. Subscribe โ