I jointly use daily data on deaths and public transportation ridership in San Francisco in 1918–19 to estimate a model in which agents choose their level of economic activity based on perceived infection risk, modeled as a function of current and lagged infections or deaths. Agents’ choices in turn affect the dynamics of the epidemic by reducing contacts in an otherwise standard SEIR model. Non-pharmaceutical interventions restrict agents’ activity either as a tax or a bound. I estimate the parameters by maximum likelihood and use the best-fitting model to compute counterfactuals. San Francisco’s intervention reduced deaths by a few percent only, and it was away from the Pareto frontier: an earlier and milder intervention would have done better. The behavioral feedback narrows the room for intervention compared to a model with unresponsive agents, and ill-timed interventions can worsen outcomes. Masks also had an effect on transmission rates.