We live in a continuous environment in which the visual scene changes on a slow timescale. It has been shown that, to exploit such environmental stability, the brain creates a “continuity field” such that objects seen seconds ago influence the perception of current objects. What is unknown is whether a similar mechanism exists at the level of our metacognitive representations. In three experiments we demonstrate a robust inter-task “confidence leak” that cannot be explained by response priming or attentional fluctuations. Observers’ ability to modulate this confidence leak predicted higher capacity for metacognition as well as greater gray matter volume in the prefrontal cortex. A model based on normative principles from Bayesian inference explained the results by postulating that observers subjectively estimate the perceptual signal strength in a stable environment. These results point to the existence of a novel metacognitive mechanism mediated by regions in prefrontal cortex.