-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
All configuration is via environment variables, validated by Zod at startup. Invalid or missing required values cause an immediate exit with a descriptive error.
| Variable | Required | Default | Description |
|---|---|---|---|
DISCORD_TOKEN |
Yes | — | Discord bot token |
DISCORD_APP_ID |
No | Derived from token | Bot application ID |
BOT_OWNER_IDS |
No | "" |
Comma-separated Discord user IDs for bot owners |
WORKSPACE_ROOT |
No | /workspace |
Parent directory for per-channel workspaces |
TMUX_SESSION_PREFIX |
No | claude- |
Prefix for tmux session names |
CLAUDE_CMD |
No | claude |
Default Claude CLI command (fallback when no AGENT_* set) |
CLAUDE_SYSTEM_PROMPT |
No | Built-in prompt | Default system prompt. Set to OFF to disable. |
AGENT_<NAME> |
No | — | Define an agent: AGENT_CODEX=codex --full-auto
|
AGENT_<NAME>_PROMPT |
No | — | Per-agent system prompt override |
LOG_LEVEL |
No | info |
Pino log level: trace, debug, info, warn, error, fatal
|
REGISTER_GUILD_ID |
No | (global) | Guild ID for instant command registration |
Agents are defined via AGENT_<NAME>=<full command> env vars. The name becomes lowercase and is used with /new agent:<name> and /agent <name>.
AGENT_CLAUDE=claude --dangerously-skip-permissions
AGENT_CODEX=codex --full-auto
AGENT_GEMINI=gemini --yolo
AGENT_COPILOT=copilotEach agent can have its own system prompt:
AGENT_GEMINI_PROMPT=You are connected to Discord. Use discord-send to reply...If no AGENT_* vars are set, the bot registers a single claude agent using the CLAUDE_CMD value.
See Multi-Agent for full details.
# Required
DISCORD_TOKEN=
# Optional
DISCORD_APP_ID=
BOT_OWNER_IDS=
WORKSPACE_ROOT=/workspace
TMUX_SESSION_PREFIX=claude-
CLAUDE_CMD=claude
LOG_LEVEL=info
REGISTER_GUILD_ID=
# Agents (define via AGENT_<NAME>=<command>)
# AGENT_CLAUDE=claude --dangerously-skip-permissions
# AGENT_CODEX=codex --full-auto
# AGENT_GEMINI=gemini --yolo
# AGENT_COPILOT=copilot
# Per-agent system prompts (optional)
# AGENT_GEMINI_PROMPT=...
# Default system prompt (used when AGENT_<NAME>_PROMPT not set)
# CLAUDE_SYSTEM_PROMPT=If DISCORD_APP_ID is not provided, the bot extracts it from the bot token. Discord bot tokens are structured as base64(userId).timestamp.hmac — the first segment decodes to the application/user ID.
The default system prompt teaches the agent how to communicate with Discord via discord-send. For Claude agents, it's injected via --append-system-prompt. For non-Claude agents, it's sent as the first message after the agent boots.
Set CLAUDE_SYSTEM_PROMPT=OFF to disable system prompt injection entirely.
claude-tmux-discord — Discord bot for per-channel Claude Code sessions via tmux
Setup
Usage
Technical
Help