pub async fn send_spawn_batch(
client: &ControlClient,
spawn_args: SpawnArgs,
count: usize,
json: bool,
) -> Result<()>Expand description
Send count copies of a resolved spawn request - the same agent, task, and
flags, each under its own fresh run id - and print one combined report.
This exists because spawn throughput from the CLI is otherwise bounded by
process startup: each lev run invocation pays binary launch plus a socket
round trip (~60 spawns/second in measurement), while the daemon itself
accepts spawns as fast as they arrive. One invocation carrying the whole
batch removes that bound without introducing any daemon-side cap.
count == 1 defers to send_spawn, keeping today’s single-run output
shapes. A mid-batch failure stops the batch and says how many runs had
already started - those runs keep running; lev ps lists them.