From dcf775d86c4a0a915beeca774ab161714ce90f79 Mon Sep 17 00:00:00 2001 From: iliya Date: Mon, 30 Mar 2026 13:45:09 +0300 Subject: [PATCH] fix(team): add updatedInput: {} to all allow control_responses Claude Code CLI Zod schema requires updatedInput to be a record when behavior is 'allow'. Without it, MCP tool approvals fail with 'Tool permission request failed: ZodError: expected record, received undefined'. Add empty updatedInput: {} to all allow responses (autoAllow, timeout-allow, and manual allow). --- src/main/services/team/TeamProvisioningService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/services/team/TeamProvisioningService.ts b/src/main/services/team/TeamProvisioningService.ts index c98f1197..75fadb6c 100644 --- a/src/main/services/team/TeamProvisioningService.ts +++ b/src/main/services/team/TeamProvisioningService.ts @@ -6014,7 +6014,7 @@ export class TeamProvisioningService { response: { subtype: 'success', request_id: requestId, - response: { behavior: 'allow' }, + response: { behavior: 'allow', updatedInput: {} }, }, }; @@ -6239,7 +6239,7 @@ export class TeamProvisioningService { // IMPORTANT: request_id is NESTED inside response, NOT top-level // (asymmetry with control_request — confirmed by Python SDK, Elixir SDK and issue #29991) - const allowResponse: Record = { behavior: 'allow' }; + const allowResponse: Record = { behavior: 'allow', updatedInput: {} }; // For AskUserQuestion: pass user's answers via updatedInput so the CLI // can deliver them without re-prompting. Format follows --permission-prompt-tool spec. if (allow && message) {