Agent fails to receive the tasks because it is not registered to any task server.
When trying to reset the agent, we see the follow entries in the logs:
Release: 8.x
The task server assigned to the agent and site is not reachable or is turned off, and because the Notification Server is not a task server, the agent cannot even register with it.
By default, the Notification Server is also a task server and when an agent cannot register with its own task server, it will register with the notification server instead.
But in some environments like this example, people uninstall the task server from the Notification Server. So, when the task server is not active, the agent cannot register with anything else.
Make sure the task server is active and reachable.
You can also install the task server on the Notification Server as an alternative option.