diff --git a/src/gateway/server-methods/chat.ts b/src/gateway/server-methods/chat.ts index 9010a6f21..dca2c54a9 100644 --- a/src/gateway/server-methods/chat.ts +++ b/src/gateway/server-methods/chat.ts @@ -362,7 +362,7 @@ export const chatHandlers: GatewayRequestHandlers = { return; } } - const { cfg, entry } = loadSessionEntry(p.sessionKey); + const { cfg, entry, canonicalKey } = loadSessionEntry(p.sessionKey); const timeoutMs = resolveAgentTimeoutMs({ cfg, overrideMs: p.timeoutMs, @@ -449,7 +449,7 @@ export const chatHandlers: GatewayRequestHandlers = { BodyForCommands: commandBody, RawBody: parsedMessage, CommandBody: commandBody, - SessionKey: p.sessionKey, + SessionKey: canonicalKey, Provider: INTERNAL_MESSAGE_CHANNEL, Surface: INTERNAL_MESSAGE_CHANNEL, OriginatingChannel: INTERNAL_MESSAGE_CHANNEL,