From 47ee03c41a51817f9d553b751bab75f23ebdf33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E5=A5=87?= Date: Fri, 10 Apr 2026 21:54:14 +0800 Subject: [PATCH] fix: prevent subagent confirmation from being hidden in compact mode hasConfirmingTool only checks ToolCallStatus.Confirming, but subagent approvals arrive via resultDisplay.pendingConfirmation while the tool status remains Executing. Add hasSubagentPendingConfirmation to the showCompact guard so tool groups with pending subagent confirmations are always force-expanded. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../cli/src/ui/components/messages/ToolGroupMessage.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx b/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx index 45eb50796b..fb9d915fa7 100644 --- a/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx +++ b/packages/cli/src/ui/components/messages/ToolGroupMessage.tsx @@ -100,11 +100,13 @@ export const ToolGroupMessage: React.FC = ({ const focusedSubagentCallId = focusedSubagentRef.current; // Compact mode: entire group → single line summary - // Force-expand when: user must interact (Confirming), tool errored, - // shell is focused, or user-initiated + // Force-expand when: user must interact (Confirming or subagent pending + // confirmation), tool errored, shell is focused, or user-initiated + const hasSubagentPendingConfirmation = subagentsAwaitingApproval.length > 0; const showCompact = compactMode && !hasConfirmingTool && + !hasSubagentPendingConfirmation && !hasErrorTool && !isEmbeddedShellFocused && !isUserInitiated;