From 0431a67b689cbc53154e46add4612c20a4cabfcd Mon Sep 17 00:00:00 2001 From: Gao Mingfei Date: Tue, 24 Mar 2026 09:44:36 +0800 Subject: [PATCH] fix(frontend): filter task tool calls when rendering SubtaskCard (#1242) Only tool calls with name === "task" should be rendered as SubtaskCard. Previously all tool_calls were mapped to IDs, causing SubtaskCard to render for non-task tool calls whose IDs were never registered in the subtask context, resulting in a TypeError on task.status. Signed-off-by: Gao Mingfei Co-authored-by: Willem Jiang --- frontend/src/components/workspace/messages/message-list.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/workspace/messages/message-list.tsx b/frontend/src/components/workspace/messages/message-list.tsx index 6059325..8d5e0f6 100644 --- a/frontend/src/components/workspace/messages/message-list.tsx +++ b/frontend/src/components/workspace/messages/message-list.tsx @@ -168,9 +168,9 @@ export function MessageList({ {t.subtasks.executing(tasks.size)} , ); - const taskIds = message.tool_calls?.map( - (toolCall) => toolCall.id, - ); + const taskIds = message.tool_calls + ?.filter((toolCall) => toolCall.name === "task") + .map((toolCall) => toolCall.id); for (const taskId of taskIds ?? []) { results.push(