diff --git a/src/cli/components/ApprovalSwitch.tsx b/src/cli/components/ApprovalSwitch.tsx index 0d87638..ecf5a53 100644 --- a/src/cli/components/ApprovalSwitch.tsx +++ b/src/cli/components/ApprovalSwitch.tsx @@ -289,16 +289,20 @@ export const ApprovalSwitch = memo( } // 5. AskUserQuestion → InlineQuestionApproval + // Guard: only render specialized UI if questions are valid, otherwise fall through + // to InlineGenericApproval (matches pattern for Bash/Task with malformed args) if (toolName === "AskUserQuestion" && onQuestionSubmit) { const questions = getQuestions(approval); - return ( - - ); + if (questions.length > 0) { + return ( + + ); + } } // 6. Task tool → InlineTaskApproval