AppFoundry WebSocket drops on Cognigy handoff

WebSocket connection dies exactly when the Cognigy bot hands off to a human agent in AppFoundry. The initial handshake works fine, and I get the first few messages, but as soon as the transfer logic triggers, the client-side socket fires a close event with code 1006. No error payload, just a hard drop.

Here’s the connection setup:

const ws = new WebSocket(`wss://${orgUrl}.mypurecloud.com/api/v2/analytics/events`);
ws.onopen = () => {
 ws.send(JSON.stringify({
 type: 'subscribe',
 eventTypes: ['conversation:updated']
 }));
};

The server logs show the conversation state changing to transfer but the WebSocket never receives that update. Is there a specific subscription filter I’m missing for transfer events, or is this a known issue with the AppFoundry runtime dropping the connection during handoff?