We will conduct a randomized, pragmatic hybrid type 1 effectiveness/implementation multisite (approximately 6 sites) trial to determine whether office-based methadone with pharmacy administration and/or dispensing or buprenorphine (BUP) results in greater treatment retention in approximately 600 patients with opioid use disorder (OUD) not optimally benefiting from office-based BUP. As part of the trial, we will identify implementation barriers and facilitators at the patient, provider and health-systems level for office-based methadone with pharmacy administration and/or dispensing.