Long-lived latently infected cells “remember” drug resistance. Experiments begin with a variable duration of daily TDF monotherapy applied with perfect adherence (pink regions), followed by a decade without treatment (yellow region), and finally, five years of suppressive therapy (1000-fold reduction in viral replication, blue region). (a) In the model without latency, counts of free virus (v, solid line for WT and dashed line for mutant) and cells with incorporated viral DNA (y, dotted line for mutant) are shown for a 15-year period beginning with 90 days of daily TDF monotherapy. The system returns to equilibrium shortly after monotherapy cessation. When a latently infected compartment w is added, the number of cells with latently incorporated mutant virus grows throughout a monotherapy exposure of 30 days (b), 90 days (c), or 365 days (d). For the decade following monotherapy exposure, the reservoir declines while being replaced with WT latently infected cells. When suppressive therapy is applied for the final five years, the latent reservoir provides the dominant source of virus. In (b), the level of mutant virus plateaus approximately 7 years after monotherapy cessation because the latent reservoir becomes a smaller source of mutants than back-mutation of replicating virus. (e) Longer monotherapy exposure produces more mutant virus in the latent reservoir after two years of suppressive therapy. The fraction of mutant free virions, though also increased by long monotherapy, is lower than the fraction in the latent compartment due to the reduced replicative capacity of the mutant. (f) For a 90-day interval of monotherapy, increasing immune pressure reduces the fraction of drug-resistant free virus and latently infected cells, but loses any incremental effect at p>10-5. This is because, similarly to (b), back-mutation of replicating WT virus becomes a larger source of latently incorporated mutants during the untreated (yellow) interval.