The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
CodexClaw
Telegram bot for Claude Code and Codex CLI with MCP routing, multi-agent orchestration, cron jobs, and access controls.
Install
git clone https://github.com/MackDing/CodexClawInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →CodexClaw
A Telegram bot that gives you remote access to @openai/codex through a Node.js runtime with two Codex backends: the Codex SDK and the legacy CLI/PTy path.
It is strictly inspired by RichardAtCT/claude-code-telegram, but this project is implemented for CodeX SDK/CLI + MCP + Subagent routing.
What Is This?
This bot connects Telegram to Codex and routes tasks to the right execution surface:
- Coding tasks -> Codex SDK threads or Codex CLI/PTy sessions
- Explicit tool tasks -> Subagents (
/mcp,GitHub Skill) - Proactive automation -> Cron scheduler for daily summaries and push notifications
Key design goals:
- Keep Codex interactive sessions smooth and stream-safe on Telegram
- Enforce zero-trust access with whitelist-only users
- Avoid duplicate MCP calls by separating Codex MCP vs Bot MCP responsibilities
- Prefer the SDK backend for new installs, while keeping the CLI backend as a fallback
Use This Like A Skill
What It Does
- installs a Telegram-facing Codex runtime
- keeps Codex live sessions scoped to
chat + repo - manages bot-side MCP and GitHub subagents
- exposes repo switching, status, and minimal frontend dev-server control from Telegram
Install
git clone https://github.com/MackDing/CodexClaw.git
cd CodexClaw
npm install
cp .env.example .env
Configure The Minimum
BOT_TOKEN=123456789:telegram-token
ALLOWED_USER_IDS=123456789
STATE_FILE=.codex-telegram-claws-state.json
WORKSPACE_ROOT=.
CODEX_WORKDIR=.
CODEX_BACKEND=sdk
Start The Skill
npm run start
Telegram Quick Use
/status
/repo
/skill
/dev status
/gh create repo my-new-app
For agent-oriented setup, see SKILL.md.
Quick Start
Prerequisites
- Node.js 20+ -- https://nodejs.org/en/download/current
- Codex CLI -- https://github.com/openai/codex
- Telegram Bot Token -- from
@BotFather
Development Commands
npm run start- start the botnpm run dev- watch mode for local developmentnpm run check- TypeScript type and syntax validation for the repositorynpm run typecheck- run the TypeScript compiler in--noEmitmodenpm run lint- ESLint for source, tests, scripts, and local JS/CJS config filesnpm run lint:fix- apply safe lint fixesnpm run format- format repository files with Prettiernpm run format:check- verify formattingnpm test- run the full test suitenpm run healthcheck- static runtime readiness checknpm run healthcheck:strict- stricter production-oriented health checknpm run healthcheck:live- live Codex + Telegram probe against the configured backend and bot tokennpm run telegram:smoke- live Telegram API smoke test when a real bot token is available
Architecture
Telegram Message
-> src/bot/handlers.ts
-> src/orchestrator/router.ts
-> src/runner/ptyManager.ts (coding tasks -> Codex SDK or Codex CLI)
-> src/orchestrator/skills/*.ts (general tasks -> MCP/GitHub subagents)
-> src/bot/formatter.ts
-> Telegram sendMessage/editMessageText
Core modules:
src/index.ts: bootstrap and lifecyclesrc/config.ts: env parsing and validationsrc/bot/: auth middleware, formatting, command handlerssrc/orchestrator/: routing + MCP client + skillssrc/runner/ptyManager.ts: Codex runner abstraction for SDK threads, CLI/PTy sessions, and CLI exec fallbacksrc/cron/scheduler.ts: proactive scheduled push
Similar plugs
Reverse engineer anything with agents, from app behavior down to native binaries.
Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io