DEV Community

Cover image for How to run Claude Code, Gemini, and Codex side-by-side from Discord
psychomafia.tiger
psychomafia.tiger

Posted on

How to run Claude Code, Gemini, and Codex side-by-side from Discord

Last week I had Claude Code running a refactor in one terminal tab, Codex generating boilerplate in another, and Gemini reviewing a PR in a third. I alt-tabbed to check on Claude Code and it had been waiting for a permission prompt for 20 minutes. Codex had finished and I didn't notice. Gemini was halfway through but I couldn't tell from the tab title.

Three agents, three terminal windows, zero visibility when I'm not staring at them.

Claude Code is great for complex multi-file work but burns tokens on simple tasks. Codex is faster and cheaper for straightforward changes. Gemini handles code reviews well. I wanted to use all three, but managing them in separate terminals wasn't working. Especially when I step away from my desk.

I set up OpenACP to run all three from Discord. My team already uses it, and threads keep each agent session separate.

What this setup looks like

OpenACP is a self-hosted bridge that connects AI coding agents to messaging platforms. For Discord specifically, it creates a forum channel where each agent session gets its own thread. You can run Claude Code in one thread, Codex in another, and Gemini in a third, all at the same time.

Discord Server
└── #openacp-sessions (forum channel)
    ├── Fix auth middleware race condition   (Claude Code)
    ├── Add user endpoint scaffolding        (Codex)
    └── Review PR #42 error handling         (Gemini)
└── #openacp-notifications
    └── Completion alerts with links back to threads
Enter fullscreen mode Exit fullscreen mode

Each thread shows real-time streaming: file reads, code writes, terminal commands, all as they happen. When an agent needs to write a file or run a command, Allow and Reject buttons show up in the thread. I approve from my phone and the agent continues.

Setting up Discord

The Discord setup takes about 10 minutes. You need a server where you have Manage Server permission.

1. Create a bot on the Discord Developer Portal

Go to discord.com/developers/applications, create a new application, then go to Bot in the sidebar. Reset the token and copy it immediately. Under Privileged Gateway Intents, enable Message Content Intent.

2. Generate an invite URL

Go to OAuth2 → URL Generator. Check bot and applications.commands under Scopes. Under Bot Permissions, check: Manage Channels, Send Messages, Send Messages in Threads, Create Public Threads, Manage Threads, Manage Messages, Embed Links, Attach Files, Read Message History, Use Slash Commands, Add Reactions.

Or just use this permission integer in the URL:

https://discord.com/oauth2/authorize?client_id=YOUR_APP_ID&scope=bot+applications.commands&permissions=328565073936
Enter fullscreen mode Exit fullscreen mode

Replace YOUR_APP_ID with your Application ID from the portal.

3. Invite the bot and grab the Guild ID

Open the invite URL, select your server, authorize. Then enable Developer Mode in Discord settings (User Settings → Advanced), right-click your server name, copy the Server ID.

4. Install and configure OpenACP

npm install -g @openacp/cli
openacp
Enter fullscreen mode Exit fullscreen mode

The setup wizard asks which platform you want. Pick Discord, paste the bot token, paste the Guild ID. It validates both and saves the config.

Start it:

openacp start
Enter fullscreen mode Exit fullscreen mode

OpenACP creates two channels automatically: #openacp-sessions (a forum channel for sessions) and #openacp-notifications (a text channel for completion alerts). The bot registers slash commands within seconds.

Installing multiple agents

By default OpenACP uses Claude Code. To add more agents:

openacp agents install gemini
openacp agents install codex
Enter fullscreen mode Exit fullscreen mode

These pull from the ACP registry. You can see everything available with openacp agents.

Running agents side-by-side

Once you have multiple agents installed, open your Discord server and type:

/new claude ~/projects/backend
Enter fullscreen mode Exit fullscreen mode

A new forum thread opens. It starts as "🔄 claude — New Session" while it initializes. Once you send your first message and the agent responds, it auto-renames to a short summary of the task, something like "Fix auth middleware race condition".

While that's running, open a new thread:

