wide-dress-57902
08/23/2025, 4:45 AMtall-airline-16756
08/23/2025, 4:45 AMtall-airline-16756
08/23/2025, 4:46 AMshutdown_process_timeout parameter in WorkerOptions. It basically sets how long the LiveKit Agents framework will wait for a job to shut down nicely before it has to step in and forcefully stop the process. This timeout is all about those shutdown hooks you add with ctx.add_shutdown_callback(), which take care of important cleanup and post-processing when a job finishes.
If those hooks don’t finish up in time, the process will be ended automatically. By default, this timeout is 60 seconds (or 60,000 milliseconds if you’re using the JavaScript SDK), but you can totally adjust it when you create a WorkerOptions instance if you need more time for longer cleanup tasks.
Sources: livekit-agents/livekit/agents/cli/cli.py | Inside a session | LiveKit Docs | Inside a session | LiveKit Docs | Inside a session | LiveKit Docs | Anatomy of an Agent | LiveKit Docs