"I am fluent in over six million forms of communication." C-3PO handled comms for the Rebellion. C3Poh handles comms for your Claude Code agent.
C3Poh lets you DM your Claude Code agent via Telegram and get answers back — from anywhere, on any device.
You're on your phone. You think of something. You message your agent. Claude Code handles it and replies. That's it.
Zero external dependencies. Allowlist-based access control baked in. Takes 5 minutes to set up.
┌─────────────────────────────────────────────────────────────────┐
│ Your Machine │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ │ │ │ │ │ │
│ │ C3Poh │◄────►│ Claude Code │ │ TinMan │ │
│ │ (bot) │ │ (claude) │ │ (scheduler) │ │
│ │ │ │ │ │ │ │
│ └──────┬───────┘ └──────────────┘ └──────┬───────┘ │
│ │ │ │
│ │ ◄─────────── HTTP notify ─────────────────┘ │
│ │ (localhost:7734) │
└─────────┼──────────────────────────────────────────────────────┘
│
│ Long-polling (outbound only)
▼
┌─────────────────────┐
│ Telegram API │
└─────────┬───────────┘
│
▼
┌─────────────────────┐
│ Your Phone │
│ (Telegram app) │
└─────────────────────┘
No inbound ports. No webhooks. No ngrok. C3Poh polls Telegram's API for messages and uses localhost for TinMan notifications.
C3Poh is the voice — it handles communication. Pair it with:
| Tool | Role | Link |
|---|---|---|
| TinMan | The heart — scheduled health checks | tinman_for_claudecode |
| Heartbeat Templates | The playbooks — ready-to-use checklists | heartbeat-templates |
| Agent Blueprints | The brains — starter agent templates | agent-blueprints |
The full stack:
[TinMan] ──heartbeat──► [Claude Code] ──notify──► [C3Poh] ──message──► [Your Phone]
▲ │
└──────────────── your reply ──────────────────┘
One-liner:
curl -fsSL https://raw.githubusercontent.com/andyuninvited/c3poh_for_claudecode/main/install.sh | bashOr pip:
pip install c3poh-for-claudecodeRequirements:
- Python 3.9+
- Claude Code (
claudeCLI in your PATH) - A Telegram bot token (from @BotFather — free, takes 30 seconds)
Step 1: Get a bot token
- Open Telegram → search @BotFather
- Send
/newbotand follow prompts - Copy the token (looks like
123456789:ABCdefGHI...)
Step 2: Find your Telegram user ID
Message @userinfobot on Telegram. It replies with your numeric user ID.
Step 3: Run setup
c3poh initInteractive prompts walk you through token, DM policy, and allowlist.
Step 4: Start
TELEGRAM_BOT_TOKEN=your_token_here c3poh startNow DM your bot on Telegram. Claude Code replies.
c3poh init Interactive first-time setup
c3poh start Start the bot
c3poh test Verify Telegram connection
c3poh test --send-to 123456789 Send a test message to yourself
c3poh status Show config and connection status
Don't skip this. OpenClaw users get burned by leaving this on open.
| Policy | Who can DM | Use when |
|---|---|---|
allowlist |
Only your Telegram user IDs | default — recommended always |
pairing |
First person to /start becomes owner | Single-user, no ID lookup |
open |
Anyone with your bot link | Demos only, never production |
disabled |
Nobody | Notify-only mode (outbound only) |
Set via config or env var:
# Allowlist (recommended)
C3POH_ALLOW_FROM=123456789,987654321 c3poh start
# Pairing (first-user-wins)
C3POH_DM_POLICY=pairing c3poh startC3Poh looks for config at ./c3poh.json then ~/.c3poh/config.json.
{
"dm_policy": "allowlist",
"allow_from": ["123456789"],
"require_mention": true,
"notify_port": 7734,
"notify_host": "127.0.0.1",
"claude_timeout_seconds": 300,
"log_messages": true
}Token is never saved to disk — always set via env var:
export TELEGRAM_BOT_TOKEN=your_token_hereEnvironment variable overrides:
TELEGRAM_BOT_TOKEN=... # required
C3POH_ALLOW_FROM=111,222 # comma-separated Telegram user IDs
C3POH_DM_POLICY=allowlist
C3POH_NOTIFY_PORT=7734
C3POH_CLAUDE_TIMEOUT=300Pair C3Poh with TinMan to get heartbeat alerts on your phone:
In TinMan's config (tinman.json):
{
"notify_c3poh": true,
"c3poh_endpoint": "http://localhost:7734/notify"
}Now when TinMan detects something (disk space low, failing tests, stale branches), it sends the alert to C3Poh → you get a Telegram message.
What C3Poh protects:
- All traffic goes Telegram API → your machine (outbound only)
notify_hostdefaults to127.0.0.1— the notify server is never public- Bot token is never written to disk
- Blocked user IDs are logged
What C3Poh does not do:
- Store your messages anywhere except a local log (opt-out:
"log_messages": false) - Use webhooks (long-polling only — no inbound ports needed)
- Require any cloud account beyond Telegram
What you should do:
- Use
dm_policy: allowlistwith your user ID - Keep your bot token in an env var or password manager, not in a file
- Don't share your bot link publicly if you care about who can use it
You (Telegram) → Telegram API → C3Poh (long-polling)
↓
access check (allowlist)
↓
claude --print "your message"
↓
Claude Code response
↓
Telegram API → You (Telegram)
Long-polling (not webhooks): C3Poh calls Telegram's API every few seconds to check for new messages. No inbound ports, no reverse proxy, no ngrok. Runs from anywhere.
pip install c3poh-for-claudecode[dev]
pytest tests/ -v- v0.2: Slack support
- v0.2: Discord support
- v0.2: Message history context (multi-turn conversations)
- v0.3:
/statusand/helpbot commands - v0.3: File/image send support
- v1.0: Webhook mode (for production deployments)
- TinMan — Heartbeat for Claude Code (the heart to C3Poh's voice)
- Heartbeat Templates — Ready-to-use HEARTBEAT.md files
- Agent Blueprints — Starter templates for AI agents
- Claude Code — the agentic CLI this is built for
GNU GPLv3 — copy-left, and let's evolve together.
See LICENSE for the full text.
Built by @andyuninvited. Star if you've ever wished you could text your agent.