gogo-telegram-bot
v1.0.12
Published
Claude Code plugin — spawn an ephemeral Telegram bot with full conversation context, configurable permissions, and real-time tool use streaming
Maintainers
Readme
gogo-telegram-bot
Claude Code plugin that spawns an ephemeral Telegram bot backed by a Claude Agent SDK session. The bot inherits your full conversation context and can perform the same actions as Claude Code — from your phone.
Install
One command:
npx gogo-telegram-botOr manually:
git clone https://github.com/saturnino-adrales/gogo-telegram-bot.git ~/.claude/skills/telegram-bot
cd ~/.claude/skills/telegram-bot/bot && npm installSetup
- Get a bot token from @BotFather on Telegram
- Get your Telegram user ID from @userinfobot
- Create
~/.claude/telegram-bot.yml:
telegram:
bot_token: "YOUR_BOT_TOKEN"
owner_id: YOUR_TELEGRAM_USER_ID
defaults:
permission_level: readonly
acl: []Usage
/telegram-bot # Launch with default permissions
/telegram-bot --full # Full access (read/write/bash/agents)
/telegram-bot --standard # Read + edit + bash
/telegram-bot --readonly # Read only (default)
/telegram-bot ps # List running bots
/telegram-bot stop # Stop all bots
/telegram-bot restart # Restart with same permissions
/telegram-bot kill <PID> # Kill specific botTelegram Commands
| Command | Action |
|---------|--------|
| /stop | Shut down the bot |
| /status | Show permissions, uptime, working dir |
| /perms | List allowed tools |
| /permlevel full | Change permissions live |
| /acl add <id> | Add a user |
| /acl remove <id> | Remove a user |
| /context | Show injected context size |
| /reset | Clear the current SDK session and start fresh |
Features
- Full conversation context injected at startup
- Configurable permission levels (readonly / standard / full)
- Live permission changes via
/permlevel - ACL with owner-only default
- Real-time tool use streaming (shows which tools Claude is using)
- Intermediate text messages ("Let me check...")
- Telegram HTML formatting (bold, code, tables, links)
- Image and file attachment support (photos, documents, audio, video, stickers)
- Auto-rotate session on context-limit errors (recovers without restart)
- Manual session reset via
/reset - Session persistence (remembers conversation within a session)
- Project-level config override
How It Works
The plugin spawns a Node.js process that:
- Creates a Telegraf bot connected to your Telegram bot token
- Initializes a Claude Agent SDK session with your conversation context
- Bridges messages: Telegram → SDK → Telegram
- Shows tool use and intermediate responses in real-time
- Dies when you send
/stopor kill the process
Config Layering
Priority: slash command args > project config > global config
- Global:
~/.claude/telegram-bot.yml - Project:
./telegram-bot.yml(optional, overrides global) - Args:
--full,--acl 123,456(overrides everything)
Changelog
1.0.12 — Better tool labels
Agent/Tasktool entries now show the subagent'sdescription(orsubagent_type) — parallel agents no longer look identicalToolSearchand WebFetch-style tools show theirquery/url
1.0.11 — Stream intermediate text live
- Intermediate thinking messages now stream to Telegram as Claude produces them, instead of being buffered and dumped after the SDK finishes
- Final result is only sent if it wasn't already streamed as an intermediate (no duplicate)
1.0.10 — No more silent death on long runs
- Disabled Telegraf's 90s
handlerTimeout(set toInfinity) so long-running SDK / Agent calls aren't aborted mid-flight - Added
bot.catchto surface Telegraf middleware errors unhandledRejectionanduncaughtExceptionnow DM the owner a formatted error (stack trace included) in addition to logging
1.0.9 — Session resilience
- Added
/resetTelegram command to clear the current SDK session - Auto-rotate session on context-limit errors (one-shot retry with fresh session)
unhandledRejection/uncaughtExceptionare logged instead of killing the bot
1.0.8 — PID state file
- Bot writes
/tmp/gogo-telegram-bot.state.jsonon startup and on/permlevel//aclchanges /telegram ps|kill|stop|restartusekill -0 <pid>liveness probe (nops aux)- State file removed on clean shutdown; stale files auto-cleaned on discovery
1.0.7 — Attachments
- Download and pass Telegram attachments (photo, document, video, audio, voice, video_note, animation, sticker) to Claude via absolute file paths
- Files saved under
<cwd>/.telegram-uploads/ - Accepts text, caption, or attachment-only messages
1.0.6 — Process control fix
/telegram stopuseskill -9with a correct pgrep regex
1.0.5 — Detached bot process
- Uses
nohupso the bot survives Claude Code exiting
1.0.4 and earlier
- Installer copies
SKILL.mdto the skill root for Claude Code discovery - Japanese README
npx gogo-telegram-botone-command installer- Renamed to
gogo-telegram-botunder GoGo IT Lab - Restructured as a Claude Code plugin for npm distribution
/telegram restartand/telegram stopsubcommands- HTML entity escaping in tool-use messages
- Always send final result, even when it matches an intermediate text
