Remote OpenClaw Blog
Claude Code Channels: Telegram, Discord, and iMessage Integration Explained [2026]
What changed
This post was reviewed and updated to reflect current deployment, security hardening, and operations guidance.
What should operators know about Claude Code Channels: Telegram, Discord, and iMessage Integration Explained [2026]?
Answer: Claude Code Channels is a feature introduced by Anthropic that lets developers receive real-time events from external messaging platforms directly inside an active Claude Code session. When someone sends you a Telegram message, a Discord ping, an iMessage, or triggers a webhook, that event gets pushed into your coding environment as context that Claude can read and act.
Claude Code Channels lets you push events from Telegram, Discord, iMessage, or webhooks into a coding session. Full breakdown of how it works, setup steps, and how it compares to OpenClaw messaging integrations.
Marketplace
Free skills and AI personas for OpenClaw — deploy a pre-built agent in 15 minutes.
Browse the Marketplace →Join the Community
Join 500+ OpenClaw operators sharing deployment guides, security configs, and workflow automations.
What Are Claude Code Channels?
Claude Code Channels is a feature introduced by Anthropic that lets developers receive real-time events from external messaging platforms directly inside an active Claude Code session. When someone sends you a Telegram message, a Discord ping, an iMessage, or triggers a webhook, that event gets pushed into your coding environment as context that Claude can read and act on.
The key word is "developer tool." Claude Code is Anthropic's CLI for working with Claude — you open a terminal, start a session, and interact with Claude while writing code. Channels extends that session by piping in external events. You might be building an API and want to see incoming Telegram messages from a test bot in real time. You might want Discord notifications about deployment failures to appear in your coding session so Claude can immediately help you debug.
Channels does not turn Claude Code into an autonomous agent. It does not run in the background. It does not respond to messages on your behalf. It is a context pipeline — information flows in, and you (with Claude's help) decide what to do with it.
This is a fundamentally different model from what OpenClaw provides, and understanding that difference is critical before you choose which tool to use.
How Do Claude Code Channels Work?
Channels works through a local relay process that runs alongside your Claude Code session. When you enable a channel, Claude Code starts a lightweight listener that connects to the messaging platform's API and forwards events into the session context.
The architecture looks like this:
Telegram/Discord/iMessage → Channel Listener (local) → Claude Code Session → Developer
Each channel type has its own connector. The Telegram connector uses the Bot API with long polling. The Discord connector uses the Gateway WebSocket API. The iMessage connector reads from the local Messages database on macOS. The webhook connector exposes a local HTTP endpoint that any service can POST to.
When an event arrives, it appears in your session as a structured message. Claude can see who sent it, what platform it came from, the message content, and any metadata (timestamps, channel names, attachments). You can then ask Claude to do things like "parse that error message and fix the bug" or "draft a reply to that customer question."
Events are ephemeral — they exist in your current session context and are not persisted separately. If you close the session, the channel listeners stop and events stop flowing. This is intentional. Channels is a developer productivity feature, not a data pipeline.
You can run multiple channels simultaneously. A typical setup might have Telegram and Discord channels active at the same time, giving you visibility into both platforms while you code.
How Do You Set Up the Telegram Channel?
Setting up Telegram as a Claude Code Channel takes about five minutes:
- Create a bot via BotFather. Open Telegram, search for @BotFather, and send
/newbot. Follow the prompts to name your bot and get an API token. - Start Claude Code. Open your terminal and launch a Claude Code session in your project directory.
- Enable the Telegram channel. Run
/channel telegram --token YOUR_BOT_TOKENinside the Claude Code session. - Test. Send a message to your bot in Telegram. It should appear in your Claude Code session within seconds.
The bot must be started by sending it a /start command in Telegram before events will flow. If you want to receive messages from a group chat, add the bot to the group and disable group privacy mode via BotFather (/setprivacy → Disabled).
Common issues include forgetting to start the bot, using an expired token, or having network restrictions that block Telegram's API. If events are not appearing, check that your local machine can reach api.telegram.org on port 443.
How Do You Set Up the Discord Channel?
The Discord channel setup requires creating a Discord application and bot:
- Create an application. Go to the Discord Developer Portal, create a new application, and navigate to the Bot section. Click "Add Bot" and copy the bot token.
- Set intents. Enable the Message Content intent under Privileged Gateway Intents. Without this, the bot cannot read message content.
- Invite the bot. Generate an invite URL with the appropriate permissions (Read Messages, Read Message History) and add the bot to your server.
- Enable the channel. In Claude Code, run
/channel discord --token YOUR_BOT_TOKEN. - Filter channels. Optionally specify which Discord channels to listen to with
--channels general,dev-opsto avoid noise from every channel.
The Discord connector uses the Gateway WebSocket API, which means it maintains a persistent connection. This uses minimal bandwidth but does require a stable internet connection. If your connection drops, the connector will attempt to reconnect automatically.
How Do You Set Up the iMessage Channel?
The iMessage channel is macOS-only and works by reading the local Messages database. This means it requires full disk access permissions for your terminal application.
- Grant permissions. Go to System Settings → Privacy & Security → Full Disk Access. Add your terminal application (Terminal, iTerm2, Warp, etc.).
- Enable the channel. In Claude Code, run
/channel imessage. - Filter contacts. Optionally specify which contacts to listen to with
--contacts "John Doe,Jane Smith".
The iMessage connector polls the local SQLite database at a configurable interval (default: 2 seconds). It reads new messages since the session started and pushes them into context. It does not send messages — it is read-only.
Privacy note: the iMessage channel reads your actual messages. Be aware of this if you share your screen or session logs. You can use the contact filter to limit which conversations are visible to Claude.
How Do Webhooks Work with Channels?
The webhook channel is the most flexible option. It starts a local HTTP server that accepts POST requests and pushes the payload into your Claude Code session.
/channel webhook --port 8765
This starts a listener on localhost:8765. Any service that can send an HTTP POST request can push events into your session:
curl -X POST http://localhost:8765/event \
-H "Content-Type: application/json" \
-d '{"source": "deploy", "message": "Build failed on staging"}'
This makes the webhook channel useful for CI/CD notifications, monitoring alerts, form submissions, or any custom integration. You can connect it to GitHub Actions, Vercel deployment hooks, Stripe webhooks (via a tunnel), or anything else.
For external services to reach your local webhook, you will need a tunnel like ngrok or Cloudflare Tunnel. Claude Code does not expose the webhook to the public internet by default.
How Do Channels Compare to OpenClaw Messaging?
This is the most important distinction in this article. Claude Code Channels and OpenClaw messaging integrations solve fundamentally different problems.
| Feature | Claude Code Channels | OpenClaw Messaging |
|---|---|---|
| Runs autonomously | No — requires active session | Yes — 24/7 on your server |
| Sends replies | No — read-only event stream | Yes — full bidirectional messaging |
| Requires developer | Yes — developer must be present | No — handles conversations independently |
| Platforms | Telegram, Discord, iMessage, webhooks | 50+ including WhatsApp, Slack, email, CRMs |
| Purpose | Augment developer workflow | Autonomous agent operations |
| Persistence | Session-only | Persistent with memory and history |
| Code execution | Yes — full Claude Code capabilities | Yes — sandboxed execution |
OpenClaw lives on your messaging platforms. It receives messages, understands context, takes actions, and replies — all without you being present. It manages conversations, schedules tasks, processes leads, handles customer inquiries, and executes workflows around the clock. It is an autonomous agent.
Claude Code Channels gives you a window into messaging platforms while you code. It pushes information to you, and you decide what to do with it. Claude helps you process that information and write code in response, but it does not independently manage conversations or take actions on messaging platforms.
Think of it this way: OpenClaw is like hiring an employee who manages your inbox. Claude Code Channels is like having your inbox open on a second monitor while you work.
When Should You Use Each Tool?
Use Claude Code Channels when:
- You're actively developing and want messaging context in your coding session
- You need to debug issues reported via messaging platforms in real time
- You want CI/CD notifications piped into your development environment
- You're testing a bot or integration and want to see events as they arrive
- You prefer a developer-centric workflow where you stay in the terminal
Use OpenClaw when:
- You need an AI agent running 24/7 on messaging platforms
- You want autonomous handling of customer inquiries, leads, or scheduling
- You need bidirectional messaging — the agent reads and replies
- You want access to 50+ native integrations and 13,000+ community skills
- You need persistent memory, conversation history, and workflow automation
- You want a non-technical team to interact with the agent
Use both when:
- You're developing custom skills for OpenClaw and want to test them with live message data flowing through Channels
- You want OpenClaw handling production messaging while you use Channels to monitor and debug during development
- You're building webhook integrations and want to prototype them in Claude Code before deploying to OpenClaw
For most operators reading this blog, OpenClaw is the right choice. Claude Code Channels is a powerful developer tool, but it requires a developer in the loop. OpenClaw's strength is that it removes that requirement — your agent works while you sleep. If you want autonomous messaging operations, OpenClaw is what you need.
