Habits are inflexible behaviors that can be maladaptive in diseases including drug addiction. The striatum is integral to habit formation, and interspersed throughout the striatum are patches, or striosomes, which are characterized by unique gene expression relative to the surrounding matrix. Recent work has indicated that patches are necessary for habit formation, but how patches contribute to habits remains partially understood. Here, using optogenetics, we modulated striatal patches in Sepw1-NP67 mice during habit formation. We find that patch activation during operant training impairs habit formation, and conversely, that acute patch stimulation after reward devaluation can drive habitual reward seeking. Patch stimulation invigorates general locomotion but is not inherently rewarding. Finally, we use fast-scan cyclic voltammetry to demonstrate that patch stimulation suppresses dopamine release in dorsal striatum in vivo. Overall, this work provides novel insight into the role of the patch compartment in habit formation, and potential interactions with dopamine signaling.