Billions of dollars have been spent on pilot programs searching for ways to reduce healthcare costs. I study one such program, where hospitals pay doctors bonuses for reducing the total hospital costs of admitted Medicare patients (a “bundled payment”). Doctors respond to the bonuses by becoming more likely to admit patients whose treatment can generate high bonuses, and sorting healthier patients into participating hospitals. Conditional on patient health, however, doctors do not reduce costs or change procedure use. These results highlight the ability of doctors to game incentive schemes, and the risks of basing nationwide healthcare reforms on pilot programs.