Dibenzochrysene enables tightly controlled docking and stabilizes photoexcited states in dual-pore covalent organic frameworks.