Building a Custom AI Coding Assistant by Orchestrating Multiple CLIs
A research summary on multi-CLI agent orchestration: patterns, tooling, and real-world results.
1. The Idea
Rather than forcing a single AI coding tool (Claude Code, Codex CLI, Gemini CLI, OpenCode) to do everything, developers can run several of them side-by-side, each in an isolated workspace, with a supervisor — human or AI — that decomposes work, dispatches tasks, and reviews results.
You cannot mix plugins across these tools directly, but you can combine their strengths through:
- Shared configurations & workflows — unified config repos and cross-CLI workflow projects
- Cross-CLI orchestration — agents take different roles and collaborate on complex tasks
- Concept mapping & migration — converting plugins/skills between ecosystems (e.g.,
wshobson/agentsgenerates native artifacts for Codex CLI, OpenCode, Gemini CLI, Cursor, Copilot, and Claude Code from one Markdown source: 94 plugins, 203 agents, 175 skills, 109 commands)
Since early 2026, running multiple AI coding CLIs in parallel has crystallized into a recognized practice the community calls "agentmaxxing".
2. The Core Pattern
The classic workflow has four steps:
- Decompose — break work into independent, parallelizable tasks with clear file boundaries
- Launch — start agents in isolated workspaces (git worktrees) with focused prompts
- Review — inspect output as each agent completes
- Merge — integrate completed branches into main
The fundamental isolation primitive is git worktree — each agent gets its own branch, directory, and terminal session sharing the same object store, so agents never touch each other's files.
The critical constraint: if Agent B needs something Agent A hasn't created yet, they cannot run in parallel. Task decomposition quality determines the ROI.
The developer's role inverts: from writing code to decomposing work, dispatching agents, and reviewing output — a "compound engineering" model where planning and review dominate.
3. Real-World Use Cases
Parallel feature development
Decompose a feature into independent tasks (e.g., auth API, settings UI, DB migration) and launch one agent per worktree. incident.io runs 4–5 concurrent Claude agents; a UI editor took 10 minutes instead of ~2 hours, with an 18% build speed improvement.
Multi-model code review
The same PR gets reviewed in parallel by different agents that catch different things:
| Reviewer | Strength |
|---|---|
| Codex | Edge cases, logic errors, race conditions — lowest false-positive rate |
| Gemini | Security issues, scalability problems — free tier |
| Claude | Architectural concerns — validates what others flag |
Cost-tiered task routing
Match the agent to the task economics:
| Tool | Best for | Cost profile |
|---|---|---|
| Claude Code | Complex reasoning-heavy refactors | $10–30/day via API |
| Codex CLI | Routine development, fast iterations | $5–15/day via API |
| Gemini CLI | Simple prompts, light work | Free tier (1,000 req/day) |
Council / consensus
Ask all configured agents the same question in parallel, then let a "chairman" agent synthesize a conclusion — inspired by Karpathy's LLM Council, but using your installed CLIs instead of direct API calls (no additional API costs).
Cadence-team pipelines
JSON-driven workflows where Gemini, Codex, and Claude each handle designated phases of a development pipeline (e.g., catlog22/Claude-Code-Workflow).
4. Design Patterns (What the Tools Converge On)
-
Supervisor / Chief-of-Staff pattern — one agent (or the human) holds business context, routes tasks, monitors progress, and only escalates to the human. Workers stay focused on code. (CLI Agent Orchestrator, EloPhanto)
-
Worktree isolation — one git worktree per agent; the standard anti-conflict primitive. (parallel-code, worktrunk, agent-cli)
-
Adversarial cross-model review — the writer is always reviewed by a different model; orchestrators validate independently and never trust subagent self-reports. (metaswarm)
-
Parallel review gates — independent specialist reviewers run concurrently (e.g., 5-agent design review: PM, Architect, Designer, Security, CTO) with an iteration cap before human escalation. (metaswarm)
-
Context broker / daemon pattern — persistent background daemons per model keep context alive, cutting prompt size from 5,000–20,000 tokens to 50–200 tokens per call; agents can delegate sub-tasks cross-model (Codex delegating to OpenCode). (claude_code_bridge)
-
Message-bus coordination — agents coordinate via a SQLite message system + FIFO merge queue with tiered conflict resolution and a watchdog fleet monitor. (Overstory)
-
Three-tier orchestration (Addy Osmani) — orchestrate at three levels simultaneously:
- In-process: subagents within a single session (Codex
max_threads=6) - Local parallel: independent CLI processes in worktrees
-
Cloud async: fire-and-forget (
codex cloud exec) — Codex Cloud tasks consume no local resources, enabling 3 local Claude instances + 4 Codex Cloud tasks = 7-way parallelism -
Knowledge-driven development — a git-native knowledge base of patterns/gotchas, primed selectively before each task (
bd prime --files ... --keywords ...), so agents get relevant lessons without bloating context. (metaswarm, BEADS)
5. Key Numbers & Honest Caveats
- Optimal concurrency: 5–7 agents on modern hardware — before human review bandwidth becomes the bottleneck
- Multi-agent coordination: +81% gains on parallelizable tasks, but −70% degradation on sequential work
- Overhead: 5–10 minutes setup; tasks under ~15 minutes of sequential time have negative ROI
- Cost multiplies: three agents running simultaneously triple token consumption
- DORA 2025: 90% AI adoption correlated with +9% bug rates, +91% code review time, +154% PR size — parallel agents concentrate, not eliminate, the review requirement
- Overstory's README warning: "compounding error rates, cost amplification, debugging complexity, and merge conflicts are the normal case, not edge cases"
- Most honest framing: the benefit isn't raw speed — it's clarity (named tasks, visible branches, reviewable diffs)
6. The Tooling Landscape (GitHub Repos)
| Tool | What it does | Pattern |
|---|---|---|
| awslabs/cli-agent-orchestrator (969★) | Local server + supervisor delegates to specialist CLIs (Claude, Codex, Gemini, OpenCode, Cursor, Copilot, Hermes, Kimi, Antigravity) in tmux sessions; Web UI, flows, memory, tool restrictions | Supervisor |
| dsifry/metaswarm (370★) | 18 agents, 9-phase SDLC, IMPLEMENT→VALIDATE→ADVERSARIAL REVIEW→COMMIT, quality gates, self-learning knowledge base | Swarm + gates |
| 0xwilliamortiz/agents-council (295★) | Parallel opinions from Codex/Gemini/etc., chairman synthesis; npx installable skill | Council |
| johannesjo/parallel-code (~512★) | Electron desktop app: one worktree per task panel, runs all 3 CLIs natively, built-in diff viewer | Worktree isolation |
| bfly123/claude_code_bridge (~2.1k★) | Persistent per-model daemons, ~50–200 token context carry-over, cross-model delegation | Context broker |
| jayminwest/overstory | SQLite message bus + FIFO merge queue + tiered watchdog; 11 runtime adapters | Mailbox |
| generalaction/emdash (YC W26) | 23 CLI providers, Linear/GitHub/Jira ticket intake, Plan Mode safety gate | Provider-agnostic fleet |
| josstei/maestro-orchestrate | Specialist personas; classifies tasks into Express vs 4-phase workflows | Workflow classifier |
| max-sixty/worktrunk | Worktree lifecycle CLI (wt new/switch/list), hooks for auto-setup |
Worktree manager |
| basnijholt/agent-cli | One-command bootstrap: worktree + deps + env + launch (~4s) | Bootstrapper |
| catlog22/Claude-Code-Workflow (2.1k★, archived) | JSON-driven cadence-team workflows across CLIs | Pipeline |
| wshobson/agents (38.4k★) | Cross-platform marketplace: 94 plugins / 203 agents / 175 skills / 109 commands for 6 harnesses | Cross-harness |
Related foundations: karpathy/llm-council (the council idea), steveyegge/beads (git-native task tracking), obra/superpowers (agentic skills methodology).
7. Getting Started
- Start single: get comfortable with one CLI (e.g., Claude Code or Codex) and its native subagents first.
- Add worktree discipline: adopt
git worktreeor a tool like Worktrunk so agents never share state. - Install a marketplace like
wshobson/agentsfor cross-CLI plugins/skills. - Try orchestration:
uv tool install cli-agent-orchestrator(CAO) for supervisor-based delegation, or metaswarm's/start-taskfor full SDLC workflow. - Route by economics: Claude for hard refactors, Codex for routine, Gemini for simple tasks.
- Keep the human in the loop: review everything; parallel agents concentrate cognitive load.
References
Repos - https://github.com/awslabs/cli-agent-orchestrator · docs: https://awslabs.github.io/cli-agent-orchestrator/ - https://github.com/dsifry/metaswarm - https://github.com/0xwilliamortiz/agents-council - https://github.com/johannesjo/parallel-code - https://github.com/bfly123/claude_code_bridge - https://github.com/jayminwest/overstory - https://github.com/generalaction/emdash - https://github.com/josstei/maestro-orchestrate - https://github.com/max-sixty/worktrunk · https://worktrunk.dev/ - https://github.com/catlog22/Claude-Code-Workflow - https://github.com/wshobson/agents - https://github.com/karpathy/llm-council · https://github.com/steveyegge/beads
Blog posts - Daniel Vaughan, Agentmaxxing: Parallel Multi-CLI Orchestration with Codex CLI, Claude Code and Gemini CLI (Apr 2026): https://codex.danielvaughan.com/2026/04/11/agentmaxxing-parallel-multi-cli-orchestration/ - AgentMarketCap, Open-Source Multi-Agent CLI Orchestration (Apr 2026): https://agentmarketcap.ai/blog/2026/04/06/open-source-multi-agent-cli-orchestration-parallel-code-claude-bridge-moonmind - EloPhanto, How I Orchestrate Claude Code, Codex, and Gemini CLI as a Swarm (Feb 2026): https://dev.to/elophanto/how-i-orchestrate-claude-code-codex-and-gemini-cli-as-a-swarm-4p3c - Bibit Labs, Multi-Model Orchestration: Running Claude, Gemini, and Codex CLI Together (May 2026): https://bibitlabs.com/multi-model-orchestration-running-claude-gemini-and-codex-cli-together/ - Bas Nijholt, Parallel agentic coding made trivial with agent-cli dev: https://www.nijho.lt/post/parallel-agentic-coding/ - Stackademic, Multi-Agent Architectures in Agentic Coding (Mar 2026): https://blog.stackademic.com/multi-agent-architectures-in-agentic-coding-inside-claude-codex-and-gemini-729956c17563