We study analytically the dynamics of a generalized p-spin model, starting with a thermalized initial condition. The model presents birth and death of states, hence the dynamics (even starting at equilibrium) may go out of equilibrium when the temperature is varied. We give a full description of this constrained out of equilibrium behavior and we clarify the connection to the thermodynamics by computing (sub-dominant) tap states, constrained to the starting equilibrium configuration.PACS numbers: 75.10. Nr, 64.70.Pf, 75.50.Lk Many interesting physical systems live for very long times out of equilibrium, and, in this regime, they display highly non trivial behaviors which are still to be understood (e.g. rejuvenation and memory effects in spin glasses). In general, these systems fall out of equilibrium when some external parameter is changed. For example, fragile glassforming liquids undergo a dramatic slowing down of their relaxational dynamics when the temperature is dropped below the glass transition temperature 1 . This effect is sharpened in certain mean-field models where, at a critical temperature T d , a transition occurs from an equilibrium kind of dynamics to an off-equilibrium aging one 2 . The phenomenon is ubiquitous and can be found also in very different fields: e.g. in local search algorithms for solving hard optimization problems the time-complexity may become extremely large by varying a macroscopic parameter 3 . A better understanding of the mechanisms leading to the dramatic slowing down in out of equilibrium dynamics is a subject of broad interest and wide applicability.In describing the dynamical slowing down (and possible eventual arrest) the common view suggests that at a low temperature a huge number of metastable states appears (with energies higher than the equilibrium one, E 0 ), making relaxation to equilibrium very slow, and even impossible if interactions are long ranged and metastable states lifetimes diverge in the thermodynamic limit. This picture has been verified by solving the out of equilibrium Langevin dynamics of a particularly simple mean-field model, the so-called fully connected spherical p-spin, whose Hamiltonian is 4where the N spins σ i are continuous variables subject to the spherical constraint i σ 2 i = N and the couplings are i.i.d. random variables with zero mean and variance p!/(2N p−1 ). In this model (hereafter p ≥ 3) if we consider a quench, that is if we choose an initial configuration of high energy and let the system relax at a fixed value of the temperature T < T d (T d being the dynamic transition temperature), the asymptotic dynamics remains trapped at the energy level of the highest and most numerous metastable states, the so-called threshold states. Time-translation invariance and the dynamic fluctuation-dissipation relation are violated and aging is observed in correlation and response functions 5 .These features are intriguing and experimentally relevant, since aging behaviour has been observed in many disordered systems. Nevertheless, in order t...