Testing the Addition of an Anti-cancer Drug, Adavosertib, to Radiation Therapy for Patients With Incurable Esophageal and Gastroesophageal Junction Cancers

This phase I trial investigates the side effects and best dose of adavosertib and how well it works when given in combination with radiation therapy in treating patients with esophageal or gastroesophageal junction cancer for which no treatment is currently available (incurable). Adavosertib may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. Radiation therapy uses high energy x-rays to kill tumor cells and shrink tumors. Giving adavosertib together with radiation therapy kill more tumor cells than radiation therapy alone in treating patients with esophageal and gastroesophageal junction cancer.

PRIMARY OBJECTIVE:

I. To identify the maximally tolerated dose of adavosertib (AZD1775) to be used in combination with radiation therapy for patients with esophageal/gastroesophageal junction (GEJ) cancer that is metastatic or inoperable and not eligible for definitive chemoradiation.

SECONDARY OBJECTIVES:

I. To observe and record anti-tumor activity. II. To evaluate the efficacy of AZD1775 when administered in combination with radiation therapy by assessing changes in Ogilvie dysphagia score following treatment, time to second intervention for dysphagia, and overall survival.

III. To identify biomarkers that are predictive for response to experimental therapy.

OUTLINE: This is a dose escalation study of adavosertib.

Patients undergo radiation therapy once daily (QD) 5 days per week for 3 weeks in the absence of disease progression or unacceptable toxicity. Patients also receive adavosertib orally (PO) QD for 2-5 days (depending on dose level) during weeks 1 and 3 of radiation therapy in the absence of disease progression or unacceptable toxicity.

After completion of study treatment, patients are followed up at 3 weeks, every 3 months for 2 years, then every 6 months for 3 years.

Eligibility Criteria:
Inclusion Criteria:

* Patients must have histologically confirmed esophageal cancer (either squamous cell or adenocarcinoma), including Siewert gastroesophageal junction adenocarcinomas types 1 and 2, that is inoperable and not eligible for definitive chemoradiation after multidisciplinary review or have pathologically confirmed or imaging consistent with metastatic disease
* Age \>= 18 years. Because no dosing or adverse event data are currently available on the use of AZD1775 in combination with radiation therapy in patients \< 18 years of age, children are excluded from this study
* Eastern Cooperative Oncology Group (ECOG) performance status 0-1 (Karnofsky \>= 70%)
* Leukocytes \>= 3,000/mcL
* Absolute neutrophil count \>= 1,500/mcL
* Hemoglobin \>= 9 g/dL
* Platelets \>= 100,000/mcL
* Total bilirubin =\< 1.5 x institutional upper limit of normal (ULN)
* Aspartate aminotransferase (AST) (serum glutamic oxaloacetic transaminase \[SGOT\])/alanine aminotransferase (ALT) (serum glutamate pyruvate transaminase \[SGPT\]) =\< 3 x institutional ULN
* Creatinine =\< 1.5 x institutional ULN OR
* Glomerular filtration rate (GFR) \>= 60 mL /min/1.73 m\^2 unless data exists supporting safe use at lower kidney function values, no lower than 30 mL/min/1.73 m\^2
* For patients with evidence of chronic hepatitis B virus (HBV) infection, the HBV viral load must be undetectable on suppressive therapy, if indicated
* Patients with a history of hepatitis C virus (HCV) infection must have been treated and cured. For patients with HCV infection who are currently on treatment, they are eligible if they have an undetectable HCV viral load
* Patients with treated brain metastases are eligible if follow-up brain imaging after central nervous system (CNS)-directed therapy shows no evidence of progression
* Patients with new or progressive brain metastases (active brain metastases) or leptomeningeal disease are eligible if the treating physician determines that immediate CNS specific treatment is not required and is unlikely to be required during the first cycle of therapy
* 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 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 able to swallow whole capsules. Patients with esophageal stents and/or feeding tubes are eligible but must be able to swallow whole capsules. Capsules may not be opened or put down a feeding tube
* Patients with a life expectancy \> 3 months
* Patients must have an electrocardiogram (ECG) within 8 weeks prior to treatment assignment and must have no clinically important abnormalities in rhythm, conduction or morphology of resting ECG

  * Resting corrected QTc interval using the Fridericia formula (QTcF) \> 480 msec (as calculated per institutional standards) obtained from an ECG (Note: if one ECG demonstrates a QTcF \> 480 msec, then a mean QTcF of =\< 480 msec obtained from 3 ECGs 2-5 minutes apart, is required at study entry)
  * Patients with congenital long QT syndrome are excluded
* The effects of AZD1775 on the developing human fetus are unknown. For this reason and because other therapeutic agents used in this trial are known to be teratogenic, women of child-bearing potential must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) for 2 weeks prior to study drug exposure, the duration of study participation, and for 1 month after completing treatment. Women of child-bearing potential must have a negative serum or urine pregnancy test (minimum sensitivity 25 IU/L or equivalent units of HCG) within 1 week of registration. 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. Men treated or enrolled on this protocol must also agree to use adequate contraception for the duration of study participation and for 3 months after completion of treatment. Male patients should not donate sperm during exposure to study drug and for 3 months after study drug discontinuation
* Ability to understand and the willingness to sign a written informed consent document. Participants with impaired decision-making capacity (IDMC) will also be eligible

Exclusion Criteria:

* Patients who have had chemotherapy or radiotherapy within 3 weeks (6 weeks for nitrosoureas or mitomycin C) prior to starting study therapy
* Patients who have not recovered from adverse events due to prior anti-cancer therapy (i.e., have residual toxicities \> grade 1) with the exception of alopecia
* Patients who are receiving any other investigational agents
* History of allergic reactions attributed to compounds of similar chemical or biologic composition to AZD1775
* Patients receiving any medications or substances that are strong inhibitors or inducers of CYP3A4 are ineligible. Because the lists of these agents are constantly changing, it is important to regularly consult a frequently-updated medical reference. As part of the enrollment/informed consent procedures, the patient will be counseled on the risk of interactions with other agents, and what to do if new medications need to be prescribed or if the patient is considering a new over-the-counter medicine or herbal product
* Patients with uncontrolled intercurrent illness
* Patients with psychiatric illness/social situations that would limit compliance with study requirements
* Pregnant women are excluded from this study because AZD1775 is a WEE1 inhibiting agent with the potential for teratogenic or abortifacient effects. Because there is an unknown but potential risk for adverse events in nursing infants secondary to treatment of the mother with AZD1775, breastfeeding should be discontinued if the mother is treated with AZD1775. These potential risks may also apply to other agents used in this study
* Prior thoracic or abdominal radiation therapy for cancer that would result in significant overlap of radiation therapy fields at the discretion of the investigator
* Patients with congenital long QT syndrome or with a history of Torsades de pointes unless all risk factors contributed to Torsades have been corrected. AZD1775 has not been studied in patients with ventricular arrhythmias or recent myocardial infarction
* Eligibility of subjects receiving any medications or substances with the potential to affect the activity or pharmacokinetics of AZD1775 will be determined following review by the principal investigator