olaparib and ramucirumab in treating patients with metastatic or locally recurrent gastric or gastroesophageal junction cancer that cannot be removed by surgery

Conditions: Metastatic Esophageal Carcinoma; Metastatic Gastric Carcinoma; Metastatic Gastroesophageal Junction Adenocarcinoma; Recurrent Esophageal Carcinoma; Recurrent Gastric Carcinoma; Recurrent Gastroesophageal Junction Adenocarcinoma; Stage III Esophageal Cancer AJCC v7; Stage III Gastric Cancer AJCC v7; Stage IV Esophageal Cancer AJCC v7; Stage IV Gastric Cancer AJCC v7; Unresectable Esophageal Carcinoma; Unresectable Gastric Carcinoma; Unresectable Gastroesophageal Junction Adenocarcinoma

Summary: this phase i/ii trial studies the side effects and best dose of olaparib when given together with ramucirumab and how well they work in treating patients with gastric or gastroesophageal junction cancer that has spread to other places in the body (metastatic), has come back (recurrent), or cannot be removed by surgery (unresectable). olaparib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. immunotherapy with monoclonal antibodies, such as ramucirumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. giving olaparib and ramucirumab may work better in treating patients with gastric or gastroesophageal junction cancer compared to ramucirumab and paclitaxel (a chemotherapy drug) or ramucirumab alone.

primary objectives: i. to determine the safe dose of olaparib with ramucirumab, but not to exceed olaparib dose of 300 mg twice daily (tablet formulation). (phase i) ii. to determine the efficacy of olaparib plus ramucirumab as measured by the objective response rates (orr) stratified by broca-hr biomarker status. (phase ii). secondary objectives: i. to estimate median progression-free survival (pfs) stratified by broca-hr biomarker status. ii. to estimate median overall survival (os) stratified by broca-hr biomarker status. iii. to measure the prevalence of the broca-hr biomarker in our study population. iv. to determine toxicity of olaparib and ramucirumab combination. exploratory objectives: i. to assess the correlation between the signature 3 status, and mutations in broca-hr panel. ii. to evaluate the association between findings from broca-hr panel with response to therapy. iii. to evaluate the association between findings from broca-hr panel and signature 3 results with response to therapy. iv. to determine results of immunoassay for poly-adp-ribosylated (par) substrates in tumor tissue. v. to create a pdx model to study deoxyribonucleic acid (dna) repair in gastric tumors treated with parp inhibitors (parpi) from both pre-treatment biopsy and repeat biopsy after 16 weeks of treatment. vi. development of a novel genomic assay for brcaness. vii. defining t cell receptor diversity of gastric cancer patients +/- brcaness. viii. biobank additional tumor tissue for future genomic analysis. ix. biobank peripheral blood for future genomic analysis and assessment of circulating tumor dna. outline: this is a phase i, dose-escalation study of olaparib followed by a phase ii study. patients receive olaparib orally (po) twice daily (bid) on days 1-14 of each cycle and ramucirumab intravenously (iv) over 60 minutes on day 1 of each cycle. cycles repeat every 14 days in the absence of disease progression or unacceptable toxicity. after completion of study treatment, patients are followed up at 4 weeks and then every 6 weeks if the patient has not had disease progression and every 3 months if the patient has had disease progression.

