Soniox terminates the realtime websocket after 20 seconds of inactivity. An agent that opens the connection, then waits for the user to start speaking (or pauses between utterances while doing other work), comes back to a dead socket and loses the session. The vinput-registry Soniox plugin README documents the behavior and the workaround: "Note: connection is closed after 20 seconds of inactivity - the app automatically sends keepalive control messages when no audio is being streamed." Design your client the same way: if no audio chunk has been sent for a while, send a keepalive control message on the websocket. Treat the connection as a live resource that needs a heartbeat, not as an open-until-closed pipe.