Inclusion
Age \>= 18 years
Pilot study (group 1): Histologic confirmation of intrahepatic CCA (Closed as of amendment 3)
Phase II study (group 2): Histologic and/or radiologic confirmation of hepatocellular carcinoma (HCC)
Phase II study (group 3): Histologic confirmation of intrahepatic cholangiocarcinoma (iCCA)
The following tumor characteristics must be met
Unresectable disease: HCC (group 2) or intrahepatic CCA (group 3)
Measurable or evaluable disease
All lesions should be treatable by EBRT while meeting normal tissue constraints
Tumor lesions should be accessible using an ultrasound (US)-guided approach for intratumoral DC injection
No evidence of extrahepatic tumor (excluding tumor thrombus) by computed tomography (CT) or magnetic resonance imaging (MRI) scan
NOTE: Patients who are not candidates for surgical treatment or for ablation with curative intent are allowed
Good candidate for standard of care high-dose conformal EBRT in the view of the investigator
Eastern Cooperative Oncology Group (ECOG) performance status (PS) 0 or 1
GROUP 2 HCC ONLY: Absolute neutrophil count (ANC) \>= 1000/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Absolute lymphocyte count (ALC) \>= 500/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Absolute monocyte count (AMC) \>= 300/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Platelet count \>= 50,000/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Hemoglobin \>= 9.0 g/dL (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Total bilirubin \< 1.5 mg/dL (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Aspartate aminotransferase (AST) and alanine aminotransferase (ALT) =\< 5 x upper limit of normal (ULN) (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Creatinine =\< 2 mg/dL (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Prothrombin time (PT)/international normalized ratio (INR)/activated partial thromboplastin time (aPTT) =\< 1.5 x ULN (obtained =\< 15 days prior to registration)
GROUP 2 HCC ONLY: Absence of proteinuria at screening as demonstrated by one of the following:
Urine protein/creatinine (UPC) ratio \< 1.0 at screening OR
Urine dipstick for proteinuria \< 2+ (patients discovered to have \>= 2+ proteinuria on dipstick urinalysis at baseline should undergo a 24-hour urine collection and must demonstrate =\<1g of protein in 24 hours to be eligible)
GROUP 3 iCCA ONLY: Absolute neutrophil count (ANC) ≥ 1000/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: Absolute lymphocyte count ≥ 500/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: Absolute monocyte count ≥ 300/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: Platelet count ≥ 50,000/mm\^3 (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: Hemoglobin ≥ 9.0 g/dL (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: Total bilirubin \< 1.5 x ULN (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: Aspartate aminotransferase (AST) and alanine aminotransferase (ALT) and alkaline phosphatase (ALP) ≤ 2.5 x ULN (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: Creatinine ≤ 2 mg/dL (obtained =\< 15 days prior to registration)
GROUP 3 iCCA ONLY: PT/INR/aPTT ≤ 1.5 x ULN (obtained =\< 15 days prior to registration)
NOTE: If patient is receiving therapeutic anticoagulation, patient must be on a stable anticoagulant regimen
Ability to provide written consent
Willingness to return to enrolling institution for follow-up (during the active monitoring phase of the study)
Willingness to provide blood and tissue samples for correlative research purposes
Exclusion
Any of the following because this study involves an investigational agent, the genotoxic, mutagenic and teratogenic effects of which on the developing fetus and newborn are unknown:
Pregnant persons
Nursing persons
Persons of childbearing potential who are unwilling to employ highly effective contraception during heterosexual intercourse while on this study and for 5 months after the last dose of study medication
Co-morbid systemic illnesses or other severe concurrent disease which, in the judgment of the investigator, would make the patient inappropriate for entry into this study or interfere significantly with the proper assessment of safety and toxicity of the prescribed regimens
Immunocompromised patients and patients known to be HIV positive.
NOTE: Patients known to be HIV positive, but without clinical evidence of an immunocompromised state, are eligible for this trial if they are stable on anti-retroviral therapy, have a CD4+ T cell count ≥ 200/uL, and have an undetectable viral load
Uncontrolled intercurrent illness including, but not limited to:
Ongoing or active infection requiring systemic treatment or that could impact patient safety
Severe infection ≤ 4 weeks prior to registration, including, but not limited to, hospitalization for complications of infection, bacteremia, or severe pneumonia
Significant cardiovascular disease (New York Heart Association \[NYHA\] class II), symptomatic congestive heart failure, unstable angina pectoris, cardiac arrhythmia
Or, psychiatric illness/social situations (e.g., substance abuse) that would limit compliance with study requirements
Receiving any other investigational agent that would be considered a treatment for the primary neoplasm
Other active malignancy =\< 1 year prior to registration that is considered by the investigator to interfere with the current treatment or measurement of outcomes
Major surgery =\< 4 weeks prior to enrollment (other than diagnostic surgery or surgical spacer placement in preparation for radiation treatment), or anticipation of need for a major surgical procedure during the study
History of hypersensitivity or anaphylactoid reactions to pneumococcal vaccine or any component of the formulation, including diphtheria toxoid
Active or history of autoimmune disease or immune deficiency, including but not limited to,myasthenia gravis, myositis, autoimmune hepatitis, Crohn's disease, inflammatory bowel disease, antiphospholipid antibody syndrome, rheumatoid arthritis, Sjogren syndrome, systemic lupus erythematosus, Guillain-Barre syndrome, multiple sclerosis, Wegener granulomatosis, or similar conditions
NOTE: Exceptions are allowed for:
Patients with hypothyroidism on thyroid replacement therapy
Patients with type 1 diabetes mellitus on insulin regimen
Patients with eczema, psoriasis lichen simplex chronicus, or vitiligo with dermatologic manifestations only (e.g., patients with psoriatic arthritis are excluded) are eligible for the study provided all of the following conditions are met:
Rash must cover \< 10% of body surface area
Disease is well controlled at baseline and requires only low-potency topical corticosteroids
There has been no occurrence of acute exacerbations of the underlying condition requiring psoralen plus ultraviolet A radiation, methotrexate, retinoids, biologic agents, oral calcineurin inhibitors, or high potency or oral corticosteroids ≤ 12 months prior to registration
Requires anticoagulant treatment (INR \> 1.5 x ULN) or use of anti-platelet agents that cannot be discontinued for the intratumoral injection procedure
NOTE: Heparin for line patency without detectable lab abnormalities in coagulation will be allowed
Corticosteroids =\< 2 weeks prior to registration, including oral, intravenous (IV), subcutaneous, or inhaled routes of administration
NOTE: Patients on chronic corticosteroids for adrenal insufficiency or other reasons may enroll if they receive less than 10 mg/day of prednisone (or equivalent)
NOTE: Exception allowed for patients who need prophylactic steroids prior to imaging for contrast allergies
Exception: Patients who received acute, low-dose systemic immunosuppressant medication or a one-time pulse dose of systemic immunosuppressant medication (e.g., 48 hours of corticosteroids for a contrast allergy) are eligible for the study
Exception: Patients who received mineralocorticoids (e.g., fludrocortisone), corticosteroids for chronic obstructive pulmonary disease (COPD) or asthma, or low-dose corticosteroids for orthostatic hypotension or adrenal insufficiency are eligible for the study
History of myocardial infarction =\< 6 months, or congestive heart failure requiring use of ongoing maintenance therapy for life-threatening ventricular arrhythmias
Child Pugh class B or C cirrhosis of the liver
Previously received immune modulating therapies including but not limited to immune checkpoint inhibitors targeting PD-1 PDL-1 CTLA4, etc.; or prior dendritic cell therapy
Prior liver radiation, including radioembolization
GROUP 2 ONLY: Barcelona Clinic Liver Cancer (BCLC) stage D disease
GROUP 2 ONLY: History of untreated high-risk gastroesophageal varices
Active tuberculosis
Treatment with therapeutic oral or IV antibiotics ≤ 2 weeks prior to registration
NOTE: Exception for patients receiving prophylactic antibiotics (e.g., to prevent a urinary tract infection or chronic obstructive pulmonary disease exacerbation) are eligible for the study
Prior allogeneic stem cell or solid organ transplantation
Treatment with a live, attenuated vaccine ≤ 4 weeks prior to registration