Telegram Bridge for Claude Code - Access Your AI Agent from Your Phone

Fazm Team··2 min read

Your AI coding agent runs on your desktop. But sometimes you need to check on it, give it a new task, or read its output from your phone. A Telegram bridge solves this cleanly.

The Setup

The basic architecture is simple - a Telegram bot running on your machine that forwards messages to Claude Code and sends responses back. Your phone becomes a remote terminal for your AI agent.

You need a Telegram bot token from BotFather, a script that listens for messages, and a way to pipe those messages into your agent's session. The whole setup takes about thirty minutes.

SSH as the Foundation

If your machine is accessible via SSH, you can trigger agent commands remotely. The Telegram bot becomes a thin layer on top - it receives your message, runs the command over SSH, and sends back the output.

For machines behind NAT, use a reverse SSH tunnel or a service like Tailscale to maintain connectivity. The key is having a persistent connection to your development machine.

Mobile Workflow Patterns

The most useful patterns are not full coding sessions from your phone. They are quick interactions - checking if an agent finished a task, reviewing its output, approving a PR it created, or kicking off the next task before you get back to your desk.

Think of it as a notification and control layer, not a replacement for sitting at your computer. The agent does the heavy lifting. You just steer.

Security Considerations

Never expose your agent directly to the internet without authentication. Telegram provides user ID verification out of the box - restrict your bot to only respond to your Telegram user ID. Add rate limiting and command whitelisting for extra safety.


Fazm is an open source macOS AI agent. Open source on GitHub.

More on This Topic

Related Posts