The appropriate initiation and termination of behavioural action sequences is imperative, but the neural mechanisms underlying the learning and execution of fixed behavioural patterns are poorly understood. Here the authors reveal start/stop neuronal activity in basal ganglia circuits that emerge during task training in mice. Genetically altering these circuits disrupted the activity and impaired performance, providing evidence for a causal relationship between the specific neuronal activity and task learning.