Agents: fix subagent completion thread routing

This commit is contained in:
Gustavo Madeira Santana
2026-02-17 22:52:46 -05:00
parent 35851cdaff
commit 0bf1b38cc0
8 changed files with 90 additions and 25 deletions

View File

@@ -235,4 +235,22 @@ describe("gateway send mirroring", () => {
}),
);
});
it("forwards threadId to outbound delivery when provided", async () => {
mocks.deliverOutboundPayloads.mockResolvedValue([{ messageId: "m-thread", channel: "slack" }]);
await runSend({
to: "channel:C1",
message: "hi",
channel: "slack",
threadId: "1710000000.9999",
idempotencyKey: "idem-thread",
});
expect(mocks.deliverOutboundPayloads).toHaveBeenCalledWith(
expect.objectContaining({
threadId: "1710000000.9999",
}),
);
});
});