There are multiple solutions to minimize the risk to have above scenario.
Solution 1 :
Delay the startup of caf and hmagent services by executing these commands on the computers
sc config hmagent start= delayed-auto
sc config caf start= delayed-auto
This could be done using a SD or AM job.
caf will be started later during boot process and this gives more chance to user to be logged in when SD Job with reboot is executed. (and so has the caf reboot dialog box displayed).
Solution 2 :
Execute following command on the computers to avoid SD Agent execution after caf register execution :
ccnfcmda -cmd SetParameterValue -ps itrm/agent/solutions/usd_agent -pn postregistrationplugin -v ""
SD Agent will automatically be executed when it received the SD Trigger sent by the scalability Server (every 10 minutes in case of pending SD job) or via the scheduler task sdagentschedule
Solution 3 :
Check the scheduling options of collect Task of AM Agent (specially Software Inventory as it could take time to be executed). And check if scheduling options could be updated to minimize the AM Agent execution time after the boot of computer.
For example if software inventory is scheduled once a day, maybe change it to once a week.
Or define a time range (ex: between 12pm and 8pm)
The goal is to speed up the execution of AM Agent after the first computer boot. caf will perform the reboot (requested by SD Agent job) more quickly and user may has no time to logon or to start to work.