A ZnII8L6 pseudocube containing anthracene-centered ligands, a ZnII4L'4 tetrahedron with a similar side length as the cube, and a trigonal prism ZnII6L3L'2 were formed in equilibrium from a common set of subcomponents. Hetero-Diels-Alder reaction with photogenerated singlet oxygen transformed the anthracene-containing "L" ligands into endoperoxide "LO" ones and ultimately drove the integrative self-sorting to form the trigonal prismatic cage ZnII6LO3L'2 exclusively. This ZnII6LO3L'2 structure lost dioxygen in a retro-Diels-Alder reaction after heating, which resulted in reversion to the initial ZnII8L6 + ZnII4L'4 ⇌ 2 × ZnII6L3L'2 equilibrating system. Whereas the ZnII8L6 pseudocube had a cavity too small for guest encapsulation, the ZnII6L3L'2 and ZnII6LO3L'2 trigonal prisms possessed peanut-shaped internal cavities with two isolated compartments divided by bulky anthracene panels. Guest binding was also observed to drive the equilibrating system toward exclusive formation of the ZnII6L3L'2 structure, even in the absence of reaction with singlet oxygen.