calm-oyster-84545
04/18/2026, 10:25 AM17 April 2026, 16:47
{"message": "closing agent session due to participant disconnect (disable via `RoomInputOptions.close_on_disconnect=False`)", "level": "INFO", "name": "livekit.agents", "room": "371007ad-95f9-4120-9faf-47f658ebd83e", "participant": "user-user-test-1@ext.vanilabs.ai", "reason": "CLIENT_INITIATED", "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:44.684968+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "STT metrics", "level": "INFO", "name": "livekit.agents", "model_name": "saarika:v2.5", "model_provider": "Sarvam", "audio_duration": 2.04, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:41.415766+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "EOU metrics", "level": "INFO", "name": "livekit.agents", "model_name": "unknown", "model_provider": "stt", "end_of_utterance_delay": 0.55, "transcription_delay": 0.0, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:40.303519+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "LLM metrics", "level": "INFO", "name": "livekit.agents", "model_name": "gpt-5.2", "model_provider": "api.openai.com", "ttft": 0.8, "prompt_tokens": 0, "prompt_cached_tokens": 0, "completion_tokens": 0, "tokens_per_second": 0.0, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:14.197786+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "STT metrics", "level": "INFO", "name": "livekit.agents", "model_name": "saarika:v2.5", "model_provider": "Sarvam", "audio_duration": 3.64, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:14.189969+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "EOU metrics", "level": "INFO", "name": "livekit.agents", "model_name": "unknown", "model_provider": "stt", "end_of_utterance_delay": 0.55, "transcription_delay": 0.0, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:13.052918+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "STT metrics", "level": "INFO", "name": "livekit.agents", "model_name": "saarika:v2.5", "model_provider": "Sarvam", "audio_duration": 1.52, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:09.138377+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "EOU metrics", "level": "INFO", "name": "livekit.agents", "model_name": "unknown", "model_provider": "stt", "end_of_utterance_delay": 0.5, "transcription_delay": 0.0, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:08.394835+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:47
{"message": "STT metrics", "level": "INFO", "name": "livekit.agents", "model_name": "saarika:v2.5", "model_provider": "Sarvam", "audio_duration": 4.56, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:17:07.892134+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:46
{"message": "STT metrics", "level": "INFO", "name": "livekit.agents", "model_name": "saarika:v2.5", "model_provider": "Sarvam", "audio_duration": 1.27, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:16:38.816578+00:00"}
0ad8c18e5324489abae198320919cb09
insurance-worker
17 April 2026, 16:46
{"message": "TTS metrics", "level": "INFO", "name": "livekit.agents", "model_name": "chirp_3", "model_provider": "Google Cloud Platform", "ttfb": 0.15450423897709697, "audio_duration": 34.96, "pid": 22055, "job_id": "AJ_DwaC5dp5kFx7", "room_id": "RM_Y4srKDfHRz3b", "timestamp": "2026-04-17T11:16:24.600258+00:00"}
When I look at timestamp, there was an LLM event but no TTS event so LLM generated a response but TTS did not speaktall-airline-16756
04/18/2026, 10:25 AMtall-airline-16756
04/18/2026, 10:25 AMRoomInputOptions.close_on_disconnect=False)".
• When an AgentSession closes, the agent’s I/O pipeline (STT → LLM → TTS/playout) is shut down immediately. That stops any pending or in-progress TTS work, so an LLM completion can exist in logs but never get synthesized or played.
What you can do next
• If you want the agent to finish speaking after a participant leaves:
◦ Disable automatic close-on-disconnect by setting RoomInputOptions.closeOnDisconnect = False (Node) or RoomOptions.close_on_disconnect = False (Python).
◦ Or perform a draining shutdown so the agent finishes TTS/playout before fully closing (e.g., session.shutdown(drain=True) or wait for playout with the SDK’s wait/drain APIs).
• Also consider listening for participant_disconnected and explicitly waiting for playout completion (ctx.waitForPlayout() or equivalent) before closing the session.
If you’d like, tell me which SDK you’re using (Node.js or Python) and I’ll provide the exact code snippet to: 1) disable close-on-disconnect, or 2) implement a drain/wait flow so the TTS can complete.
Sources: Pipeline nodes and hooks | LiveKit Documentation | Agent session | LiveKit Documentation | Job lifecycle | LiveKit Documentation | Agent speech and audio | LiveKit Documentation, with interactive elementscalm-oyster-84545
04/18/2026, 10:37 AMtall-airline-16756
04/18/2026, 10:38 AMCLIENT_INITIATED, but that can happen for reasons other than the participant intentionally leaving (e.g., a session timer, programmatic shutdown, or an internal error). When the session begins closing it can halt TTS before audio plays, which explains an LLM metric without downstream TTS metrics.
To help narrow this down, please answer:
1. Which SDK are you using (Node.js or Python)?
2. Do you have any custom shutdown/timer logic, retries, or job timeouts in your agent code?
3. Can you paste (or share) any log lines immediately before and after the LLM metrics timestamp (around 2026-04-17T111714 and up to 111745)? Look for errors, shutdown calls, or SIGTERM messages.
4. Do you see any TTS-related error logs (failed synth, TTS provider errors) or network errors around that time?
What I’ll do next
• Once you share the SDK and the surrounding logs, I’ll point to the exact places to check and provide a short code snippet to either:
◦ keep the session open to finish TTS, or
◦ perform a draining shutdown so TTS completes before closure.
If you prefer, paste the additional logs here and I’ll review them.
Sources: Agent session | LiveKit Documentation | Job lifecycle | LiveKit Documentation | Deployment reliability on LiveKit Cloud | LiveKit | Build a salary negotiation coach with a LemonSlice avatar | LiveKit | Build a salary negotiation coach with a LemonSlice avatar | LiveKit, with interactive elementscalm-oyster-84545
04/18/2026, 10:44 AMtall-airline-16756
04/18/2026, 10:44 AMself._draining = True from a SIGTERM or shutdown call) might have been set without logging details, preventing TTS from starting.
• The LLM response could have been partial/streamed and the agent was waiting for completion or post-processing before invoking TTS.
Quick checks I recommend right now
1. Confirm SDK (Node.js or Python).
2. Search logs for any process-level signals or shutdown calls (SIGTERM, ctx.shutdown, session.shutdown, aclose) within ~1 minute after 111714.
3. Check TTS provider logs/requests around that time — does the TTS service receive a request? Any slow/failed HTTP calls?
4. Check for thread/blocking issues: are there any long GC pauses, blocked worker threads, or thread pool exhaustion metrics?
5. Inspect agent-side timeouts (LLM/TTS request timeouts, overall job timeout, session timers) and any retry/backoff logic that could pause the pipeline silently.
If you want, share:
• SDK (Node or Python), and any shutdown/timer code or job timeout values.
• TTS provider logs or HTTP traces for that job_id (AJ_DwaC5dp5kFx7).
• Any process-level logs (SIGTERM, resource warnings, GC pauses) within the minute after 111714.
Tell me which of those you can pull and I’ll point exactly where to look and what snippet to add to capture the blocked/timeout event.
, with interactive elementscalm-oyster-84545
04/18/2026, 10:46 AMtall-airline-16756
04/18/2026, 10:47 AMRoomInputOptions.closeOnDisconnect = false or ensure you call `await ctx.waitForPlayout()`/`session.shutdown({ drain: true })` to let TTS finish. (This won’t fix the root cause but prevents session closure from masking the issue.)
1. Check logs around resource limits:
◦ Worker pool exhaustion, memory pressure, or GC pauses can cause large gaps without explicit errors.
What I can do next for you
• If you paste the small added logs you get from step 3 around the LLM→TTS handoff, I’ll interpret them and point to the exact failure mode.
• If you can share whether the TTS provider shows any incoming request for job_id AJ_DwaC5dp5kFx7, tell me the timestamps and I’ll help map where the pipeline stalled.
Would you like the minimal debug-snippet to add to your Node agent for the LLM→TTS handoff and event-loop lag measurement?
, with interactive elements