Setting up Claude Code channels with Telegram
Claude Code channels let you message a running Claude Code session from Telegram, Discord or iMessage. Claude does the work on your machine and replies in the chat. Setup takes five steps: a bot, a plugin, a token, a restart with the channel flag, and pairing. The catch is that messages only arrive while the session is open, so the Mac must stay on.
What channels are
A channel is an MCP server. It pushes events into a Claude Code session that is already running. It can be two way. Claude reads the message, works, and answers through the same chat. Anthropic's docs list Telegram, Discord and iMessage in the research preview (code.claude.com/docs/en/channels, October 2026).
This differs from Remote Control. Remote Control lets you drive your session from the Claude app. Channels bring in messages from other platforms, and webhooks too, such as a failed CI run.
Requirements
- Claude Code signed in with a claude.ai account or a Console API key. Channels do not work on Amazon Bedrock, Google Cloud or Microsoft Foundry.
- On Team and Enterprise plans an admin must turn channels on first. Pro and Max users without an organization can use them directly. The docs also say availability is rolling out gradually.
- Bun. The channel plugins are Bun scripts.
- A Telegram bot token from BotFather, for the Telegram channel.
Install the pieces
Install Claude Code and Bun with their official scripts.
curl -fsSL https://claude.ai/install.sh | bash curl -fsSL https://bun.com/install | bash
In Telegram, open BotFather and send the newbot command. Pick a name and a username ending in bot. Copy the token it returns. Then install the plugin. Inside Claude Code it is a slash command.
/plugin install telegram@claude-plugins-official
From a plain shell, the plugin CLI does the same thing. If the marketplace is missing, add it first.
claude plugin marketplace add anthropics/claude-plugins-official claude plugin install telegram@claude-plugins-official
We ran these on a GitHub hosted macOS 26 machine on October 2, 2026, with no login. The install worked. This is what it printed.
$ claude --version
2.1.287 (Claude Code)
$ bun --version
1.4.2
$ claude plugin install telegram@claude-plugins-official
Successfully installed plugin: telegram@claude-plugins-official (scope: user)
$ claude plugin list
telegram@claude-plugins-official
Version: 0.0.7
Scope: user
Status: enabledConnect the bot and pair
Inside Claude Code, save your token. It is stored in the telegram folder under channels in your Claude config folder.
/telegram:configure <token>
Then exit and start Claude Code again from the shell, with the channel flag.
claude --channels plugin:telegram@claude-plugins-official
Send any message to your bot. It answers with a pairing code. Approve the code in Claude Code, then lock the bot to your account only.
/telegram:access pair <code> /telegram:access policy allowlist
Two things confuse people here. The channel flag does not show in the help output during the preview, but it works. And the terminal shows the incoming message and a sent note, not the reply text. The reply appears in Telegram.
Discord instead of Telegram
The Discord steps follow the same shape. Create an application in the Discord Developer Portal and copy the bot token. Turn on Message Content Intent. Invite the bot to your server with permission to view channels, send messages and read history. Then install, configure and pair the same way. The restart line runs in the shell. The other lines run inside Claude Code.
/plugin install discord@claude-plugins-official /discord:configure <token> claude --channels plugin:discord@claude-plugins-official /discord:access pair <code> /discord:access policy allowlist
You can pass several plugins to the channels flag, separated by spaces. One session can then listen on both apps.
Keep the session open around the clock
Events reach only a session that is open. Close the terminal, let the Mac sleep, or reboot, and the bot goes quiet. Three things fix that. Turn off sleep. Run Claude Code inside tmux. Start that tmux session at login.
sudo pmset -a sleep 0 sudo pmset -a disksleep 0 sudo pmset -a displaysleep 10
This LaunchAgent starts a tmux session named channels with Claude Code and the Telegram channel. It checks every minute and does nothing if the session already exists. Save it as dev.local.claude-channels.plist in your LaunchAgents folder.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>dev.local.claude-channels</string>
<key>ProgramArguments</key>
<array>
<string>/bin/zsh</string>
<string>-lc</string>
<string>export PATH="$HOME/.local/bin:$HOME/.bun/bin:/opt/homebrew/bin:$PATH"; tmux has-session -t channels 2>/dev/null || tmux new -d -s channels -c "$HOME" "claude --channels plugin:telegram@claude-plugins-official"</string>
</array>
<key>RunAtLoad</key><true/>
<key>StartInterval</key><integer>60</integer>
</dict>
</plist>Install tmux first if you do not have it. Then load the agent and attach to check on Claude.
brew install tmux launchctl load ~/Library/LaunchAgents/dev.local.claude-channels.plist tmux attach -t channels
We tested this exact file on a GitHub hosted macOS 26 machine on October 2, 2026. Twenty seconds after loading it, launchd had created the session in the home folder, with Claude Code waiting inside.
$ tmux ls channels: 1 windows (created Fri Oct 2 04:21:09 2026) $ tmux capture-pane -pt channels Welcome to Claude Code v2.1.287
The session starts in your home folder. Put your project path in place of the home variable if you want Claude to start there. The first time, attach, answer the first-run questions and sign in.
One more stall to plan for. If Claude hits a permission prompt while you are away, the session waits for you. The docs mention a skip permissions flag for trusted machines. Read running Claude Code unattended safely before you use it.
Security notes
- Each channel keeps a sender allowlist. Messages from anyone else are dropped silently.
- Anyone on the allowlist can steer your session. If the plugin relays permission prompts, they can approve tool use too. Add only people you trust with your machine.
- Your bot token is a password. If it leaks, revoke it in BotFather and configure the new one.
- iMessage reads the Messages database and needs Full Disk Access. On a Mac you rent, that means signing your Apple ID into Messages on hardware you do not own. Telegram or Discord avoid that.
Running it on a MacRun Mac
Our agent plan already has Claude Code installed. You sign it in with your own Claude plan. The Mac never sleeps and its session survives reboots. You add Bun and the plugin, which takes a few minutes. Your laptop can then close, and the bot still answers.
Who does not need this. If you only want to steer a session from your phone, the Claude app's Remote Control does that without a bot. And if your Team plan admin has not turned channels on, a new Mac will not change that.
For the bigger picture, read running Claude Code 24/7 on a Mac.
Frequently asked questions
Do Claude Code channels need an API key?
+
No. Anthropic's docs say channels need claude.ai login or a Console API key. A Pro or Max login works, and Team or Enterprise needs an admin to enable channels.
Why does my Telegram bot not reply?
+
The bot can reply only while Claude Code is running with the channels flag. Check that the session is open and the Mac is awake.
Which channels does Claude Code support?
+
The research preview includes Telegram, Discord and iMessage, plus a local demo called fakechat. You can also build your own channel as an MCP server.
Why is --channels missing from claude --help?
+
Anthropic's docs say the channel flags are hidden from the help output during the research preview. They still work.