add retry for engine executing task fail when agent is reconnecting