Cognitive flexibility, the ability to alter one's strategy in light of changing stimulus-response-reward relationships, is a critical tool for acquiring and executing learned behavior. In order to adapt to novel, uncertain, or dynamic contexts, it is often necessary to abandon previously successful rules, and explore new rules, based on trial and error. One form of cognitive flexibility, commonly referred to as set-shifting, entails ignoring a previously relevant stimulus feature in favor of a newly relevant features. Successful performance of set-shifting behavior has been shown through previous work to involve the prefrontal cortex (PFC), and impairments in setshifting behavior are associated with multiple psychiatric disorders. In spite of the translational importance of this behavior, it remains unclear which cell types within PFC are responsible for conveying information critical to setshifting to downstream brain regions. To address this question, we used a novel set-shifting task in head-fixed mice to test the role of two major PFC projections, the cortico-striatal and cortico-thalamic pathways, in setshifting. Using optogenetics and 2-photon calcium imaging, we found that these cell types robustly and persistently encoded feedback from the outcomes of recent trials, and that the activity of both cell types during the inter-trial interval was critical to successfully switching between task rules. Moreover, we found that both cell types displayed a topological gradient, with neurons located further from the pial surface representing more taskcritical information. Together, these findings suggest that deep PFC projection neurons enable set-shifting through trial feedback monitoring. Figure 1 a) Task schematic. Top: diagram of stimulus delivery and lick response setup. Bottom: relevant and irrelevant stimuli and rule shifting. b) Training curves for seven learning stages. Y-axis denotes the proportion of animals at a given learning stage after trial number x. SD = Simple Discrimination, CD = Compound Discrimination, IDS1 = Intradimensional Shift (initial stimulus modality), Rev = Reversal (initial stimulus modality), EDS = Extradimensional Shift, IDS2 = Intradimensional Shift (second stimulus modality), SEDS = Serial Extradimensional Shifting. N = 53 animals. Trials displayed are concatenated from across multiple sessions (Mode = 350 trials/session). c) Left: Number of trials to criterion, Intradimensional vs Extradimensional Shift, n = 53 animals, sign rank = 0.0034, 6*10^-5 for IDS1/EDS, IDS2/EDS, 0.2for IDS1/IDS2. Right: Mean trials to criterion during SEDS, whisker rule vs odor rule. N = 100 animals, signed rank = 0.45. d) Left: trials to criterion in EDS sessions following transcranial infusion (SAL = saline; MUS = muscimol). N = 12, 13 (SAL, MUS). Rank sum p = 0.02.Right: Number of trial blocks reaching criterion performance in SEDS sessions following 10 rule shifts. N = 12; median blocks (BL/MUS/SAL): 4, 1.5, 4. Sign rank p = 0.0005 (BL/MUS), 0.001 (SAL/MUS), 0.68 (BL/SAL). Median total trials complete...