testing a new combination of anti-cancer immune therapies, atezolizumab and cdx-1127 (varlilumab) with or without the addition of a third anti-cancer drug, cobimetinib, for advanced-stage biliary tract cancer

Conditions: Metastatic Distal Bile Duct Adenocarcinoma; Metastatic Gallbladder Carcinoma; Metastatic Intrahepatic Cholangiocarcinoma; Recurrent Distal Bile Duct Adenocarcinoma; Recurrent Gallbladder Carcinoma; Recurrent Intrahepatic Cholangiocarcinoma; Stage IV Distal Bile Duct Cancer AJCC v8; Stage IV Gallbladder Cancer AJCC v8; Stage IV Intrahepatic Cholangiocarcinoma AJCC v8; Unresectable Liver Carcinoma

Summary: this phase ii trial investigates the effect of combining two immune therapies, atezolizumab and cdx-1127 (varlilumab), with or without cobimetinib, in treating patients with biliary tract cancer that cannot be removed by surgery (unresectable). immunotherapy with monoclonal antibodies, such as atezolizumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. varlilumab is an immune agonist antibody that may further strengthen the immune system's attack on the cancer. cobimetinib is in a class of medications called kinase inhibitors. it works by blocking the action of an abnormal protein that signals cancer cells to multiply. this helps slow or stop the spread of cancer cells. giving atezolizumab in combination with varlilumab and cobimetinib may work better than atezolizumab and varlilumab alone in treating patients with unresectable biliary tract cancer.

primary objectives: i. to assess the response rate (orr) of patients with unresectable, pre-treated biliary cancers treated with the combination of atezolizumab and cdx-1127 (varlilumab) with or without cobimetinib. ii. to assess the progression free survival (pfs) of patients with unresectable, pre-treated biliary cancers treated with the combination of atezolizumab and cdx-1127 (varlilumab) with or without cobimetinib. secondary objectives: i. to assess the safety and tolerability of combination of atezolizumab and cdx-1127 (varlilumab) with or without cobimetinib in patients with unresectable, pre-treated biliary cancers. ii. to assess overall survival (os) of patients with unresectable, pre-treated biliary cancers treated with the combination of atezolizumab and cdx-1127 (varlilumab) with or without cobimetinib. iii. to determine the effect of combination atezolizumab and cdx-1127 (varlilumab) +/- cobimetinib on t cell subpopulations systemically and intratumorally. correlative objectives: i. to explore the effect of atezolizumab and cdx-1127 (varlilumab) +/- cobimetinib on local and systemic immune activation pathways, immune suppressive pathways, and cytokine/chemokine signaling in peripheral blood and within the tumor microenvironment. ii. to assess whether atezolizumab and cdx-1127 (varlilumab) clearance at baseline and over time correlate with clinical outcomes (orr, pfs and os) and the presence of cachexia. iii. to assess immunogenicity by monitoring for the presence of anti-drug antibodies (ada) to both atezolizumab and cdx-1127 (varlilumab). outline: patients are randomized to 1 of 2 arms. arm a: patients receive cobimetinib orally (po) once daily (qd) on days 1-21 of each cycle, atezolizumab intravenously (iv) over 30-60 minutes on days 1 and 15 of each cycle, and varlilumab iv over 90 minutes on days 1 and 15 of each cycle. cycles repeat every 28 days in the absence of disease progression or unacceptable toxicity. patients undergo a computed tomography (ct) or magnetic resonance imaging (mri) at baseline, every 8 weeks while on treatment, and at end of treatment or progression. patients also undergo a tumor biopsy at baseline and on day 21 of cycle 1. patients also undergo blood sample collection on study. arm b: patients receive atezolizumab iv over 30-60 minutes on days 1 and 15 of each cycle and varlilumab iv over 90 minutes on days 1 and 15 of each cycle. cycles repeat every 28 days in the absence of disease progression or unacceptable toxicity. patients undergo a ct or mri at baseline, every 8 weeks while on treatment, and at end of treatment or progression. patients also undergo a tumor biopsy at baseline and on day 21 of cycle 1. patients also undergo blood sample collection on study. after completion of study treatment, patients are followed up at 30 days and then every 3 months until death, withdrawal of consent, or study closure.

