Samotolisib in Treating Patients With Relapsed or Refractory Advanced Solid Tumors, Non-Hodgkin Lymphoma, or Histiocytic Disorders With TSC or PI3K/MTOR Mutations (A Pediatric MATCH Treatment Trial)

This phase II Pediatric MATCH trial studies how well samotolisib works in treating patients with solid tumors, non-Hodgkin lymphoma, or histiocytic disorders with TSC or PI3K/MTOR mutations that have spread to other places in the body (metastatic) and have come back (recurrent) or do not respond to treatment (refractory). Samotolisib may stop the growth of cancer cells by blocking some of the enzymes needed for cell growth.

PRIMARY OBJECTIVE:

I. To determine the objective response rate (ORR; complete response + partial response) in pediatric patients treated with samotolisib (LY3023414) with advanced solid tumors, non-Hodgkin lymphomas or central nervous system (CNS) tumors that harbor TSC loss of function mutations, and/or other PI3K/MTOR activating mutations.

SECONDARY OBJECTIVES:

I. To estimate the progression free survival in pediatric patients treated with LY3023414 with advanced solid tumors, non-Hodgkin lymphomas or CNS tumors that harbor TSC loss of function mutations, and/or other PI3K/MTOR activating mutations.

II. To obtain information about the tolerability of LY3023414 in children with relapsed or refractory cancer.

III. To characterize the pharmacokinetics of LY3023414 in children with recurrent or refractory cancer.

EXPLORATORY OBJECTIVES:

I. To increase knowledge of the genomic landscape of relapsed pediatric solid tumors and lymphomas and identify potential predictive biomarkers (other than the genomic alteration for which study treatment was assigned) using additional genomic, transcriptomic, and proteomic testing platforms.

II. To explore approaches to profiling changes in tumor genomics over time through evaluation of circulating tumor deoxyribonucleic acid (DNA).

III. To evaluate the frequency and mechanism of biallelic loss of function, and evaluate the expression of TSC1, TSC2, and PTEN in subjects who enroll with a loss of function mutation in one of these genes.

OUTLINE: This is a dose-escalation study.

Patients receive samotolisib orally (PO) twice daily (BID) on days 1-28. Treatment repeats every 28 days for up to 6 cycles in the absence of disease progression or unexpected toxicity. Patients undergo an x-ray, computed tomography (CT), magnetic resonance imaging (MRI), fludeoxyglucose F-18 (FDG)-position emission tomography (FDG-PET), and blood sample collection on study.

After completion of study treatment, patients are followed up periodically.

Eligibility Criteria:
Inclusion Criteria:

* Patient must have enrolled onto APEC1621SC/NCI-2017-01251/ NCT03155620 and must have been given a treatment assignment to Molecular Analysis for Therapy Choice (MATCH) to APEC1621D based on the presence of an actionable mutation as defined in APEC1621SC; note that treatment assignment may be to primary cohort A for patients with TSC1 or TSC2 loss of function mutations or primary cohort B for patients with other PI3K/MTOR pathway mutations
* Patients accruing to dose level 1 must have a body surface area \>= 0.52 m\^2 at the time of study enrollment; patients accruing to dose level 2 must have a body surface area \>= 0.37 m\^2 at the time of study enrollment; patients accruing to dose level -1 must have a body surface area \>= 0.75 m\^2 at the time of study enrollment
* Patients must have radiographically measurable disease at the time of study enrollment; patients with neuroblastoma who do not have measurable disease but have metaiodobenzylguanidine (MIBG) positive (+) evaluable disease are eligible; measurable disease in patients with CNS involvement is defined as any lesion that is at minimum 10 mm in one dimension on standard magnetic resonance imaging (MRI) or computed tomography (CT)

  * Note: The following do not qualify as measurable disease:

    * Malignant fluid collections (e.g., ascites, pleural effusions)
    * Bone marrow infiltration except that detected by MIBG scan for neuroblastoma
    * Lesions only detected by nuclear medicine studies (e.g., bone, gallium or positron emission tomography \[PET\] scans) except as noted for neuroblastoma
    * Elevated tumor markers in plasma or cerebrospinal fluid (CSF)
    * Previously radiated lesions that have not demonstrated clear progression post radiation
    * Leptomeningeal lesions that do not meet the measurement requirements for Response Evaluation Criteria in Solid Tumors (RECIST) 1.1
    * Bone lesions without an associated soft tissue mass \>= 10 mm in greatest diameter; bone lesions with an associated soft tissue mass \>= 10 mm in greatest diameter imaged by CT or MRI are considered measurable
