The ability to switch between different tasks is a critical component of adaptive cognitive functioning, but a mechanistic understanding of this capacity has remained elusive. Longstanding debates over whether task switching requires active preparation remain hotly contested, in large part due to the difficulty of inferring task preparation from behavior alone. We make progress on this debate by quantifying neural task representations through high-dimensional linear dynamical systems fit to human electroencephalographic recordings. We find that these dynamical systems are highly predictive of macroscopic neural activity, and reveal neural signatures of active preparation that are shared with task-optimized neural networks. These findings help inform a classic debate about how we control our cognition, and offer a promising new paradigm for neuroimaging analysis.