Skip to content

What is Claude Code Channels and How Does It Work with Telegram and Discord?

Problem

I was at a coffee shop when I got an urgent message. A production bug needed fixing immediately. But I only had my phone - no laptop, no terminal access.

Before Claude Code Channels, I had two options:

  1. Drive home to fix it (not ideal at 2 AM)
  2. Use OpenClaw - but that requires a dedicated Mac Mini, Docker, Node.js 22+, WebSocket gateway, and significant setup

Then I discovered Claude Code Channels. One flag, one bot token, and I could message my AI coding assistant from anywhere.

What is Claude Code Channels?

Claude Code Channels is a research preview feature that connects my Claude Code terminal session to Telegram or Discord through an MCP (Model Context Protocol) plugin.

When I enable it with the --channels flag, Claude Code spins up a polling service that monitors a messaging platform. I can then message my bot from my phone, Claude Code receives the instruction, executes it, and replies back in chat.

Here’s the basic flow:

Channels Architecture
+-------------+ +-------------+ +-------------+
| Phone | | MCP | | Claude |
| Telegram |---->| Plugin |---->| Code |
| Discord | | (Bun) | | Session |
+-------------+ +-------------+ +-------------+
|
v
+-------------+
| File |
| System |
+-------------+

How It Works

The architecture is straightforward. When I start Claude Code with Channels enabled:

Terminal window
# Start Claude Code with Channels
claude --channels

The system does this:

  1. Spins up a polling service - Monitors the messaging platform for new messages
  2. Connects via MCP plugin - Uses Bun runtime for the connection layer
  3. Provides full tool access - File edits, test runs, git operations, all available from chat

I tried sending a simple command from Telegram:

Telegram Message
"Edit src/auth.ts to add rate limiting"

Claude Code received it, made the edit, and sent back a summary. The whole process took about 30 seconds.

Setting Up Telegram

I went through the Telegram bot setup. It’s surprisingly simple:

Step 1: Create a Bot

Telegram Bot Creation
1. Open Telegram, search @BotFather
2. Send /newbot command
3. Follow prompts to name your bot
4. Copy the bot token (looks like: 1234567890:ABCdefGHI...)

Step 2: Connect to Claude Code

When I ran claude --channels, Claude Code prompted me for the bot token. I pasted it, scanned the QR code that appeared, and the connection was established.

Step 3: Test It

From my phone, I sent:

Test Commands
"What files are in the current directory?"
"Run npm test and show me failures"
"Create a new file called test.js with a hello world function"

Each command executed and returned results within seconds.

Setting Up Discord

Discord setup follows a similar pattern but with more steps:

Step 1: Create Discord Application

Discord Bot Setup
1. Go to Discord Developer Portal
2. Create New Application
3. Navigate to Bot section
4. Click "Add Bot"
5. Copy the bot token

Step 2: Invite Bot to Server

Bot Invitation
1. Go to OAuth2 section in Developer Portal
2. Select "bot" scope
3. Select permissions: Send Messages, Read Messages
4. Copy and open the generated URL
5. Select server to add bot

Step 3: Connect

Same as Telegram - provide the token when Claude Code prompts, and the connection is ready.

The OpenClaw Comparison

I had previously tried OpenClaw for remote Claude access. The comparison is stark:

Setup Complexity Comparison
Claude Code Channels:
- Flag: --channels
- Token: One bot token
- Time: ~5 minutes
OpenClaw:
- Hardware: Dedicated Mac Mini
- Software: Docker, Node.js 22+
- Infrastructure: WebSocket gateway
- Dependencies: 70+ packages
- Time: Hours of configuration

VentureBeat even called Channels the “OpenClaw killer.” While that might be hyperbolic, the difference in setup effort is real.

Here’s a feature comparison:

FeatureClaude Code ChannelsOpenClaw
Setup--channels flagDedicated Mac Mini + Docker
DependenciesPlugin + bot token70+ dependencies
PlatformsTelegram, Discord, custom20+ platforms
ModelsClaude only500+ via KiloClaw
Always-onRequires running sessionDesigned for always-on
Cost$20-200/mo subscriptionFree, self-hosted

