limited-magician-22288
03/04/2026, 7:56 PMtall-airline-16756
03/04/2026, 7:56 PMtall-airline-16756
03/04/2026, 7:57 PMRM_nnnnn), or the room name you reused.
• Timestamps (with timezone) when the phantom session appeared and when the room was recreated or deleted.
• Relevant logs (server/app logs around room creation/deletion and any errors) and any agent/observability traces you have.
How to submit that information
• Post the details in the LiveKit community Slack (join here: https://livekit.io/join-slack) and post in the #agents or a relevant channel — include all items above so engineers can find matching logs quickly.
• If you prefer, include the dashboard link and the logs directly when contacting the LiveKit responder in your support channel so they can triage faster.
Why this happens and a prevention tip
• Phantom sessions can occur when you recreate a room with the same name quickly. The system can non-deterministically reuse a previous Room ID due to race conditions while deletion is still being processed.
• To avoid this, use a unique room name each time (for example append a timestamp or short random suffix).
If you’d like, I can:
• Walk you through collecting the exact logs and timestamps to include, or
• Suggest a simple room-naming scheme to eliminate reuse race conditions.
Which would you prefer?
Sources: Avoiding Room ID Reuse When Re-Creating Rooms With the Same Name | Still Have Questions | Streamline troubleshooting with Agent Observabilitylimited-magician-22288
03/04/2026, 7:58 PMtall-airline-16756
03/04/2026, 7:59 PMDeleteRoom and CreateRoom API calls on the server that manages rooms.
• Why it matters: Room ID reuse can happen within a short window (roughly 30–60 seconds). Precise timestamps show whether create/delete calls overlapped.
1. Gather the dashboard link and room identifiers
• What to do: Copy the dashboard URL that shows the phantom session and note the Room ID if visible (example format: RM_nnnnn) and the room name you reused.
• Why it matters: The dashboard link and Room ID let engineers find matching entries in logs quickly.
1. Record timezone and exact event times
• What to do: For each relevant event, provide the full timestamp and timezone (e.g., 2026-03-04T143212.345-07:00). Include:
◦ When the original room was deleted (server time).
◦ When the new room was created (server time).
◦ When the phantom session first appeared on the dashboard (approximate time).
• Why it matters: Timezone-aligned timestamps remove ambiguity and speed correlation across systems.
1. Stream or export agent/runtime logs
• If using LiveKit Cloud or agents:
◦ Use the LiveKit CLI to stream agent logs: lk agent logs --id <agent-id> (first run lk agent list to find the agent id).
◦ Or download the Agent insights/session logs from the Dashboard (Agent insights tab) in JSON if available.
• What to capture: The agent logs covering the time window from a minute before the delete to a minute after the recreate.
• Why it matters: Agent logs include lifecycle events and can show whether a previous Room ID was reused or deletion was still in progress.
1. Collect application & SDK logs (client and server)
• What to do: From your app servers and any client SDKs involved, collect logs around connection, join, and disconnect events for the same timeframe. Include logs that show:
◦ Room name used
◦ Any reported Room ID (if available)
◦ WebSocket/RTC connect or disconnect messages
• Why it matters: Initial connection logs may not include room context until after the WebSocket handshake, so both sides help correlate.
1. Add contextual fields to logs
• What to do: Ensure logs include structured fields: room_name, room_id (if available), request_id or trace_id, and user_id (if applicable). If you can, add a custom correlation id per operation.
• Why it matters: Correlation ids let engineers follow a request across services and match entries precisely.
1. If you forward logs to external monitoring
• What to do: If you already push logs to Datadog, CloudWatch, Sentry, or similar, export the relevant spans/log entries for the window and include links or exported JSON.
• Why it matters: These systems make it easy to search and filter by timestamp, room name, or trace id.
1. Reproduce (if intermittent) while logging is enabled
• What to do: Try recreating the sequence (delete then create with same name) while you have verbose logging enabled. Keep the same time-window capture (1 minute before to 1 minute after).
• Why it matters: Reproduction while logging gives the clearest evidence of the race condition.
1. Package and share what you collected
• What to include:
◦ Dashboard link and Room ID / room name.
◦ All timestamps with timezone and millisecond precision.
◦ Agent logs (raw or JSON) covering the event window.
◦ Server and client SDK logs for the same window.
◦ Any correlation/request IDs or trace IDs.
• Why it matters: This package lets the LiveKit team find the exact traces quickly and confirm whether Room ID reuse occurred.
If you’d like, I can:
• Provide a short checklist you can paste into your logging commands or runbook to ensure you collect everything, or
• Give an example of the exact log lines/fields to include (for your language of choice).
Which would help you most right now?
Sources: Ensuring Unique Room IDs with Dynamic Room Names | LiveKit | Where to find your Agent Logs | LiveKit | How to Send Logs from the JavaScript SDK to External Providers | LiveKit | Job lifecycle | LiveKit Documentation | Still Have Questions