From 3ce8ee4f492b9b90ff2513bf04caa6a9f29d7db3 Mon Sep 17 00:00:00 2001 From: Ryder Sun Date: Tue, 15 Sep 2026 17:10:10 +0800 Subject: [PATCH] fix: persist isolated group agent sessions --- .../src/workspace/local-workspace-agent-invocation.cjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/src/workspace/local-workspace-agent-invocation.cjs b/desktop/src/workspace/local-workspace-agent-invocation.cjs index 51e5550..ab4ff03 100644 --- a/desktop/src/workspace/local-workspace-agent-invocation.cjs +++ b/desktop/src/workspace/local-workspace-agent-invocation.cjs @@ -699,9 +699,9 @@ class LocalWorkspaceAgentInvocation { } : null const idempotencyMode = agent.idempotencyMode === 'durable' ? 'durable' : 'none' - const resolvedSession = reviewOnly || isolated + const resolvedSession = reviewOnly ? { - key: this.sessionKey(group.id, kind, group.conversationType === 'direct' ? '' : taskId), + key: this.sessionKey(group.id, kind), sessionRef: '', sessionMeta: {}, provenance: createdSessionProvenance(group, taskId, true), @@ -1433,7 +1433,7 @@ class LocalWorkspaceAgentInvocation { onSessionRef: (nextSessionRef, metadata = {}) => { if (agentCallbacksClosed || agentController.signal.aborted) return noteWatchdogProgress() - if (reviewOnly || isolated) return + if (reviewOnly) return const transport = ['legacy', 'acp'].includes(metadata?.transport) ? metadata.transport : '' @@ -1446,7 +1446,7 @@ class LocalWorkspaceAgentInvocation { })) }, onSessionInvalidated: () => { - if (kind !== 'hermes' || isolated || resumedPermission) return null + if (kind !== 'hermes' || reviewOnly || resumedPermission) return null return { prompt: rebuildFreshSession() } }, signal: agentController.signal, @@ -1895,7 +1895,7 @@ class LocalWorkspaceAgentInvocation { pendingMessage.metadata, ) : null - if (!reviewOnly && !isolated) { + if (!reviewOnly) { this.persistSessionState(key, result.sessionRef || sessionRef, completedSessionMeta( sessionMeta, sessionProvenance, taskId, { promptChars: prompt.length,