Important Limitations

I learned about these limitations the hard way.

Session Must Be Active

Channels is NOT always-on. I need an active Claude Code session running on my computer for the bot to respond. If my laptop sleeps or the terminal closes, the connection dies.

This differs from OpenClaw, which is designed for 24/7 operation on dedicated hardware.

Permission Prompts Block Execution

When Claude Code hits a permission prompt while I’m away, the session pauses until I approve locally. This means:

Terminal window
# This works - no permission needed
"Show me the contents of package.json"
# This pauses - needs local approval
"Delete the dist folder"

The Dangerous Flag

There’s a flag for fully unattended use:

Terminal window
# For trusted environments only!
claude --dangerously-skip-permissions --channels

I used this once. Then I read the horror stories about deleted files and broken environments. Now I only use it inside Docker containers where nothing matters.

Subscription Requirements

Not everyone can use Channels. It requires:

TierPriceChannels Access
Free$0/moNo
Pro$20/moYes
Max$100-200/moYes

This is a research preview feature, so availability might change.

Real-World Use Cases

After using Channels for a few weeks, I found these scenarios most valuable:

1. Push Hotfixes from Anywhere

Remote Hotfix Example
Me (at dinner): "Run tests for auth module"
Bot: "All 23 tests passed"
Me: "Commit with message 'fix: rate limiting edge case'"
Bot: "Committed successfully to main"

2. Quick Code Reviews

During my commute, I reviewed a pull request:

Mobile Code Review
"What changed in the last commit?"
"Show me the diff for src/api/users.ts"
"Any security concerns in the auth changes?"

3. Debugging Remotely

When a teammate reported a bug:

Remote Debugging
"Check the logs for errors in the last hour"
"Find all occurrences of 'ValidationError' in the codebase"
"Show me the function that handles user registration"

Security Considerations

Bot tokens grant full access to my Claude Code session. I treat them like API keys:

Security Best Practices
DO:
- Use private bots only
- Use private Discord servers only
- Revoke tokens when compromised
- Store tokens in password manager
DON'T:
- Commit tokens to git
- Share bots publicly
- Use --dangerously-skip-permissions on important machines
- Leave sessions running unattended in public places

Common Mistakes

I made these mistakes so you don’t have to:

Mistake 1: Expecting Always-On

I left my laptop closed and expected the bot to respond. It didn’t. Channels requires an active session.

Mistake 2: Using —dangerously-skip-permissions Recklessly

I enabled this flag on my main development machine. Claude deleted some test files I was still using. Never again.

Mistake 3: Treating Bot Tokens Casually

I almost committed a bot token to GitHub. The token would have given anyone access to run arbitrary commands on my machine. I now use environment variables.

Mistake 4: Expecting Push Notifications

Channels is request-response, not push-based. I can’t configure Claude to proactively message me when tests fail or deployments complete. I have to ask.

Custom Platform Integration

The MCP architecture supports custom platforms. While Telegram and Discord are built-in, I can build my own:

Custom Integration Architecture
+-------------+
| Custom |
| Platform |
+------+------+
|
v
+-------------+ +-------------+
| MCP | | Claude |
| Plugin |---->| Code |
+-------------+ +-------------+

The sample code for creating new channels is available in the Claude Code documentation. This means Slack, WhatsApp, or any messaging platform with an API could potentially integrate.

Summary

Claude Code Channels solved my “fix bugs from coffee shop” problem. Instead of maintaining a complex OpenClaw setup, I now use a single flag and a bot token.

The trade-offs are clear:

  • Pros: Simple setup, full tool access, works from phone
  • Cons: Requires active session, not always-on, needs Pro subscription

For developers who need occasional remote access to their coding environment, Channels is the simpler choice. For 24/7 always-on operations, OpenClaw still has its place.

The key insight: Channels is for “I need to push a quick fix from my phone,” not “I want Claude running unattended for days.”

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments