In early phase clinical trials of a new medical treatment, patients are treated to decide whether there is sufficient promise to justify additional studies. A decision theoretic approach is proposed to help determine the number of patients that should be treated. The optimal sample size is obtained by maximizing a utility function which incorporates both the number of 'gained successes' and the costs of treatment. The method extends work of Sylvester and Staquet, and adopts a Bayesian formulation. Numbers of patients in later studies and in eventual routine use of the treatment are taken into account. We allow for the possibility that a later study might lead to an erroneous conclusion. The effects of these various influences on the recommended sampling plan for the early phase clinical trial are explored.