This is most likely one of the “worms” that attach tomato which include tomato fruitworm,
tomato hornworm or similar pest. I would apply Bt (Dipel or Thuricide) or spinosad which is
listed in the ingredients as a biological control for these larvae. Any of the products I mentioned
can be used on pests whose adults are moths like caterpillars or “worms”.
by Robert Morris