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",