atezolizumab with or without cobimetinib in treating patients with metastatic bile duct cancer that cannot be removed by surgery or gallbladder cancer

Conditions: Gallbladder Carcinoma; Metastatic Cholangiocarcinoma; Stage III Intrahepatic Cholangiocarcinoma AJCC v8; Stage IV Intrahepatic Cholangiocarcinoma AJCC v8; Unresectable Cholangiocarcinoma

Summary: this randomized phase ii trial studies how well atezolizumab with or without cobimetinib works in treating patients with bile duct cancer that has spread to other places in the body (metastatic) and cannot be removed by surgery (unresectable) or gallbladder cancer. 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. cobimetinib is used in patients whose cancer has a mutated (changed) form of a gene called braf. it 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 with cobimetinib may work better at treating patients with bile duct and gallbladder cancer.

primary objective: i. to assess the progression free survival (pfs) of patients receiving atezolizumab monotherapy and cobimetinib in combination with atezolizumab for unresectable cholangiocarcinoma. secondary objectives: i. to assess the overall survival (os) of patients receiving cobimetinib in combination with atezolizumab and atezolizumab monotherapy for unresectable cholangiocarcinoma. ii. to determine the objective response rate (orr), defined as complete plus partial response, of cobimetinib in combination with atezolizumab and atezolizumab monotherapy in patients with unresectable cholangiocarcinoma. iii. to assess the safety and tolerability of cobimetinib in combination with atezolizumab and atezolizumab monotherapy in patients with unresectable cholangiocarcinoma. iv. to determine the relationship between pd-l1 expression in tumor at baseline and on treatment, and response to treatment. correlative objectives: i. to determine the effect of cobimetinib on cd8+ t cell infiltration in tumor. ii. to determine the effect of cobimetinib on t cell subpopulations systemically and in tumor, pd-1/pd-l1 expression on tumor, and mhc 1/2 expression. iii. to determine the effect of cobimetinib on markers of immune exhaustion and pro-apoptotic factors in cd8+ effector t cells. iv. to explore the effect of cobimetinib on local and systemic immune activation pathways and immune suppressive pathways through expression profiling. outline: patients are randomized to 1 of 2 arms. arm a: patients receive atezolizumab intravenously (iv) over 30-60 minutes on days 1 and 15. cycles repeat every 28 days in the absence of disease progression or unacceptable toxicity. patients also undergo computed tomography (ct) or magnetic resonance imaging (mri) and collection of blood samples throughout the trial and undergo tumor biopsy on study. arm b: patients receive atezolizumab iv over 30-60 minutes on days 1 and 15 and cobimetinib orally (po) once daily (qd) on days 1-21. cycles repeat every 28 days in the absence of disease progression or unacceptable toxicity. patients also undergo ct or mri and collection of blood samples throughout the trial and undergo tumor biopsy on study. after completion of study treatment, patients are followed up every 3 months until death, withdrawal of consent, or study closure, whichever occurs first.

