A large literature has documented the positive effects of conditional cash transfer programs on school enrollment. However, evidence on their learning impacts is mixed and provides little insights into the mechanisms at play. Using a regression discontinuity analysis of a program implemented at scale in Morocco, we identify a substantial decrease in dropout rates in treated municipalities, which increased both class size and heterogeneity in class composition, and ultimately had negative impacts on children’s test scores. These patterns indicate that, when there is a lack of coordinated supply-side responses, conditional cash transfer programs can constrain learning by putting additional pressure on existing resources. They also highlight the importance of class size and composition for children learning.