A confined space preorganizes substrates, which substantially changes their chemical reactivity and selectivity; however, the performance as a reaction vessel is hampered by insensitivity to environmental changes. Here, we show a dynamic confined space formed by substrate grasping of an amphiphilic host with branched aromatic arms as an active molecular gripper capable of performing substrate grasping, macrocyclization, and product release acting as a macrocycle synthesizer. The confined reaction space is formed by the substrate grasping of the molecular gripper, which is further stabilized by gel formation. Confining a linear substrate in the closed form of the gripper triggers a spontaneous ring-forming reaction to release a macrocycle product by opening. The consecutive open–closed switching enables repetitive tasks to be performed with remarkable working efficiency.