diff --git a/wechat-mp.mjs b/wechat-mp.mjs index 3e35a90..16ef1e2 100644 --- a/wechat-mp.mjs +++ b/wechat-mp.mjs @@ -1701,6 +1701,9 @@ export function createWechatMpService({ // `/agent/start` already persists the owning user and goosed node via the // portal proxy. Re-registering here without the node can overwrite the // correct mapping back to node 0 in multi-goosed production. + if (!startAgentSession && typeof userAuth.registerAgentSession === 'function') { + await userAuth.registerAgentSession(userId, sessionId); + } await reconcileAgentSession( (pathname, init) => fetchForSession(sessionId, pathname, init), sessionId,