How cells control protein aggregation under stress