My Livekit session wont end, I checked manually th...
# ask-ai
t
My Livekit session wont end, I checked manually through livekit CLI it says no rooms active livekit cloud shows that there is a room active
t
Thanks for reaching out, Subscriptions. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re seeing that mismatch between the CLI (no rooms) and LiveKit Cloud (room still active). I’ll help you troubleshoot and get the room cleaned up. From what you described, I’m responding to: your LiveKit session won’t end; the CLI reports no active rooms but the Cloud dashboard still shows one active room. Quick checklist — things that commonly keep a room marked active • An agent, egress process, or other non-user connection is still attached to the room (these keep it alive). • The room is within the configured grace period (
departure_timeout
) after participants left. • Webhook or cleanup logic didn’t run (so
room_finished
/
participant_left
events weren’t processed). • A UI/dashboard caching delay (the cloud UI can sometimes show stale state briefly). Please try these steps and share results so I can help further: 1) Confirm whether any participants or egress/agents are still connected • Check the Cloud dashboard’s participant list for that room. If it shows any participant, egress, or agent, that connection will keep the room active. • If you have access to server logs, search for recent
participant_join
,
participant_left
, or any egress connection logs for that room. 2) Check webhook events / job lifecycle logs • Look for
participant_left
and
room_finished
webhook events for that room. If those events didn’t fire or weren’t processed, the room can remain active. • If you use agent/job flows, confirm job lifecycle events completed as expected. 3) Verify departure timeout behavior • Rooms can remain active for a short period after everyone leaves depending on
departure_timeout
. If you expect immediate termination, confirm what
departure_timeout
is set to in your configuration. 4) Manually delete the room via API (if you want immediate removal) • If you’ve confirmed no live connections and want the room gone right away, you can delete the room using the Rooms API. If you want, tell me the SDK/language you use and I’ll provide the exact API call snippet. What I need from you if the above doesn’t resolve it • Room name or room ID (so I can advise targeted checks) • Which SDK or CLI command you used when verifying no rooms (so I can match steps) • Whether you use agents/egress or multi-region deployment (both can affect room lifecycle) If you share those details I’ll give the exact API calls/log checks and next steps. Sources: CreateRoom() is taking too long | LiveKit | Agent session | LiveKit Documentation | Why is there extra audio at the end of my recordings of an agent session? |... | server-sdk-ruby | livekit/livekit_composite | DeepWiki | Job lifecycle | LiveKit Documentation
t
image.png
t
Thanks — that screenshot is helpful. I’m responding to your issue where the Cloud dashboard shows the room as ACTIVE while the CLI reports no active rooms. From the image I can see the room row for RM_wSkGwL2pqkFN shows “In progress”, a long elapsed time (1,107 mins), and an “ACTIVE” status badge — which indicates the cloud dashboard still considers that room alive. Next steps I can help with — please provide any of the following you’re comfortable sharing so I can give exact commands/snippets or targeted checks: • Confirm the exact room ID you want to clean up (it looks like
RM_wSkGwL2pqkFN
in the screenshot). • Which SDK or CLI and language you used when you checked “no rooms active” (for example: LiveKit CLI, server SDK in Node/Python/Go, or REST API). • Whether you run egress jobs, agents, or any third-party connectors that might remain attached to the room. Immediate things you can try now 1. Re-check for any connected participants or egress processes in that room via the dashboard participant list or server logs — any active connection will keep the room alive. 2. Look for recent webhook events (
participant_left
,
room_finished
) or agent job lifecycle events to confirm cleanup ran. 3. If you confirm no active connections and want the room removed immediately, you can delete the room via the Rooms API. Tell me your SDK/CLI and I’ll provide the exact delete call. If you share the room ID and which client/SDK you prefer, I’ll give the precise API/CLI command and any log queries to run next.
t
can you see the image?
t
Yes — I can see the screenshot and I’ve extracted the contents you shared. What I can see: • Two rows representing rooms/sessions: ◦ Row 1: Room
RM_syKznHtoAqah
, session
interview-859035133174877348506386
, timestamps 26 Feb 2026 170453 → 170844, duration 9 mins, count 2 (rightmost columns partially cut off). ◦ Row 2: Room
RM_wSkGwL2pqkFN
, session
interview-89a02313b08a38e95f01958d
, timestamp 26 Feb 2026 162937, status “In progress”, duration 1,107 mins, count 1, and a green “ACTIVE” status badge. Next steps I can help with: • Verify whether the “ACTIVE” room (
RM_wSkGwL2pqkFN
) actually has live connections or egress keeping it open. • Walk you through the exact CLI/API calls to list participants, check egress, or delete the room. • If you prefer, I can provide the specific API/CLI commands for your environment—tell me which SDK or CLI you used. Which would you like to do next? If you want me to check something specific, please share the room ID you want me to focus on (or confirm it’s
RM_wSkGwL2pqkFN
).
t
can you end the session/?
t
I can’t end the session from here, but I can guide you step‑by‑step to terminate it immediately. You confirmed the active room is
RM_wSkGwL2pqkFN
— here are three safe ways to end it. Pick the one that fits your environment. 1) Delete the room via the REST API (immediate) • Send an authenticated DELETE request to the Rooms API for that room. • If you tell me which language or tool you use (curl, Node, Go, Python), I’ll provide the exact request snippet. 2) End any connected egress or agent processes • Check for any egress jobs or agents attached to `RM_wSkGwL2pqkFN`; those will keep the room active. • If you find an egress job ID, stop or cancel that job (I can show the API/CLI call if you share the job ID or how you manage egress). 3) Confirm no participants and wait for departure timeout or force-delete • Verify there are no participants listed for that room in the dashboard or via the CLI. • If no participants exist and you want immediate removal, use the DELETE room call from step 1 to force termination rather than waiting for
departure_timeout
. Which option do you want to proceed with? If you choose DELETE via API, tell me: • The tool/language you prefer (curl, Node, Python, Go), and • Whether you want a curl command or an SDK snippet. If you prefer, paste any error messages you get when trying to delete and I’ll troubleshoot the exact failure.
t
can you Verify whether the “ACTIVE” room (
RM_wSkGwL2pqkFN
) actually has live connections or egress keeping it open.
t
Thanks — I’ll help you verify whether
RM_wSkGwL2pqkFN
actually has live connections or egress keeping it active. I’ll walk you through the quickest checks you can run now and what to share back so I can help take the next step. Quick plan — three checks (participants, egress, and webhooks/logs): 1) Check participants (fastest) • Run this LiveKit CLI command: ◦ lk room participants list RM_wSkGwL2pqkFN • What to look for: ◦ Any participants listed (users, agents, SIP callers). If even one is present, the room stays active. • If you don’t use the CLI, tell me which SDK/language you prefer and I’ll provide a snippet. 2) Check active egress sessions • Run this LiveKit CLI command: ◦ lk egress list --room RM_wSkGwL2pqkFN • What to look for: ◦ Any egress jobs returned with status like active/recording/streaming. Active egress will keep the room alive until stopped. • If you find an egress ID and want to stop it, tell me the ID and I’ll give the exact stop command. 3) Check webhooks or recent logs (confirm lifecycle events) • Look for
participant_left
,
room_finished
, or
egress_ended
webhook events for that room. • If webhooks aren’t showing expected events (e.g., no
participant_left
or no
egress_ended
), that explains why the room remains active. • If you don’t have webhooks, check server logs for recent join/leave/egress events. If you want to force the room closed immediately • Stop any active egress first, then delete the room: a. Stop egress: lk egress stop <egress-id> b. Delete room: lk room delete RM_wSkGwL2pqkFN • Tell me which tool (curl, Node, Python, Go) you prefer and I’ll give exact commands/snippets. What I need from you to proceed • The outputs of the two CLI commands above (participants list and egress list), or • If you can’t run CLI, tell me which SDK/language and I’ll provide equivalent code snippets, or • If you prefer, paste any webhook/log lines related to that room. Share the command outputs and I’ll tell you precisely what’s keeping the room active and the safe next action to end it. Sources: Backup Egress Recordings | Server-side | livekit/livekit_composite | DeepWiki | Why is there extra audio at the end of my recordings of an agent session? |...
t
can you connect me with one of the Livekit engineers to help me effectively solve my problem in a better way.
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!