This wild-looking little thing completely puzzled me. At first I was thinking beetle or month larva, until I got a look at the pictures on the computer screen. I made a couple of incorrect guesses before entomologist Greg Courtney pointed me in the right direction with Psychodidae. He suggested a possible genus of Thornburghiella, but could not rule out some other members of the tribe Pericomini.
The large free-living larvae of the Rhyacophila genus are among the best-known caddisflies, and for good reason, because their unique biology is both interesting to entomologists and compatible with trout fishing. There are over 100 species, and many of them can be important.
I collected this pupa and several like it from the same stream and on the same day as this larva. I suspect they're the same species. Every pupa I collected was in a brown casing like the one shown in one of the pictures below. I cut this pupa out of its case after a picture so you can see more details. It is close to but not fully developed.