#4205
WIP: Add mailbox-backed subagent results
Summary
- Add an in-memory mailbox protocol for subagent task/result records with one-time result consumption.
- Change
SubagentManagercompletion to write mailbox results instead of publishing synthetic inbound messages, and remove the hidden_drain_pendingwait on running subagents. - Add explicit
poll_subagents,wait_subagents, andcancel_subagenttools plus focused regression coverage. - Include the referenced
.agent/subagent-mailbox-mvp-plan.mdimplementation plan.
Verification
$env:PYTHONPATH='.'; python .verify/subagent-mailbox/consumer_mailbox.py-> PASS mailbox consumer; dispatch returned in 0.356s, worker completion left inbound queue at 0, wait consumed once.$env:PYTHONPATH='.'; pytest tests/agent tests/tools -q-> 1592 passed, 21 skipped.$env:PYTHONPATH='.'; pytest tests/command tests/session tests/cli/test_restart_command.py -q-> 75 passed.ruff checkon changed implementation/test files -> All checks passed.$verifyreport checker:.verify/subagent-mailbox/report.md-> PASS.
Notes
- A broad ruff run over unrelated repo files still reports pre-existing lint debt outside this change; changed-file ruff is clean.
Activity
3This pull request is a draft
Merging is unavailable until it is marked ready for review.