* Karnofsky \>= 50% for patients \> 16 years of age and Lansky \>= 50 for patients =\< 16 years of age; Note: neurologic deficits in patients with CNS tumors must have been stable for at least 7 days prior to study enrollment; patients who are unable to walk because of paralysis, but who are up in a wheelchair, will be considered ambulatory for the purpose of assessing the performance score
* Patients must have fully recovered from the acute toxic effects of all prior anti-cancer therapy and must meet the following minimum duration from prior anti-cancer directed therapy prior to enrollment; if after the required timeframe, the numerical eligibility criteria are met, e.g. blood count criteria, the patient is considered to have recovered adequately

  * Cytotoxic chemotherapy or other anti-cancer agents known to be myelosuppressive; \>= 21 days after the last dose of cytotoxic or myelosuppressive chemotherapy (42 days if prior nitrosourea)
  * Anti-cancer agents not known to be myelosuppressive (e.g. not associated with reduced platelet or absolute neutrophil count \[ANC\] counts): \>= 7 days after the last dose of agent
  * Antibodies: \>= 21 days must have elapsed from infusion of last dose of antibody, and toxicity related to prior antibody therapy must be recovered to grade =\< 1
  * Corticosteroids: if used to modify immune adverse events related to prior therapy, \>= 14 days must have elapsed since last dose of corticosteroid
  * Hematopoietic growth factors: \>= 14 days after the last dose of a long-acting growth factor (e.g. pegfilgrastim) or 7 days for short-acting growth factor; for growth factors that have known adverse events occurring beyond 7 days after administration, this period must be extended beyond the time during which adverse events are known to occur; the duration of this interval must be discussed with the study chair and the study-assigned research coordinator
  * Interleukins, interferons and cytokines (other than hematopoietic growth factors): \>= 21 days after the completion of interleukins, interferon or cytokines (other than hematopoietic growth factors)
  * Stem cell Infusions (with or without total body irradiation \[TBI\]):

    * Allogeneic (non-autologous) bone marrow or stem cell transplant, or any stem cell infusion including donor lymphocyte infusion (DLI) or boost infusion: \>= 84 days after infusion and no evidence of graft versus host disease (GVHD)
    * Autologous stem cell infusion including boost infusion: \>= 42 days
  * Cellular therapy: \>= 42 days after the completion of any type of cellular therapy (e.g. modified T cells, natural killer \[NK\] cells, dendritic cells, etc.)
  * Radiation therapy (XRT)/external beam irradiation including protons: \>= 14 days after local XRT; \>= 150 days after TBI, craniospinal XRT or if radiation to \>= 50% of the pelvis; \>= 42 days if other substantial bone marrow (BM) radiation

    * Note: radiation may not be delivered to "measurable disease" tumor site(s) being used to follow response to subprotocol treatment
  * Radiopharmaceutical therapy (e.g., radiolabeled antibody, iobenguane I-131 \[131I-MIBG\]): \>= 42 days after systemically administered radiopharmaceutical therapy
  * Patients must not have received prior exposure to LY3023414
  * Patients must not have received prior exposure to an agent specifically directed at the PI3K/MTOR pathway (a PI3K inhibitor, an AKT inhibitor, an MTOR inhibitor, including rapalogs, or a combined PI3K/MTOR inhibitor)
