Tumour-specific CD8 T cells in solid tumours are dysfunctional, allowing tumours to progress. The epigenetic regulation of T cell dysfunction and therapeutic reprogrammability (for example, to immune checkpoint blockade) is not well understood. Here we show that T cells in mouse tumours differentiate through two discrete chromatin states: a plastic dysfunctional state from which T cells can be rescued, and a fixed dysfunctional state in which the cells are resistant to reprogramming. We identified surface markers associated with each chromatin state that distinguished reprogrammable from non-reprogrammable PD1hi dysfunctional T cells within heterogeneous T cell populations from tumours in mice; these surface markers were also expressed on human PD1hi tumour-infiltrating CD8 T cells. Our study has important implications for cancer immunotherapy as we define key transcription factors and epigenetic programs underlying T cell dysfunction and surface markers that predict therapeutic reprogrammability.