Hi,
Do you mean agent is disconnected from Task Server?
This can be due to some network issues, mac configuration (sleep, power saver) etc.
Do determine root cause, as Igor has mentioned, please collect devnote logs on agent side and logs from TaskServer/NS server, and share these with us.
Thanks,
Andrei