A common principle of tissue regeneration is the reactivation of previously employed developmental programs. During zebrafish heart regeneration, cardiomyocytes in the cortical layer of the ventricle induce the transcription factor gene gata4 and proliferate to restore lost muscle. A dynamic cellular mechanism initially creates this cortical muscle in juvenile zebrafish, where a small number of internal cardiomyocytes breach the ventricular wall and expand upon its surface. Here, we find that emergent juvenile cortical cardiomyocytes induce expression of gata4 in a manner similar to during regeneration. Clonal analysis indicates that these cardiomyocytes make biased contributions to build the ventricular wall, whereas gata4(+) cardiomyocytes have little or no proliferation hierarchy during regeneration. Experimental microinjuries or conditions of rapid organismal growth stimulate production of ectopic gata4(+) cortical muscle, implicating biomechanical stress in morphogenesis of this tissue and revealing clonal plasticity. Induced transgenic inhibition defined an essential role for Gata4 activity in morphogenesis of the cortical layer and the preservation of normal cardiac function in growing juveniles, and again in adults during heart regeneration. Our experiments uncover an injury-responsive program that prevents heart failure in juveniles by fortifying the ventricular wall, one that is reiterated in adults to promote regeneration after cardiac damage.