Failure to adapt performance following an error is a debilitating symptom of many neurological and psychiatric conditions. Healthy individuals readily adapt their behavior in response to an error, an ability thought to be subserved by the posterior medial frontal cortex (pMFC). However, it remains unclear how humans adaptively alter cognitive control behavior when they reencounter situations that were previously failed minutes or days ago. Using functional magnetic resonance imaging, we examined neural activity during a Go/No-go response inhibition task that provided the opportunity for participants to learn from their errors. When they failed to inhibit their response, they were shown the same target stimulus during the next No-go trial, which itself could occur up to 20 trials after its initial presentation. Activity within the pMFC was significantly greater for initial errors that were subsequently corrected than for errors that were repeated later in the display sequence. Moreover, pMFC activity during errors predicted future responses despite a sizeable interval (on average 12 trials) between an error and the next No-go stimulus. Our results indicate that changes in cognitive control performance can be predicted using error-related activity. The increased likelihood of adaptive changes occurring during periods of recent success is consistent with models of error-related activity that argue for the influence of outcome expectancy (Holroyd and Coles, 2002; Brown and Braver, 2005). The findings may also help to explain the diminished error-related neural activity in such clinical conditions as schizophrenia, as well as the propensity for perseverative behavior in these clinical groups.