LiveKit Cloud session remains ACTIVE in Sessions dashboard even after room is gone from RoomService API

Hello,

We are using LiveKit Cloud and found a session that appears to be stuck as ACTIVE in the Sessions dashboard.

Details:

  • Room name: 1
  • Stuck session ID: RM_d6X7rgCKks5Q
  • Started at: 2026/03/19 13:50:13 (JST)
  • In the Sessions dashboard, this session remains ACTIVE and its duration keeps increasing

What we confirmed on our side:

  • We can manage the current room normally with RoomService API
  • ListRooms(names=["1"]) returns no rooms for the stuck session case
  • ListParticipants(room="1") returns not_found
  • DeleteRoom("1") returns not_found
  • When a new real room with the same app-level room is created, it appears separately and can be deleted normally with DeleteRoom
  • After deleting the current real room, ListRooms(names=["1"]) becomes empty again, but the old session RM_d6X7rgCKks5Q still remains ACTIVE in the Sessions dashboard

So it looks like:

  • the RoomService API no longer sees an active room for that stale session
  • but the Sessions dashboard still shows the old session as ACTIVE

Could you please confirm:

  1. whether this is a known issue with stale/analytics session records
  2. whether this stuck session is still counted toward usage / participant minutes
  3. whether there is any way to force-close or clear that session record

If needed, I can provide our project details and API credentials privately.

Thanks.

I couldn’t find your Room ID, but I think you have a typo above and mean RM_d6Xr7gCKks5Q :slight_smile:

This does happen occasionally, please see this similar issue: Wrong data presented in session - #2 by CWilson .

The best thing to do is to check for active rooms with the LK CLI, lk room list, and if the long-running room is not there, it’s safe to assume this is an issue with the portal. The reported usage will not count towards your plan minutes, and will not incur overcharge.

I am seeing the same issue, no stuck rooms or participants, but active sessions shown in the dashboard. Is it possible the session is not properly cancelled when stopping the local agent due to an auth issue?

See how the command says using “Using url, api-key, api-secret from environment”. Then it says “dev-livekit.domain.tld: no such host”:

lk room list
Using url, api-key, api-secret from environment
twirp error internal: failed to do request: Post "https://dev-livekit.domain.tld/twirp/livekit.RoomService/ListRooms": dial tcp: lookup dev-livekit.domain.tld: no such host

No idea where that host comes from, but it’s not in my code. Could be injected into the dev client somehow. Possible some LLM messed with it during coding.

In Python, I must set override=True in load_dotenv(find_dotenv(".env.local"), override=True) to be able to read and override from my .env.local and connect to LiveKit Cloud, otherwise I cannot connect. When I log the URL before I load_dotenv, I am also seeing the domain.tld host in my code.

To me this looks like the client is stopped and then lk is trying to disconnect the session, but cannot see my .env.local for auth outside my code.

Anything I could try, e.g. reset lk?

@oliver,

That dev-livekit.domain.tld is coming from a stale LIVEKIT_URL in your environment, not your code. The lk CLI resolves credentials as explicit flags, then environment variables (LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET), then your linked default project (livekit-cli README), so an exported LIVEKIT_URL (a template placeholder here) overrides your lk cloud auth project. Your Python override=True finding is the same root cause: python-dotenv will not overwrite an already-exported variable, so .env.local was being shadowed by that same env LIVEKIT_URL.

To fix it:

  1. printenv LIVEKIT_URL to confirm the stale value.
  2. Remove the export at its source: shell profile, a base .env loaded before .env.local, Docker/compose env, or an editor-injected env.
  3. For the CLI, either unset LIVEKIT_URL LIVEKIT_API_KEY LIVEKIT_API_SECRET so it uses your linked project, or pass --project <name> for one command.
  4. Re-run lk room list. Once it points at the right project and shows no room, the still-ACTIVE dashboard session is the portal display issue noted above, which does not count toward usage.

Thank you for clarifying.

This confirms what I suspected: After unset LIVEKIT_URL LIVEKIT_API_KEY LIVEKIT_API_SECRET I can run my project without override=True and sessions properly close even when I CTRL+C out.

The CLI variables override the project variables from .env.local, so LiveKit is trying to close the sessions on the wrong server.

To prevent sessions from staying open, the project

- must be configured with load_dotenv(find_dotenv(".env.local")) (no override) to work nicely with CLI variables, and
- CLI variables must be unset LIVEKIT_URL LIVEKIT_API_KEY LIVEKIT_API_SECRET if the project is supposed to pick up variables from .env.local.

LiveKit is new to me, so I can’t say if that’s the expected behaviour or if it is an error in LiveKit or if LiveKit could work around this. But at least we know why it happens.