CC-Remote Control — Discord Bot for Claude Code
Discord bot that wraps Claude Code CLI, enabling remote control from any device via Discord messages. Each channel maintains a persistent Claude Code session.
Current Focus
Architecture is complete. Next step is deployment (tmux on server) and live testing of --resume session persistence across messages.
Open Tasks
- Try OpenACP first:
npm install -g @openacp/cli && openacp→ wizard → Discord + LiteLLM proxy - If OpenACP works, retire custom Python bot approach
- If custom bot: deploy (
python claude_discord_bot.py) under tmux on the server - Set
ALLOWED_USER_IDto actual Discord user ID - Set
PROJECT_DIRto actual project path - Configure
ANTHROPIC_BASE_URLto point at LiteLLM proxy (http://172.18.0.1:4001) - Test
--resumesession persistence and!reset/!sessioncommands
Key Decisions / Insights
- OpenACP is the recommended first try — multi-platform (Telegram/Discord/Slack), one-command install, works with local LiteLLM proxy, no Anthropic auth required
- TeleClaw is the best Telegram-only option for production use (SQLite sessions, live streaming, auto-recovery)
--resume <session_id>is the key mechanism — maintains Claude Code context across separate subprocess calls--output-format stream-jsonenables parsing of text, tool calls, and session ID from stdout--dangerously-skip-permissionsneeded for autonomous operation
People
Progress Log
2026-05-29
Architected full Discord bot implementation. Core logic: claude -p <prompt> --output-format stream-json --dangerously-skip-permissions [--resume <session_id>]. Session ID extracted from system.init event in stream-json output and stored per channel. Bot splits responses over 2000 chars into multiple Discord messages. Built-in commands: !reset (clear session), !session (show current ID). Run under tmux for persistence.
# Key session management pattern
sessions = {} # channel_id -> session_id
# On each message:
session_id = sessions.get(message.channel.id)
text, new_session_id, tool_uses = await run_claude(prompt, session_id)
if new_session_id:
sessions[message.channel.id] = new_session_id2026-06-01
Researched landscape of third-party Claude Code remote tools. OpenACP emerges as the best fit for the LiteLLM + Discord setup — multi-platform, self-hosted, one wizard install, no Anthropic auth. Decision: try OpenACP before investing more time in the custom Python bot. Reinstalled @openacp/cli via npm (config at ~/openacp-workspace/.openacp/config.json survives reinstall). Also noted TeleClaw (Telegram, production-grade, session management + live streaming) and claude-notifications-go (notification-only, no command sending) as alternatives.