A tailgate assembly for an agricultural baler, comprising: a tailgate that is movable between an open position and a closed position; and a tailgate actuator coupled to the tailgate and configured to move the tailgate between the open position and the closed position; characterized by: a controller (210, 220) configured to: determine that a bale formation cycle is beginning; enter a lockout mode responsively to determining the bale formation cycle has begun, the lockout mode preventing the tailgate actuator from moving the tailgate to the open position; determine that the bale formation cycle is complete; and enter an ejection mode from the lockout mode responsively to determining the bale formation cycle has completed, the ejection mode allowing the tailgate actuator to move the tailgate to the open position; and a valve that is operatively coupled to the tailgate actuator and the controller (210, 220) and is switchable between being open and closed, the tailgate actuator being a fluid actuator and the valve preventing fluid delivery to the tailgate actuator when closed and allowing fluid delivery to the tailgate actuator when open, and wherein the valve comprises a solenoid and the controller (210, 220) is configured to output a close signal to the solenoid to close the valve when entering the lockout mode and output an open signal to the solenoid to open the valve when entering the ejection mode. a tailgate that is movable between an open position and a closed position; and a tailgate actuator coupled to the tailgate and configured to move the tailgate between the open position and the closed position; characterized by: a controller (210, 220) configured to: determine that a bale formation cycle is beginning; enter a lockout mode responsively to determining the bale formation cycle has begun, the lockout mode preventing the tailgate actuator from moving the tailgate to the open position; determine that the bale formation cycle is complete; and enter an ejection mode from the lockout mode responsively to determining the bale formation cycle has completed, the ejection mode allowing the tailgate actuator to move the tailgate to the open position; and a valve that is operatively coupled to the tailgate actuator and the controller (210, 220) and is switchable between being open and closed, the tailgate actuator being a fluid actuator and the valve preventing fluid delivery to the tailgate actuator when closed and allowing fluid delivery to the tailgate actuator when open, and wherein the valve comprises a solenoid and the controller (210, 220) is configured to output a close signal to the solenoid to close the valve when entering the lockout mode and output an open signal to the solenoid to open the valve when entering the ejection mode. a controller (210, 220) configured to: determine that a bale formation cycle is beginning; enter a lockout mode responsively to determining the bale formation cycle has begun, the lockout mode preventing the tailgate actuator from moving the tailgate to the open position; determine that the bale formation cycle is complete; and enter an ejection mode from the lockout mode responsively to determining the bale formation cycle has completed, the ejection mode allowing the tailgate actuator to move the tailgate to the open position; and determine that a bale formation cycle is beginning; enter a lockout mode responsively to determining the bale formation cycle has begun, the lockout mode preventing the tailgate actuator from moving the tailgate to the open position; determine that the bale formation cycle is complete; and enter an ejection mode from the lockout mode responsively to determining the bale formation cycle has completed, the ejection mode allowing the tailgate actuator to move the tailgate to the open position; and a valve that is operatively coupled to the tailgate actuator and the controller (210, 220) and is switchable between being open and closed, the tailgate actuator being a fluid actuator and the valve preventing fluid delivery to the tailgate actuator when closed and allowing fluid delivery to the tailgate actuator when open, and wherein the valve comprises a solenoid and the controller (210, 220) is configured to output a close signal to the solenoid to close the valve when entering the lockout mode and output an open signal to the solenoid to open the valve when entering the ejection mode.