Rats with impaired function in dorsomedial regions of the prefrontal cortex (dmPFC) are unable to maintain a behavioral response over a delay period. Here we report that neurons in this cortical region are prominently modulated after errors in a tone-cued, simple reaction time task and that inactivation of dmPFC attenuates a slowing of reaction times that is observed following errors. Using methods for chronic single-unit recording, we found that approximately one-third of dmPFC neurons were modulated after errors, and 28% of these neurons had increased posterror firing that persisted into the delay period of the following trial. In contrast to dmPFC, no such neurons were found in motor cortex. Our results implicate the dorsomedial prefrontal cortex in a form of retrospective working memory that improves task performance following errors.