lozzkappa/claude-code-telegram-bot — explained in plain English
Analysis updated 2026-05-18
Get Claude Code responding reliably to Telegram messages despite the plugin's notification bug.
Run a persistent Claude Code Telegram bot on a home server or Raspberry Pi.
Add a typing indicator and stall watchdog to a self-hosted Claude Code bot.
Learn how to patch the official Telegram plugin's server code.
| lozzkappa/claude-code-telegram-bot | 0marildo/imago | abdurrafey237/rag-chatbot | |
|---|---|---|---|
| Stars | 3 | 3 | 3 |
| Language | — | Python | Jupyter Notebook |
| Setup difficulty | hard | easy | moderate |
| Complexity | 4/5 | 2/5 | 3/5 |
| Audience | developer | general | general |
Figures from each repo's GitHub metadata at analysis time.
Requires manually patching plugin source code and a Linux server with tmux and bun installed.
This repository is a setup guide and workaround, not a standalone app, for running Claude Code as a Telegram bot. The author found that a specific version range of Claude Code has a confirmed bug: when the official Telegram plugin is installed and Claude Code is launched with channel support, incoming Telegram messages are received by the plugin's server but silently dropped by Claude Code itself, even though the bot can still send replies. As of the time this README was written, there was no official fix. The workaround swaps out the broken notification path for a simple file based system. The Telegram plugin's server script is patched to write every incoming message to a local inbox file, in addition to sending the notification that Claude Code normally ignores. A separate bash script then polls that file every 5 seconds, and when it finds new messages while Claude is idle, it types a short instruction directly into Claude's terminal session using tmux, telling it to check and reply to the Telegram inbox. Claude then reads the file, replies through Telegram, and clears it. This entire polling loop runs in plain bash, so it uses no AI tokens while waiting, and the README reports response times of about five to nine seconds. An optional cron job exists as a last resort fallback but is disabled by default since the watcher handles things on its own. Setting it up requires a Linux server, the Claude Code CLI, the bun JavaScript runtime the Telegram plugin depends on, a bot token from Telegram's BotFather, and tmux for running Claude in a persistent terminal session. The guide walks through installing the plugin, creating a credentials file and an access control list restricting who can message the bot, editing the Claude configuration file to register the plugin as an MCP server, and directly patching the plugin's server code to add the inbox workaround and a persistent typing indicator so users see "typing" for the whole time Claude is working. A launch script starts everything inside a tmux session with the right environment variables and includes a watchdog that restarts the session if the inbox is not cleared within five minutes, guarding against Claude getting stuck or running out of context.
A setup guide and file-based workaround for a Claude Code bug that silently drops incoming Telegram messages sent to its bot plugin.
The README does not state license terms in the shown portion.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.