mFOLFIRINOX Versus mFOLFOX With or Without Nivolumab for the Treatment of Advanced, Unresectable, or Metastatic HER2 Negative Esophageal, Gastroesophageal Junction, and Gastric Adenocarcinoma

This phase III trial compares the effect of modified fluorouracil, leucovorin calcium, oxaliplatin, and irinotecan (mFOLFIRINOX) to modified fluorouracil, leucovorin calcium, and oxaliplatin (mFOLFOX) for the treatment of advanced, unresectable, or metastatic HER2 negative esophageal, gastroesophageal junction, and gastric adenocarcinoma. The usual approach for patients is treatment with FOLFOX chemotherapy. Chemotherapy drugs work in different ways to stop the growth of tumor cells, either by killing the cells, by stopping them from dividing, or by stopping them from spreading. Fluorouracil stops cells from making DNA and it may kill tumor cells. Leucovorin is used with fluorouracil to enhance the effects of the drug. Oxaliplatin works by killing, stopping, or slowing the growth of tumor cells. Some patients also receive an immunotherapy drug, nivolumab, in addition to FOLFOX chemotherapy. Immunotherapy may induce changes in body's immune system and may interfere with the ability of tumor cells to grow and spread. Irinotecan blocks certain enzymes needed for cell division and DNA repair, and it may kill tumor cells. Adding irinotecan to the FOLFOX regimen could shrink the cancer and extend the life of patients with advanced gastroesophageal cancers.

PRIMARY OBJECTIVE:

I. To determine if overall survival (OS) is improved in patients who received mFOLFIRINOX +/- nivolumab in comparison to FOLFOX +/- nivolumab as first-line chemotherapy for metastatic gastroesophageal adenocarcinoma.

SECONDARY OBJECTIVES:

I. To compare other indices of efficacy, including progression-free survival, objective response rates and duration of response between both treatment arms.

II. To evaluate safety and tolerability associated with treatment in each of the treatment arms.

III. To evaluate the proportion of patients receiving second line of therapy in both arms.

IV. To evaluate tolerability of the treatment in both arms using Patient Reported Outcomes-Common Terminology Criteria for Adverse Events (PRO-CTCAE).

EXPLORATORY OBJECTIVES:

I. Exploratory correlative markers will also be measured and evaluated within and between arms to better assess mechanisms and prognostic impact of markers on impact. These will include baseline PD-L1 combined positive score (CPS) and cell free deoxyribonucleic acid (cfDNA) before and after treatment.

II. To evaluate and assess the feasibility and compliance associated with not centrally collecting perceived attribution of protocol treatment to reported adverse events.

OUTLINE: Patients are randomized to 1 of 2 arms.

ARM I: Patients receive fluorouracil intravenously (IV), leucovorin calcium IV, oxaliplatin IV, and irinotecan IV on study and nivolumab IV as clinically indicated. Patients undergo magnetic resonance imaging (MRI) and a computed tomography (CT) scan throughout the trial. Patients may also undergo blood sample collection on study.

ARM II: Patients receive fluorouracil IV, leucovorin calcium IV, and oxaliplatin IV on study and nivolumab IV as clinically indicated. Patients undergo MRI and a CT scan throughout the trial. Patients may also undergo blood sample collection on study.

Eligibility Criteria:
Inclusion Criteria:

* Histologic documentation: HER2 negative adenocarcinoma as defined by American Society of Clinical Oncology (ASCO) College of American Pathologists (CAP) guidelines (Bartley et al., Journal of Clinical Oncology \[JCO\] 2017) with known PD-L1 CPS (Any CPS is allowed, but should be known prior to registration)
* Stage: unresectable or metastatic
* Tumor site: esophagus, gastroesophageal junction, or stomach
* Measurable disease or non-measurable but evaluable disease as defined by Response Evaluation Criteria in Solid Tumors (RECIST) 1.1
* No prior treatment for unresectable or metastatic disease
* Prior neoadjuvant or adjuvant cytotoxic chemotherapy or adjuvant immunotherapy is allowed as long as it was completed at least 1 year prior to registration
* Age \>= 18 years
* Eastern Cooperative Oncology Group (ECOG) Performance Status 0 or 1
* Absolute neutrophil count (ANC) \>= 1,500/mm\^3
* Platelet count \>= 100,000/mm\^3
* Creatinine =\< 1.5 x upper limit of normal (ULN) OR calculated (calc.) creatinine clearance \>= 30 mL/min
* Total bilirubin =\< 1.5 x ULN
* Aspartate aminotransferase (AST) and alanine aminotransferase (ALT) =\< 3 x ULN (in patients with liver metastasis: =\< 5 x ULN if clearly attributable to liver metastases)
* Patients with a prior or concurrent malignancy whose natural history or treatment does not have the potential to interfere with the safety or efficacy assessment of the investigational regimen are eligible for this trial
* Patients positive for human immunodeficiency virus (HIV) are eligible only if they meet all of the following:

  * On effective anti-retroviral therapy
  * Undetectable HIV viral load by standard clinical assay =\< 6 months of registration
* Patients with known history or current symptoms of cardiac disease, or history of treatment with cardiotoxic agents, should have a clinical risk assessment of cardiac function using the New York Heart Association Functional Classification. To be eligible for this trial, patients should be class 2B or better
* Patients who will receive nivolumab in addition to chemotherapy must not have any contraindications to immune checkpoint inhibitors

  * Patients must not have active autoimmune disease that has required systemic treatment within 6 months prior to registration. Patients are permitted to receive immunotherapy if they have vitiligo, type I diabetes, residual hypothyroidism due to autoimmune condition only requiring hormone replacement, psoriasis not requiring systemic treatment, or conditions not expected to recur in the absence of an external trigger (precipitating event)
  * Patients must not have a condition requiring systemic treatment with either corticosteroids (\>10mg/day prednisone equivalents) or other immunosuppressive medications within 14 days prior to registration. Inhaled or topical steroids and adrenal replacement doses (=\< 10mg/day prednisone equivalent) are permitted
  * Patients must not have a history of noninfectious pneumonitis requiring steroids
  * Patients with prior immune mediated adverse events related to immunotherapy that resulted in permanent treatment discontinuation with these agents are ineligible
* This study includes the use of the mandatory patient completed measure, PRO-CTCAE. For this study the PRO-CTCAE is available in English, Spanish, Korean, Chinese (Simplified), and Russian, hence patients must be able to speak, understand and read in these languages. Ad-hoc translation of patient-reported measures is not permitted

Exclusion Criteria:

* Not pregnant and not nursing, because this study involves an agent that has known genotoxic, mutagenic and teratogenic effects

  \* Therefore, for women of childbearing potential only, a negative serum or urine pregnancy test done =\< 7 days prior to registration is required
* No known Gilbert's syndrome or known homozygosity for UGAT1A1\*28 polymorphism
* No baseline grade \>= 2 peripheral neuropathy, neurosensory toxicity, or neuromotor toxicity per CTCAE version (v) 5.0 regardless of causality
* No medical condition such as uncontrolled infection or uncontrolled diabetes mellitus which, in the opinion of the treating physician, would make this protocol unreasonably hazardous for the patient
* No untreated, symptomatic brain metastasis. Patients with treated brain metastases are eligible if the following criteria are met: 1) follow-up brain imaging done at least in 4 weeks after central nervous system (CNS)-directed therapy shows no evidence of progression and 2) the patient no longer requires steroids, or is on a stable steroid dose for more than four weeks
* No allogeneic tissue/organ transplant