Well on the moon maybe since the time lag is only one second but on Mars with a time lag of four minutes+ making on time maneuver impossible so a task batch will be sent and the robot will follow through accordingly with some flexibility for the computer to follow through autonomously.
For example robot is given instructions to build a house with step by step instructions using nuts and bolts. The robot can not lose any pieces in completing the instructions but lets say he dropped one. At this point the AI sub-routine kicks in and starts to search the missing piece then the next routine kicks in for the robot to navigate to the found piece and then another routine kicks in to retrieve the piece and lastly another routine kicks in to return to the place of origin.
There will be other autonomous instructions such as recharging batteries and or even the most mundane routine like standing back up after falling down.