Claude CodeTelegramAI AgentsDeveloper ToolsRemote Development

How to Set Up Claude Code with Telegram (Step-by-Step Guide 2026)

Dmytro ChabanDmytro Chaban
March 28, 202611 min read
How to Set Up Claude Code with Telegram (Step-by-Step Guide 2026)

I run Claude Code on a VPS and control it from my phone. No terminal window open, no SSH session, just Telegram. Here's how to get the same setup in under 5 minutes.

TL;DR#

  • Claude Code Channels bridge your coding agent to Telegram, so you send messages from your phone and Claude works on your machine
  • Requires Claude Code v2.1.80+, Bun runtime, and a claude.ai Pro/Max/Team/Enterprise account
  • For VPS setups, combine with --dangerously-skip-permissions for fully unattended operation
  • Main gotcha: keep only one terminal running or messages get swallowed

Quick setup (assuming you already have a bot token from @BotFather):

Quick Setup
$/plugin install telegram@claude-plugins-official
$/reload-plugins
$claude --channels plugin:telegram@claude-plugins-official

Then DM your bot on Telegram, grab the pairing code, and run /telegram:access pair <code> in Claude Code.

What Are Claude Code Channels?#

A channel is an MCP server that pushes events into a running Claude Code session. You send a message from Telegram, it reaches Claude in your terminal, Claude does the work, and the reply shows up in the same Telegram chat.

Your session stays on your machine (or VPS). Nothing runs in the cloud. Claude has full access to your filesystem, git, and all your MCP servers and tools. Telegram is just the remote control.

Channels are in research preview as of March 2026. Telegram, Discord, and iMessage are supported.

What You Need Before You Start#

Check these first:

  • Claude Code v2.1.80 or later (run claude --version to check)
  • A claude.ai account on Pro, Max, Team, or Enterprise. API keys don't work with channels
  • Bun runtime installed. Not Node.js, not Deno. The Telegram plugin specifically requires Bun. This trips people up
  • A Telegram account (obviously)

If you don't have Bun:

Install Bun
$curl -fsSL https://bun.sh/install | bash

Set Up Telegram in 5 Minutes#

Step 1: Create a Bot with BotFather#

Open Telegram and search for @BotFather. Send /newbot.

BotFather asks for two things:

  1. Display name for your bot (anything works, can have spaces)
  2. Username that must be unique and end in bot (e.g., my_claude_assistant_bot)

BotFather gives you a token. Copy it. You'll need it in the next step.

Telegram chat interface showing a new bot creation, displaying its API access token and a link to the Bot API documentation.

Step 2: Install the Telegram Plugin#

Open a Claude Code session and run:

Install Telegram Plugin
$/plugin install telegram@claude-plugins-official
Plugin installed: telegram@claude-plugins-official
$/reload-plugins
Plugins reloaded.

The installer prompts you for the bot token from Step 1. Paste it in. It writes the token to ~/.claude/channels/telegram/.env.

Step 3: Launch with the Channels Flag#

Exit your current session and restart with the channels flag:

Launch Claude Code with Telegram
$claude --channels plugin:telegram@claude-plugins-official

Claude Code starts with the Telegram plugin active and begins polling for messages from your bot.

Step 4: Pair Your Device#

Open Telegram and DM your bot. Send anything.

The bot replies with a 6-character pairing code. Go back to your Claude Code terminal and run:

Pair Your Device
$/telegram:access pair 6214a5
Paired successfully.

This is the actual pairing flow from my setup:

Telegram bot chat showing the pairing process with a Claude Code session, including access commands and granted Bash/Write permissions.

The whole thing takes about 2 minutes.

Step 5: Lock Down Access#

Right now the bot is in pairing mode, which means anyone who DMs it gets a pairing code. Switch to allowlist mode:

Lock Down Access
$/telegram:access policy allowlist
Access policy set to allowlist.

Now only your paired Telegram account can send messages to Claude. Strangers get nothing.

Tips for Daily Use#

Setup is done. Most guides stop here. They shouldn't.

Create a Shell Alias#

You don't want to type that full --channels flag every time. Add this to your .bashrc or .zshrc:

Shell Alias
$echo 'alias claudet="claude --channels plugin:telegram@claude-plugins-official"' >> ~/.zshrc
$source ~/.zshrc
$claudet

Now you just type claudet and you're connected.

