CD8+ T cell responses to chronic infection and cancer are sustained by stem-like precursors of exhausted T (Tpex) cells. It is, however, insufficiently understood how stemness and differentiation potential of these T cells are regulated. Here we demonstrate that across different types of infection the transcriptional regulator ID3 is the common factor that identifies stem-like T cells that are uniquely adapted to respond to chronic infection or cancer. Furthermore, we describe an essential developmental transition, regulated by ID3, from the most stem-like Tpex cells, characterized by expression of CD62L and the transcription factor MYB to Tpex cells en route to effector differentiation marked by expression of the tyrosin protein kinase c-Kit. Mechanistically, ID3 released suppression of proliferation and expression of c-Kit, which itself promoted T cell expansion and effector differentiation. Finally, we show that IL-1 family members such as IL-36b and IL-18 promoted the generation of ID3+ T cells that provided superior tumor control. Overall, we identify ID3 as a common denominator of stem-like T cells, which together with c-Kit constitutes a novel checkpoint that balances proliferation and stemness of T cells in infection and cancer.