From 248d4b70130629ebf998bbca4591f329e1fc21d9 Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Sat, 6 Jun 2026 07:24:59 +0800 Subject: [PATCH] refactor: explicitly pass openclawSessionKey in task start --- lib/app/app_controller_desktop_thread_sessions.dart | 3 --- lib/runtime/go_task_service_client.dart | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/app/app_controller_desktop_thread_sessions.dart b/lib/app/app_controller_desktop_thread_sessions.dart index c5ba0ed4..1f8b2267 100644 --- a/lib/app/app_controller_desktop_thread_sessions.dart +++ b/lib/app/app_controller_desktop_thread_sessions.dart @@ -197,9 +197,6 @@ extension AppControllerDesktopThreadSessions on AppController { if (normalizedSessionKey == 'main') { return true; } - if (normalizedSessionKey.startsWith('agent:')) { - return true; - } return _runtimeSessionKeyPatternInternal.hasMatch(normalizedSessionKey); } diff --git a/lib/runtime/go_task_service_client.dart b/lib/runtime/go_task_service_client.dart index bbdd46ad..a123b701 100644 --- a/lib/runtime/go_task_service_client.dart +++ b/lib/runtime/go_task_service_client.dart @@ -327,6 +327,8 @@ class GoTaskServiceRequest { 'requestedExecutionTarget': normalizedTarget.promptValue, if (_usesGatewaySessionMode(acpMode)) ...{ 'executionTarget': normalizedTarget.promptValue, + 'appThreadKey': threadId, + 'openclawSessionKey': threadId, if (agentId.trim().isNotEmpty) 'agentId': agentId.trim(), if (metadata.isNotEmpty) 'metadata': metadata, },