We consider a Ramsey model with a continuum of Cournotian industries where free entry generates an endogenous markup. The model produces two different regimes, monopolistic and Cournotian monopolistic competition, resulting in non-smooth dynamics. We analyze the global dynamics of the model, demonstrating it may exhibit heteroclinic orbits connecting multiple equilibria. Small transitory changes in parameters can lead to large permanent effects and there can be a poverty trap separating a low-capital and high-markup equilibrium from a high-capital low-markup equilibrium. We apply results from the mathematics of non-smooth dynamic systems, which provide a more general framework for understanding regime switching.