/new codex ~/projects/backend
Enter fullscreen mode Exit fullscreen mode

Now Codex is working on the same project in a separate thread. You can give it a different task. Both agents run in parallel, each in their own isolated session.

Need a code review? Third thread:

/new gemini ~/projects/backend
Enter fullscreen mode Exit fullscreen mode

Three threads, three agents, one Discord server. Each one streams independently. When a session finishes, a completion notification goes to #openacp-notifications with a link back to the thread.

How the thread UI works

Each thread shows:

  • Tool call embeds with a colored sidebar. Blue while the agent is working, green when done, red on error. These group all the file reads, writes, grep calls, and terminal commands into a single embed so the thread doesn't flood with individual messages.
  • Action row buttons below the embed: Low, Medium, High to control how much detail you see, and Cancel to abort. No slash commands needed for the common actions.
  • Permission buttons when the agent wants to do something destructive. Allow or Reject, right there in the thread. If you're on your phone and the agent wants to run rm -rf node_modules && npm install, you see the full command and can decide.
  • Auto-naming after the first prompt. The thread renames from "🔄 claude — New Session" to a short summary of the task, like "Fix auth middleware race condition".

Continuing or changing agents

/newchat starts a fresh session in the same thread with the same agent and workspace. Useful when you want a clean slate without losing the conversation history above.

To use a different agent, run /new codex ~/projects/backend from any channel. It opens a fresh thread. There's no way to swap agents inside an existing thread, which honestly keeps things cleaner. Each thread is one agent, one task.

A workflow I use daily

Morning. I have a PR to review and two bugs to fix.

Thread 1: /new gemini ~/projects/api. I send "Review the diff on branch feature/notifications, focus on error handling." Gemini reads the diff, posts comments in the thread. I read them on my phone over coffee.

Thread 2: /new claude ~/projects/api. I send "The webhook handler in src/webhooks/stripe.ts is silently swallowing errors. Fix it and add proper logging." Claude Code digs through the codebase, finds the issue, proposes a fix. I tap Allow when it wants to write the file.

Thread 3: /new codex ~/projects/api. I send "Add a GET endpoint at /api/v1/health that returns the server uptime and version." Simple task, Codex handles it in under a minute.

All three finish at different times. Each one posts a completion notification to #openacp-notifications. I check the results when I'm back at my desk, or from my phone if I'm still out.

Total cost for the morning: usually under $5. OpenACP tracks per-session token usage and cost, and you can set monthly budget limits that pause the agent when hit.

Slash commands reference

These register automatically when OpenACP starts:

Command What it does
/new [agent] [workspace] Create a new session in a new thread
/newchat New session with same agent and workspace
/cancel Cancel the session in the current thread
/status Show session or system status
/sessions List all active sessions
/menu Open the control panel
/agents Browse available agents
/install [name] Install an agent
/handoff Get a terminal command to continue locally
/dangerous Toggle auto-approve for all permission requests
`/outputmode [low medium
{% raw %}`/tts [on off]`
/doctor Run system diagnostics
/help Show all commands

Things to know

Everything except the model API calls stays on your machine. No relay, no third-party storing your sessions. Swapping between agents doesn't change your messaging setup.

Some things I ran into. The forum channel works best with Discord Community mode enabled. Without it, OpenACP falls back to a regular text channel with threads, which is less organized. Discord's rate limits on message edits mean streaming output sometimes lags a couple seconds behind the actual agent. And if you're running three agents simultaneously, you're paying three sets of API costs, so the budget limit feature is worth setting up early.

Getting started

npm install -g @openacp/cli
openacp
Enter fullscreen mode Exit fullscreen mode

Pick Discord during setup. The wizard validates your bot token, connects to your server, and creates the channels. Takes about 10 minutes total.

Source: https://github.com/Open-ACP/OpenACP
Discord setup guide: https://openacp.gitbook.io/docs/platform-setup/discord
ACP registry (browse agents): https://agentclientprotocol.com/get-started/registry

MIT licensed. I'm a contributor to OpenACP. Happy to answer questions about the multi-agent setup or Discord integration below.

Top comments (0)