The value of CD4 lymphocyte counts as a surrogate marker in persons with advanced human immunodeficiency virus infection during antiretroviral treatment was assessed using longitudinal models and data from the Terry Beirn Community Programs for Clinical Research on AIDS didanosine/zalcitabine trial of 467 HIV-infected patients. Patients with AIDS or two CD4 counts of < or = 300 who fulfilled specific criteria for zidovudine intolerance or failure were randomized to receive either 500 mg didanosine (ddl) daily or 2.25 mg zalcitabine (ddC) per day. Absolute CD4 counts were recorded at study entry and at as many as four visits. Patients were followed for clinical disease progression and survival. At 2 months, the difference in mean CD4 count from baseline was +15.4 cells/mm3 in the ddI group but -1.3 cells/mm3 in the ddC group. Patients assigned to ddI had a greater chance of a CD4 response at 2 months than those on ddC, yet only those in the ddC group with a response showed significant improvement in progression of disease or survival compared with ddC nonresponders, ddI responders, and ddI nonresponders (p = 0.03). We conclude that a CD4 response does not necessarily correlate with improved outcome and is therefore not a useful surrogate marker in these patients.