An assembly for an extendable and retractable boom of an agricultural machine, comprising - a first boom section having a first frame structure comprising a plurality of frame elements; - a second boom section connected to the first boom section by an articulating joint configured to allow 180 degrees rotational movement between the first and second boom sections , thereby, relocating the first and second boom sections between an extended boom section arrangement and a retracted boom section arrangement; - an arrangement of hinged elements connected to both the first and the second boom sections ; - an actuator provided with a cylinder-piston arrangement; - an actuator mechanism, the actuator mechanism comprising the actuator received inside the first frame structure of the first boom section and functionally connected to the arrangement of hinged elements , wherein the actuator mechanism and the arrangement of hinged elements are configured to produce the 180 degrees rotational movement between the first and second boom sections , and the actuator is configured to drive the 180 degrees rotational movement; and - a limiting device ; wherein the actuator provided with the cylinder-piston arrangement is prevented by the limiting device from rotational movement while driving the 180 degrees rotational movement between the first and second boom sections and while moving a movable actuator element between an extended and a retracted position; and characterized in that the limiting device comprises a guiding mechanism provided with guiding wall elements receiving the movable actuator element for guiding while the movable actuator element is moved between the extended and retracted positions, thereby, preventing the actuator from rotation. - a first boom section having a first frame structure comprising a plurality of frame elements; - a second boom section connected to the first boom section by an articulating joint configured to allow 180 degrees rotational movement between the first and second boom sections , thereby, relocating the first and second boom sections between an extended boom section arrangement and a retracted boom section arrangement; - an arrangement of hinged elements connected to both the first and the second boom sections ; - an actuator provided with a cylinder-piston arrangement; - an actuator mechanism, the actuator mechanism comprising the actuator received inside the first frame structure of the first boom section and functionally connected to the arrangement of hinged elements , wherein the actuator mechanism and the arrangement of hinged elements are configured to produce the 180 degrees rotational movement between the first and second boom sections , and the actuator is configured to drive the 180 degrees rotational movement; and - a limiting device ; wherein the actuator provided with the cylinder-piston arrangement is prevented by the limiting device from rotational movement while driving the 180 degrees rotational movement between the first and second boom sections and while moving a movable actuator element between an extended and a retracted position; and characterized in that the limiting device comprises a guiding mechanism provided with guiding wall elements receiving the movable actuator element for guiding while the movable actuator element is moved between the extended and retracted positions, thereby, preventing the actuator from rotation. <EOS>