We select and execute extended task episodes (‘make tea’) as one entity and not individually execute their very many components (find kettle, boil water, etc.). Such hierarchical execution is thought to occur in familiar task situations with pre-existing task episode-related scripts that once selected, control the identity and sequence of component steps. Here, in contrast, we show hierarchical execution of extended behavior in situations, where the identity and sequence of component steps were unknown and a predetermined script could not have existed. Participants performed a rule-switching task in which the rule to be applied on each trial could not be predicted. Crucially, they were biased into construing a recurring instance of three or five trials as a single task episode. Behavioral signs of hierarchical execution, identical to those seen during memorized task-sequence executions, were present. These included longer reaction time on the first trial of each episode that was proportionate to the length of that episode, and absence of rule switch costs only between those consecutive trials that crossed episode boundaries. Hierarchical execution thus occurs every time the to-be-executed behavior is construed as one task episode, and is not limited to predictable sequences. We suggest that hierarchical execution occurs because task episodes are controlled and executed through goal-related entities assembled at the beginning of execution that subsume the execution and instantiate purposive control across time until the goal is complete.