Skip to content

The agent that grows with you

docs(desktop): state one fallthrough contract at the agent seam

Jack Lauf0f4f29e27fc
diff --git a/apps/desktop/src/store/gateway.ts b/apps/desktop/src/store/gateway.ts
index 5d4de94fb94..13708f657e5 100644
--- a/apps/desktop/src/store/gateway.ts
+++ b/apps/desktop/src/store/gateway.ts
@@ -669,9 +669,11 @@ export async function openGatewayForAgent(connectionId: null | string, profile:
// The agent-scoped analogue of prepareGatewayForProfile, and the same
// publication seam: dial the agent's socket without publishing anything, and
-// hand back the synchronous activation thunk. A local/null connection falls
+// hand back the synchronous activation thunk. A null connection id falls
// through to the profile seam, so both doors into an activation share one
-// atomicity contract instead of drifting apart.
+// atomicity contract instead of drifting apart; an explicit `local` id is a
+// registry identity (`registryBackendScopeKey` keeps its own scope for it) and
+// stays on the registry route.
//
// The thunk reports whether it actually published, preserving the `activated`
// contract callers rely on: a source edit/remove can dispose this entry while
diff --git a/apps/desktop/src/store/profile.ts b/apps/desktop/src/store/profile.ts
index 6c406854849..6e23a7b07f2 100644
--- a/apps/desktop/src/store/profile.ts
+++ b/apps/desktop/src/store/profile.ts
@@ -413,7 +413,6 @@ async function resolveConnectionForActiveAgent(
// ONE synchronous frame, via the same prepare/publish seam the profile path
// uses, so no subscriber sees the new backend paired with the old
// descriptor.
-// A local/null connectionId falls through to the profile path verbatim.
// Only a null connectionId falls through to the legacy profile path. Explicit
// `local` is a registry identity and must use the genuinely-local route.
export async function ensureGatewayAgent(connectionId: null | string, profile: string): Promise<void> {