In day-to-day life, we often choose between pursuing familiar behaviors that have been rewarded in the past or adjusting behaviors when new strategies might be more fruitful. The dorsomedial striatum (DMS) is indispensable for flexibly arbitrating between old and new behavioral strategies. The way in which DMS neurons host stable connections necessary for sustained flexibility is still being defined. An entry point to addressing this question may be the structural scaffolds on DMS neurons that house synaptic connections. We find that the non-receptor tyrosine kinase Proline-rich tyrosine kinase 2 (Pyk2) stabilizes both dendrites and spines on striatal medium spiny neurons, such that Pyk2 loss causes dendrite arbor and spine loss. Viral-mediated Pyk2 silencing in the DMS obstructs the ability of mice to arbitrate between rewarded and non-rewarded behaviors. Meanwhile, the overexpression of Pyk2 or the closely related focal adhesion kinase (FAK) enhances this ability. Finally, experiments using combinatorial viral vector strategies suggest that flexible, Pyk2-dependent action involves inputs from the medial prefrontal cortex (mPFC), but not the ventrolateral orbitofrontal cortex (OFC). Thus, Pyk2 stabilizes the striatal medium spiny neuron structure, likely providing substrates for inputs, and supports the capacity of mice to arbitrate between novel and familiar behaviors, including via interactions with the medial-prefrontal cortex.