Team Coding Orchestrator
Run multi-agent coding work with fixed role routing and observable progress.
Core routing policy
Always follow this role split unless the user explicitly overrides:
- Codex: implement backend and complex logic
- Claude: frontend implementation and review
- planning/modeling:
claude-opus-4-6 - code writing:
claude-sonnet-4-6 - search/scouting/find-information tasks:
claude-haiku-4-5-20251001(cost-optimized)
- planning/modeling:
- Gemini: summarize outputs and perform second-pass review (docs + code)
Gemini policy:
- Use login-based Gemini CLI flow
- Do not introduce Gemini API key flow unless user requests it
Runtime mode selection
Pick runtime by task type:
- tmux-first (default) for interactive or visible collaboration
- background process fallback for unattended long-running jobs
Prefer tmux whenever the user wants visibility into progress.
Bundled script
Use bundled script:
scripts/agent-stack
Recommended env (~/.config/agent-stack/env.sh):
ANTHROPIC_API_KEYCLAUDE_BASE_URLCLAUDE_MODELDISCORD_WEBHOOK_URL(for completion notifications)
The script supports:
up/down/statustask [--notify <bot_id>] <agent> "prompt"watch <bot_id> <agent>(attach completion watcher to running task)send <agent> <raw shell command>tail <agent> [lines]doctor
Notification hooks now apply uniformly to codex / claude / gemini.
When --notify is used, agent-stack injects a completion token and watcher reports success/failure back to Discord webhook.
Standard operating flow
- Run
scripts/agent-stack up - Run
scripts/agent-stack doctor - Dispatch tasks by role:
- Codex for backend logic
- Claude Opus for plan, then Sonnet for coding/review
- Gemini for summary + second review
- Use
scripts/agent-stack tail <agent>to inspect progress - Dispatch long tasks with notifier enabled, e.g.
scripts/agent-stack task --notify <dispatcher_bot_id> claude "..." - Report milestones to user (started, in-progress, blocked, finished, ETA)
- Do not "dead-wait" long CLI jobs: actively tail/checkpoint and send periodic progress updates
- Avoid fixed short timeouts for long tasks; prefer tmux/background + watcher
- Run
scripts/agent-stack downafter completion (or keep session if user wants continuity)
Claude model routing commands
Use explicit models for Claude tasks to avoid default-model drift.
Plan with Opus:
scripts/agent-stack send claude "ANTHROPIC_BASE_URL=https://gaccode.com/claudecode ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY claude --dangerously-skip-permissions -p --model claude-opus-4-6 'Create an implementation plan for: ...'"
Code with Sonnet:
scripts/agent-stack send claude "ANTHROPIC_BASE_URL=https://gaccode.com/claudecode ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY claude --dangerously-skip-permissions -p --model claude-sonnet-4-6 'Implement frontend changes for: ...'"
Search/scouting with Haiku (cheap mode):
scripts/agent-stack send claude "ANTHROPIC_BASE_URL=https://gaccode.com/claudecode ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY claude --dangerously-skip-permissions -p --model claude-haiku-4-5-20251001 'Find relevant files/specs for: ...'"
Response contract to users
When coordinating work, provide concise updates:
- what is running
- what finished
- any blocker requiring user input
- next step
Use templates and examples from references/routing-playbook.md when needed.
CodeX / Gemini hook examples
# Codex with completion callback
scripts/agent-stack task --notify 1475340557059625222 codex "Implement ..."
# Gemini with completion callback
scripts/agent-stack task --notify 1475340557059625222 gemini "Summarize ..."