Cooperation is essential to reap efficiency gains from specialization, not least in poor communities where economic transactions are often informal. Yet, cooperation might be more difficult to sustain under scarcity, since defecting from a cooperative equilibrium can yield safe, short-run benefits. In this study, we investigate how scarcity affects cooperation by leveraging exogenous variation in economic conditions induced by the Msimu harvest in rural Tanzania. We document significant changes in food consumption between the pre- and post-harvest period, and show that lean season scarcity reduces socially efficient but personally risky investment in a framed investment game. This can contribute to what is commonly referred to as a behavioral poverty trap.