diff --git a/apps/macos/Sources/Clawdis/TalkModeRuntime.swift b/apps/macos/Sources/Clawdis/TalkModeRuntime.swift index 97f8ee12f..48f64c129 100644 --- a/apps/macos/Sources/Clawdis/TalkModeRuntime.swift +++ b/apps/macos/Sources/Clawdis/TalkModeRuntime.swift @@ -291,9 +291,13 @@ actor TalkModeRuntime { await self.reloadConfig() guard self.isCurrent(gen) else { return } let prompt = self.buildPrompt(transcript: transcript) - let sessionKey = - await MainActor.run { WebChatManager.shared.activeSessionKey } ?? - await GatewayConnection.shared.mainSessionKey() + let activeSessionKey = await MainActor.run { WebChatManager.shared.activeSessionKey } + let sessionKey: String + if let activeSessionKey { + sessionKey = activeSessionKey + } else { + sessionKey = await GatewayConnection.shared.mainSessionKey() + } let runId = UUID().uuidString let startedAt = Date().timeIntervalSince1970 self.logger.info(