Claude Code Telegram integration
Control Claude Code from your phone — the session stays on your machine.
Claude Code will work on its own for twenty minutes at a stretch. The awkward part is that you have to be at the terminal to find out it finished, and to say what happens next. This page is about closing that gap with Telegram: a message on your phone when a task lands, and a reply that goes back into the same running session.
The tool that does it is Agent Babysitter (abs) — open
source, MIT licensed, macOS and Linux. It is a bash script around Anthropic's own Claude Code
Telegram plugin, so there is no server anywhere and no second copy of your session.
How the connection works
Two things follow from that shape, and they are the reasons it behaves better than a bot that shells out to Claude for each message:
- Nothing is hosted. Telegram is polled outbound from your machine, so no
public IP, no open port and no webhook. It works unchanged over SSH, and in
tmuxon a VPS or a home box. - Your reply keeps the context. The message is handed to the session that is already running, between turns — so Claude continues with everything it already knows, rather than starting again from nothing.
Setting it up
Two commands and one walkthrough. You need Claude Code installed and logged in first.
- The installer puts
abson your PATH, adds the Claude Code plugin marketplace if this machine has never needed it, and installs the Telegram plugin. - First run walks you through BotFather: send
/newbot, pick a name, and paste the token back. The bot is yours — nobody else's server is involved. - Pairing shows a PIN in your terminal. Send it to the bot, and your Telegram account ID is written to an allowlist. Anyone else who finds the bot gets silence.
- Then just work. Every session you start with
absreports to that chat.
Older versions stay installable, and abs offers you the update
itself at launch — see releases.
What arrives on your phone
A summary, not a ping
When a task finishes you get what happened, written out: what changed, how it was checked, what broke, and anything waiting on a decision from you. A long update arrives as a voice note, the exact text of what was spoken, and a point-wise card — so you can listen walking down the street or read it at a glance.
It goes quiet when you sit down
Reports mute themselves while you are typing at the terminal and resume when you step away,
because a notification for something you are watching happen is just noise.
abs quiet on mutes them by hand without cutting anything inbound.
Usage, without going back to the desk
Send /usage and your Claude limits come back — the five-hour window, the week,
and how much of the session's context is left. The same numbers glance live in Claude Code's
own status bar.
What you can send back
- An instruction. Anything you type is delivered to the session as your next turn.
- A screenshot or photo. Attach it and Claude reads the image directly — a failing screen, a stack trace you photographed, a design to match.
- A voice note. It is transcribed on your machine, repeated back to you so a mis-heard word gets caught, and then acted on. Replies are spoken back with a voice you pick by ear. No cloud speech vendor is involved in either direction.
- A control phrase.
ABS MUTE,ABS STOP,ABS OFFand two more are acted on by a session hook rather than by the model, so they work even if a message tries to talk the model out of them.
Starting and resuming sessions from the chat
A background daemon keeps the bot awake when no session is running, so a message at 2am is not lost. Pick a project from the chat, resume or start fresh, and the messages you sent while it was idle are offered back as the opening prompt. Several projects run side by side through profiles — one bot each, so their conversations never mix.
Is it safe?
This is a bot with a line into a machine where Claude can run commands, so the model is worth stating plainly:
- Only your account reaches it. Pairing is PIN-confirmed at the terminal, and the allowlist can only be changed there. A message asking to be added is exactly what an attack would look like, so it is refused.
- A remote turn is lower-trust than your keyboard. Destructive commands — recursive deletes, force pushes, reading credential files — are blocked when the instruction arrived over Telegram. At the terminal, nothing is blocked.
- Deploys and pushes are never a side effect. Finished work waits until you say so, and shipping asks one plain question first.
- The honest caveat: Telegram is not end-to-end encrypted, so Telegram's servers can see the messages. If that matters for your work, this is not the right tool.
The full threat model says what else it does and does not cover.
Questions
How do I connect Claude Code to Telegram?
Install Agent Babysitter, then run abs. On first run it walks you through creating a bot with Telegram's BotFather, pastes the token in, and pairs your account with a PIN you confirm at the terminal. After that, every session you start with abs reports to that chat.
Does my reply go into the session that is already running?
Yes. That is the point of it. The message is delivered into the live Claude Code session between turns, so it continues with your instruction instead of starting a new conversation that has lost all the context.
Do I need a server or a webhook?
No. Telegram is polled outbound from your own machine, so there is no public IP, no open port and no webhook to host. It works the same on a laptop, over SSH, or in tmux on a headless box.
Can I use the official Claude Code Telegram plugin on its own?
You can, and Agent Babysitter is built on it. The plugin gives you the channel; Agent Babysitter adds what you need when you are actually away — a written summary when a task finishes, auto-silence while you are at the desk, voice both ways, usage checks, personas, and rails so a message from a phone cannot trigger something destructive.
Is it safe to let a Telegram bot reach my terminal?
Only your paired account can reach it: pairing is PIN-confirmed at the terminal and the allowlist can only be changed there, so a message asking to be let in is dropped. Destructive commands are blocked when the turn came from Telegram rather than the keyboard. The honest caveat is that Telegram is not end-to-end encrypted, so its servers see the messages.
Get it
One line on macOS or Linux — the command is at the top of this page, and the home page has the walkthrough. The source is on GitHub, the docs link every feature to the line that implements it, and the FAQ has twenty more answers.