Spawnt N parallele Codex-Agents via tmux, orchestriert von Claude Opus 4.6. Jeder Agent laeuft in eigener Worktree mit konfigurierbarem Modell und Prompt.
How this skill is triggered — by the user, by Claude, or both
Slash command
/multi-model-orchestrator:codex-swarmThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Claude Opus 4.6 als Oberagent orchestriert N parallele Codex-Agents.
Claude Opus 4.6 als Oberagent orchestriert N parallele Codex-Agents. Jeder Agent arbeitet isoliert in eigener Git Worktree via tmux (WSL2/Ubuntu).
┌──────────────────────────────────────────────────────┐
│ Claude Opus 4.6 (Oberagent) │
│ ──────────────────────────── │
│ 1. Task entgegennehmen + Konfiguration parsen │
│ 2. Task in N Sub-Tasks zerlegen (oder N identisch) │
│ 3. N tmux-Panes spawnen mit je einem Codex-Agent │
│ 4. Parallel warten auf Completion │
│ 5. Ergebnisse sammeln + reviewen + mergen │
├──────────────────────────────────────────────────────┤
│ tmux session: codex-swarm-<timestamp> │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐│
│ │ Agent 0 │ │ Agent 1 │ │ Agent 2 │ ...│ Agent N ││
│ │ WT: /0 │ │ WT: /1 │ │ WT: /2 │ │ WT: /N ││
│ │ Model: │ │ Model: │ │ Model: │ │ Model: ││
│ │ 5.4-mini│ │ 5.3-cdx │ │ 5.4 │ │ 5.4-mini││
│ └─────────┘ └─────────┘ └─────────┘ └─────────┘│
└──────────────────────────────────────────────────────┘
Der Swarm wird ueber eine JSON-Konfiguration oder CLI-Flags gesteuert:
# Einfach: N Agents mit gleichem Task
./scripts/codex-swarm.sh \
--repo ~/projects/myapp \
--agents 5 \
--model gpt-5.4-mini \
--prompt "Schreibe Unit-Tests fuer alle Dateien in src/utils/"
# Mit Reasoning-Level
./scripts/codex-swarm.sh \
--repo ~/projects/myapp \
--agents 3 \
--model gpt-5.3-codex \
--reasoning high \
--prompt "Refactore alle Dateien in src/ zu async/await"
# Pro Agent eigener Task (via JSON-Config)
./scripts/codex-swarm.sh \
--repo ~/projects/myapp \
--config swarm-config.json
# Gemischt: verschiedene Modelle
./scripts/codex-swarm.sh \
--repo ~/projects/myapp \
--agents 3 \
--models "gpt-5.4-mini,gpt-5.3-codex,gpt-5.4" \
--prompt "Implementiere die TODO-Kommentare in diesem Repo"
# Task-Zerlegung: Claude zerlegt automatisch in Sub-Tasks
./scripts/codex-swarm.sh \
--repo ~/projects/myapp \
--agents 4 \
--decompose \
--prompt "Refactore das gesamte Projekt auf async/await und schreibe Tests"
# Slash-Command (aus Claude Code heraus)
# /codex-swarm --prompt "Write tests for all modules" --agents 5 --decompose yes
{
"repo": "/path/to/project",
"timeout": 600,
"agents": [
{
"name": "tests-utils",
"model": "gpt-5.4-mini",
"reasoning": "low",
"prompt": "Write unit tests for src/utils/"
},
{
"name": "tests-api",
"model": "gpt-5.3-codex",
"reasoning": "high",
"prompt": "Write integration tests for src/api/"
},
{
"name": "refactor-models",
"model": "gpt-5.4",
"reasoning": "medium",
"prompt": "Refactor src/models/ to use dataclasses"
},
{
"name": "docs",
"model": "gpt-5.4-mini",
"reasoning": "low",
"prompt": "Generate docstrings for all public functions"
}
]
}
--decompose)Claude Opus analysiert den High-Level-Task und das Repo, zerlegt ihn in N
unabhaengige Sub-Tasks mit passendem Modell und Reasoning-Level pro Agent.
Generiert automatisch eine generated-config.json.
# Claude zerlegt "Refactore das gesamte Projekt" in z.B.:
# Agent 0: "Refactore src/utils/ zu async/await" (gpt-5.4-mini, low)
# Agent 1: "Refactore src/api/ zu async/await" (gpt-5.3-codex, medium)
# Agent 2: "Update alle Tests" (gpt-5.4-mini, low)
codex-swarm-<timestamp>safe.directory konfigurierenFuer jeden Agent i=0..N-1:
tmux send-keys -t "codex-swarm-$TS:$i" \
"cd $WORKTREE_DIR && codex exec --sandbox workspace-write \
--model $MODEL '$PROMPT' > $OUTPUT_DIR/agent-$i.txt 2>&1; \
echo DONE > $OUTPUT_DIR/agent-$i.done" Enter
Timeout: Standardmaessig 600s (10 min), konfigurierbar via --timeout.
git add -A && git diff --cached HEAD)output/swarm-<timestamp>/ ablegenClaude Opus reviewed automatisch alle gesammelten Diffs:
review.md gespeichertWorktrees loeschen, tmux-Session beenden.
output/swarm-<timestamp>/
├── generated-config.json # Task-Zerlegung (bei --decompose)
├── agent-0.txt # Stdout von Agent 0
├── agent-0.diff # Git diff von Agent 0
├── agent-0.meta.json # Modell, Reasoning, Worktree
├── ...
├── summary.md # Oberagent-Zusammenfassung
└── review.md # Claude Opus Review
| Modell | Staerken | Empfehlung |
|---|---|---|
gpt-5.4 | Neuestes Frontier-Modell, bestes Reasoning | Komplexe Features, Architektur-Tasks |
gpt-5.4-mini | Schnell, guenstig, solides Reasoning | Tests, Docs, Linting, Boilerplate |
gpt-5.3-codex | Coding-optimiert (Default) | Refactoring, Implementierung, Bug-Fixes |
gpt-5.2-codex | Aelterer Codex, stabil | Fallback bei 5.3 Problemen |
gpt-5.2 | General-purpose | Nicht-Code Tasks |
gpt-5.1-codex-max | Max-Kontext, grosse Codebases | Mono-Repo Refactoring |
gpt-5.1-codex-mini | Minimal, nur medium/high | Budget-Option |
Hinweis: Mit ChatGPT-Abo (kein API-Key) — o3/o4-mini sind NICHT verfuegbar.
Alle Modelle unterstuetzen konfigurierbare Reasoning-Tiefe:
| Level | Beschreibung | Empfehlung |
|---|---|---|
low | Schnell, minimales Reasoning | Mechanische Tasks (Linting, Docs, Boilerplate) |
medium | Balanciert (Default) | Alltaegliche Coding-Tasks |
high | Tiefes Reasoning | Komplexe Refactorings, Bug-Fixes |
xhigh | Maximum Reasoning | Architektur-Entscheidungen, Security-Reviews |
CLI: --reasoning <level> oder per Agent in JSON-Config: "reasoning": "high"
codex CLI authentifiziert (OAuth via Desktop App)claude CLI authentifiziert (Max Plan)tmux kill-session -t codex-swarm-*--sandbox workspace-write erlaubt nur Schreiben im Worktree, kein NetzwerkJA — Swarm nutzen wenn:
NEIN — Einzelagent nutzen wenn:
npx claudepluginhub dynamic-dome/inception-sandbox --plugin multi-model-orchestratorCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.