HIV-1 mutates extensively in vivo to escape immune control by CD8+ T cells (CTLs). The CTL escape mutant virus might also revert back to wild-type upon transmission to new hosts if significant fitness costs are incurred by the mutation. Immune escape and reversion can be extremely fast if they occur very early after infection, whereas they are much slower when they begin later during infection. Immune escape presents a significant barrier to vaccination, because escape of vaccine-mediated immune responses could neutralise any benefits of vaccination. Here, we consider the dynamics of immune escape and reversion in vivo in natural infection, and suggest how understanding of this can be used to predict optimal vaccine targets and design vaccination strategies that maximise immune control. We predict that inducing synchronous, broad CTL by vaccination should limit the likelihood of viral escape from immune control.