Taken together, we identify HDAC7 as a central regulator of cellular exhaustion and apoptosis of peripheral CD8<sup>+</sup> T cells, controlling CD8<sup>+</sup> T cell dependent anti-tumor and anti-viral immunity in mice. Here, CD8A is linked to neoplasm.