Under proteotoxic stress, some cells survive whereas others die. The mechanisms governing this heterogeneity in cell fate remain unknown. Here we report that condensation and phase transition of heat-shock factor 1 (HSF1), a transcriptional regulator of chaperones1,2, is integral to cell-fate decisions underlying survival or death. During stress, HSF1 drives chaperone expression but also accumulates separately in nuclear stress bodies called foci3-6. Foci formation has been regarded as a marker of cells actively upregulating chaperones3,6-10. Using multiplexed tissue imaging, we observed HSF1 foci in human tumours. Paradoxically, their presence inversely correlated with chaperone expression. By live-cell microscopy and single-cell analysis, we found that foci dissolution rather than formation promoted HSF1 activity and cell survival. During prolonged stress, the biophysical properties of HSF1 foci changed; small, fluid condensates enlarged into indissoluble gel-like arrangements with immobilized HSF1. Chaperone gene induction was reduced in such cells, which were prone to apoptosis. Quantitative analysis suggests that survival under stress results from competition between concurrent but opposing mechanisms. Foci may serve as sensors that tune cytoprotective responses, balancing rapid transient responses and irreversible outcomes.