home / claude code telegram integration

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

your machine your phone Claude Code session │ ├── abs watches it, and appends │ the reporting rules to the session │ └── Telegram plugin ──── polls out ────▶ Telegram ────▶ your private bot ▲ │ └──────────── your reply, into the SAME session ──────┘

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:

Setting it up

Two commands and one walkthrough. You need Claude Code installed and logged in first.

$ curl -fsSL https://agentbabysitter.com/install.sh | bash $ abs
  1. The installer puts abs on your PATH, adds the Claude Code plugin marketplace if this machine has never needed it, and installs the Telegram plugin.
  2. 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.
  3. 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.
  4. Then just work. Every session you start with abs reports 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

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:

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.

← Back to home  ·  v3.7.4  ·  MIT License  ·  About & contact  ·  Made with ♥ for Claude Code users