BackgroundWe use a novel, longitudinal approach to describe average time spent in opioid use disorder (OUD) cascade of care stages for people with HIV (PWH) and with OUD, incorporating four definitions of treatment retention. Using this approach, we describe the impact of cocaine or hazardous alcohol use on time spent retained on buprenorphine.MethodsWe followed PWH with OUD enrolled in the Johns Hopkins HIV Clinical Cohort from their first buprenorphine treatment episode between 2013 and 2020. We estimated 4-year restricted mean time spent on buprenorphine below buprenorphine retention threshold, on buprenorphine above retention threshold, off buprenorphine and in HIV care, loss to follow-up, and death. Retention definitions were based on retention threshold (180 vs 90 days) and allowable treatment gap (7 vs 30 days). Differences in 2-year restricted mean time spent retained on buprenorphine were estimated for patients with and without cocaine or hazardous alcohol use.ResultsThe study sample (N = 179) was 63% male, 82% non-Hispanic Black, and mean age was 53 (SD 8) years. Patients spent on average 13.9 months (95% CI 11.4, 16.4) on buprenorphine over 4 years. There were differences in time spent retained on buprenorphine based on the retention definition, ranging from 6.5 months (95% CI 4.6, 8.5) to 9.6 months (95% CI 7.4, 11.8). Patients with cocaine use spent fewer months retained on buprenorphine. There were no differences for patients with hazardous alcohol use.ConclusionsPWH with OUD spend relatively little time receiving buprenorphine in their HIV primary care clinic. Concurrent cocaine use at buprenorphine initiation negatively impact time on buprenorphine.