Claude Code Now Has a Telegram Channel — and It Runs on Your Hardware

Anthropic quietly shipped a research preview feature in Claude Code that most people missed: channels. The first plugin is Telegram. You stand up a bot, point it at a persistent Claude Code session on your server, and suddenly you can talk to Claude from your phone — with full access to your codebase, tools, and project context.

This isn’t claude.ai in a Telegram wrapper. It’s your Claude Code instance, running on your machine, with your files, your API key, and your access rules. Telegram is just the transport layer.

How it works:

  1. Create a Telegram bot via BotFather (takes 30 seconds)

  2. Install the official plugin: claude mcp add-plugin telegram@claude-plugins-official

  3. Launch a persistent session: claude --channels plugin:telegram@claude-plugins-official --permission-mode auto

  4. Wrap it in systemd so it survives reboots

That’s it. Claude Code spawns inside a tmux session, the Telegram plugin connects via the Bot API, and inbound messages land as tool calls in the assistant’s context. Claude can reply with text, send files, react with emoji, and edit its own messages for progress updates.

The access model is sane. Unknown senders get a 6-character pairing code. You approve it from your terminal — never from Telegram itself (prompt injection prevention). Codes expire after an hour, max three pending at once. Once paired, your user ID hits an allowlist stored in a local JSON file you can inspect and edit. You can also lock it down to allowlist-only mode or disable DMs entirely.

Groups work too, but require explicit opt-in per group. Privacy mode means the bot only triggers on @mentions or direct replies unless you tell BotFather otherwise.

What you get that claude.ai doesn’t give you:

  • Full project context — Claude can read your files, run your tests, grep your codebase

  • Persistent memory across conversations via Claude Code’s memory system

  • Tool access — it can run shell commands, edit files, call MCP servers (Stripe, databases, whatever you’ve connected)

  • Local state — all config lives in ~/.claude/channels/telegram/ as plain JSON and .env files. No cloud dashboard, no opaque settings page

What you don’t get:

  • Message history. The Telegram Bot API has no getMessages endpoint — the bot only sees messages as they arrive. If Claude needs earlier context, you paste it or summarize

  • Edited messages. If you fix a typo after sending, Claude already read the original

  • High-res photos. Telegram compresses images; send as document attachment if fidelity matters

  • Multi-user conversations. One persistent session means one conversation thread. Group support exists but it’s still the same Claude context

The thing nobody warns you about: permission prompts. Claude Code’s auto permission mode is supposed to handle most tool calls without asking. In a terminal session, that works fine — you’re sitting right there to approve anything it flags. In a headless Telegram session? Crickets. You send a message, Claude starts working, hits a permission prompt for a Bash command with a backslash in it, and… silence. No reply. No error. Just a bot that ghosts you.

We found this out the hard way. Multiple times. The session would be humming along, answering questions, running commands — and then nothing. Every time, we’d have to SSH into the server, attach to the tmux session, and find Claude politely waiting for someone to press Enter on a permission dialog that nobody could see.

The fix was two-fold: first, we added a broad set of Bash command permissions to the project settings so the auto-mode classifier stops flagging safe read-only commands. Second — and this is the part that made us laugh — we wrote a notification service. A hook that fires when the Telegram session gets blocked by a permission prompt and sends us… a Telegram message. Claude Code alerting you via Telegram that it can’t reply to you on Telegram. It’s not elegant, but it works.

We also completed our first real coding task entirely via Telegram. No laptop, no terminal, no SSH — just phone messages to a bot on the train. The details of what we built are a story for another issue. But the fact that it worked at all — that you can describe a feature in a chat message, have Claude scaffold the code, run the tests, and commit the result, all from your phone — that changes the shape of what “development time” looks like.

The real play here is mobile access to your dev environment. You’re on the train, you remember you need to check something — open Telegram, ask Claude to grep for it, get the answer. You’re reviewing a PR on your phone and want Claude to run the tests — send the command, get the result. No VPN, no SSH client, no laptop required. Just a Telegram DM to a bot running on your own hardware.

Does this affect you?

  • If you run Claude Code on a headless server or always-on dev machine — this is directly useful. You get phone access to your full Claude Code environment for the cost of a Telegram bot token (free) and your existing Anthropic API usage

  • If you only use Claude Code interactively in a terminal — you can skip this for now, but it’s worth knowing the plugin system exists. Channels are the first step toward Claude Code as a persistent service rather than an interactive tool

  • If you’re concerned about attack surface — the security model is reasonable. Access control is file-based and terminal-gated. The bot token is the main secret to protect (chmod 600 on the .env file). No inbound network listeners on your machine; the bot polls Telegram’s servers outbound. That said, it’s version 0.0.1 and labeled “research preview” — treat it accordingly

  • If you self-host and care about cost — there’s no per-channel fee. You pay Anthropic per-token as usual. The session idles at zero cost when nobody’s talking to it. A cheap NUC or old laptop is enough to run it

The plugin source is cached locally in ~/.claude/plugins/cache/ — readable TypeScript, Apache 2.0 licensed. You can audit the entire thing in an afternoon.

Setup takes about ten minutes if you already have Claude Code installed. The hardest part is remembering to enable lingering for your systemd user service so it survives logouts.

Claude Code documentation →


📚 Go deeperbaremetaldigest.com has guides on self-hosting, Claude Code, reverse proxies, backups, and more. Written for builders who ship solo.