v2.4.1 — Farm reply routes through team mailbox (Lead sees the output)
Fix
Architectural invariant the operator flagged: farm agents are just teammates that live on a different machine. Their response must flow back through the same team mailbox local teammates use, so the master Lead picks it up on its next wake — otherwise master sees no output when the Lead delegates a farm turn.
Local teammates accomplish this via the team MCP send_message tool, which their ACP session has access to. Farm teammates run headless on the slave without that tool.
The change
WakeRunner.dispatchFarmTurn now does the mailbox write + recipient wake on the farm teammate's behalf after a successful turn:
- Collect every distinct
fromAgentIdin the mailbox messages that triggered the turn (excluding self +'user'). - For each sender:
mailbox.write({ fromAgentId: farmSlot, toAgentId: sender, content: assistantText })void this.wake(sender)— matches howActionExecutor'ssend_messageaction wakes its recipients.
'user'senders (direct sends from the chat UI) are deliberately NOT routed through the mailbox — the user sees the reply via theFarmChatresponseStreamsubscription added in v2.3.4.
Result
When the master Lead delegates to a farm teammate → slave Lead runs the turn → response comes back → mailbox gets an entry addressed to the master Lead → Lead wakes and sees the reply → Lead can continue the conversation or report to the user. Same loop as local teammates.
wake_completed audit row now carries a repliedTo list for observability.
Upgrade notes
- Master-only fix. Machine A must be on v2.4.1. Slave can stay on v2.4.0.
- No DB migration.