Compulsive behavior is a hallmark of substance use disorder and other addictive disorders. My lab models compulsive behavior in mice using a reinforcement training paradigm (RI60) that leads to habitual and punishment-resistant reward-seeking. By using fiber photometry and optogenetics to measure and manipulate dopamine signals in vivo as compulsive behavior emerges, we are revealing how dopamine contributes to this addiction-relevant process. I will present published and unpublished work identifying the specific spatiotemporal features of dopamine signaling that drive compulsion, including evidence that adolescent stress – an important risk factor for addiction – reshapes key features of dopamine engagement in compulsion. These findings highlight the synaptic- and circuit-level mechanisms by which developmental experiences alter vulnerability to addiction and suggest new avenues for personalized treatment strategies.