Finding a large green tomato hornworm caterpillar on your tomato plant is never a good sign – unless, that is, it has small white capsules attached all over its back. The white capsules on its back, frequently mistaken for "hornworm eggs" are actually the pupal stage of a tiny wasp called a Braconid. As Braconid larvae, these wasps fed on the insides of this hornworm and have now completed that feeding and are preparing to emerge as tiny wasps. Under such circumstances, the hornworm caterpillar might be capable of slow sluggish movement but is incapable of further feeding and will die very shortly. In the meantime it serves a very valuable function as a nursery for these wasps. When they emerge, the adult wasps will fly off to hunt for other hornworms to parasitize. So, if you leave the parasitized hornworm in place and allow the parasites to emerge, you are in effect killing many other hornworms in the vicinity.
I call this good luck!