How to Manage Multiple AI Coding Agents
Running one AI coding agent is straightforward. Running five at once across different repos, branches, and containers turns into a mess of terminal tabs and forgotten sessions. Here is how to bring order to the chaos.
The Problem with Multiple Agents
AI coding agents like Claude Code, Codex, Gemini CLI, and OpenCode each need their own terminal session. When you are working on a real project, you might have one agent refactoring a module, another writing tests, and a third exploring an API integration. Each runs in its own terminal, and you quickly lose track of which is which.
The typical workaround is a collection of tmux sessions or terminal tabs with cryptic names. You switch between them trying to remember which agent is doing what, whether it is waiting for input, or if it finished ten minutes ago. Context switching becomes the bottleneck instead of the AI.
A Session Manager Built for AI Agents
Agent of Empires (aoe) is a terminal session manager designed specifically for this workflow. It gives you a TUI dashboard where every agent session is visible at a glance with real-time status detection. You can see which agents are actively generating code, which are waiting for your input, and which have finished.
Sessions are organized into groups, so you can keep your work project agents separate from your side project experiments. Everything runs in tmux underneath, which means sessions persist even if you close the TUI or disconnect SSH. Your agents keep running.
Key Features for Multi-Agent Workflows
Supported agents
aoe has built-in status detection for Claude Code, Codex, Gemini CLI, OpenCode, and Mistral Vibe. Any terminal-based agent can be managed as a session.
Status Detection
aoe automatically detects the state of your coding agent sessions by inspecting running processes in each tmux session. No agent-specific plugins or configuration needed. The dashboard shows whether each instance is:
- Active: The agent is generating code or running commands
- Waiting: The agent needs your input or approval
- Idle: The session is open but no agent is running
Git Worktrees for Parallel Work
Instead of cloning the same repo multiple times, aoe uses git worktrees to let multiple agents work on different branches of the same repository simultaneously. Each agent gets its own working directory with its own branch, but they all share the same git history.
Docker Sandboxing
For safety, you can run agents inside Docker containers. Each session gets its own isolated environment with configurable volume mounts, persistent authentication, and custom images. If an agent does something unexpected, it is contained.
Session Groups
Organize your sessions into hierarchical folders. Keep client work in one group, open source contributions in another, and experimental agents in a third. Groups can be collapsed and expanded in the TUI.
Manual tmux vs. aoe
You can absolutely manage AI agents with raw tmux. Many developers do. But the workflow gets tedious quickly:
- Without aoe: Create tmux sessions manually, name them yourself, switch between them with keyboard shortcuts, check each one individually for status, manage worktrees by hand, set up Docker containers separately.
- With aoe:
aoe adda session, see all statuses in a dashboard, navigate with arrow keys, get automatic worktree and container lifecycle management.
The difference is most noticeable when you are running 3+ agents. At that point, the overhead of manual management starts eating into the productivity gains from using AI in the first place.