Fix Claude Code Telegram Bot That Stops Receiving Messages

    by Po Jian

    0

    The bot can still send, but stops receiving until you run /reload-plugins.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Fix Claude Code Telegram Bot That Stops Receiving Messages

    Example session with this skill installed

    Set up the Telegram webhook channel for my Claude Code bot on port 8791, domain bots.example.com.

    • Read your context and instructions
    • Compiled the fix claude code

    Plan for bot "botA":

    1. bun install in the skill folder.
    2. Copy bot.env.example to ~/.claude/channels/botA.env and fill TELEGRAM_BOT_TOKEN, TELEGRAM_WEBHOOK_SECRET (long random string), TELEGRAM_ALLOW_FROM (your Telegram user id), WEBHOOK_PORT=8791.
    3. Project .mcp.json: server "telegram-webhook", command run.sh, args [~/.claude/channels/botA.env].
    4. nginx: location /botA/ { proxy_pass http://127.0.0.1:8791/; } (trailing slashes on both), then nginx -t && systemctl reload nginx.
    5. Register: setWebhook url=https://bots.example.com/botA/ with your secret_token, then check getWebhookInfo: pending_update_count 0 and no last_error_message.
    6. Start: claude --dangerously-load-development-channels server:telegram-webhook and press Enter on the one-time dialog.
      Verify: send "ping" in Telegram. Claude Code shows "← telegram-webhook: ping", calls reply, "pong" arrives on your phone.
      Common failures: 301 from nginx = missing trailing slash; "Connection timed out" on 443 = register on 8443; no messages = official plugin also enabled, disable it per project.
    3. Project .mcp.json

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Problem: The official Telegram plugin for Claude Code polls from an MCP process that is never restarted once the harness recycles it. The bot can still send, but stops receiving until you run /reload-plugins. This is an open upstream issue (claude-plugins-official#1680, claude-code#36427, #24350).

    What you get: a small Bun server that lets Telegram push messages to you (a "webhook") and hands them to Claude Code as channel events; a reply tool (text and images); inbound photos/documents; sender allow-list and secret check; nginx config routing many bots through one public port; and a list of gotchas we hit (duplicate official plugin, nginx 301 on missing trailing slash, :443 timeouts, an env var that silently blocks delivery).

    You need: a machine with a public HTTPS address (domain + nginx or similar), Bun, and a Telegram bot token. Not for setups without a public endpoint.

    Tested: end to end on Claude Code 2.1.332 with a real bot: send, receive, and an agent replying.

    Supports text, photos, and documents only. No voice or stickers. Requires public HTTPS endpoint and manual Enter key confirmation on agent start. No retry on failed sendMessage calls.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    Accounts
    Telegram
    Software
    BunClaude Code

    a public HTTPS domain with nginx (or similar reverse proxy).

    Permissions

    Terminal / Shell
    Network Access
    Write Files
    Environment Variables
    Read Files

    Allowed Hosts

    api.telegram.org

    File Scopes

    ~/.claude/channels/

    Needs a public HTTPS address reachable by Telegram (ports 443, 80, 88 or 8443). Keep the bot token in the env file, never in git.

    Listed8 days ago

    What's inside

    Frequently Asked Questions

    Standard polling often fails to reconnect after idle periods or plugin reloads; this skill replaces that mechanism with a push-based webhook architecture, ensuring your bot remains responsive 24/7 without manual restarts.

    Yes, the skill is designed for multi-bot environments, allowing you to route traffic to multiple local listeners via nginx without port conflicts or security overlaps.

    You will need the Bun runtime, TypeScript, and an nginx instance to handle TLS termination and route external HTTPS traffic to the local webhook listener.

    Security is handled through a combination of secret header tokens for request validation and a strict 'TELEGRAM_ALLOW_FROM' whitelist to ensure only authorized users can interact with your agent.

    Currently, the skill supports text, photos, and document attachments; however, it does not support voice messages, stickers, or video files at this time.

    You receive the full infrastructure code, a pre-configured Bun-powered channel server, the nginx routing template, and the MCP configuration steps needed to integrate it with Claude Code.

    New in Agents & Orchestration

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.