Inclusion Criteria:  18 to 60 years old meet DSM 5 diagnostic criteria for cocaine use disorder report recent cocaine use, verified by at least one positive urine drug screen for the cocaine metabolite, benzoylecgonine, during intake be judged by the medical staff to be psychiatrically stable and physically healthy for females, be using an effective form of birth control (e.g., barrier, IUD, or sterilization) and not be pregnant as determined by a serum pregnancy test at screening and negative urine pregnancy test at intake prior to first dose of investigational drug (test will be repeated weekly to ensure that female patients do not continue in the study if pregnant) or lactating be willing to be admitted to a 5-day inpatient detoxification program at The Right Step Houston be able to understand the consent form and provide written informed consent be able to provide the names of at least 2 persons who can consistently locate their whereabouts  Exclusion Criteria:  have an acute medical or psychiatric disorder that would, in the judgment of the study physician, make participation difficult or unsafe have suicidal or homicidal ideation that requires immediate attention have another current (≥ moderate) substance use disorder aside from alcohol, nicotine, or marijuana have a medical condition contraindicating PIO pharmacotherapy (e.g., drug- or insulin-dependent diabetes, congestive heart failure, edema, clinical significant liver disease, hypoglycemia, history of bladder cancer) or be taking medications that would adversely interact with PIO (e.g., CYP2C8 inhibitors or inducers, antihyperglycemic medications) be concurrently enrolled in other addiction treatment services aside from smoking cessation if female, be currently pregnant, breastfeeding, or planning on conception have conditions of probation or parole requiring reports of drug use to officers of the court be unable to read, write, or speak English be homeless (live on the street) have medical contraindications to MRI/DTI scans (e.g., history of pacemaker, metal implants, or welding/metal work without protective eyewear)