Abstract Developing supramolecular porous crystalline frameworks with tailor-made architectures from advanced secondary building units (SBUs) remains a pivotal challenge in reticular chemistry. Particularly for hydrogen-bonded organic frameworks (HOFs), construction of geometrical cavities through secondary units has been rarely achieved. Herein, a body-centered cubic HOF (TCA_NH 4 ) with octahedral cages was constructed by a C 3 -symmetric building block and NH 4 + node-assembled cluster (NH 4 ) 4 (COOH) 8 (H 2 O) 2 that served as supramolecular secondary building units (SSBUs), akin to the polynuclear SBUs in reticular chemistry. Specifically, the octahedral cages could encapsulate four homogenous haloforms including CHCl 3 , CHBr 3 , and CHI 3 with truncated octahedron configuration. Crystallographic evidence revealed the cages served as spatially-confined nanoreactors, enabling fast, broadband photochromic effect associated with the reversible photo/thermal transformation between encapsulated CHI 3 and I 2 . Overall, this work provides a strategy by shaping SSBUs to expand the framework topology of HOFs and a prototype of hydrogen-bonded nanoreactors to accommodate reversible photochromic reactions.