# Ductor: Control Claude Code and Codex From Telegram

> Ductor exposes Claude Code, Codex, and Gemini CLI through a Telegram bot with persistent memory, cron scheduling, and multi-agent delegation.

Published: 2026-03-17
URL: https://daniliants.com/insights/github-pleaseprompto-ductor/
Tags: claude-code, telegram-bot, ai-agents, cli-automation, self-hosting, multi-agent, cron-jobs

---

## Summary

Ductor is a Python tool that exposes Claude Code, Codex CLI, and Gemini CLI through a Telegram (or Matrix) bot - running the official CLIs as subprocesses with zero API spoofing. It adds persistent memory, named sessions, background tasks, cron scheduling, webhooks, Docker sandboxing, and multi-agent delegation on top of existing subscriptions like Claude Max.

## Key Insight

- Uses official CLI binaries as subprocesses, not SDK patches - compliant with provider ToS and works with any active subscription (Claude Max, etc.), no separate API key required
- Multi-context architecture: private chat, Telegram group topics, named sessions, and background tasks each maintain isolated conversation state while sharing a single `~/.ductor/` workspace
- Cron + webhooks enable fully autonomous, unattended agent runs - e.g. daily reports, scheduled research tasks, metric digests - with results routed back to specific chats or topics
- Cross-agent delegation: a Claude agent can hand off subtasks to a Codex or Gemini sub-agent, each with its own workspace, memory, and config
- State is entirely plain files (JSON + Markdown) - no database, portable, easy to inspect and back up