The generalized stability of a sea-breeze front is analyzed using a two-dimensional model. The objective is to understand the mechanisms leading to the shedding of eddies behind the sea-breeze front, as seen in observations, laboratory experiments and numerical models. Regions with Ri < 1/4 are not always associated with instability in this spatially inhomogeneous flow and significant transient growth is found in the absence of normal-mode instability, for both Ri ≤ 1/4 and Ri > 1/4. The energy source for optimal growth is the vertical shear of the mean horizontal wind, the vertical shear in the upper part of the front and the horizontal shear in the lower part. The growth begins with vertical advection by the perturbation velocity of the mean flow momentum located in the upper part of the front. Perturbations eventually propagate away from the localized shear area and a feedback mechanism is needed for this growth to be sustained. This feedback occurs through temperature anomalies in the upper part of the front inducing pressure-gradient anomalies in the lower part. These gradients lead to a growing vertical wind component and this vertical wind component then enters the upper part of the front, which reinforces the extraction of energy, thereby closing the feedback loop and leading to both normal-mode instability and, in the stable regime, large non-normal growth. We find that both the instability and the non-normal growth are vulnerable to parameter changes that weaken this feedback loop.