Testing the Use of AMG 510 (Sotorasib) and Panitumumab as a Targeted Treatment for KRAS G12C Mutant Solid Tumor Cancers (A ComboMATCH Treatment Trial)

This phase II ComboMATCH treatment trial tests how well AMG 510 (sotorasib) with or without panitumumab works in treating patients with KRAS G12C mutant solid tumors that may have spread from where it first started to nearby tissue, lymph nodes, or distant parts of the body (advanced). Sotorasib is in a class of medications called KRAS inhibitors. It works by blocking the action of the abnormal protein that signals cancer cells to multiply. This helps stop or slow the spread of cancer cells. Panitumumab is in a class of medications called monoclonal antibodies. It works by slowing or stopping the growth of cancer cells. Giving combination panitumumab and sotorasib may kill more tumor cells in patients with advanced solid tumors with KRAS G12C mutation.

PRIMARY OBJECTIVES:

I. To evaluate the efficacy of the combination of AMG 510 (sotorasib) and panitumumab as compared to AMG 510 (sotorasib) alone in patients with advanced/metastatic KRAS G12C mutated solid tumors (except colorectal carcinoma \[CRC\] and non-small cell lung carcinoma \[NSCLC\]) as measured by progression free survival (Cohort 1).

II. To evaluate the efficacy of the combination of AMG 510 (sotorasib) and panitumumab in patients with advanced/metastatic KRAS G12C mutated solid tumors that have progressed on a prior KRAS G12C inhibitor as measured by response rate (Cohort 2).

SECONDARY OBJECTIVES:

I. To evaluate the efficacy of the combination of AMG 510 (sotorasib) and panitumumab as compared to AMG 510 alone in patients with advanced/metastatic KRAS G12C mutated solid tumors (except CRC and NSCLC) as measured by response rate, disease control rate, and overall survival (Cohort 1).

II, To evaluate the efficacy of the combination of AMG 510 (sotorasib) and panitumumab in patients with advanced/metastatic KRAS G12C mutated solid tumors that have progressed on a prior KRAS G12C inhibitor as measured by disease control rate, progression free survival (PFS), and overall survival (Cohort 2).

III. To further evaluate the safety and tolerability of the combination of AMG 510 (sotorasib) and panitumumab.

IV. To collect tissue and provide it to the ComboMATCH Registration Protocol to assess concordance between the diagnostic tumor mutation profile generated by the Designated Laboratories, the pre-treatment biopsy mutation profile, and the pre-treatment circulating tumor-derived deoxyribonucleic acid (DNA) (ctDNA) mutation profile from plasma, as described in ComboMATCH Registration Protocol.

CORRELATIVE EXPLORATORY OBJECTIVES:

I. To investigate the impact of concomitant mutations on the clinical benefit. II. To evaluate if changes in circulating tumor DNA (ctDNA) over time correlate with response to treatment.

III. To evaluate the relative mutant allele fraction of KRAS mutation as a predictor of clinical benefit.

IV. To evaluate if ERK 1/2 and PI3K pathway activation correlate with response and/or resistance.

OUTLINE: Patients are assigned to 1 of 2 cohorts.

COHORT I: Patients who have never received a KRAS G12C inhibitor are randomized to arms A or B.

ARM A: Patients receive sotorasib orally (PO) once daily (QD) on days 1-28 and panitumumab intravenously (IV) on days 1 and 15 of each cycle. Cycles repeat every 28 days in the absence of disease progression or unacceptable toxicity. Patients also undergo collection of blood samples, biopsy, and computed tomography (CT) or magnetic resonance imaging (MRI) on study.

ARM B: Patients receive sotorasib PO QD on days 1-28 of each cycle. Cycles repeat every 28 days in the absence of disease progression or unacceptable toxicity. Patients with disease progression may cross-over to cohort II. Patients also undergo collection of blood samples, biopsy, and CT or MRI on study.

COHORT II: Patients who have received a KRAS G12C inhibitor are assigned to arm C.

ARM C: Patients receive combination therapy as in Arm A.

After completion of study treatment, patients are followed up at 30 days and then every 3-6 months for up to 36 months.

Eligibility Criteria:
Inclusion Criteria:

* Patient must have enrolled onto EAY191 and must have been given a treatment assignment to ComboMATCH to EAY191-E5 based on the presence of an actionable mutation as defined in EAY191
* Patient must be enrolled on the ComboMATCH Registration Protocol (EAY191) at the time of registration/randomization to the EAY191-E5 study
* Patient must be \>= 18 years of age
* Patient must have a KRAS G12C alteration as determined by the ComboMATCH screening assessment
* Patient must have disease that can be safely biopsied and agree to a pre-treatment biopsy or have tissue available from within 12 months prior to the date of registration on the ComboMATCH Registration Trial (EAY191-E5)

  * NOTE: The current actionable marker of interest (aMOI)/actionable alteration list for this treatment trial can be found on the Cancer Trials Support Unit (CTSU) website: www.ctsu.org (final URL pending)
  * NOTE: Novel/Dynamic aMOI can be submitted for review per the process described in the ComboMATCH registration protocol
