Skip to content
Rina edited this page May 13, 2026 · 3 revisions

claude-tmux-discord

A Discord bot that remote-controls AI coding agents (Claude Code, Codex, Gemini, Copilot, etc.) running inside tmux sessions. Agents reply directly to Discord using the bundled discord-send CLI — no output scraping or polling.

How It Works

User types in Discord → buffer → /enter → tmux send-keys → AI Agent
AI Agent → runs discord-send → Discord REST API → message in channel

Each Discord channel gets an isolated tmux session with its own agent instance and workspace directory. Messages accumulate in a buffer until /enter flushes them as a single prompt.

Quick Start

Docker (Recommended)

git clone https://github.com/aomkoyo/claude-tmux-discord.git
cd claude-tmux-discord
cp .env.example .env    # fill in DISCORD_TOKEN
docker compose up -d
docker compose exec bot claude login   # authenticate Claude

Local (Bare Metal)

git clone https://github.com/aomkoyo/claude-tmux-discord.git
cd claude-tmux-discord
./setup.sh              # installs deps, generates Prisma client
cp .env.example .env    # fill in DISCORD_TOKEN
pnpm dev                # starts with hot-reload

Wiki Pages

Key Features

  • Multi-agent — Run Claude, Codex, Gemini, Copilot, or any CLI agent per room
  • Projects — Group channels under a Discord category with shared workspace
  • Per-channel isolation — Each channel gets its own tmux session
  • Buffer-then-enter — Compose multi-message prompts with attachments
  • File attachments — Upload images/files that agents can see and reference
  • Permission modesdefault, plan, acceptEdits, bypassPermissions
  • Access control — ACL system for user, role, and channel allowlisting
  • Auto-resume — Sessions resume on bot restart using per-channel marker files
  • Auto-registration — Channels in project categories auto-register as rooms
  • Docker-ready — Multi-stage build with CI/CD to GHCR

Clone this wiki locally