In human immunodeficiency virus clinical trials, the CD4-lymphocyte count has been regarded as a promising surrogate endpoint for clinical efficacy measures such as time to opportunistic infection and survival time. In the present paper, we test this hypothesis according to a criterion proposed by Prentice. This criterion requires the surrogate variable to capture the entire effect of treatment on the clinical endpoint, and it is satisfied if the hazard rate of the clinical endpoint is not affected by treatment among patients with the same preceding history of the surrogate variable. We analyse data from two completed zidovudine trials using the Cox regression model with the CD4-lymphocyte count as a time-varying covariate. The results indicate that the CD4-lymphocyte count captures part of the relationship between zidovudine and time to a first critical event but does not fulfil the Prentice criterion.