A. Your description sounds like European Sawfly Larvae. The description below from a website left no doubt in my mind. Note the last paragraph in particular...
Several varieties of pine sawfly larvae feed on many types of conifers across the United States. The European pine sawfly is one of the more common varieties. They feed on Scotch, mugho, red, jack, and other pine trees in the eastern and southern U.S. The larvae look like caterpillars, but they are the young of a non-stinging wasp. The female adult will lay her eggs into a group of needles that are next to each other. She has a saw-like organ that makes a small cut into the needle in order to deposit her eggs. The eggs generally hatch before the new growth – often called 'candles' – has started. Therefore, they will feed on the older needles on one branch before moving to another branch. The larvae will reach about 1” in length, are dark green, and have a black head. In late May to early June, the larvae will drop to the ground and spin a cocoon. The adults emerge in early fall, mate, and lay eggs. The larvae are normally found in groups of about 30. They can quickly defoliate several branches on the tree. They generally do not feed on the newest growth, so the tree will survive, but in a weakened state.
Selective pruning can control minor infestations of European pine sawfly larvae. If the larvae are small (1/8 to1/4“ in length), then summer horticultural oils or insecticidal soaps can be used.
The European pine sawfly larvae will rear-up in unison when disturbed. It is a fascinating sight to see the little green 'soldiers' all come to attention when one is threatened or touched. It is most likely a reaction to scare away a predator, such as a bird or parasitic insect. The quick response would appear to be threatening and would probably frighten most any attacker. It almost looks like the branch has come alive.
Some resources (both online and in print) you can use to identify pests:
- The Digital Guide to Nursery and Landscape Arthropod Pests of Ontario
- University of Guelph Insect Collection
- Canadian Journal of Arthropod Identification
- You can find out what pests are "in season" using the OMAFRA Nursery and Landscape Report
- A good publication called Common Pests, Diseases & Disorders of Ornamental Trees & Shrubs by the Ohio Nursery & Landscape Association.