pub fn spawn_subagents(
agents: Vec<(String, String)>,
model: Arc<RwLock<Box<dyn Model>>>,
config: &ModelConfig,
progress: Arc<Mutex<Vec<SubagentProgress>>>,
) -> (Vec<JoinHandle<SubagentResult>>, Vec<SubagentResult>)Expand description
Spawn multiple subagents in parallel.
Returns JoinHandles so the caller can decide how to wait:
- TUI: polls
is_finished()withrender_and_check_interruptbetween checks - Non-interactive:
join_alldirectly
Agents beyond MAX_CONCURRENT_AGENTS are returned as immediate failed results.