We study foam production and destabilization through a flow-focusing geometry, namely a single pore of rectangular cross-section, by coinjecting gas and liquid at constant pressure, P g , and constant flow rate, Q w . We observe that bubble production results from a Rayleigh-Plateau destabilization of the internal gas thread that occurs at the pore neck when its width becomes comparable to the height of the rectangular-section channel. Using a simple model and numerical approach, we (i) predict the shape of the gas jet and its stability range as a function of flow parameters and device geometry, which we successfully compare with our experimental results, and (ii) demonstrate the existence of a critical local pressure drop at the pore neck that determines whether or not a stable gas flow can form. We thus show that bubble foam generation exhibits hysteretic behavior due to hydrodynamic feedback and demonstrate that there is a maximum bubble volume fraction that the generated foam cannot exceed, the value of which is fixed by the geometry. Our results suggest that the foam collapse observed in porous media when the fractional gas flow becomes too large may result from hydrodynamic feedback inhibiting foam generation and not necessarily from coalescence between bubbles, as is usually claimed.