Recent work has demonstrated that nonstimulatory endogenous peptides can enhance T cell recognition of antigen, but MHCI- and MHCII-restricted systems have generated very different results. MHCII-restricted TCRs need to interact with the nonstimulatory peptide-MHC (pMHC), showing peptide specificity for activation enhancers or coagonists. In contrast, the MHCI-restricted cells studied to date show no such peptide specificity for coagonists, suggesting that CD8 binding to noncognate MHCI is more important. Here we show how this dichotomy can be resolved by varying CD8 and TCR binding to agonist and coagonists coupled with computer simulations, and we identify two distinct mechanisms by which CD8 influences the peptide specificity of coagonism. Mechanism 1 identifies the requirement of CD8 binding to noncognate ligand and suggests a direct relationship between the magnitude of coagonism and CD8 affinity for coagonist pMHCI. Mechanism 2 describes how the affinity of CD8 for agonist pMHCI changes the requirement for specific coagonist peptides. MHCs that bind CD8 strongly were tolerant of all or most peptides as coagonists, but weaker CD8-binding MHCs required stronger TCR binding to coagonist, limiting the potential coagonist peptides. These findings in MHCI systems also explain peptide-specific coagonism in MHCII-restricted cells, as CD4-MHCII interaction is generally weaker than CD8-MHCI.