Eligibility criteria:
inclusion criteria: * pathologically confirmed metastatic or unresectable cholangiocarcinoma or gallbladder carcinoma (gbc), 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 adjuvant therapy 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, defined as at least one lesion that can be accurately measured in at least one dimension (longest diameter to be recorded for non-nodal lesions and short axis for nodal lesions) as \>= 20 mm (\>= 2 cm) with conventional techniques or as \>= 10 mm (\>= 1 cm) with spiral ct scan, mri, or calipers by clinical exam; assessment must be completed within 4 weeks of randomization * age \>= 18 years. because no dosing or adverse event data are currently available on the use of cobimetinib in combination with atezolizumab in patients \< 18 years of age, children are excluded from this study * eastern cooperative oncology group (ecog) performance status =\ = 80%) * life expectancy of greater than 2 months * leukocytes \>= 2,500/mcl (within 2 weeks of randomization) * absolute neutrophil count \>= 1,500/mcl (within 2 weeks of randomization) * platelets \>= 75,000/mcl (within 2 weeks of randomization) * hemoglobin \>= 8 g/dl (within 2 weeks of randomization) * total bilirubin =\< 1.5 x institutional upper limit of normal (uln) (however, patients with known gilbert disease who have serum bilirubin level =\< 3 x uln may be enrolled) (within 2 weeks of randomization) * aspartate aminotransferase (ast) (serum glutamic-oxaloacetic transaminase \[sgot\])/alanine aminotransferase (alt) (serum glutamate pyruvate transaminase \[sgpt\]) =\< 3 x uln (within 2 weeks of randomization) * creatinine clearance \>= 30 ml/min/1.73 m\^2 by cockcroft-gault or creatinine \< 1.5 x uln (within 2 weeks of randomization) * international normalized ratio (inr) and 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) (within 2 weeks of randomization) * administration of atezolizumab and cobimetinib may have an adverse effect on pregnancy and poses a risk to the human fetus, including embryo-lethality; women of childbearing potential must agree to use either two adequate barrier methods or a barrier method plus a hormonal method of contraception to prevent pregnancy, or to abstain from heterosexual activity (complete abstinence) prior to study entry, for the duration of study participation, and for 5 months (150 days) after the last dose of study agent; 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; male patients must agree to use an adequate method of contraception, or to abstain from heterosexual activity (complete abstinence), prior to study entry, for the duration of study participation, and for 5 months (150 days) after the last dose of study agent * ability to understand and the willingness to sign a written informed consent document * patients positive for human immunodeficiency virus (hiv) are allowed on study, but hiv-positive patients must have: * a stable regimen of highly active anti-retroviral therapy (haart) * no requirement for concurrent antibiotics or antifungal agents for the prevention of opportunistic infections * a cd4 count above 250 cells/mcl and an undetectable hiv viral load on standard polymerase chain reaction (pcr)-based tests * oxygen saturation \>= 92% on room air exclusion criteria: * received chemotherapy or radiotherapy within 3 weeks prior to randomization or those who have not recovered to =\< grade 1 adverse events (other than alopecia) due to agents administered more than 3 weeks earlier; herbal therapy intended as anticancer therapy must be discontinued at least 1 week prior to randomization; for patients who received prior immunotherapy (eg anti-ctla-4), at least five drug half-lives must have passed before the patient may enroll on this study; however, the following therapies are allowed: * hormone-replacement therapy or oral contraceptives * palliative radiotherapy for bone metastases \>= 2 weeks prior to randomization * prior treatment with a mek inhibitor or erk inhibitor * prior treatment with any anti-pd-1 or anti-pd-l1 antibody, prior allogeneic bone marrow transplantation, or prior solid organ transplantation * treatment with any investigational agent within 4 weeks prior to cycle 1, day 1, or five drug half-lives (whichever is longer) * treatment with systemic immunosuppressive medications (including, but not limited to, prednisone, cyclophosphamide, azathioprine, methotrexate, thalidomide, and anti-tumor necrosis factor \[anti-tnf\] agents) within 6 weeks prior to cycle 1 day 1; * 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 inhaled corticosteroids and mineralocorticoids (e.g., fludrocortisone) for patients with orthostatic hypotension or adrenocortical insufficiency is allowed * patients with known primary central nervous system (cns) malignancy or symptomatic cns metastases, 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 clinical stability 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 * has a known concurrent malignancy that is expected to require active treatment within two years, or may interfere with the interpretation of the efficacy and safety outcomes of this study in the opinion of the treating investigator; superficial bladder cancer, non-melanoma skin cancers, or low grade prostate cancer not requiring therapy should not exclude participation in this trial * known hypersensitivity to chinese hamster ovary cell products or other recombinant human antibodies * allergy or hypersensitivity to components of the cobimetinib formulations * history of congenital long qt syndrome or corrected qt interval (qtc) \> 450 msec within 2 weeks of randomization * left ventricular ejection fraction (lvef) below institutional lower limit of normal (lln) or below 50%, whichever is lower, as determined by echocardiogram or multi-gated acquisition (muga) scan within 4 weeks of randomization * patients who meet any of the following exclusion criteria related to ocular disease will be excluded from study entry: * known risk factors for ocular toxicity, consisting of any of the following: * history of serous retinopathy * history of retinal vein occlusion (rvo) * evidence of ongoing serous retinopathy or rvo at screening * patients receiving any medications or substances that are strong inhibitors or inducers of cyp3a4 enzymes are ineligible; these include st. john's wort or hyperforin (potent cyp3a4 enzyme inducer) and grapefruit juice (potent cytochrome p450 cyp3a4 enzyme inhibitor); such substances can significantly increase or decrease the serum level of cobimetinib; 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 * 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) * history or risk of 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, bell's palsy, guillain-barre syndrome, multiple sclerosis, autoimmune thyroid disease, vasculitis, or glomerulonephritis * patients with a history of autoimmune hypothyroidism on a stable dose of thyroid replacement hormone 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: * 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%, flucinolone 0.01%, desonide 0.05%, aclometasone 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) * 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 * 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 antibiotics (e.g., for prevention of a urinary tract infection or chronic obstructive pulmonary disease) are eligible * major surgical procedure within 4 weeks 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 cycle 1, day 1 or at any time during the study * uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, active tuberculosis (tb), symptomatic congestive heart failure (chf), unstable angina pectoris, cardiac arrhythmia, or psychiatric illness/social situations that would limit compliance with study requirements * symptomatic chf is defined as new york heart association (nyha) chf class ii or higher disease * pregnant women are excluded from this study because both atezolizumab and cobimetinib are expected to cause fetal harm if used during pregnancy; because there is an unknown but potential risk for adverse events in nursing infants secondary to treatment of the mother with cobimetinib or atezolizumab, breastfeeding should be discontinued if the mother is treated with either therapy; these potential risks may also apply to other agents used in this study * inability or unwillingness to swallow pills * history of malabsorption syndrome or other condition that would interfere with enteral absorption * clinically significant ascites, defined as ascites that is symptomatic or has resulted in a paracentesis in the past 3 months