 This phase 0 trial studies hydroxychloroquine in blocking autophagy in patients with prostate cancer who are undergoing surgery or active surveillance. Autophagy is a process in which cells break down some parts of themselves to stay alive during times of stress, such as starvation. This may allow cancer cells to survive damage from chemotherapy. Hydroxychloroquine may block this process from happening. 