I have had this problem for several months now. It only affects a few systems specifically Windows Server 2008 R2 and Windows Server 2012 R2. Not all the servers act the same. About half the servers have no problem running what ever task I push to it. Then there are the same servers every time I push a task to it fails. It fails with 'No user has logged onto the system, failed operation'. When I RDP to the server and rerun the task it will succeed no problem.
The tasks I run very from batch scripts to powershell scripts to executable to msi Distribution tasks. I have looked through the PolicySync.log and PolicySync.exe.log with no errors showing from what I can tell. All systems have the same agents installed(Workstations and servers alike). I don't have this problem with the Windows 7 boxes.
So one thing to help you out is to enable more verbosity on the logs for a start (be careful - may be killing you with kindness here). Check this article for information on how to do that -- How to enable Xtrace Diagnostic Logging -- and check my comments, for a copy&paste -able .REG template.
It *sounds* to me like you've got a limitation set up that requires someone to be logged in. Is it possible that the following may need changing in your server-side agent distribution setting?
... could be something as simple as that, perhaps?