Claude Tg banner
sawierro sawierro

Claude Tg

Development community

Description

Telegram bot for remote control of Claude Code (Codex) CLI sessions from your phone

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Claude-TG

Telegram bot for remote control of [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI sessions from your phone.

Connect to a running Claude Code terminal session via Telegram, see responses in real-time, send commands remotely, and sync context back when you return to the terminal.

Features

  • Connect to terminal sessions — attach to any running Claude Code session with one tap
  • Real-time response mirroring — Claude's terminal output is forwarded to Telegram automatically
  • Remote command execution — send prompts from Telegram, Claude executes with full permissions
  • Context sync — transfer Telegram conversation history back to the terminal via /sync
  • Session management — create, list, stop sessions from Telegram
  • Smart message routing — replies go to the right session, inline keyboards for disambiguation
  • Auto-registration — first /start auto-registers your chat_id
  • Prompt templates — upload .md/.txt snippets and dispatch them with one tap
  • Session health check/ping detects hung runs and reports idle time
  • Token usage tracking — local counter per session and across all sessions (5h/24h/all-time)
  • Auto-resume after rate limits — queue messages when usage limit hits; bot retries automatically or notifies when the window resets
  • Auto-continue for terminal sessions — opt-in per session; if Claude in the terminal hits a limit while you're watching from Telegram, the bot detects it in the JSONL stream and sends a continuation prompt as soon as the window resets (no prompt from you needed)
  • Self-update from GitHub/update fetches and applies new commits

How It Works

sequenceDiagram
    participant T as Terminal
    participant B as Claude-TG Bot
    participant TG as Telegram

    T->>T: claude (interactive session)
    TG->>B: /connect
    B-->>TG: session list (inline buttons)
    TG->>B: tap session
    B->>B: attach watcher to JSONL

    T-