Closed-topology magnetic domains are usually observed in thin films and in an applied magnetic field. Here we report the observation of rectangular cross-section tubular ferromagnetic domains in thick single crystals of CeAgSb2 in zero applied field. Relatively low exchange energy, small net magnetic moment, and anisotropic in-plane crystal electric fields lower the domain wall energy and allow for the formation of the closed-topology patterns. Upon cycling the magnetic field, the domain structure irreversibly transforms into a dendritic open-topology pattern. This transition between closed and open topologies results in a topological magnetic hysteresis - the actual hysteresis in magnetization, not due to the imperfections and pinning, but due to the difference in the pattern morphology. Similar physics was suggested before in pure type-I superconductors and is believed to be a generic feature of other nonlinear multi-phase systems in the clean limit.