The present disclosure relates to an electromechanical surgical system (10) including a surgical instrument (100) having a controller (150 or 154), and an end effector (300) selectively and removably connectable to the surgical instrument, wherein the controller is configured to enter an emergency retraction mode (540, 640, 740) when at least one input element (124, 126, 128, 130) of the surgical system is incapable of providing control signals to the controller to operate a motor (166), wherein the emergency retraction mode activates the motor to withdraw a drive assembly (360) from any advanced position thereof.