The Hunga Tonga-Hunga Ha'apai volcanic eruption is arguably the most explosive since Krakatoa erupted in 1883. Understanding how magma dynamics are regulated by volcanic plumbing systems on timescales of seconds to minutes remains challenging. Here we identify four similar seismic subevents within a 5-minute interval during the intensifying early eruptive phase. Each subevent is similar in waveform and duration and is characterized by a sequence of four stages, A-D. Initial stage A is marked by an unusual negative P-wave polarity which is best explained by an upward, single-force mechanism at the volcano created by a magma hammer related to a transiently closed or blocked conduit. Renewed high mass flow in the second stage (B) produced a single force down at the volcano which was followed by reverberations that represent stages C and D and recovery to the initial state. This episodic magma hammer model, which is consistent with thermodynamic properties of the multiphase magmatic mixture, yields an estimate of magma mass flow in the conduit that is remarkably consistent with discharge into the atmosphere estimated from satellite imagery of plume heights.