Organization of behavior into a nested hierarchy of tasks and subtasks is characteristic of purposive cognition in humans. While frontoparietal regions have been shown to represent many kinds of task events, their representation of task/subtask structure has not been directly investigated. On each trial of the current study, participants carried out a sequence of four visual target detections organized by task context into subtasks of different structure (three and one or two and two). Through extended regions of frontoparietal cortex, activity elicited by target detections depended upon the hierarchical level of the episode completed. Target detections completing the entire trial elicited greatest activity, followed by targets completing a subtask, and finally targets within one subtask. Results depended on task and subtask completion, rather than the complexity of the next task stage to be established. We suggest that, through large regions of frontoparietal cortex, control representations direct each step of a behavioral program. Completion of a subtask revises control representations related just to this subtask, leaving those related to the overarching task episode intact, while completion of the entire task revises the entire assembly of representations.