Studies of task switching demonstrate that task switches are associated with response costs and that these costs are reduced when a cue is presented in advance of a switch. The present study examined cortical event-related potential correlates of task switching and switch costs in 39 participants during a cued match/mismatch discrimination task. Compared with non-switch trials, switch trials were associated with a larger cue-related, anticipatory P3b-like waveform. Switch trials were also associated with smaller target-related, stimulus-dependent P2 and P3-like components. Moreover, the switch-related amplitude variability in the P3b to the cue and the P2 to the target were associated with unique components of the residual switch costs. The results support an integrated model of task switching with complementary yet distinct roles for anticipatory and stimulus-dependent processes in task switching and switch costs.