Principle:777genius Agent teams ai Team Provisioning
| Knowledge Sources | |
|---|---|
| Domains | Process_Management, Team_Management |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Orchestration pattern for spawning, tracking, and managing multi-agent team CLI processes across heterogeneous runtime providers (Claude, Codex, OpenCode).
Description
Team Provisioning is the process of taking a team configuration and turning it into live, running CLI processes — one lead process per team, plus optional secondary lanes for OpenCode. It coordinates binary detection, process spawning, worktree isolation, inbox initialization, and progress reporting.
The core challenges are:
- Multi-provider abstraction: Claude, Codex, and OpenCode have different spawn protocols, inbox delivery mechanisms, and lifecycle semantics.
- Progress reporting: The UI needs real-time provisioning progress (spawning, bootstrapping, ready) via callbacks.
- Resource tracking: Each launch creates a process handle, worktree, and inbox files that must be cleaned up on shutdown.
- Admission control: Pending launches consume shared resources (e.g., an HTTP bridge for OpenCode); an admission guard prevents oversubscription.
= Usage
Use this principle when designing a system that orchestrates long-running external CLI processes from a desktop application, especially when multiple heterogeneous providers share a common lifecycle interface. Applicable to any multi-agent orchestration layer.
Theoretical Basis
The provisioning follows a delegate orchestration pattern:
# Abstract algorithm (NOT real implementation)
async def launch_team(request, on_progress):
config = read_config(request.team_name)
worktrees = ensure_worktrees(config.members)
on_progress(stage="spawning")
process = spawn_cli(
provider=config.provider,
model=config.model,
prompt=config.lead_prompt,
worktree=worktrees[0]
)
on_progress(stage="bootstrapping")
init_inboxes(config.members)
register_run(team_name, process)
on_progress(stage="ready")
return LaunchResponse(status="launched", process=process)
The orchestrator delegates provider-specific work to focused layers while maintaining a stable facade for IPC callers.