Chris Grinter agrees with me that this photo is of a sawfly in the genus Dimorphopteryx.
I first saw some photos of similar sawflies in this book:
Their Natural History and Diversity
by Stephen A. Marshall
I then found some images on BugGuide.
It really is an odd looking critter. If I’d instead shown this view, it would have been more obvious, I think, that it’s a sawfly.
Here you can see the horns just behind the head.
Marshall reports that the “tubercle behind the head is eversible, and sticks out like a snake’s tongue when the insect is disturbed.” Cool. I wish I’d known that when I encountered it. I would have tried to coax it into displaying that behavior.
I’ll certainly be on the lookout for these in the future. Since this is the first one I’ve ever seen, I don’t anticipate finding another one anytime soon.