At Kilauea volcano, Hawaii, the recent long‐lived eruptions of Mauna Ulu and Pu'u O'o have occurred in two major stages, defining a characteristic eruptive pattern. The first stage consists of cyclic changes of activity between episodes of “fire fountaining” and periods of quiescence or effusion of vesicular lava. The second stage consists only of continuous effusion of lava. We suggest that these features reflect the dynamics of magma degassing in a chamber which empties into a narrow conduit. In the volcano chamber, gas bubbles rise through magma and accumulate at the roof in a foam layer. The foam flows toward the conduit, and its shape is determined by a dynamic balance between the input of bubbles from below and the output into the conduit. The foam thickness is proportional to (μlQ/ε2 ρl g)1/4, where μ l and ρl are the viscosity and density of magma, ε is the gas volume fraction in the foam, g is the acceleration of gravity, and Q is the gas flux. The bubbles in the foam deform under the action of buoyancy, and the maximum permissible foam thickness is hc = 2σ/ερlgR, where σ is the coefficient of surface tension and R is the original bubble radius. If this critical thickness is reached, the foam collapses into a large gas pocket which erupts into the conduit. Foam accumulation then resumes, and a new cycle begins. The attainment of the foam collapse threshold requires a gas flux in excess of a critical value which depends on viscosity, surface tension, and bubble size. Hence two different eruption regimes are predicted: (1) alternating regimes of foam buildup and collapse leading to the periodic eruption of large gas volumes and (2) steady foam flow at the roof leading to continuous bubbly flow in the conduit. The essential result is that the continuous process of degassing can lead to discontinuous eruptive behavior. Data on eruption rates and repose times between fountaining phases from the 1969 Mauna UIu and the 1983–1986 Pu'u O'o eruptions yield constraints on three key variables. The area of the chamber roof must be a few tens of square kilometers, with a minimum value of about 8 km2. Magma reservoirs of similar dimensions are imaged by seismic attenuation tomography below the east rift zone. Close to the roof, the gas volume fraction is a few percent, and the gas bubbles have diameters lying between 0.1 and 0.6 mm. These estimates are close to the predictions of models for bubble nucleation and growth in basaltic melts, as well as to the observations on deep submarine basalts. The transition between cyclic and continuous activity occurs when the mass flux of gas becomes lower than a critical value of the order of 103 kg/s. In this model, changes of eruptive regime reflect changes in the amount and size of bubbles which reach the chamber roof.