i dont think nanobot's should be self-replicating, instead we could have a system where we feed the bio-markers of tumor the system that generates couple of billions nanobots programmed to seek out and destroy those cells then overtime biodegrade into nothing. We don't even need to go all robotics, we could piggyback some virus/bacteria that is able to evade immune system, doesn't reproduce, can't mutate (which is important, if mutation is high than what you program it do is irrelevant as it can deviate from it), and simply just find the cells pre-programmed to be found and not even deliver poison, just mark them as targets for immune system.