Eligibility Criteria:
Inclusion Criteria:
* Histologically or cytologically confirmed small cell lung cancer (SCLC)
* Extensive stage SCLC
* Extensive stage disease: the extensive disease classification for this protocol includes all patients with disease sites not defined as limited stage; limited stage disease category includes patients with disease restricted to one hemithorax with regional lymph node metastases, including hilar, ipsilateral and contralateral mediastinal, and/or ipsilateral supraclavicular nodes; extensive disease patients are defined as those patients with extrathoracic metastatic disease, malignant pleural effusion, bilateral or contralateral supraclavicular adenopathy
* Measurable disease based on Response Evaluation Criteria in Solid Tumors (RECIST); baseline measurements and evaluations of all sites of disease must be obtained =\< 4 weeks prior to randomization
* Eastern Cooperative Oncology Group (ECOG) performance status 0 or 1
* Absolute neutrophil count (ANC) \>= 1,500/mm\^3
* Platelets \>= 100,000/mm\^3
* Total bilirubin =\< 1.5 x institutional upper limit of normal (ULN)
* Aspartate aminotransferase (AST) (serum glutamic oxaloacetic transaminase)/alanine aminotransferase (ALT) (serum glutamate pyruvate transaminase) =\< 3 x institutional ULN (=\< 5 x ULN if liver function test \[LFT\] elevations are due to liver metastases)
* Creatinine =\< 1.5 x institutional ULN OR creatinine clearance \>= 60 mL/min/1.73 m\^2 for patients with creatinine levels \> 1.5 x institutional ULN
* Leukocytes \>= 3,000/mm\^3
* Hemoglobin \>= 9 g/dL
* Fasting serum glucose \< 120 mg/dL or below institutional ULN =\< 7 days prior to protocol randomization
* Patients with central nervous system (CNS) metastases will be eligible if they have completed a course of CNS radiotherapy and have stable neurologic function for a minimum of 28 days prior to study randomization; radiotherapy must have been completed a minimum of 28 days prior to randomization, and patients must have recovered from any adverse events related to the radiotherapy (except alopecia and grade 1 neuropathy) and have stable neurologic function for a minimum of 28 days prior to study randomization
* NOTE: the use of prophylactic cranial irradiation (recommended dose 25 Gy) in those who completed protocol chemotherapy and have a response (in the absence of progressive disease \[PD\]) is allowed; for patients on Arms B and C, GDC-0449 and IMC-A12 will be held while patient is receiving prophylactic cranial irradiation (PCI); these agents can be reinstituted after PCI is completed
* Women of child-bearing potential (WCBP) and men must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) prior to study entry and for the duration of study participation
* WCBP must agree to use two reliable forms of contraception simultaneously or to practice complete abstinence from heterosexual intercourse; the two methods of reliable contraception must include one highly effective method (i.e., intrauterine device \[IUD\], hormonal \[birth control pills, injections, or implants\], tubal ligation, partner?s vasectomy) and one additional effective (barrier) method (i.e., latex condom, diaphragm, cervical cap); WCBP must be referred to a qualified provider of contraceptive methods if needed
* NOTE: the WCBP randomized to Arm B must agree to use two reliable forms of contraception simultaneously or to practice complete abstinence from heterosexual intercourse during the following two additional time periods related to this study: 1) while participating in the study; and 2) for at least 12 months after discontinuation from the study
* Before starting the study drugs, all WCBP must have a negative pregnancy test (sensitivity of at least 50 mIU/mL); the pregnancy test must be performed within 10-14 days prior to randomization
* NOTE: the WCBP randomized to Arm B must have a second pregnancy test performed within the 24 hours prior to the start of the GDC-0449; the subject may not receive GDC-0449 until the investigator has verified that the results of these pregnancy tests are negative
* The WCBP randomized to Arm B will be warned that sharing the study drug is prohibited and will be counseled about pregnancy precautions and potential risks or fetal exposure; she must also agree to abstain from donating blood during study participation and at least 12 months after discontinuation from the study drug
* NOTE: male subjects randomized to Arm B must agree to use a latex condom during sexual contact with WCBP while participating in the study and for at least 12 months following discontinuation from the study even if he has undergone a successful vasectomy
* Male subjects randomized to Arm B will be warned that sharing study drug is prohibited and will be counseled about pregnancy precautions and potential risks of fetal exposure; male subjects must agree to abstain from donating blood, semen, or sperm during study participation and for at least 3 months after discontinuation from the study drug
Exclusion Criteria:
* Pregnant or breastfeeding; all WCBP must have a blood test within 10-14 days prior to randomization to rule out pregnancy
* Prior chemotherapy or biologic therapy for SCLC; patients with prior radiation may be eligible or after palliative radiotherapy for other sites of disease; patients receiving prior radiation cannot start therapy within 14 days after completion of radiation, and must have recovered from adverse events attributed to radiation; no previous irradiation to the only site of measurable or evaluable disease, unless that site had subsequent evidence of progression
* Receiving any other investigational agents
* History of allergic reactions attributed to compounds of similar chemical or biological composition to GDC-0449 and IMC-A12 or other agents used in the study
* Uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, symptomatic congestive heart failure, unstable angina pectoris, uncontrolled cardiac arrhythmia, or psychiatric illness/social situations that would limit compliance with study requirements
* Human immunodeficiency virus (HIV)-positive patients on combination antiretroviral therapy
* Poorly controlled diabetes mellitus; patients with a history of diabetes mellitus are allowed to participate, provided that their blood glucose is within normal range (fasting \< 120 mg/dL or below institutional upper limit of normal) and that they are on a stable dietary or therapeutic regimen for this condition
* Patients with major surgery, hormonal therapy (other than replacement), within 4 weeks prior to entering the study or those who have not recovered from adverse events
* Prior treatment with other agents targeting the IGFR or the Hedgehog signaling pathway