Short-term memory (STM) is prone to failure, especially during prolonged memory maintenance or under limited cognitive control. Despite predictive mechanistic frameworks based on persistent neural activity and attractor states, a direct assessment of network dynamics during multifactorial STM failure is still missing. We addressed this in a delayed-response task where mice maintained a prospective response during a long variable delay. Mice behavior episodically switched between a task-engaged state described by an attractor model, and a task-disengaged state purely determined by previous choices. During task engagement, the anterolateral motor cortex (ALM) showed delay persistent activity stably encoding correct choices, whereas the encoding reversed during the delay in error trials. In contrast, in task-disengaged phases ALM showed no clear traces of attractor dynamics and instead exhibited enhanced synchrony at ∼ 4-5Hz. Thus, ALM switches between distinct error-generating dynamics: in control-capable trials, transitions between memory attractors cause forgetting errors, whereas non-memory errors are caused by the dissociation of ALM during the mnemonic period reflecting the lack of cognitive control.