Eligibility criteria:
inclusion criteria: * the patient must have histologically confirmed, gastric carcinoma, including gastroesophageal junction (gej) adenocarcinoma (patients with adenocarcinoma of the distal esophagus are eligible if the primary tumor involves the gej) * the patient has metastatic disease or locally recurrent, unresectable disease * the patient must have measurable disease by response evaluation criteria in solid tumors (recist) version (v)1.1 * the patient must have experienced disease progression during or within 4 months after the last dose of chemotherapy for metastatic disease, during or within 6 months after the last dose of adjuvant chemotherapy, or have been intolerant of previous chemotherapy * the patient must have experienced disease progression or intolerance as outlined above after treatment with 1 or more prior chemotherapies * all previous treatments are acceptable as long as they did not contain bevacizumab, ramucirumab or parp inhibitors * elevation in tumor markers without radiographic evidence of disease progression is not satisfactory for progression on previous treatment * the patient is \>= 18 years of age * the patient has a life expectancy of \>= 16 weeks * eastern cooperative oncology group (ecog) performance status score of 0-1 (karnofsky \>= 60%) * hemoglobin \>= 10 g/dl with no blood transfusions (packed red blood cells and platelet transfusions) in the past 28 days (within 28 days prior to administration of study treatment) * white blood cells (wbc) \> 3 x 10\^9/l (within 28 days prior to administration of study treatment) * absolute neutrophil count (anc) \>= 1.5 10\^9/l (within 28 days prior to administration of study treatment) * platelet count \>= 100 x 10\^9/l (within 28 days prior to administration of study treatment) * no features suggestive of myelodysplastic syndrome (mds)/acute myelogenous leukemia (aml) on peripheral blood smear or bone marrow biopsy, if clinically indicated (within 28 days prior to administration of study treatment) * total bilirubin =\< 1.5 x the institutional upper limit of normal (uln) (within 28 days prior to administration of study treatment) * aspartate aminotransferases (ast) (serum glutamic-oxaloacetic transaminase \[sgot\])/alanine aminotransferase (alt) (serum glutamate pyruvate transaminase \[sgpt\]) =\< 2.5 x institutional uln unless liver metastases are present in which case they must be =\< 5 x uln (within 28 days prior to administration of study treatment) * calculated serum creatinine clearance \>= 60 ml/min/1.73 m\^2 (within 28 days prior to administration of study treatment) * proteinuria with urinary protein =\< 1+ on dipstick or routine urinalysis, or a 24-hour urine collection for protein \< 1000 mg of protein in 24 hours (within 28 days prior to administration of study treatment) * coagulation parameters (international normalized ratio \[inr\], activated partial thromboplastin time \[aptt\]) =\< 1.25 x institutional limits, except where a lupus anti-coagulant has been confirmed or the patient is on warfarin; patients on full dose anticoagulation must be on a stable dose for at least 14 days; if receiving warfarin, the patient must have an inr =\< 3.0 without any evidence of active bleeding within 14 days prior to first dose of study treatment or a pathologic condition that carries a high risk of bleeding (tumor involvement with major blood vessels or varices) (within 28 days prior to administration of study treatment) * postmenopausal or evidence of non-childbearing status for women of childbearing potential a negative urine or serum pregnancy test within 28 days of study treatment and confirmed prior to treatment on day 1; postmenopausal is defined as: * amenorrheic for 1 year or more following cessation of exogenous hormonal treatments * luteinizing hormone (lh) and follicle stimulating hormone (fsh) levels in the postmenopausal range for women under 50 * radiation-induced oophorectomy with last menses \> 1 year ago * chemotherapy-induced menopause with \> 1 year interval since last menses * surgical sterilization (bilateral oophorectomy or hysterectomy) * the effects of olaparib and ramucirumab on the developing fetus are unknown; for this reason, women of child-bearing potential and men must agree to use adequate contraception including hormonal, barrier, or abstinence; contraception must be started prior to study enrollment; female patients of childbearing potential must have a negative serum pregnancy test within 7 days prior to treatment; should a woman become pregnant or suspect she is pregnant while she or her partner is participating in this study, she should inform her treating physician immediately; both men and women treated or enrolled on this protocol must also agree to use adequate contraception prior to the study, for the duration of the study participation, and for 3 months after completion of olaparib and ramucirumab administration; male patients and their partners, who are sexually active and of childbearing potential, must agree to the use of two highly effective forms of contraception in combination, throughout the period of taking study treatment and for 3 months after last dose of study drug(s) to prevent pregnancy in a partner * ability to understand and the willingness to sign a written informed consent document * the patient must be willing to undergo a biopsy prior to treatment, an on treatment biopsy at week 16 is optional if felt to be safe in the opinion of the investigator * for inclusion into optional exploratory genetic and biomarker research, patients must fulfill the following criteria: * provision of informed consent for genetic research * provision of informed consent for biomarker research * if a patient declines to participate in the optional exploratory genetic research or the optional biomarker research, there will be no penalty or loss of benefit to the patient; the patient will not be excluded from other parts of the study * patients must be able to tolerate oral medications by mouth, and not have a gastrointestinal illness that would preclude absorption of olaparib * adequately controlled blood pressure (bp) \< 140 mmhg (systolic) and \< 90 mmhg (diastolic) taken in the clinic setting by a medical professional within 2 weeks prior to starting study; patients with hypertension may be managed with up to a maximum of 3 antihypertensive medications; a cardiologist or blood pressure specialist must evaluate patients who are on 3 antihypertensive medications within 4 weeks of enrollment * patients who have the following risk factors are considered to be at increased risk for cardiac toxicity and must have documented left ventricular ejection fraction (lvef) by echocardiogram greater than institution's lower limit of normal (or 55% if threshold for normal not otherwise specified by institutional guidelines) obtained within 3 months * prior treatment with anthracyclines * prior treatment with trastuzumab * a new york heart association (nyha) classification of ii controlled with treatment * prior central thoracic radiation therapy (rt), including rt to the heart * history of myocardial infarction within 12 months (patients with history of myocardial infarction within 6 months are excluded) exclusion criteria: * patients with untreated brain metastases are excluded from this clinical trial because of their poor prognosis and because they often develop progressive neurologic dysfunction that would confound the evaluation of neurologic and other adverse events; a scan to confirm the absence of brain metastases is not required; the patient can receive a stable dose of corticosteroids before and during the study as long as these were started at least 4 weeks prior to treatment; patients with spinal cord compression are also excluded unless considered to have received definitive treatment for this and evidence of clinically stable disease for 28 days * patients who have not recovered from adverse events due to prior anti-cancer therapy (i.e., have residual toxicities \> common terminology criteria for adverse events \[ctcae\] grade 1 or baseline, with the exception of alopecia) * patients unable to swallow orally administered medication and patients with gastrointestinal disorders likely to interfere with absorption of the study medication * the patient has experienced any grade 3-4 gastrointestinal bleeding within 3 months prior to randomization * the patient has experienced any arterial thrombotic events, including but not limited to myocardial infarction, transient ischemic attack, cerebrovascular accident, or unstable angina, within 6 months prior to enrollment * the patient has an ongoing or active infection, symptomatic congestive heart failure, unstable angina pectoris, symptomatic or poorly controlled cardiac arrhythmia, uncontrolled thrombotic or hemorrhagic disorder, or any other serious uncontrolled medical disorder in the opinion of the investigator * the patient has an ongoing or active psychiatric illness or social situation that would limit compliance with study requirements * clinically significant peripheral vascular disease or vascular disease (abdominal aortic aneurysm \> 5 cm) or aortic dissection; if known history of abdominal aortic aneurysm with \>= 4 cm in diameter, all of the following must be met * an ultrasound within the last 6 months required to document that it is =\< 5 cm * patient must be asymptomatic from the aneurysm * blood pressure must be well controlled as defined in this protocol * the patient has uncontrolled or poorly controlled hypertension despite standard medical management as defined in this protocol * nyha classification of iii or iv * a resting electrocardiogram (ekg) with a corrected qt (qtc) \>= 470 msec detected on 2 or more time points within a 2 hour period or family history of long qt syndrome; if the ekg demonstrates qtc \>= 470 msec, the patient will only be eligible if a repeat ekg demonstrates qtc =\< 470 msec * history of hypertensive crisis or hypertensive encephalopathy within 3 years * major surgery within 28 days of starting study treatment and patients must have recovered from any effects of any major surgery * an open biopsy, non-healing wound, ulcer or significant traumatic injury within 28 days prior to starting treatment (percutaneous, endobronchial, and endoscopic biopsies are allowed) * the patient has received chemotherapy, radiotherapy (except for palliative reasons), immunotherapy, or targeted therapy for gastric cancer within 3 weeks of study treatment * the patient has received any investigational therapy within 4 weeks of enrollment * the patient has received prior therapy with bevacizumab, ramucirumab or any parp inhibitor, including olaparib * patients must not have evidence of coagulopathy or bleeding diathesis; therapeutic anticoagulation for prior thromboembolic events is permitted; the clinical indication for therapeutic anticoagulation must be clearly documented prior to enrollment and must be discussed with the principal investigator (pi); due to risk of serious bleeding with ramucirumab, patients on greater than or equal to 2 anti-thrombotic agents, including but not limited to anti-platelet agents (nonsteroidal anti-inflammatory drugs \[nsaids\]/aspirin, clopidogrel), heparin, low molecular weight heparin, warfarin and a direct thrombin inhibitor will be excluded * the patient has elective or planned major surgery to be performed during the course of the clinical trial * history of allergic reactions attributed to compounds of similar chemical or biologic composition to olaparib and ramucirumab * patients with a known hypersensitivity to olaparib or any of the excipients of the product * patients with a known hypersensitivity to the combination/comparator agent * pregnant or breast feeding women are excluded from this study because olaparib and ramucirumab have the potential for teratogenic or abortifacient effects * immunocompromised patients, this includes human immunodeficiency virus (hiv)-positive patients, because of the potential for interaction with antiretroviral therapy and ramucirumab and/or olaparib; in addition, these patients are at increased risk of lethal infections when treated with marrow-suppressive therapy * patients with a known history of hepatitis b (defined as hepatitis b surface antigen \[hbsag\] reactive) or known active hepatitis c virus (defined as detectable hepatitis c virus \[hcv\] ribonucleic acid \[rna\]) infection; note: no testing for hepatitis b and hepatitis c is required unless mandated by local health authority * the patient has known and active alcohol or drug dependency * the patient has a concurrent active malignancy other than treated non-melanoma skin cancers or in situ neoplasm; a patient with a prior history of malignancy is eligible, provided that they have been free of disease for \>= 5 years * patients may not have features suggestive of myelodysplastic syndrome (mds) or acute myelogenous leukemia (aml) on peripheral blood smear or bone marrow biopsy, if clinically indicated * patients may not have had a prior allogeneic bone marrow transplant or double umbilical cord blood transplantation (ducbt) * patients may not have current signs and/or symptoms of bowel obstruction within 1 month prior to starting study drugs, except if it was a temporary incident (improved within \< 24 hours \[hr\] with medical management) * history of hemoptysis within the last 1 month * history of abdominal fistula, intra-abdominal abscess, or gastrointestinal perforation within the last 3 months * dependency on iv hydration \> 1 day per week within the screening period * participants receiving any medications or substances that are strong inhibitors or inducers of cyp3a4/5 are ineligible; the required washout period prior to starting treatment is 2 weeks for cyp3a inhibitors, 3 weeks for cyp3a inducers, and 5 weeks for enzalutamide; dihydropyridine calcium-channel blockers are permitted for management of hypertension * whole blood transfusions in the last 120 days prior to entry to the study (packed red blood cells and platelet transfusions are acceptable) * involvement in the planning and/or conduct of the study (applies to both astrazeneca staff and/or staff at the study site) * previous enrollment in the present study * current use of natural herb products or other complementary alternative medications; if used previously, patients must have at least 1-week washout and must stop using them while participating in this study