Posted by sixddc 3 hours ago
The problem: Claude Code runs in the terminal. When you step away from your computer, the session keeps working but you lose visibility and control.
CCBot connects Telegram to your tmux session — it reads Claude's output and sends keystrokes back. This means you can switch from desktop to phone mid-conversation, then tmux attach when you're back with full context intact. No separate API session, no lost state.
How it works:
- Each Telegram topic maps 1:1 to a tmux window and Claude session - Real-time notifications for responses, thinking, tool use, and command output - Interactive inline keyboards for permission prompts, plan approvals, and multi-choice questions - Create/kill sessions directly from Telegram via a directory browser - Message history with pagination - A SessionStart hook auto-tracks which Claude session is in which tmux window
The key design choice was operating on tmux rather than the Claude Code SDK. Most Telegram bots for Claude Code create isolated API sessions you can't resume in your terminal. CCBot is just a thin layer over tmux — the terminal stays the source of truth.
CCBot was built using itself: iterating on the code through Claude Code sessions monitored and driven from Telegram.