builtin Go (infra/connectors/telegram) · Bot API getUpdates Long Polling

Control Local Claude Code & Codex From Telegram — Private Chats & Group Chats

TagTag bridges your local CLI agents to Telegram using Bot API Long Polling (getUpdates), requiring only a BotFather token and zero public infrastructure. It supports text and photo replies, persistent offset cursor tracking, multi-Bot group chats, and sanitized error paths so your bot token is never leaked in logs.

Transport
Bot API getUpdates Long Polling
Instance Env Keys
TELEGRAM_BOT_TOKEN
LLM Isolation
TELEGRAM_ stripped from LLM

Multi-Bot group chats

Add multiple Bots to a Telegram group (disable Group Privacy in BotFather if a Bot needs wider context, or keep privacy on for explicit @mentions). Each Bot maintains isolated state per chat and respects owner-only guards on /model, /stop, and /schedule.

Mobile Dev Chat · Telegram
Owner (on phone)Executes locally on your Mac

@MacClaudeBot Run go test ./infra/connectors/... and send me only failing cases

Owner (on phone)Zero-token live status check

/status

Setup & config

Generate manifest →
  1. 1. Create a Bot via @BotFather

    Message @BotFather with /newbot, pick a name and username, and copy the HTTP API token.

  2. 2. Bind Owner ID for Safe Mobile Control

    Send /help in a DM to inspect your scoped platform ID, then add it to owner_ids so only you can invoke /model, /stop, or /trace raw.

  3. 3. Test Cursor & Connectivity With --dry-run

    Run tagtag connector poll --dry-run telegram:personal to verify getUpdates without mutating your saved offset.

connectors.json
{
  "id": "telegram:personal",
  "type": "telegram",
  "enabled": true,
  "bot_id": "mobile-dev",
  "access": "send",
  "env_keys": ["TELEGRAM_BOT_TOKEN"],
  "config": {}
}

Connector recipes

RSS + X + Reddit + YouTube Daily Brief on Your Phone

Combine TagTag’s zero-dependency web/social connectors with Telegram so your Bot filters noise locally and delivers one short numbered brief each morning.

Verified pitfalls

Go *url.Error leaking TELEGRAM_BOT_TOKEN in URLs on network failure

Caught in TagTag live testing (BUG-01): all Telegram transport errors now pass through full-path redaction replacing tokens with [REDACTED].

Duplicate message replay when all updates are filtered

TagTag preserves positive previous offsets on empty polls and advances candidate cursors to max(N, update_id+1) even when updates are filtered out.

FAQ

Does Telegram support draft-only mode in TagTag?

Telegram’s Bot API has no server-side draft endpoint, so AccessGuardSink explicitly rejects draft sends with an error rather than silently sending a message—zero accidental sends.

See how 7 zero-token slash commands control harnesses in chatSlash commands
Local agents
IM platforms