Commands such as sigkill do not work to stop the a...
# ask-ai
i
Commands such as sigkill do not work to stop the agent connection.
t
Thanks for reaching out, Selahattin. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi there! I understand it can be a bit confusing, so let me help clarify why the
SIGKILL
command doesn’t work to stop the agent connection. It actually bypasses LiveKit’s carefully designed supervised process architecture and shutdown mechanisms. LiveKit agents are set up to ignore standard termination signals like
SIGTERM
at the job level, because the parent worker process is responsible for handling those signals. To stop the agent connection properly, it’s best to use
SIGTERM
(for example,
kill <pid>
), which initiates a graceful shutdown. This way, the agent can disconnect cleanly, helping to avoid any data loss or resource issues. If you need to terminate immediately during development, you can press Ctrl+C twice to force an exit. I hope this helps, and please feel free to reach out if you have any more questions! Sources: agents/src/cli.ts | Job lifecycle | LiveKit Docs | livekit-agents/livekit/agents/ipc/job_proc_lazy_main.py