* Patient must have cytologically/histologically confirmed advanced/metastatic solid tumor
* Patient must have progressed on at least one line of standard of care therapy in the advanced/metastatic setting

  * NOTE: Patients who have progressed on a prior human epidermal growth factor receptor (EGFR) inhibitor will meet this criterion
* Patient must have an Eastern Cooperative Oncology Group (ECOG) performance status of =\< 2 (or Karnofsky performance status \>= 60%)
* Patient must have at least one measurable lesion as defined by Response Evaluation Criteria in Solid Tumors (RECIST) documented by imaging obtained within 28 days prior to registration/randomization
* Patient must not have any serious active infection within 4 weeks prior to EAY191-E5 registration/randomization (e.g., requiring hospitalization and/or intravenous \[IV\] antibiotics) or currently receiving oral or IV antibiotics for the treatment of infection. Patients receiving prophylactic antibiotics are eligible
* Patient must have the ability to retain oral medication and not have any clinically significant gastrointestinal abnormalities that might alter absorption
* Patient must not have any history of or current evidence of non-infectious interstitial lung disease (ILD)/pneumonitis
* Patient must not have a history of allergic reactions attributed to either of the study agents or to agents of similar chemical or biologic composition
* Patient must have completed full treatment cycle 21 days prior to EAY191-E5 registration/randomization if they have received prior chemotherapy, biological cancer therapy, radiation therapy or an investigational agent/device. Patients must have recovered to Common Terminology Criteria for Adverse Events (CTCAE) grade 1 or better from any adverse events due to prior cancer therapy (with the exception of alopecia)
* Patient must not be pregnant or breast-feeding due to the potential harm to an unborn fetus and possible risk for adverse events in nursing infants with the treatment regimens being used. All patients of childbearing potential must have a blood test or urine study within 14 days prior to registration/randomization to rule out pregnancy. A patient of childbearing potential is defined as anyone, regardless of sexual orientation or whether they have undergone tubal ligation, who meets the following criteria: 1) has achieved menarche at some point, 2) has not undergone a hysterectomy or bilateral oophorectomy; or 3) has not been naturally postmenopausal (amenorrhea following cancer therapy does not rule out childbearing potential) for at least 24 consecutive months (i.e., has had menses at any time in the preceding 24 consecutive months)
* Patient must not expect to conceive or father children by using accepted and effective method(s) of contraception or by abstaining from sexual intercourse for the duration of their participation in the study and for at least 6 months after the last dose of protocol treatment. Patients must not breastfeed while receiving protocol treatment and for one week (7 days) after the last dose of AMG 510 (sotorasib) and 2 months after the last dose of panitumumab
* Patients must not have neuropathy ≥ grade 2 within 14 days prior to registration/randomization
* Patients with treated brain metastases are eligible if follow-up brain imaging after central nervous system (CNS)-directed therapy shows no evidence of progression
* Human immunodeficiency virus (HIV)-infected patients no effective anti-retroviral therapy with undetectable viral load within 6 months are eligible for this trial
* 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 history, 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 trail, patients should be class 2B or better
* Total bilirubin =\< 1.5 x institutional upper limit of normal (ULN) (obtained ≤ 28 days prior to protocol registration/randomization)
* Aspartate aminotransferase (AST) (serum (glutamic-oxaloacetic transaminase \[SGOT\])/alanine aminotransferase (ALT) (serum glutamic pyruvic transaminase (\[SGPT\]) \< 3 x institutional upper limit of normal (obtained ≤ 28 days prior to protocol registration/randomization)
* Creatinine =\< 1.5 x institutional ULN OR creatinine clearance \> 50 mL/min/1.73 m\^2 for patients with creatinine levels \> 1.5 mg/dL as per Cockcroft-Gault (obtained ≤ 28 days prior to protocol registration/randomization)
* COHORT I: Patient must not have colorectal cancer or non-small cell lung cancer
* COHORT I: Patient must not have been previously treated with a KRAS G12C inhibitor
* COHORT II: Patient must have progressed after treatment at the recommended phase II dose (RP2D) of any KRAS G12C inhibitor

  * NOTE: Patients on cohort 1 who experience progression on Regimen 2 (AMG 510 \[sotorasib\] alone) may be eligible to enroll on cohort 2 and receive combination treatment with panitumumab and AMG 510 (sotorasib). Patients must meet performance status requirements and laboratory values as above and must be begin treatment within 7 days of enrollment. Migration to cohort 2 must take place within 6 months of progression, with no intervening anti-cancer therapy given.
  * NOTE: Cohort migration following disease progression is dependent on a slot being available. MATCHBox makes the new treatment assignment following initiation of a step 2 registration for this treatment trial
* COHORT II: Patient must not have been previously treated with a KRAS G12C inhibitor in combination with an EGFR inhibitor