Multi-Agent Orchestration
멀티에이전트 오케스트레이션
A personal orchestration system evolved into a full MCP server ecosystem — Claude, Codex, and Gemini as specialized worker agents with 200+ delegated tasks, custom MCP servers exposing each agent as a callable tool to any MCP client.
Claude, Codex, Gemini를 전문 에이전트로 관리하는 오케스트레이션 시스템. 200+ 위임 태스크, codex-mcp·gemini-mcp로 CLI 에이전트를 MCP 도구로 래핑해 Claude Code·Cursor·Windsurf 등 모든 MCP 클라이언트에서 호출 가능.
Problem
/ 문제Most multi-agent setups treat extra LLMs as cheap labor — auto-route work to whichever model is fastest or cheapest. The result tends to be a swarm of opaque calls, lost context, and outputs nobody verifies. The starting question here was different: if Claude is already capable of doing the work directly, what is a second model actually for?
대부분의 멀티에이전트 구성은 추가 LLM을 값싼 노동력처럼 다룬다 — 빠르거나 싼 모델로 자동 라우팅한다. 결과는 보통 불투명한 호출의 떼와 잃어버린 맥락, 그리고 아무도 검증하지 않는 출력물이다. 이 시스템의 출발점은 달랐다 — Claude가 이미 직접 해낼 수 있다면, 두 번째 모델은 정확히 무엇을 위해 있는가?
Architecture
/ 아키텍처Key Decisions
/ 핵심 결정Verification-first, not labor offloading
노동 분담이 아닌 교차검증 우선
Claude is the primary executor — edits files, runs analysis, builds plans, calls WebSearch directly. Codex and Gemini are not workers; they are second opinions. Codex is invoked when an independent perspective on architecture or assumptions is worth the round-trip. Gemini is invoked when Google-indexed facts or 2M+ context windows matter. The constraint that flows from this: a delegation has to either reduce hallucination, challenge a design, or read something Claude cannot — otherwise it does not happen.
Claude가 주 실행자다 — 파일 편집, 분석, 계획 수립, WebSearch까지 직접 한다. Codex와 Gemini는 워커가 아니라 두 번째 의견이다. Codex는 아키텍처나 가정에 대한 독립 관점이 round-trip 비용을 정당화할 때 호출한다. Gemini는 구글 인덱스 사실 검증이나 2M+ 컨텍스트가 필요할 때 호출한다. 여기서 따라오는 제약은 명확하다 — 위임은 할루시네이션을 줄이거나, 설계에 도전하거나, Claude가 못 읽는 것을 읽어야 한다. 그 외엔 안 한다.
No auto-trigger — the user owns delegation timing
자동 트리거 없음 — 위임 타이밍은 사용자가 정한다
Claude does not silently route work to subagents. In high-risk contexts (migration, auth, crypto, security) it adds one line at the end of an answer suggesting a possible /codex check — and stops there. The user calls /codex or /gemini through a slash skill, picks from a 3–5 item recommendation menu the skill assembles from current git state and recent diff, and confirms with a one-line echo. This trades throughput for trust: the user always knows when another model spent tokens on their work.
Claude는 서브에이전트로 작업을 조용히 라우팅하지 않는다. 고위험 맥락(migration·auth·crypto·security)에서는 답 끝에 "/codex 교차검증 가능" 한 줄만 흘리고 멈춘다. 사용자가 /codex 또는 /gemini 슬래시 스킬을 직접 호출하면, 스킬이 현재 git 상태와 최근 diff에서 3~5개 추천 메뉴를 조립해 보여주고, 사용자가 한 줄 echo-confirm으로 확정한다. 처리량을 신뢰와 맞바꾼 셈이다 — 다른 모델이 너의 작업에 토큰을 쓴 순간을 사용자가 항상 안다.
Background + failure-tolerant — the loop never blocks
백그라운드 + 실패 허용 — 루프가 절대 블로킹되지 않는다
Every external call is dispatched with --background and a soft failure path. Claude continues editing while Codex thinks for two minutes; if the call fails, the original work is unaffected. The dispatch wrapper (codex-dispatch.sh, gemini-dispatch.sh) auto-injects the project CLAUDE.md so the subagent has matching project context, attaches --background by default, and exposes resume / wait subcommands so a long-running task can re-enter the conversation as a notification when ready.
모든 외부 호출은 --background와 soft failure path로 디스패치된다. Codex가 2분 생각하는 동안 Claude는 편집을 계속하고, 호출이 실패해도 원래 작업은 영향이 없다. dispatch wrapper(codex-dispatch.sh, gemini-dispatch.sh)는 프로젝트 CLAUDE.md를 자동 주입해 서브에이전트가 같은 프로젝트 맥락을 갖도록 하고, --background를 기본으로 붙이며, resume/wait 서브커맨드로 장시간 작업이 준비되면 알림으로 대화에 다시 들어오게 한다.
Dispatch wrappers absorb CLI churn
Dispatch wrapper가 CLI 변동을 흡수한다
The system started with MCP servers wrapping each CLI agent — codex-mcp, gemini-mcp — exposing them as tools to any MCP-compatible editor. That worked, but every Codex or Gemini CLI release shifted flag names and config paths, and MCP tool descriptors did not absorb the change. Replacing the MCP layer with a thin shell dispatch script (one per agent) made the breakage local: when Codex renames a flag, only codex-dispatch.sh changes. The /codex skill on top stays stable, and project-level AGENTS.md stubs auto-link back to the CLAUDE.md so other repos pick up the same routing rules.
초기 구조는 각 CLI 에이전트를 감싼 MCP 서버였다 — codex-mcp, gemini-mcp — MCP 호환 에디터 어디서나 도구로 호출 가능. 동작했지만, Codex나 Gemini CLI 릴리스마다 플래그 이름과 설정 경로가 바뀌었고 MCP 도구 디스크립터는 그 변화를 흡수하지 못했다. MCP 계층을 얇은 shell dispatch 스크립트(에이전트별 1개)로 교체하니 변동이 국지화됐다 — Codex가 플래그를 바꾸면 codex-dispatch.sh만 고치면 된다. 그 위의 /codex 스킬은 안정적으로 유지되고, 다른 프로젝트에는 init-project-agents.sh가 AGENTS.md stub을 만들어 같은 CLAUDE.md를 자동 참조하게 한다.
Outcome
/ 결과Three slash skills (/codex, /gemini, /openclaw) sit in front of Claude, Codex, Gemini, and OpenClaw. agent_config.yaml maps complexity tiers to specific models (haiku/sonnet/opus, gpt-5.3/5.4, gemini flash/pro). Adapter files in adapters/ are deployed to ~/CLAUDE.md, ~/.codex/, and ~/.gemini/ via sync.sh — the same routing rules apply across every project on every device. The dispatch wrapper layer has survived several CLI releases of both Codex and Gemini without changing the skill surface. The verification-first pattern was later extracted into the standalone claude-gemini-plugin so anyone can install the same setup.
세 개의 슬래시 스킬(/codex, /gemini, /openclaw)이 Claude, Codex, Gemini, OpenClaw 앞에 자리한다. agent_config.yaml이 복잡도 티어를 특정 모델(haiku/sonnet/opus, gpt-5.3/5.4, gemini flash/pro)에 매핑한다. adapters/의 어댑터 파일은 sync.sh를 통해 ~/CLAUDE.md, ~/.codex/, ~/.gemini/로 배포된다 — 모든 기기의 모든 프로젝트에 같은 라우팅 규칙이 적용된다. dispatch wrapper 계층은 Codex와 Gemini 양쪽의 여러 CLI 릴리스를 스킬 표면 변경 없이 견뎌왔다. 검증 우선 패턴은 이후 standalone claude-gemini-plugin으로 추출돼 누구나 같은 설정을 설치할 수 있게 됐다.