Andrey Markin
  • home
  • services
  • products
  • projects
    • Telegram Claude + Codex: Remote Coding Agents via Telegram
    • Recruit AI: Intelligent Recruitment Matching
    • oRPC-to-WebMCP Bridge
    • AI Form Assistant
    • Outrizz AI: Event Engagement Platform
    • Intelligent Aggregator Platform
    • PickArt: Art-Hospitality Marketplace Platform
  • blog
  • directory
  • courses
  • resume
  • about
  • contact
  • meet

Mark Life Ltd

  1. Home
  2. Projects
  3. Telegram Claude + Codex
Meet

Mark Life Ltd

BG208147965

HomeContactPrivacyLLM-friendlyBlog RSSDirectory RSS

Telegram Claude + Codex: Remote Coding Agents via Telegram

TypeScriptBunTelegram BotClaude CodeOpenAI CodexAIgrammyGroq

Run Claude Code or OpenAI Codex on your VPS from Telegram. Streams responses to chat, switches providers at runtime, and adds per-provider sessions, voice messages, plan mode, compose mode, and message queuing.

Telegram Claude + Codex: Remote Coding Agents via Telegram
View on GitHub

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:

  1. Receive — Telegram message or voice note arrives
  2. Transcribe — voice becomes text via Groq Whisper
  3. Route — sent to the active project's session for the current provider
  4. Stream — agent output and thinking stream back as Telegram draft messages
  5. 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
grammy
Claude
OpenAI
Groq
  • 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

Want to build an AI-powered automation tool?

Let's Discuss Your Project