From 8e30d9c3cf89194c1be3efb8292adad01c1cca76 Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Sat, 30 May 2026 10:25:01 -0400 Subject: [PATCH] fix: bypassPermissions auto-allows interactive tools (reliable dangerous-skip) --- server/claude-sdk.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/claude-sdk.js b/server/claude-sdk.js index 0f1cac9..0442b81 100644 --- a/server/claude-sdk.js +++ b/server/claude-sdk.js @@ -535,11 +535,13 @@ async function queryClaudeSDK(command, options = {}, ws) { sdkOptions.canUseTool = async (toolName, input, context) => { const requiresInteraction = TOOLS_REQUIRING_INTERACTION.has(toolName); - if (!requiresInteraction) { - if (sdkOptions.permissionMode === 'bypassPermissions') { - return { behavior: 'allow', updatedInput: input }; - } + // Dangerously-skip / bypass mode: auto-allow EVERY tool, including interactive + // ones (AskUserQuestion, ExitPlanMode). This guarantees zero prompts. + if (sdkOptions.permissionMode === 'bypassPermissions') { + return { behavior: 'allow', updatedInput: input }; + } + if (!requiresInteraction) { const isDisallowed = (sdkOptions.disallowedTools || []).some(entry => matchesToolPermission(entry, toolName, input) );