Stat5 opposes the transcription factor Tox and rewires exhausted CD8+ T cells toward durable effector-like states during chronic antigen exposure.