Hey team
I’ve been running a deployed agent on LiveKit Cloud for several months without issues. About 2–3 weeks ago it stopped working completely, and after extensive debugging I can confirm it’s not a code or config problem.
Details:
Agent ID: CA_kdH3VYVKtzsr
Project ID: p_5wnpagm7zno
Region: us-east
Plan: Build (free)
Agent: Python SDK livekit-agents==1.5.1, explicit dispatch with agent_name=“outbound-caller”
Dispatched from: .NET backend via AgentDispatchServiceClient
What’s happening:
lk agent status always shows Sleeping with CPU: 0m, Mem: 0
AgentDispatchServiceClient.CreateDispatch() returns a valid AD_ ID with no errors
The agent never joins the room — dispatch is orphaned
lk agent restart returns “Restarted” but status stays Sleeping immediately after
Runtime logs are inaccessible: “The agent has shut down due to inactivity. It will automatically start again when a new session begins.” — but it never does
Build logs are completely clean — all 9 Docker steps succeed, no errors
Confirmed NOT the issue:
All secrets present and valid (OPENAI_API_KEY, DEEPGRAM_API_KEY, ASSEMBLYAI_API_KEY, SIP_OUTBOUND_TRUNK_ID, AWS keys)
LIVEKIT_URL/API_KEY/SECRET are project-level — not needed in secrets
Free plan quota not exceeded
Room stays open for several minutes after dispatch (not an emptyTimeout issue)
Dispatch API works correctly — valid AD_ IDs returned every time
Self-hosted works perfectly:
When I run the exact same agent code locally with python agent.py dev pointing to the same LiveKit Cloud project, it works flawlessly — registers as a worker, receives the dispatch, joins the room, completes the full session including DTMF, STT, TTS, S3 upload. Zero issues.
So the code is correct. The cloud deployment of the same code is broken.
My conclusion: The deployment CA_kdH3VYVKtzsr appears stuck in a broken infrastructure state where the cold start mechanism silently fails — the container is triggered to wake up on dispatch but never actually boots, never registers as a worker, and the pending dispatch expires with nobody to claim it.
This started happening ~2–3 weeks ago with no changes on my end.
Questions:
Can you investigate what’s happening with this specific deployment on your infrastructure?
Is there a known issue with cold start + explicit dispatch on the Build plan recently?
Would deleting and redeploying fix this, or is it a broader platform issue?
Thanks
I don’t see any similar issues that could indicate a broader platform issue, but I notice you have rebuilt the agent today and are seeing some sessions with the agent joining. Is this still an issue ?
Agent: Python SDK livekit-agents==1.5.1, explicit dispatch with agent_name=“outbound-caller”
Just to clarify, the agent with ID CA_kdH3VYVKtzsr has no name if you look at the analytics, Sign in | LiveKit Cloud but if you look at the list of agents at Sign in | LiveKit Cloud I DO see outbound-caller, so quite possibly something did get confused, and deleting / recreating the agent will resolve your issue.
I did redeploy yesterday and the initial status of the agent is “running“ as it should be after deployment, and during the status was running, agent dispatch worked, but right after the status went pending, dispatch wasn’t working, but this morning it worked I can’t seem to figure out what is the problem. Soon we’re planning to move on to the paid plan, on Ship plan and above the worker stays running 24*7 correct?
But anyways for now the problem is resolved, thanks for the help @darryncampbell .
The best and most reliable indicator of agent state is to use the LiveKit CLI, and you will see the different statuses your agent can return here: Agent commands | LiveKit Documentation
The dashboard will amalgamate these statuses into either ‘running’, ‘pending’ or ‘error’.
Soon we’re planning to move on to the paid plan, on Ship plan and above the worker stays running 24*7 correct?
You were seeing Pending because your agent was in the Sleeping state since it had scaled down to 0 active instances, as documented here: Agent commands | LiveKit Documentation. So, yes, after you upgrade to the Ship plan I would not expect to see this.
The same issue. It won’t wake up when it goes to pending. lk agent restart or similar commands doesn’t work. It goes into running for a while only when we do a new deployment. We were planning to upgrade our plan but it makes our demos difficult and affects the business
Hitting the same issue for the past two days. Our agent stops accepting dispatches and the only way to recover is to delete the agent and redeploy — it then works for a while before going unresponsive again. Is there a workaround beyond redeploy?
@willsr@mmyrt@Hariram_m 3 separate posts in a few days from different accounts is concerning, but I don’t see any other reports.
As you probably know, agent cold starts can take 10-20 seconds to have the agent join the room, Quotas and limits | LiveKit Documentation . The agent will be in the pending state until it starts.
Another common issue is exceeding the number of concurrent agent sessions, set to 5 for the build plan.
The first thing to check is by using Agent Console, Agent Console | LiveKit Documentation , are you able to start an agent? Remember to specify the agent name in the config. I did try this with an old test account I had on build tier and my agent did eventually join.
The other common issue is some bug in the agent preventing it from launching, e.g. some code path that only executes when you pass through specific meta data causing it to crash. You can run lk agent logs to see if the agent is ever dispatched.
I did look at a selection of sessions across your accounts where the agent didn’t join and I wasn’t able to determine a definitive reason for every session I looked at, so I’d like to try and reproduce this myself. How can I reproduce this from scratch?
Hi, we are also encountering the same issue. We tried deleting and recreating the agent which helped at first but after about 2 days the same issue resurfaces. Inbound SIP reaches LiveKit successfully: the room is created, the SIP participant joins, and an agent dispatch is created. However, the Cloud Agent stays in Sleeping with 0 replicas and never wakes to claim the dispatch. A direct lk dispatch create also creates a dispatch but does not wake the agent.
I’m also encountering this issue. I’ve tried connecting to a sleeping agent multiple times, both via phone call and through the console test, but it’s still sleeping. It doesn’t seem like the issue is cold start.
lk agent status - sleeping
lk agent logs - “failed to get logs: The agent has shut down due to inactivity. It will automatically start again when a new session begins.”
Redeploying helped, but naturally this isn’t the ideal solution.
Can you please share you the agent id so I can have the team look into this. You can find it here https://cloud.livekit.io/projects/p_/agents It is most helpful to have the id of a stuck agent.
Hello, me too. The Cloud Agent deployment exists and is sleeping. The backend successfully creates an AgentDispatch with agent_name=agent-web, but list_dispatch keeps showing jobs_count=0, agent_ids=, worker_ids=, deployment_ids=, regions=. The agent logs remain empty because the agent is never invoked. This is not an agent crash; the dispatch is not being resolved into a Cloud Agent job.