From 4f8690f98df5ba4eeaf06e1cd955ad06e5a3237f Mon Sep 17 00:00:00 2001 From: Shubham Naik Date: Fri, 20 Feb 2026 13:26:57 -0800 Subject: [PATCH] fix: never auto-approve interactive tools in listen mode (#1066) Co-authored-by: Letta --- src/websocket/listen-client.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/websocket/listen-client.ts b/src/websocket/listen-client.ts index 8701244..87b0402 100644 --- a/src/websocket/listen-client.ts +++ b/src/websocket/listen-client.ts @@ -25,6 +25,7 @@ import { generatePlanFilePath } from "../cli/helpers/planName"; import { drainStreamWithResume } from "../cli/helpers/stream"; import { permissionMode } from "../permissions/mode"; import { settingsManager } from "../settings-manager"; +import { isInteractiveApprovalTool } from "../tools/interactivePolicy"; import { loadTools } from "../tools/manager"; interface StartListenerOptions { @@ -652,8 +653,10 @@ async function handleIncomingMessage( // Classify approvals (auto-allow, auto-deny, needs user input) // Don't treat "ask" as deny - cloud UI can handle approvals + // Interactive tools (AskUserQuestion, EnterPlanMode, ExitPlanMode) always need user input const { autoAllowed, autoDenied, needsUserInput } = await classifyApprovals(approvals, { + alwaysRequiresUserInput: isInteractiveApprovalTool, treatAskAsDeny: false, // Let cloud UI handle approvals requireArgsForAutoApprove: true, });