Summary: A critical aim of vaccine-related research is to identify the mechanisms by which memory T cells are formed and maintained over long periods of time. In recent years, we have designed experiments aimed at addressing two key questions: (i) what are the factors that maintain functionally responsive CD8+ memory cells over long periods of time, and (ii) what are the signals during the early stages of infection that drive the differentiation of long-lived CD8+ memory T cells? We have identified a role for CD4+ T cells in the generation of CD8+ T-cell-mediated protection from secondary challenge. While CD4+ T cells appear to play a role in the programme of CD8 memory, we find that they are also required for the long-term maintenance of CD8+ memory T-cell numbers and function. This property is independent of CD40–CD40L interactions, and we propose a role for CD4+ T cells in maintaining the ability of CD8+ memory T cells to respond to interleukin-7 (IL-7) and IL-15. By manipulating both the time course of infection and the timing of antigen presentation to newly recruited CD8+ T cells, we also demonstrate that the programming of effector and memory potential are at least partially distinct processes.