Livekit main.py console closes the console when I ...
# ask-ai
r
Livekit main.py console closes the console when I ctrl-C. Is there a way to not have this happen?
t
Thanks for reaching out, Trevor. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It sounds like you’re asking if Ctrl-C can stop your
main.py
without closing the LiveKit agent process/console. By design, Ctrl-C sends SIGINT and the worker begins a graceful shutdown, then exits. If you want to change the behavior, you can: • Increase the worker shutdown/drain time so it stays up longer before exiting (see Job lifecycle and Worker options). • Add shutdown hooks to perform cleanup and keep the process alive until they complete (within the configured timeout). For details: • Job lifecycle and shutdown timeouts: Job lifecycle • Worker options (e.g.,
shutdown_process_timeout
): Worker options • Deployment behavior with signals: Deploying to custom environments If your goal is different (e.g., keep the console fully interactive after Ctrl-C, or only pause jobs), let me know and I can suggest the exact WorkerOptions or code snippets. Sources: Deploying to custom environments | LiveKit Docs | Agent Session & Client Integration | livekit/livekit_composite | DeepWiki | Job lifecycle | LiveKit Docs | Worker options | LiveKit Docs | Voice AI quickstart | LiveKit docs