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

41 lines
1.8 KiB
Markdown

---
status: resolved
claimed-by: "019fba91-eabf-76ae-b086-a37ac061d6e8"
claimed-at: "2026-08-01T14:36:01-04:00"
completed-at: "2026-08-01T14:44:11-04:00"
parent: "[[027-pi-subagents-implementation-spec-task]]"
blocked-by:
- "[[046-pi-subagents-minimal-tracer-bullet-task]]"
tags:
- 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
- [x] Batch spawn validates every entry with the same rules as single spawn.
- [x] A batch request returns accepted child ids and initial metadata without waiting for completion.
- [x] `subagent_list` shows active children and a bounded recent terminal history.
- [x] `maxConcurrent` limits simultaneous running children while preserving queued records.
- [x] 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`.