cli: a5c-ai/claude-code-telegram-bot Turns Telegram Into a Remote Control Plane for Claude Code

A mobile wrapper, yes. More interestingly, a persistent session manager that keeps one Claude Code process alive, accepts voice and files, and lets you steer real coding work without sitting at the terminal.

8 min read • View on GitHub • More from a5c-ai

A hand holds a phone with a Telegram interface in the foreground while a thin thread of messages reaches a laptop terminal on a desk. The image explains that the phone is not where the agent lives. It is the transport layer for a live Claude Code session.
Telegram acts as the front door, while the long-running Claude Code process stays on the machine doing the work.
Key Takeaways

Most Telegram bots are chat surfaces. This one is closer to a remote operator console. It takes a persistent Claude Code session, wraps it in a familiar mobile interface, and lets you keep moving when the laptop is closed. That is the useful inversion, because the value is not the chat thread. It is the live process behind it.

A Telegram bot that bridges your mobile device with Anthropic's Claude Code CLI, enabling remote operation from anywhere. Create sessions, manage multiple projects, and interact with Claude's agentic coding capabilities directly through Telegram.

a5c-ai/claude-code-telegram-bot Repository, Primary Source · claude-code-telegram-bot README

Telegram Is the Front Door

That framing matters because Telegram is not doing the hard work. The bot uses Telegram's message stream, file delivery, and notification habits as a thin shell around a real coding agent. The codebase is TypeScript-based, but the design instinct is more important than the language choice: keep the backend stateful, keep the client disposable.

The Clever Bit Is One Process Per Session

The central design choice is a single long-lived Claude CLI process for each session. Instead of spawning a fresh process for every reply, the bot routes inputs into the same stdin and reads incremental output back through stdout. The README describes bidirectional stdin and stdout streaming JSON communication, which is the difference between a throwaway wrapper and a genuine session controller.

The whole point is continuity. Each new input resolves to the same live process, so the bot behaves like a control plane instead of a chat toy.

The resume story is just as important. The bot can discover past sessions from ~/.claude/history.jsonl and match partial session IDs, which means it behaves less like a throwaway conversation and more like a workbench you can return to. Add voice notes and file uploads, and the workflow starts to look like mobile triage for actual coding tasks.

A close-up of one session box receiving three different inputs, a text tile, a waveform, and a file icon. The illustration explains that voice, files, and typed instructions all converge on the same persistent Claude Code process.
Multiple input types collapse into one live session, which is why the bot can feel stateful.

Why Telegram Works Better Than It Should

Telegram brings three things at once. It is already on the phone, it handles files without ceremony, and it makes notifications feel native instead of bolted on. That makes it a good transport for an agent session, even though it is not an IDE and does not pretend to be one. The repo is not trying to replace Claude Code's terminal UI. It is trying to make it reachable.

The bot uses a single long-lived Claude CLI process per session with bidirectional stdin/stdout streaming JSON communication.

a5c-ai/claude-code-telegram-bot Repository, Primary Source · claude-code-telegram-bot README

What It Beats, and What It Does Not

SurfaceSession persistenceMobile accessVoice and filesBest atTrade-off
This repoYes, one live process per sessionYesYesSteering real work from a phoneDepends on Telegram and an active Claude Code setup
Claude Code in terminalYes, while the terminal stays openNoManualDeep local coding sessionsTied to one desk and one keyboard
SSH plus tmuxYes, but manually managedPossible, awkwardNo native supportRemote shell workMore setup, less friendly input
IDE copilots or chat wrappersUsually chat context, not process continuityVariesUsually limitedInline assistance in the editorOften better as helpers than as operators

That is the niche. This project is not trying to win the IDE. It is trying to win the moments when you are away from the terminal and still need to keep an agentic session moving. On that axis, persistence matters more than polish.

A split composition shows a messy left side where every message spawns a new paper process, while the right side shows one anchored machine holding the thread of conversation together. The contrast explains why persistence beats restart-heavy chat wrappers.
Fresh process per message is noisy. One anchored session is calmer, cheaper, and easier to resume.

The Bigger Pattern

The broader lesson is bigger than Telegram. Useful agent tools are starting to look like control planes: stateful backend, lightweight front end, multimodal input, and a clear path back into the same work. That is a better shape for real work than endless prompt boxes, because the session survives the device that started it. This repo is small, but it points in the right direction.