Telegram Claude + Codex puts coding-agent CLIs in Telegram. No SSH: send a message, get streamed, context-aware replies from Claude Code or OpenAI Codex, switchable at runtime.
The bot spawns the active provider's CLI in your project directories, keeps per-provider sessions for follow-ups, and handles everything from voice transcription to plan approval — all in chat.
Key Features
Multi-Provider
- Switch Claude Code and OpenAI Codex at runtime via
/provider
- Sessions and capabilities tracked per provider
- Active provider shown in
/status, /help, and the pinned project message
- UI adapts to each provider's capabilities
Real-Time Streaming
- Spawns the active provider's CLI as a child process
- Streams responses to Telegram live
- Auto-splits at Telegram's 4000-character limit
- Renders MarkdownV2, falls back to plain text
Project Switching
- Inline keyboard for quick project selection
- Configurable project directories
- Each project keeps its own session per provider
- Auto-unpins old project messages
Voice Messages
- Transcribes voice notes via Groq Whisper (
whisper-large-v3-turbo)
- Sends the transcript straight to the active agent
- Hands-free coding assistance
- Low-latency transcription
Plan Mode
- Intercepts plan mode for both providers (Claude's
ExitPlanMode, Codex's .codex/plans/)
- Presents plans for approval via Telegram buttons
- Execute in a new session, keep context, or revise with feedback
- Full control over code changes from your phone
Compose Mode
/compose batches multiple messages into one prompt
- Accepts text, voice, forwarded messages, files, and photos
/send dispatches the batch, /cancel discards it
- Handy for forwarding context from other chats
Architecture
One TypeScript app on Bun, deployed on the VPS next to the projects it manages.
Message Processing Pipeline
A sequential queue processes messages in order, so concurrent arrivals never race:
- Receive — Telegram message or voice note arrives
- Transcribe — voice becomes text via Groq Whisper
- Route — sent to the active project's session for the current provider
- Stream — agent output and thinking stream back as Telegram draft messages
- Complete — final response sent, session stays active for follow-ups
Session Management
- Sessions persist across messages for natural conversation
- Per-provider tracking —
/history and follow-ups stay scoped to the active provider
- Resume via Claude's
-r <id> or Codex's exec resume <id>
- Git branch and open PR status in
/status and response footers
Deployment
- Runs as a systemd service — auto-restart and boot persistence
- Bot tokens and project paths configured via environment
- No API keys — CLI auth via
claude login / codex login on the host
- Light footprint — spawns the agent CLI only when needed
Technology Stack
- TypeScript + Bun — fast runtime, native TypeScript
- grammy — Telegram bot framework with middleware
- Claude Code CLI — Anthropic's AI development CLI
- OpenAI Codex CLI — optional second provider
- Groq SDK — Whisper voice transcription
- systemd — process management and auto-restart on Linux