Ablation of EP2/EP4 signalling in cancer-specific CD8+ T cells rescues their expansion and effector differentiation within tumours and leads to tumour elimination in multiple mouse cancer models. Here, PTGER4 is linked to cancer.