A2A delegate_task fails: SendMessageRequest message.role missing (likely root of agents-team transport storm) #2251

Closed
opened 2026-06-04 20:46:59 +00:00 by core-devops · 0 comments
Member

Reproduced live 2026-06-04 (CTO session, delegating a review to CR2).

delegate_task (and delegate_task_async) outbound A2A send fails validation:

{"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid Request",
 "data":"1 validation error for SendMessageRequest
params.message.role
  Field required ..."}}

The outbound A2A envelope built by the delegate_task path is missing the required message.role field. reply_to_workspace works (its envelope sets role), so this is specific to the delegate_task send path — compare the two envelope builders and add role (e.g. "user"/"agent") to delegate_task.

Impact (high): ALL task delegations fail at validation -> the PM cannot dispatch work to agents -> agents idle -> retries replay (this is almost certainly the concrete root of the multi-hour "CLASS-D transport-retry storm" / delivery-surface instability the agents-team PM has been reporting). Sibling of core#2244 (delegate_task_async silent-delivery) but a distinct, hard validation failure.

Repro: call the molecule MCP delegate_task to any peer -> -32600 missing message.role.

Fix: set message.role in the delegate_task A2A SendMessageRequest envelope (mirror reply_to_workspace). Add a contract test that delegate_task produces a schema-valid SendMessageRequest.

Workaround in use: dispatch via reply_to_workspace (sets role).

**Reproduced live 2026-06-04** (CTO session, delegating a review to CR2). `delegate_task` (and `delegate_task_async`) outbound A2A send fails validation: ``` {"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid Request", "data":"1 validation error for SendMessageRequest params.message.role Field required ..."}} ``` The outbound A2A envelope built by the delegate_task path is **missing the required `message.role`** field. **`reply_to_workspace` works** (its envelope sets `role`), so this is specific to the delegate_task send path — compare the two envelope builders and add `role` (e.g. "user"/"agent") to delegate_task. **Impact (high):** ALL task delegations fail at validation -> the PM cannot dispatch work to agents -> agents idle -> retries replay (this is almost certainly the concrete root of the multi-hour "CLASS-D transport-retry storm" / delivery-surface instability the agents-team PM has been reporting). Sibling of core#2244 (delegate_task_async silent-delivery) but a distinct, hard validation failure. **Repro:** call the molecule MCP `delegate_task` to any peer -> -32600 missing message.role. **Fix:** set `message.role` in the delegate_task A2A SendMessageRequest envelope (mirror reply_to_workspace). Add a contract test that delegate_task produces a schema-valid SendMessageRequest. Workaround in use: dispatch via reply_to_workspace (sets role).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2251