From 958cf216c48cd4e2d279a11f3b03f2f7195578a2 Mon Sep 17 00:00:00 2001 From: Merge Sim Date: Fri, 11 Sep 2026 00:57:07 -0700 Subject: [PATCH] Scope the conversation lookup to the branch that mints the tab Also corrects the re-publish comment: that branch is no longer a strict no-op, it now carries a newly proven conversation. --- ...ca-runtime-restore-structured-agent-session-tabs-once.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/runtime/orca-runtime-restore-structured-agent-session-tabs-once.ts b/src/main/runtime/orca-runtime-restore-structured-agent-session-tabs-once.ts index 6d3e0c5bb92..8d9c15b6f65 100644 --- a/src/main/runtime/orca-runtime-restore-structured-agent-session-tabs-once.ts +++ b/src/main/runtime/orca-runtime-restore-structured-agent-session-tabs-once.ts @@ -125,10 +125,9 @@ export class OrcaRuntimeWithRestoreStructuredAgentSessionTabsOnce extends OrcaRu } const existing = this.mobileSessionTabsByWorktree.get(input.workspaceId) const id = `agent-session:${input.sessionId}` - const providerSessionId = structuredAgentSessionProviderSessionId(input.sessionId) if (existing?.tabs.some((tab) => tab.id === id)) { - // A background re-publish is a no-op — no store write, no emit — so it cannot re-surface a - // client whose mirror lost the tab; healing one needs `activate` or an explicit republish. + // A background re-publish carries nothing but a newly proven conversation, so it cannot + // re-surface a client whose mirror lost the tab; healing one needs `activate`. if (!input.activate) { this.republishStructuredProviderSessions(existing, input.notify) return @@ -158,6 +157,7 @@ export class OrcaRuntimeWithRestoreStructuredAgentSessionTabsOnce extends OrcaRu } return } + const providerSessionId = structuredAgentSessionProviderSessionId(input.sessionId) const tab: RuntimeMobileSessionAgentTab = { type: 'agent-session', id,