* For patients with solid tumors without known bone marrow involvement:

  * Peripheral absolute neutrophil count (ANC) \>= 1000/mm\^3
  * Platelet count \>= 100,000/mm\^3 (transfusion independent, defined as not receiving platelet transfusions for at least 7 days prior to enrollment)
* Patients with known bone marrow metastatic disease will be eligible for study provided they meet the blood counts (may receive transfusions provided they are not known to be refractory to red cell or platelet transfusions); these patients will not be evaluable for hematologic toxicity
* Creatinine clearance or radioisotope glomerular filtration rate (GFR) \>= 70 ml/min/1.73 m\^2 or a serum creatinine based on age/gender as follows:

  * Age: 1 to \< 2 years; maximum serum creatinine (mg/dL): male 0.6; female 0.6
  * Age: 2 to \< 6 years; maximum serum creatinine (mg/dL): male 0.8; female 0.8
  * Age: 6 to \< 10 years; maximum serum creatinine (mg/dL): male 1; female 1
  * Age: 10 to \< 13 years; maximum serum creatinine (mg/dL): male 1.2; female 1.2
  * Age: 13 to \< 16 years; maximum serum creatinine (mg/dL): male 1.5; female 1.4
  * Age: \>= 16 years; maximum serum creatinine (mg/dL): male 1.7; female 1.4
* Bilirubin (sum of conjugated + unconjugated) =\< 1.5 x upper limit of normal (ULN) for age
* Serum glutamate pyruvate transaminase (SGPT) (alanine aminotransferase \[ALT\]) =\< 135 U/L; (for the purpose of this study, the ULN for SGPT is 45 U/L)
* Serum albumin \>= 2 g/dL
* Patients must have a normal blood sugar level for age; if an initial random draw (i.e. non-fasting) blood glucose value is out of range, it is acceptable to repeat this test as a fasting draw
* Patients must have a serum triglyceride level =\< 300 mg/dL and serum cholesterol level =\< 300 mg/dL; if an initial random draw (i.e. non-fasting) is out of range, it is acceptable to repeat this test as a fasting draw
* Patients with seizure disorder may be enrolled if on anticonvulsants and well controlled
* Nervous system disorders (by Common Terminology Criteria for Adverse Events version 5.0 \[CTCAE V 5.0\]) resulting from prior therapy must be =\< grade 2, with the exception of decreased tendon reflex (DTR); any grade of DTR is eligible
* Corrected QT (QTc) interval =\< 480 milliseconds
* Patients must be able to swallow intact tablets
* All patients and/or their parents or legally authorized representatives must sign a written informed consent; assent, when appropriate, will be obtained according to institutional guidelines

Exclusion Criteria:

* Pregnant or breast-feeding women will not be entered on this study; pregnancy tests must be obtained in girls who are post-menarchal; males or females of reproductive potential may not participate unless they have agreed to use an effective contraceptive method while receiving study treatment and for 3 months after the last dose of LY3023414
* Concomitant medications

  * Corticosteroids: patients receiving corticosteroids who have not been on a stable or decreasing dose of corticosteroid for at least 7 days prior to enrollment are not eligible; if used to modify immune adverse events related to prior therapy, \>= 14 days must have elapsed since last dose of corticosteroid
  * Investigational drugs: patients who are currently receiving another investigational drug are not eligible
  * Anti-cancer agents: patients who are currently receiving other anti-cancer agents are not eligible
  * Anti-GVHD agents post-transplant: patients who are receiving cyclosporine, tacrolimus or other agents to prevent graft-versus-host disease post bone marrow transplant are not eligible for this trial
* Patients who have an uncontrolled infection are not eligible
* Patients who have insulin dependent diabetes are not eligible
* Patients who have received a prior solid organ transplantation are not eligible
* Patients with subependymal giant cell astrocytomas (SEGAs) are not eligible
* Patients who in the opinion of the investigator may not be able to comply with the safety monitoring requirements of the study are not eligible