Barrier tissues are primary targets of environmental stressors and are home to the largest number of antigen-experienced lymphocytes in the body, including commensal-specific T cells. We found that skin-resident commensal-specific T cells harbor a paradoxical program characterized by a type 17 program associated with a poised type 2 state. Thus, in the context of injury and exposure to inflammatory mediators such as interleukin-18, these cells rapidly release type 2 cytokines, thereby acquiring contextual functions. Such acquisition of a type 2 effector program promotes tissue repair. Aberrant type 2 responses can also be unleashed in the context of local defects in immunoregulation. Thus, commensal-specific T cells co-opt tissue residency and cell-intrinsic flexibility as a means to promote both local immunity and tissue adaptation to injury.