Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(grok): a wait_all over several tasks no longer leaves finished subagents running #38257

Closedsidlakkoju(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/38257/headopened View on GitHub

Showing 2 changed files with 73 additions and 0 deletions.

x
0 of 2 viewed, 2 left
42 additions and 0 deletionspackages/provider-grok/src/server/xaiAcpExtension.test.tsModified
View file
@@ -702,6 +702,48 @@
]);
});
​
+ it("gives each task of a wait_all MultiResult its own status and output", () => {
+ const subagentId = "01a1e5fc-0e49-72b0-8841-27bfa3df8b6b";
+ const failedShellId = "call-7c835a60-7bf5-4284-a5c7-cf42a4212ece-29";
+ const runningShellId = "1fd59a86-519d-4cdf-bce0-0918577c976c";
+ expect(
+ extractXAiBackgroundTaskCompletion({
+ toolCallId: "call-multi-wait",
+ title: "get_command_or_subagent_output",
+ status: "completed",
+ data: {
+ rawInput: {
+ variant: "TaskOutput",
+ task_ids: [subagentId, failedShellId, runningShellId],
+ timeout_ms: 3_000_000,
+ },
+ rawOutput: {
+ type: "TaskOutput",
+ MultiResult: {
+ mode: "wait_all",
+ results: [
+ {
+ task_id: subagentId,
+ status: "completed",
+ exit_code: 0,
+ output:
+ "<subagent_meta>id</subagent_meta>Request changes.\n<subagent_result>x</subagent_result>",