Commitment to the T and natural killer T (NKT) cell lineages is determined during alphabeta T cell receptor (TCR)-mediated interactions of common precursors with ligand-expressing cells in the thymus. Whereas mainstream thymocyte precursors recognize major histocompatibility complex (MHC) ligands expressed by stromal cells, NKT cell precursors interact with CD1d ligands expressed by cortical thymocytes. Here, we demonstrated that such homotypic T-T interactions generated "second signals" mediated by the cooperative engagement of the homophilic receptors Slamf1 (SLAM) and Slamf6 (Ly108) and the downstream recruitment of the adaptor SLAM-associated protein (SAP) and the Src kinase Fyn, which are essential for the lineage expansion and differentiation of the NKT cell lineage. These receptor interactions were required during TCR engagement and therefore only occurred when selecting ligands were presented by thymocytes rather than epithelial cells, which do not express Slamf6 or Slamf1. Thus, the topography of NKT cell ligand recognition determines the availability of a cosignaling pathway that is essential for NKT cell lineage development.