From 8ea470b1ae3a4423ee8e5894584849487b5cb99a Mon Sep 17 00:00:00 2001 From: iliya Date: Fri, 27 Mar 2026 18:12:58 +0200 Subject: [PATCH] fix(team): intercept permission_request regardless of native delivery status When Claude Code runtime natively delivers permission_request to the lead via stdout, the message was excluded from interception by the nativeMatchedMessageIds filter. This caused the ToolApprovalSheet to not appear for teammate requests. Remove nativeMatchedMessageIds check from the permission_request filter so interception works even for natively delivered messages. --- src/main/services/team/TeamProvisioningService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/services/team/TeamProvisioningService.ts b/src/main/services/team/TeamProvisioningService.ts index dfcee64f..c6f4f80b 100644 --- a/src/main/services/team/TeamProvisioningService.ts +++ b/src/main/services/team/TeamProvisioningService.ts @@ -4033,10 +4033,12 @@ export class TeamProvisioningService { // Category 4: teammate permission requests — intercept and convert to tool approvals. // Don't relay these to the lead agent (it can't handle them). + // NOTE: We intentionally do NOT exclude nativeMatchedMessageIds here — even if + // Claude Code runtime natively delivered the message to the lead, we still need + // to intercept permission_request and show the ToolApprovalSheet for the user. const permissionRequestMsgs = unread.filter( (m) => !permanentlyIgnoredIds.has(m.messageId) && - !nativeMatchedMessageIds.has(m.messageId) && !deferredIds.has(m.messageId) && parsePermissionRequest(m.text) !== null );