Skip to content

v2.4.1 — Farm reply routes through team mailbox (Lead sees the output)

Choose a tag to compare

@ankurCES ankurCES released this 19 Apr 05:57
· 17 commits to main since this release

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 fromAgentId in 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 how ActionExecutor's send_message action wakes its recipients.
  • 'user' senders (direct sends from the chat UI) are deliberately NOT routed through the mailbox — the user sees the reply via the FarmChat responseStream subscription 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.