Completing everyday tasks often requires the execution of action sequences matched to a particular problem. To study the neural processes underlying these behaviors, we trained monkeys to produce a series of eye movements according to a sequence that changed unpredictably from one block of trials to the next. We then applied a decoding algorithm to estimate which sequence was being represented by the ensemble activity in prefrontal cortex. We found that the sequence predicted by this analysis changed gradually from the sequence that had been correct in the previous block to the sequence that was correct in the current block, closely following the fraction of executed movements that were consistent with the corresponding sequence. Thus, the neural activity dynamically tracked the monkeys' uncertainty about the correct sequence of actions. These results are consistent with prefrontal involvement in representing subjective knowledge of the correct action sequence.