Handle Permissions Remotely#

When Claude needs to run a bash command or write a file, Telegram relays the permission prompt directly to your chat:

🔐 Permission: Bash
✅ Allowed

🔐 Permission: Write
✅ Allowed

You approve or deny straight from your phone.

For VPS or disposable machines: if you're running Claude on a server you don't care about protecting, skip the permission dance entirely:

Skip Permissions (VPS only)
$claude --channels plugin:telegram@claude-plugins-official --dangerously-skip-permissions

Claude runs any command without asking. Throwaway VPS? Go for it. Your main dev machine? Probably not.

Run on a VPS for True Remote Access#

My preferred setup: Claude Code on a cloud VPS, Telegram on my phone. Actual remote coding from anywhere. If you need a VPS, I covered setting up an Ubuntu desktop on GCP before.

The workflow is dead simple:

  1. SSH into your VPS
  2. Start a tmux or screen session (so it survives SSH disconnects)
  3. Run claudet --dangerously-skip-permissions
  4. Walk away

From your phone, you can ask Claude to review PRs, fix bugs, run tests, deploy. Full filesystem access, full codebase. I've been using this as my primary workflow and it's been more reliable than Dispatch for me.

Best Workflows from Your Phone#

Things that work well from Telegram:

  • Code reviews: "Review the last PR and list the issues"
  • Test runs: "Run the test suite and tell me what broke"
  • Quick fixes: "Fix the TypeScript error in src/api/handler.ts"
  • Deploy monitoring: "Check if the deployment succeeded and show me the logs"
  • Context gathering: "Summarize what changed in the last 3 commits"

Give Claude clear, specific tasks. Text it like you'd text a colleague, not like you're writing a spec. If you want to go deeper on getting more out of AI agents, I wrote about that separately.

Get more Claude Code workflows

I share practical Claude Code setups, MCP integrations, and automation tips as I test them.

By subscribing you agree to receive email updates. See our Privacy Policy.

Troubleshooting#

Bot Not Responding at All#

Check the basics:

  • Is Claude Code running with --channels? The bot is dead without an active session
  • Did you complete pairing? Run /telegram:access list to check

If both are fine, make sure Bun is actually installed and on your PATH.

Messages Getting Dropped (The "Write Twice" Problem)#

The main gotcha I've hit. You send a message, silence. Send it again, Claude responds.

Root cause: multiple terminals running Claude Code. Even if the second terminal is NOT connected to Telegram, it can steal the session. The Telegram plugin doesn't handle this gracefully.

Fix: Make sure only one terminal is running Claude Code.

Kill and Restart
$ps aux | grep claude
$kill -9 [PID]
$claudet

If it persists, kill all Claude processes completely and start fresh. The restart process is simple and takes seconds.

Bun Not Found#

The plugin requires Bun. Node.js and Deno give you cryptic errors. Install it:

Install Bun
$curl -fsSL https://bun.sh/install | bash
$source ~/.bashrc
$bun --version

Telegram Channels vs Dispatch#

Anthropic also offers Dispatch (formerly Remote Control), a browser-based way to interact with Claude Code remotely.

FeatureTelegram ChannelsDispatch
InterfaceTelegram app (any device)Browser (claude.ai)
Setup complexity5 minutes (BotFather + plugin)1 command
Mobile notificationsNative push notificationsBrowser notifications
Rich UIPlain text + code blocksFull claude.ai interface with file previews
Reliability (my experience)Very reliable on VPSImproved, but occasional drops
Permission handlingRelay prompts to chatFull UI controls
Unattended modeWorks great with --dangerously-skip-permissionsRequires browser open
Best forVPS/headless setups, mobile-firstFull claude.ai experience

My pick: Telegram for reliability when running long tasks on a VPS. Dispatch when I want the full claude.ai interface with rich formatting and file previews.

Both have gotten better. A month ago Dispatch was flaky. It's improved. But for a fire-and-forget VPS setup, Telegram is still what I use.

Frequently Asked Questions


Dmytro Chaban

Written by

Dmytro Chaban

AI engineer writing about agentic systems, MCP integration, and LLM comparisons. 10+ years building production software, 4+ focused on AI.

Enjoyed this post?

Find out which LLM is cheapest for your use case — I test new models as they launch

By subscribing you agree to receive email updates. See our Privacy Policy.

No spam, unsubscribe anytime.