Immune function was observed for 144 weeks in 643 human immunodeficiency virus (HIV)-infected subjects who (1) had nadir CD4+ cell counts of <50 cells/mm3, followed by a sustained increase to > or =100 cells/mm3 after the initiation of HAART, and (2) were enrolled in a randomized trial of continued azithromycin prophylaxis versus withdrawal for prevention of Mycobacterium avium complex disease. The median CD4+ cell count was 226 cells/mm3 at entry and 358 cells/mm3 at week 144. Anergy (80.2% of patients) and lack of lymphoproliferative response to tetanus toxoid (TT; 73%) after immunization and impaired antibody responses after receipt of hepatitis A (54%) and TT (86%) vaccines were considered to be evidence of impaired immune reconstitution. Receipt of azithromycin did not have an effect on CD4+ cell count but was associated with higher rates of delayed-type hypersensitivity responses to TT (25% of subjects who received azithromycin vs. 15% of those who did not; P=.009) and mumps skin test antigen (29% vs. 17%; P=.001). Although the subjects had only partial responses to immune function testing, the rate of opportunistic infections was very low, and none of the tests was predictive of risk.