Eligibility criteria:
inclusion criteria: * pathologically confirmed biliary tract cancer, having received at least 1 prior line of systemic therapy, and received no more than 2 prior lines of therapy in the metastatic setting (disease recurrence =\< 6 months from the last dose of perioperative therapy/day of surgery \[whichever is more recent\] in resected patients will be considered the first line of therapy) * includes intrahepatic cholangiocarcinoma (ihc), extrahepatic cholangiocarcinoma (ehc), and gallbladder carcinoma (gbc), but not ampulla of vater cancers * patients must have measurable disease by response evaluation criteria in solid tumors (recist) version (v)1.1 * age \>= 18 years. because no dosing or adverse event data are currently available on the use of atezolizumab, cobimetinib, and cdx-1127 (varlilumab) in patients \< 18 years of age, children are excluded from this study * eastern cooperative oncology group (ecog) performance status =\ = 80%) * absolute neutrophil count \>= 1,500/mcl * hemoglobin \>= 9.0 g/dl * platelets \>= 100,000/mcl * total bilirubin =\< 1.5 x institutional upper limit of normal (uln) (patients with known gilbert disease who have serum bilirubin level =\< 3 x uln may be enrolled) * aspartate aminotransferase (ast) (serum glutamic oxaloacetic transaminase \[sgot\])/alanine aminotransferase (alt) (serum glutamic pyruvic transaminase \[sgpt\]) =\< 3 x institutional uln * serum creatinine =\< 1.5 x institutional uln or * creatinine clearance \> 30 ml/min/1.73 m\^2 (calculated by cockcroft-gault method) for patients with creatinine levels above institutional normal * albumin \>= 3.0 g/dl * prothrombin time (pt)/activated partial thromboplastin time (aptt) =\< 1.5 x uln (this applies only to patients who do not receive therapeutic anticoagulation; patients receiving therapeutic anticoagulation, such as low-molecular-weight heparin or warfarin, should be on a stable dose) * creatine kinase (ck)/creatine phosphokinase (cpk) \< 5 x uln * oxygen saturation \>= 92% on room air * left ventricular ejection fraction \> 50% * human immunodeficiency virus (hiv)-infected patients on effective anti-retroviral therapy with undetectable viral load within 6 months are eligible for this trial * 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 must be willing to undergo 2 sets of core needle biopsies. if possible, biopsied sites should be different than those used for measurable disease/recist measurements, but this is not mandatory * patients must have an estimated life expectancy of greater than 3 months * patients must be able to swallow pills * patients should not have evidence of retinal pathology on ophthalmologic examination; or neurosensory retinal detachment, retinal vein occlusion (rvo), or neovascular macular degeneration * the effects of atezolizumab, cobimetinib, and cdx-1127 (varlilumab) on the developing human fetus are unknown. for this reason, women of child-bearing potential and men must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) prior to study entry, for the duration of study participation, and 5 months after the last dose of atezolizumab. 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 prior to the study, for the duration of study participation, and 5 months (150 days) after completion of atezolizumab, cobimetinib, and cdx-1127 (varlilumab) administration * ability to understand and the willingness to sign a written informed consent document exclusion criteria: * patients with prior allogeneic bone marrow transplantation within the past 5 years or prior solid organ transplantation at any point * patients who have had chemotherapy or radiotherapy within 4 weeks (6 weeks for nitrosoureas or mitomycin c) prior to entering the study or those who have not recovered from adverse events (other than alopecia or neuropathy) due to agents administered more than 4 weeks earlier. however, the following therapies are allowed: * hormone-replacement therapy or oral contraceptives * herbal therapy \> 1 week prior to randomization (herbal therapy intended as anticancer therapy must be discontinued at least 1 week prior to randomization) * palliative radiotherapy for bone metastases \> 2 weeks prior to randomization * prior treatment with anti-ctla-4, anti-pd-1, or anti-pd-l1or other immune checkpoint inhibitor therapeutic antibodies or pathway-targeting agents with the following exceptions: * patients who have only received previous durvalumab (anti-pd-l1) as part of first line in combination with gemcitabine and cisplatin (topaz-1 regimen \[nct03875235\]) are eligible. * patients who have only received previous pembrolizumab (anti-pd-1) as part of first line in combination with gemcitabine and cisplatin (keynote-966 regimen \[nct04003636\]) are eligible. * prior treatment with mek or erk inhibitors * treatment with any other investigational agent within 4 weeks prior to randomization * treatment with systemic immunostimulatory agents (including, but not limited to, interferon \[ifn\]-alpha or interleukin \[il\]-2) within 6 weeks prior to randomization * treatment with systemic immunosuppressive medications (including, but not limited to, prednisone (\> 10 mg), cyclophosphamide, tacrolimus, sirolimus, azathioprine, methotrexate, thalidomide, and anti-tumor necrosis factor \[anti-tnf\] agents) within 2 weeks prior to randomization * patients who have received acute, low dose, systemic immunosuppressant medications (e.g., a one-time dose of dexamethasone for nausea) may be enrolled * the use of physiologic doses of systemic corticosteroids and mineralocorticoids (e.g., fludrocortisone) for patients with orthostatic hypotension or adrenocortical insufficiency is allowed * the use of topical and inhaled corticosteroids are allowed due to low systemic absorption * patients taking bisphosphonate therapy for symptomatic hypercalcemia. use of bisphosphonate therapy for other reasons (e.g., bone metastasis or osteoporosis) is allowed * presence of therapeutically actionable mutation with approved targeted therapy (e.g. fgfr fusion patients are eligible for study therapy in the 3rd line setting). patient must have received somatic mutation testing (tissue or liquid) prior to enrollment * clinically significant ascites (palpable on exam, paracentesis in last 3 months, and/or symptomatic) * patients with known primary central nervous system (cns) malignancy or symptomatic cns metastases are excluded, with the following exceptions: * patients with asymptomatic treated cns metastases may be enrolled, provided all the criteria listed above are met as well as the following: * radiographic demonstration of improvement upon the completion of cns-directed therapy and no evidence of interim progression between the completion of cns-directed therapy and the screening radiographic study * no stereotactic radiation or whole-brain radiation within 28 days prior to randomization * screening cns radiographic study \>= 4 weeks from completion of radiotherapy and \>= 2 weeks from discontinuation of corticosteroids * follow-up brain imaging 3 months after central nervous system (cns)-directed therapy shows no evidence of progression * history of malignant bowel obstruction * history of severe allergic, anaphylactic, or other hypersensitivity reactions to chinese hamster ovary cell products, chimeric, humanized, or other recombinant human antibodies or fusion proteins * history of allergic reactions attributed to compounds of similar chemical or biologic composition to atezolizumab, cobimetinib, or cdx-1127 (varlilumab) * patients receiving any medications or substances that are considered moderate to strong inhibitors or inducers of cyp3a and are not able to switch to an alternative that minimizes interaction potential will ineligible. coadministration of cobimetinib with a strong cyp3a4 inhibitor can increase cobimetinib systemic exposure significantly (e.g. itraconazole increased serum systemic cobimetinib exposure by 6.7 fold). on the other end, coadministration of cobimetinib with a strong cyp3a inducer may decrease cobimetinib systemic exposure by more than 80% thus reducing its efficacy. because the lists of these agents are constantly changing, it is important to regularly consult a frequently-updated list such as http://medicine.iupui.edu/clinpharm/ddis/; medical reference texts such as the physicians' desk reference may also provide this information. 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 on mild inhibitors or inducers of cyp3a are allowed * patients with a known clinically significant liver disease, including active viral, alcoholic, or other hepatitis; cirrhosis; fatty liver; and inherited liver disease. * patients with past or resolved hepatitis b infection (defined as having a negative hepatitis b surface antigen \[hbsag\] test and a positive anti-hbc \[antibody to hepatitis b core antigen\] antibody test) are eligible. * patients positive for hepatitis c virus (hcv) antibody are eligible only if polymerase chain reaction (pcr) is negative for hcv ribonucleic acid (rna) * patients who have received immunosuppressive treatment for systemic autoimmune disease, including, but not limited to, systemic lupus erythematosus, rheumatoid arthritis, inflammatory bowel disease, vascular thrombosis associated with antiphospholipid syndrome, wegener's granulomatosis, sjogren's syndrome, multiple sclerosis, vasculitis, or glomerulonephritis within the last 2 years. * patients with a history autoimmune endocrine disorders on stable doses of physiologic hormone replacement may be eligible. * patients with controlled type 1 diabetes mellitus on a stable insulin regimen may be eligible. * patients with eczema, psoriasis, lichen simplex chronicus of vitiligo with dermatologic manifestations only (e.g., patients with psoriatic arthritis would be excluded) are permitted provided that they meet the following conditions: * patients with psoriasis must have a baseline ophthalmologic exam to rule out ocular manifestations * rash must cover less than 10% of body surface area (bsa) * disease is well controlled at baseline and only requiring low potency topical steroids (e.g., hydrocortisone 2.5%, hydrocortisone butyrate 0.1%, fluocinolone 0.01%, desonide 0.05%, alclometasone dipropionate 0.05%) * no acute exacerbations of underlying condition within the last 12 months (not requiring psoralen plus ultraviolet a radiation \[puva\], methotrexate, retinoids, biologic agents, oral calcineurin inhibitors; high potency or oral steroids) * patients with history guillain-barre syndrome or myasthenia gravis at any point will not be eligible * history of idiopathic pulmonary fibrosis, pneumonitis (including drug induced), organizing pneumonia (i.e., bronchiolitis obliterans, cryptogenic organizing pneumonia, etc.), or evidence of active pneumonitis on screening chest computed tomography (ct) scan. history of radiation pneumonitis in the radiation field (fibrosis) is permitted * patients with active tuberculosis (tb) are excluded * severe infections within 4 weeks prior to randomization, including, but not limited to, hospitalization for complications of infection, bacteremia, or severe pneumonia * signs or symptoms of infection within 2 weeks prior to randomization * received oral or intravenous (iv) antibiotics within 2 weeks prior to randomization * patients receiving prophylactic/suppressive antibiotics will not be eligible * major surgical procedure within 28 days prior to randomization or anticipation of need for a major surgical procedure during the course of the study * administration of a live, attenuated vaccine within 4 weeks before randomization or anticipation that such a live, attenuated vaccine will be required during the study and up to 5 months after the last dose of atezolizumab. * influenza vaccination should be given during influenza season only (approximately october to march). patients must not receive live, attenuated influenza vaccine within 4 weeks prior to randomization or at any time during the study. * coronavirus disease 2019 (covid-19) vaccination is not exclusionary but should be administered at least 7 days before study start * patients with psychiatric illness/social situations that would limit compliance with study requirements * pregnant women are excluded from this study because one or more study agents have 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 atezolizumab, cobimetinib, and cdx-1127 (varlilumab), breastfeeding should be discontinued if the mother is treated with atezolizumab, cobimetinib, and cdx-1127 (varlilumab) * patients who are using ethinyl estradiol containing oral contraceptives when administered concomitantly with cobimetinib, are excluded due to increased risk of venous thromboembolism * patients with a history of clinically significant cardiac dysfunction, including the following: * left ventricular ejection fraction (lvef) below institutional lower limit of normal (lln) or below 50%, whichever is lower * current unstable angina * current symptomatic congestive heart failure (chf) of new york heart association class 2 or higher * uncontrolled hypertension \>= grade 2 (patients with a history hypertension controlled with anti-hypertensives to =\< grade 1 are eligible). * uncontrolled arrhythmias * myocardial infarction, severe/unstable angina, symptomatic chronic heart failure (chf), cerebrovascular accident or transient ischemic attack within the previous 6 months * history of treatment with cardiotoxic agents