A closed-loop drug-delivery system could improve chemotherap