From f3ef609839111b44a094e9591fe6b673459ec3ca Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 18 Jan 2026 13:42:19 +0000 Subject: [PATCH] fix: show exec approval alerts for local mac node --- apps/macos/Sources/Clawdbot/ExecApprovalsSocket.swift | 3 ++- apps/macos/Sources/Clawdbot/NodeMode/MacNodeRuntime.swift | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/macos/Sources/Clawdbot/ExecApprovalsSocket.swift b/apps/macos/Sources/Clawdbot/ExecApprovalsSocket.swift index 4f86c628c9..f6bd40bef7 100644 --- a/apps/macos/Sources/Clawdbot/ExecApprovalsSocket.swift +++ b/apps/macos/Sources/Clawdbot/ExecApprovalsSocket.swift @@ -157,9 +157,10 @@ final class ExecApprovalsPromptServer { } } -private enum ExecApprovalsPromptPresenter { +enum ExecApprovalsPromptPresenter { @MainActor static func prompt(_ request: ExecApprovalPromptRequest) -> ExecApprovalDecision { + NSApp.activate(ignoringOtherApps: true) let alert = NSAlert() alert.alertStyle = .warning alert.messageText = "Allow this command?" diff --git a/apps/macos/Sources/Clawdbot/NodeMode/MacNodeRuntime.swift b/apps/macos/Sources/Clawdbot/NodeMode/MacNodeRuntime.swift index d62d317820..52dd96abbe 100644 --- a/apps/macos/Sources/Clawdbot/NodeMode/MacNodeRuntime.swift +++ b/apps/macos/Sources/Clawdbot/NodeMode/MacNodeRuntime.swift @@ -485,10 +485,8 @@ actor MacNodeRuntime { var approvedByAsk = false if requiresAsk { - let decision = await ExecApprovalsSocketClient.requestDecision( - socketPath: approvals.socketPath, - token: approvals.token, - request: ExecApprovalPromptRequest( + let decision: ExecApprovalDecision? = await ExecApprovalsPromptPresenter.prompt( + ExecApprovalPromptRequest( command: displayCommand, cwd: params.cwd, host: "node",