Although it looks like a caterpillar, this larva is not going to metamorphose into a butterfly or moth. This is because it is a sawfly larva, and is closely related to bees and wasps. (It gets its name from the adult female’s saw-like, egg-laying ovipositor that opens like a jack-knife from the tip of her abdomen.)There are several ways to distinguish between these two types of larvae (sawflies and butterflies/moths). While both have three pairs of true legs on their thorax, caterpillars (larvae of moths and butterflies) have up to five pairs of prolegs (fleshy structures that resemble legs) located on their abdomen behind their true legs, while sawfly larvae have six or more pairs. A closer look at the tips of the prolegs on caterpillars will reveal tiny hooks called “crochets,” which are lacking on sawfly larvae prolegs. Sawfly larvae also exhibit distinctive behavior. If you see something that looks like a caterpillar feeding along the margin of a leaf and it rears up its hind end when disturbed (perhaps to frighten predators), chances are great that you are looking at a sawfly larva.
Sawflies are often mistaken for wasps, but there are subtle differences in appearance, including the thick “waist” of a sawfly compared to the threadlike waist of a wasp. Their common name comes from the females’ sawlike ovipositor which they use to cut into plants and lay their eggs. Certain species of sawflies overwinter as pupae inside cocoons that they attach lengthwise to twigs. These cocoons are fairly small (the pictured cocoon is just over ¼” long). Sawfly cocoons persist even after the adults emerge in the spring, as they are made of very tough material. Look for capped cocoons during late fall and winter, and empty cocoons, sometimes with the cap still attached, the rest of the year.