How puduhepa uses Claude
puduhepa is built around the Claude CLI — not the
Anthropic API. The whole stack runs on a single Claude Max subscription
that the user authenticates once with claude setup-token. No API keys,
no per-token billing, no rate-meter math.
What runs where
┌─ Telegram ────┐ ┌─ Bot (Go) ───┐ ┌─ Mayor (tmux + claude) ─┐
│ messages in │ ─► │ ack instantly│ ─► │ persistent session, │
│ photos / docs │ │ ship to inbox│ │ reads vault, tools: │
│ /commands │ ◄─ │ poll outbox │ ◄─ │ Edit/Read/Bash/MCP │
└───────────────┘ └──────────────┘ └─────────────────────────┘
│ │
└──┬────────────────────┘
▼
┌─ Vault (git) ──┐
│ markdown + │
│ media, auto- │
│ committed, │
│ pushed to │
│ GitHub │
└────────────────┘
The Go bot is intentionally dumb: it relays Telegram messages into mayor's
inbox via gastown's gt mail
plus a nudge, and mirrors mayor's replies back out. All reasoning, file
edits, and tool use happen inside the long-lived claude session
running under tmux.
Why a long-lived session
Per-turn claude -p "..." invocations exist (the bot uses them for a
few admin commands), but the main conversation lives in a single mayor
session that never restarts unless something crashes. That's how
context survives across days — when you ask "what did I tell you
yesterday about X?", mayor still has yesterday in its working memory.
When context does eventually compact, the vault is the canonical
backup: the bot writes every inbound + outbound message to
telegram/history/YYYY-MM-DD.md so mayor can grep history when
needed.
Persona
Mayor's behavior is shaped by persona.md
in the puduhepa repo. The container injects it into mayor's project
memory at boot, so every gastown agent sharing the town reads the same
contract: brief replies, phone-first UX, vault writes only inside the
designated rig, etc.
What's deliberately not here
- No Anthropic API client in the codebase. Search the source for
anthropicor@anthropic-ai/sdkand you'll find none. - No webhook to Anthropic's servers. Everything flows through the local
claudebinary which holds its own OAuth in/root/.claude/. - No per-message cost tracking. The Max subscription is flat-rate.
Source
- Bot: erkantaylan/puduhepa
- Site: erkantaylan/puduhepa-site
- Persona contract: persona.md