CCGram
Drive Claude Code, Codex and other terminal AI agents from Telegram while your session stays in tmux/herdr/agterm.
- Source repo
- alexei-led/ccgram
- Stars
- ★ 289
- Last updated
- 1d ago v4.25.0
- FARS reviewed
- Nov 30, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 59/100 · Major gaps
At a glance
- How it runs
- Works with
- Portable with changesCodex · Claude Code
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A developer who leaves the desk during a long build or test run and checks the agent's output and presses Enter from a phone.
- Not a fit if
- Users who need to run natively on Windows (only Linux/macOS/WSL2)
- Teams unwilling to route terminal sessions and output through Telegram
- Individuals who don't already use a tmux/herdr/agterm multiplexer
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-30latest release v4.25.0 (2026-11-18)
- Source review
- 59/100 · Major gaps
What does this agent do, and when should you use it?
CCGram is a bridge between Telegram and a terminal multiplexer (tmux, herdr, or agterm) that lets you keep monitoring and steering AI coding agents after you walk away from the desk. Its distinguishing design is that it sits on top of the multiplexer rather than wrapping an agent SDK, so the agent process stays exactly where it was and your terminal session remains the source of truth — you can move between desktop and phone without losing scrollback. Each Telegram topic maps to one tmux window, one guarded Herdr agent session, or one agterm agent pane, in a group or a private chat. CCGram reads agent transcripts and terminal output, forwards keystrokes back, and gets instant events through provider hooks, supporting Claude Code, Codex, Gemini, Pi and Shell side by side with parallel sessions. It ships as a Python package installed via uv, pipx or Homebrew, runs locally, and requires Python 3.14+, a multiplexer and at least one agent CLI.
CCGram runs a long-lived ccgram process that reads TELEGRAM_BOT_TOKEN and ALLOWED_USERS from ~/.ccgram/.env (plus CCGRAM_GROUP_ID in group mode), connects to the Telegram Bot API, and binds topics to terminal targets. A single typed line of the form <agent>[:<mode>] <project|path> [@branch] <instruction...> makes CCGram resolve the project under CCGRAM_PROJECTS_ROOTS (default ~/Workspace), start the agent in a tmux window, Herdr guarded session or agterm pane, name the topic after the line and forward the instruction; /bind adopts an already-running window instead. At runtime it continuously reads agent transcripts and terminal screens and pushes replies, tool updates and status back to Telegram, using async hooks installed with ccgram hook --install (Claude Code SessionStart/Stop, native async hooks for Codex and Pi, a detached worker for Gemini) for instant notifications. Incoming messages, slash commands, voice notes transcribed via Whisper, or raw shell input are converted into keystrokes for the target session; it also provides on-demand or 5-second-refresh terminal screenshots, provider-specific action buttons, one-tap answers to numbered and yes/no prompts, and /send for glob, path or substring file search. Topics are deleted once the terminal session is confirmed closed, failed deletions are persisted and retried, and /sync cleans up stale known topics.
- A developer who leaves the desk during a long build or test run and checks the agent's output and presses Enter from a phone.
- An engineer running Claude Code, Codex and Gemini in parallel who wants one Telegram topic per window without cross-talk.
- Someone whose Claude Code session already lives in tmux and doesn't want to restart elsewhere —
/bindadopts the existing window. - A team running agents on a remote dev box or server who wants Telegram instead of ad-hoc SSH to check progress and answer YOLO-mode prompts.
- A mobile user who dictates instructions by voice (Whisper transcription) or taps buttons for common actions like Screenshot, Mode, Esc and Enter.
- A developer who wants to share a log or build artifact from the workspace into the chat via
/sendsearch.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
uv tool install ccgram
- Environment variables
TELEGRAM_BOT_TOKENCCGRAM_GROUP_ID- Config files
~/.ccgram/.env- Runtime
- Python 3.14+
- Install notes cover
- Windows · macOS · WSL
How do you install or deploy this agent?
Install with uv (recommended), pipx, or Homebrew:
uv tool install ccgram
# or: pipx install ccgram | brew install alexei-led/tap/ccgramPrerequisites: Python 3.14+, tmux or herdr or agterm, and one agent CLI. For the Herdr or agterm backends, install integrations first:
herdr integration install pi
herdr integration install antigravity-cliCreate a bot via @BotFather; for a private chat enable Topics for the bot, for a group add the bot and promote it to Admin. Then create the config file:
TELEGRAM_BOT_TOKEN=your_bot_token_here
ALLOWED_USERS=your_telegram_user_id
# Group setup only:
CCGRAM_GROUP_ID=your_telegram_group_idPlace it at ~/.ccgram/.env. Install hooks:
ccgram hook --installOn Windows, run everything inside WSL2; native Windows is not supported.
How do you use this agent?
Start the service:
ccgramIn the configured group or private bot chat, create a topic and type one line to create the session, bind the topic and forward the instruction:
codex ccgram fix the hook timeout
claude:safe ccgram refactor the parser
pi archfit @perf-sweep profile the scan stageTo adopt an already-running tmux window, use /bind. Use /commands for the current topic's pinned panel. Switch backends with environment variables, for example:
CCGRAM_MULTIPLEXER=herdr
CCGRAM_MULTIPLEXER=agtermTo create automatic topics only for explicitly marked targets:
CCGRAM_TOPIC_DISCOVERY=marked
ccgram topic status
ccgram topic mark TARGETSend workspace files with /send, clean up stale topics with /sync, and answer the recovery banner in a dead topic to resume.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- Bridges at the terminal multiplexer, not an agent SDK, so the session stays the source of truth and you can move phone↔desktop without losing scrollback.
- Handles Claude Code, Codex, Gemini, Pi and Shell together, with one Telegram topic per window or guarded session for independent parallel work.
- The Herdr backend treats
agent.listas the sole identity source and fails closed on missing, malformed, sessionless or legacy bindings, quarantining duplicate targets. - Delivery queue losslessly merges eligible consecutive transcript text for the same topic while keeping tool updates and media separate, with a backlog 'Jump to live' confirmation.
- Low mobile friction: one-line session creation,
/bindadoption, voice transcription, terminal screenshots on a 5-second refresh, and provider-specific action buttons.
- Native Windows is unsupported and requires WSL2; the agterm backend is macOS-only.
- Heavy prerequisites: Python 3.14+, one of tmux/herdr/agterm, an agent CLI, and Telegram bot configuration.
- Delivery is at-least-once, so a Telegram failure or restart before acknowledgement can repeat a transcript message.
- Herdr/agterm guards are not atomic with input dispatch, so delivery can be indeterminate after a post-guard race; avoid rearranging agterm panes during a send.
- Topics and their history are deleted once the session is confirmed closed (unless
CCGRAM_AUTODELETE_DEAD_TOPICS=false), and/synccannot find topics whose IDs CCGram no longer knows.
How does this agent compare with similar options?
The README contrasts CCGram with other Telegram bots that wrap agent SDKs into isolated API sessions you cannot resume in your terminal, arguing that CCGram keeps the terminal session as the source of truth.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| CCGram This agent | 59 · Major gaps | CLIFree + model costs | ★ 289 | 1d ago | Python | Codex · Claude Code |
| agterm | 75 · Some gaps | Desktop appFree | ★ 781 | today | Swift | Codex · Claude Code |
| CCB Multi-Agent Terminal Workspace | 79 · Good | CLIFree + model costs | ★ 3.6k | 7d ago | Python | Codex · Claude Code |
| wmux Agent Workspace | 75 · Good | Desktop app | ★ 472 | 1d ago | TypeScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
README and api/server.py show loopback-only binding, pairing-code length checks, rate limiting, body size caps, and remote clients unable to raise approval mode (non-normal mode returns 422) — positive least-privilege and confirmation evidence. However, agents start in YOLO mode by default, ALLOWED_USERS is the sole access control, and the Telegram token plus Whisper keys live in .env with only documentation-level guidance and no encryption/redaction mechanism, so sensitive_data_handling is deducted to 1. Dependencies have upper/lower bounds (PTB 22.8–22.9, libtmux 0.62–0.63) but no lockfile or vulnerability-scan evidence, so dependency_security is 2 not 3. Rollback has /sync, failed-deletion retries, recovery banners, and CHANGELOG rollback notes but no automated rollback. source_attribution only mentions the original project six-ddc in LICENSE; README does not state the derivative relationship, deducted to 1.
README describes Herdr protocols 14–22, fail-closed behavior, duplicate-target quarantine, and at-least-once delivery concretely, consistent with server.py rate limiting/validation, so self_consistency is 2. But it requires Python 3.14+ and external tmux/herdr/agterm binaries with no compatibility matrix, so dependency_availability is deducted to 1. Failure messages have explicit ProtocolError codes and text in code, so failure_messages is 2.
README clearly supports Linux/macOS/WSL2, excludes native Windows, and notes agterm is macOS-only; scenarios cover phone monitoring, parallel sessions, voice, and file sending, so audience_and_scenarios and environment_fit are 2. capability_boundaries are explicit (/agent manual mode cannot launch/stop/redirect an agent; split topics cannot close the shared session), so 2. trigger_precision has topic discovery modes, mark/unmark, and /sync unflagged preview confirmation, so 2.
README is well structured with complete install steps (uv/pipx/brew), examples and FAQ-style notes, and explicit known limitations (non-atomic delivery, no Windows), so 2. License is MIT and consistent with pyproject, and versioning is backed by hatch-vcs and CHANGELOG, so 2. maintenance_responsibility is deducted to 1 because the publisher is unverified, there is a single author, and no governance is described.
Output usability is high (topic panels, screenshots, commands, recovery flows) and marginal_value lies in preserving terminal sessions rather than SDK isolation, so 2. But it requires creating a Bot, configuring .env, and installing external multiplexers and agent CLIs, so cost_benefit is deducted to 1.
README claims largely map to code/CI (ruff/pyright/deptry/pytest, tmux checksum verification), but some claims (Herdr protocol compatibility, at-least-once delivery) lack independent evidence, so claim_traceability and cross_source_corroboration are 1. The docs distinguish facts from inferences (e.g., 'delivery is not atomic'), so fact_inference_separation is 2.
- Agents start in YOLO mode by default and ALLOWED_USERS is the sole access control; a leaked token equals terminal control.
- Telegram Bot Token and Whisper keys are stored in plaintext .env with no encryption or redaction mechanism.
- Requires Python 3.14+ and external tmux/herdr/agterm binaries; install and compatibility cost is high and no lockfile evidence is present.
- Publisher identity is unverified; maintenance responsibility and update path are unclear.
- Some README behavior claims (Herdr protocol compatibility, at-least-once delivery) lack independent corroboration.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Fixed - Advance the delivery checkpoint after a merged Telegram send completes, even when several messages share one receipt. This prevents a stuck checkpoint from replaying already delivered transcript output after a restart ([#395](https://github.com/alexei-led/ccgram/issues/395)). - Retry transient Telegram photo and document downloads up to three attempts total. Only completed files are saved, existing uploads are not overwritten, and Telegram reports the saved path even if the agent could not be notified ([#397](https://github.com/alexei-led/ccgram/issues/397)). …View on GitHub ↗ -
Release notes excerpt
Flag-driven topic lifecycle - In marked discovery mode, unflagging a markable primary pauses forwarding and closes its Telegram topic without deleting messages or stopping the terminal. Reflagging reopens the same topic without replaying paused transcript output. - Persist paused bindings and source-generation-qualified resume frontiers across restarts; transcript rotation cannot leave a stale cutoff suppressing fresh replies. Fence queued retries, tool batches, drafts and live views against pause/resume generations. …View on GitHub ↗ -
Release notes excerpt
Marked-only topic discovery - Opt in with CCGRAM_TOPIC_DISCOVERY=marked or ccgram run --topic-discovery marked. Automatic discovery remains the default on agterm, Herdr, and tmux. - Select a terminal with ccgram topic mark TARGET; inspect exact target IDs, native owners, and unfinished operations with ccgram topic status. These commands do not need Telegram credentials. In marked mode, unmark TARGET stops future automatic admission without interrupting existing topics. …View on GitHub ↗
FAQ
Do I have to pay for CCGram?
Where does my code and terminal output go?
What happens when an agent crashes or the terminal restarts?
CCGRAM_AUTODELETE_DEAD_TOPICS=false keeps the topic and binding so a later restart can re-link a re-keyed session.Should I use a group or a private chat?
CCGRAM_GROUP_ID set.Can the same message arrive twice?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.