Files
ai-artifacts/projects/dotfiles/049-pi-subagents-batch-concurrency-task.md

1.8 KiB

status, claimed-by, claimed-at, completed-at, parent, blocked-by, tags
status claimed-by claimed-at completed-at parent blocked-by tags
resolved 019fba91-eabf-76ae-b086-a37ac061d6e8 2026-08-01T14:36:01-04:00 2026-08-01T14:44:11-04:00 027-pi-subagents-implementation-spec-task
046-pi-subagents-minimal-tracer-bullet-task
ticket/task/afk

Add batch spawning and bounded concurrency

Question

Add batch spawn support that accepts multiple subagent requests, returns child ids immediately, and runs all accepted children through the same supervisor with configurable concurrency.

What to build

Extend the non-blocking spawn path from one child to many children. Batch entries should use the same request semantics as single spawn entries. The supervisor should preserve accepted child records, report per-child spawn failures, and enforce a configurable concurrency limit without hiding queued work from status surfaces.

Acceptance criteria

  • Batch spawn validates every entry with the same rules as single spawn.
  • A batch request returns accepted child ids and initial metadata without waiting for completion.
  • subagent_list shows active children and a bounded recent terminal history.
  • maxConcurrent limits simultaneous running children while preserving queued records.
  • Partial spawn failures are reported per requested child without losing accepted children.

Implementation Notes

All spawns remain non-blocking. Do not add a wait-mode parameter in this slice.

Resolved in branch pi-subagents-tracer-bullet, commit e7a700f. Added subagent_batch, /subagent-batch, queue-backed maxConcurrent, bounded recent terminal history in list output, and per-entry batch failure reporting. Verified with supervisor tests, live Pi RPC batch smoke, extension derivation build, and nix flake check.