A construction machine comprising: a machine body (2, 3); an articulated front work implement disposed anterior to the machine body (2, 3) and including a boom, an arm, and a bucket; a plurality of hydraulic actuators (4a - 6a) including a boom cylinder that drives the boom, an arm cylinder that drives the arm, and a bucket cylinder that drives the bucket; an operation device (9a, 9b) that is operated by an operator to instruct an operation of each of the boom, the arm, and the bucket; a boom posture sensor that senses posture of the boom; an arm posture sensor that senses posture of the arm; a bucket posture sensor that senses posture of the bucket; and a controller that controls drive of the hydraulic actuators (4a - 6a) in response to an operation of the operation device (9a, 9b), the controller setting a leveling target surface, determining target velocities of the boom, the arm, and the bucket such that the bucket does not advance further down the leveling target surface, and, during leveling work, notifying the operator of details of an operation of the operation device (9a, 9b) for achieving the target velocities of the arm and the bucket or controlling drive of the hydraulic actuators (4a - 6a) so as to achieve the target velocities of the arm and the bucket, characterized in that the controller is configured to determine whether or not compaction work is in progress, calculate a front distance that represents a distance between a rotational pivot of the boom and a predetermined position in a back surface of the bucket, determine the target velocity of the bucket such that a velocity with which the bucket approaches the leveling target surface decreases with increasing values of the front distance, and, during the compaction work, notify the operator of details of an operation of the operation device (9a, 9b), the details being used for achieving the target velocity of the bucket, or control drive of the hydraulic actuators (4a - 6a) so as to achieve the target velocity of the bucket. a machine body (2, 3); an articulated front work implement disposed anterior to the machine body (2, 3) and including a boom, an arm, and a bucket; a plurality of hydraulic actuators (4a - 6a) including a boom cylinder that drives the boom, an arm cylinder that drives the arm, and a bucket cylinder that drives the bucket; an operation device (9a, 9b) that is operated by an operator to instruct an operation of each of the boom, the arm, and the bucket; a boom posture sensor that senses posture of the boom; an arm posture sensor that senses posture of the arm; a bucket posture sensor that senses posture of the bucket; and a controller that controls drive of the hydraulic actuators (4a - 6a) in response to an operation of the operation device (9a, 9b), the controller setting a leveling target surface, determining target velocities of the boom, the arm, and the bucket such that the bucket does not advance further down the leveling target surface, and, during leveling work, notifying the operator of details of an operation of the operation device (9a, 9b) for achieving the target velocities of the arm and the bucket or controlling drive of the hydraulic actuators (4a - 6a) so as to achieve the target velocities of the arm and the bucket, setting a leveling target surface, determining target velocities of the boom, the arm, and the bucket such that the bucket does not advance further down the leveling target surface, and, during leveling work, notifying the operator of details of an operation of the operation device (9a, 9b) for achieving the target velocities of the arm and the bucket or controlling drive of the hydraulic actuators (4a - 6a) so as to achieve the target velocities of the arm and the bucket, characterized in that the controller is configured to determine whether or not compaction work is in progress, calculate a front distance that represents a distance between a rotational pivot of the boom and a predetermined position in a back surface of the bucket, determine the target velocity of the bucket such that a velocity with which the bucket approaches the leveling target surface decreases with increasing values of the front distance, and, during the compaction work, notify the operator of details of an operation of the operation device (9a, 9b), the details being used for achieving the target velocity of the bucket, or control drive of the hydraulic actuators (4a - 6a) so as to achieve the target velocity of the bucket. determine whether or not compaction work is in progress, calculate a front distance that represents a distance between a rotational pivot of the boom and a predetermined position in a back surface of the bucket, determine the target velocity of the bucket such that a velocity with which the bucket approaches the leveling target surface decreases with increasing values of the front distance, and, during the compaction work, notify the operator of details of an operation of the operation device (9a, 9b), the details being used for achieving the target velocity of the bucket, or control drive of the hydraulic actuators (4a - 6a) so as to achieve the target velocity of the bucket.