This Common Pug inchworm caterpillar is dropping frass away from itself. Some parasitoids find caterpillars from the smell of their frass. This inchworm’s defense is to drop the “droppings” off the plant.
It then does some “inching”. A “regular” caterpillar probably could not navigate this thistle bloom. Notice the coloration of the caterpillar closely matches the green leaves under the thistle bloom.
For Encyclopedia of Life entry for this species: Eupithecia miserulata. For BugGuide.net entry: Eupithecia miserulata.