Hi team, I’m using LiveKit self-hosted agent with...
# server-api
p
Hi team, I’m using LiveKit self-hosted agent with the React SDK, and I’m seeing an issue related to network loss. Scenario: If the user’s internet disconnects for around 2 minutes during an interview session, when they reconnect, the bot stops speaking/responding even though the room is still active. This is how I start the agent:
Copy code
await session.start(
    agent=Assistant(
        chat_ctx=initial_ctx,
        prompt=instructions,
        user_session_config=user_session_config
    ),
    room=ctx.room,
    room_input_options=RoomInputOptions(
        noise_cancellation=noise_cancellation.BVC(),
        close_on_disconnect=False
    ),
    room_output_options=RoomOutputOptions(sync_transcription=False),
)
Versions: • livekit = 1.0.16 • livekit-agents = 1.2.14 Since
close_on_disconnect=False
, the session stays open, but after a long disconnect (≈2 mins), the agent stops outputting audio. Is there any configuration or recommended way to handle long user disconnects so that the bot continues speaking normally after the user reconnects? Thanks! cc : @refined-appointment-81829 @echoing-kitchen-90064
r
It should recover. Do you have an example session ID from your LiveKit dashboard that did not work? It will start with
RM_*
p
i mean in ever usecase it is occuring
like internet got disconnected for 2 mins when we rejoins the bot is not speaking
@refined-appointment-81829
r
I believe we would only allow a rejoin with agent for 20 seconds.
👍 1